@adobe/magento-storefront-event-collector 1.1.3 → 1.1.6
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/README.md +15 -2
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +5 -2
- package/dist/types/src/alloy.d.ts +1 -1
- package/dist/types/src/contexts/dataServicesExtension.d.ts +4 -0
- package/dist/types/src/contexts/index.d.ts +3 -0
- package/dist/types/src/contexts/recommendationsExtension.d.ts +4 -0
- package/dist/types/src/contexts/searchExtension.d.ts +4 -0
- package/dist/types/src/handlers/checkout/index.d.ts +2 -0
- package/dist/types/src/handlers/checkout/instantPurchaseAEP.d.ts +4 -0
- package/dist/types/src/handlers/checkout/placeOrderAEP.d.ts +4 -0
- package/dist/types/src/handlers/page/index.d.ts +1 -1
- package/dist/types/src/handlers/product/addToCartAEP.d.ts +4 -0
- package/dist/types/src/handlers/product/index.d.ts +2 -0
- package/dist/types/src/handlers/product/viewAEP.d.ts +3 -0
- package/dist/types/src/handlers/search/index.d.ts +2 -0
- package/dist/types/src/handlers/search/searchRequestSentAEP.d.ts +3 -0
- package/dist/types/src/handlers/search/searchResponseReceivedAEP.d.ts +3 -0
- package/dist/types/src/handlers/shoppingCart/abandonCart.d.ts +3 -0
- package/dist/types/src/handlers/shoppingCart/abandonCartAEP.d.ts +3 -0
- package/dist/types/src/handlers/shoppingCart/index.d.ts +5 -0
- package/dist/types/src/handlers/shoppingCart/initiateCheckout.d.ts +3 -0
- package/dist/types/src/handlers/shoppingCart/initiateCheckoutAEP.d.ts +3 -0
- package/dist/types/src/handlers/shoppingCart/viewAEP.d.ts +4 -0
- package/dist/types/src/schemas.d.ts +3 -0
- package/dist/types/src/types/aep/beaconSchema.d.ts +10 -0
- package/dist/types/src/types/aep/commerce.d.ts +80 -0
- package/dist/types/src/types/aep/index.d.ts +4 -0
- package/dist/types/src/types/aep/pageView.d.ts +11 -0
- package/dist/types/src/types/aep/productListItem.d.ts +38 -0
- package/dist/types/src/utils/aep/order.d.ts +4 -0
- package/dist/types/src/utils/aep/productListItems.d.ts +9 -0
- package/dist/types/src/utils/discount.d.ts +3 -0
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -56,14 +56,27 @@ The collector then begins listening for the following events.
|
|
|
56
56
|
- `searchSuggestionClick`
|
|
57
57
|
- `shoppingCartView`
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
The handlers forward events to two edges:
|
|
60
|
+
|
|
61
|
+
- Adobe Commerce Data Services (maintained by Adobe Engineering and used to power merchant performance dashboards)
|
|
62
|
+
|
|
63
|
+
Required contexts:
|
|
64
|
+
|
|
65
|
+
`StorefrontInstance`
|
|
66
|
+
|
|
67
|
+
- [Adobe Experience Platform](https://business.adobe.com/products/experience-platform/adobe-experience-platform.html) (requires a subscription and additional merchant [setup](https://experienceleague.adobe.com/docs/experience-platform/edge/fundamentals/datastreams.html?lang=en); data can be used by merchants inside the Adobe Experience Platform for detailed analytics, targeted merchandising, real time customer data profiles, and more)
|
|
68
|
+
|
|
69
|
+
Required contexts:
|
|
70
|
+
|
|
71
|
+
`AEP`
|
|
72
|
+
|
|
73
|
+
`EventForwarding.aep: true`
|
|
60
74
|
|
|
61
75
|
## Support
|
|
62
76
|
|
|
63
77
|
If you have any questions or encounter any issues, please reach out at these locations.
|
|
64
78
|
|
|
65
79
|
- [GitHub][issues]
|
|
66
|
-
- [Zendesk][zendesk]
|
|
67
80
|
|
|
68
81
|
[npm]: https://npmjs.com/package/@adobe/magento-storefront-event-collector
|
|
69
82
|
[version-badge]: https://img.shields.io/npm/v/@adobe/magento-storefront-event-collector.svg?style=flat-square
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("magentoStorefrontEventCollector",[],t):"object"==typeof exports?exports.magentoStorefrontEventCollector=t():e.magentoStorefrontEventCollector=t()}(self,(function(){return(()=>{var e={252:(e,t,n)=>{"use strict";var o=n(808);e.exports={get:o.get,set:o.set,remove:o.remove}},658:(e,t,n)=>{"use strict";var o=n(387);e.exports=function(e){var t=document.createElement("script");t.src=e,t.async=!0;var n=function(e,t){return new o((function(n,o){t.onload=function(){n(t)},t.onerror=function(){o(new Error("Failed to load script "+e))}}))}(e,t);return document.getElementsByTagName("head")[0].appendChild(t),n}},743:(e,t,n)=>{"use strict";e.exports=n(418)},387:(e,t,n)=>{"use strict";e.exports="undefined"!=typeof window&&window.Promise||void 0!==n.g&&n.g.Promise||n(595).default||n(595)},366:(e,t,n)=>{"use strict";var o=n(673);e.exports={parse:function(e){return"string"==typeof e&&(e=e.trim().replace(/^[?#&]/,"")),o.parse(e)},stringify:function(e){return o.stringify(e)}}},487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},12:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],i=0;i<4;i++)8*o+6*i<=8*e.length?n.push(t.charAt(r>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},269:function(e,t,n){var o;o=void 0!==n.g?n.g:this,e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),o=n.length,r=-1,i="",a=n.charCodeAt(0);++r<o;)0!=(t=n.charCodeAt(r))?i+=t>=1&&t<=31||127==t||0==r&&t>=48&&t<=57||1==r&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":0==r&&1==o&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(r):n.charAt(r):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(o)},808:(e,t,n)=>{var o,r,i;i=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(o){function r(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=o.write?o.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(o.read||o)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(r[u]=c,e===u)break}catch(e){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return a(e,!1)},r.getJSON=function(e){return a(e,!0)},r.remove=function(t,n){i(t,"",e(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}((function(){}))},void 0===(r="function"==typeof(o=i)?o.call(t,n,t,e):o)||(e.exports=r),e.exports=i()},418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,c=r(e),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))n.call(a,l)&&(c[l]=a[l]);if(t){s=t(a);for(var d=0;d<s.length;d++)o.call(a,s[d])&&(c[s[d]]=a[s[d]])}}return c}},595:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var o=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void u(t.promise,e)}c(t.promise,o)}else(1===e._state?c:u)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void f((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,l(e)}catch(t){u(e,t)}var o,r}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1;try{e((function(e){n||(n=!0,c(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(e){if(n)return;n=!0,u(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new d(e,t,n)),n},a.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))},a.all=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var i=o.length;function a(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,(function(t){a(e,t)}),n)}o[e]=r,0==--i&&t(o)}catch(e){n(e)}}for(var s=0;s<o.length;s++)a(s,o[s])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.race accepts an array"));for(var o=0,i=e.length;o<i;o++)a.resolve(e[o]).then(t,n)}))},a._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){o(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const g=a},587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,o,r){n=n||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,d,f,g,p=e[u].replace(a,"%20"),m=p.indexOf(o);m>=0?(l=p.substr(0,m),d=p.substr(m+1)):(l=p,d=""),f=decodeURIComponent(l),g=decodeURIComponent(d),t(i,f)?Array.isArray(i[f])?i[f].push(g):i[f]=[i[f],g]:i[f]=g}return i}},361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,o,r){return n=n||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var i=encodeURIComponent(t(r))+o;return Array.isArray(e[r])?e[r].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[r]))})).join(n):r?encodeURIComponent(t(r))+o+encodeURIComponent(t(e)):""}},673:(e,t,n)=>{"use strict";t.decode=t.parse=n(587),t.encode=t.stringify=n(361)},738:(e,t,n)=>{var o,r,i,a;o=n(12),r=n(487).utf8,i=n(487).bin,(a=function(e,t){var n=o.wordsToBytes(function(e){e.constructor==String?e=r.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var t=o.bytesToWords(e),n=8*e.length,i=[],a=1732584193,s=-271733879,c=-1732584194,u=271733878,l=-1009589776;t[n>>5]|=128<<24-n%32,t[15+(n+64>>>9<<4)]=n;for(var d=0;d<t.length;d+=16){for(var f=a,g=s,p=c,m=u,h=l,v=0;v<80;v++){if(v<16)i[v]=t[d+v];else{var y=i[v-3]^i[v-8]^i[v-14]^i[v-16];i[v]=y<<1|y>>>31}var w=(a<<5|a>>>27)+l+(i[v]>>>0)+(v<20?1518500249+(s&c|~s&u):v<40?1859775393+(s^c^u):v<60?(s&c|s&u|c&u)-1894007588:(s^c^u)-899497514);l=u,u=c,c=s<<30|s>>>2,s=a,a=w}a+=f,s+=g,c+=p,u+=m,l+=h}return[a,s,c,u,l]}(e));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):o.bytesToHex(n)})._blocksize=16,a._digestsize=20,e.exports=a},787:(e,t,n)=>{"use strict";const o="iglu:com.adobe.magento.entity/magento-extension/jsonschema/1-0-0",r="iglu:com.adobe.magento.entity/magento-js-tracker/jsonschema/2-0-0",i="iglu:com.adobe.magento.entity/product/jsonschema/2-0-3",a="iglu:com.adobe.magento.entity/recommendation-unit/jsonschema/1-0-4",s="iglu:com.adobe.magento.entity/recommended-item/jsonschema/1-0-4",c="iglu:com.adobe.magento.entity/search-input/jsonschema/1-0-11",u="iglu:com.adobe.magento.entity/search-result-category/jsonschema/1-0-1",l="iglu:com.adobe.magento.entity/search-result-product/jsonschema/1-0-2",d="iglu:com.adobe.magento.entity/search-results/jsonschema/1-0-9",f="iglu:com.adobe.magento.entity/search-result-suggestion/jsonschema/1-0-1",g="iglu:com.adobe.magento.entity/shopping-cart/jsonschema/2-0-0",p="iglu:com.adobe.magento.entity/shopper/jsonschema/1-0-0",m="iglu:com.adobe.magento.entity/storefront-instance/jsonschema/3-0-0",h=e=>{var t,n;if(e.pricing)return{regularPrice:e.pricing.regularPrice,minimalPrice:e.pricing.minimalPrice,maximalPrice:e.pricing.maximalPrice,specialPrice:e.pricing.specialPrice,tierPricing:null===(t=e.pricing.tierPricing)||void 0===t?void 0:t.map((e=>{var t;return{customerGroupId:null!==(t=e.customerGroupId)&&void 0!==t?t:null,qty:e.qty,value:e.value}})),currencyCode:null!==(n=e.pricing.currencyCode)&&void 0!==n?n:null}},v=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getProduct();return n?{schema:i,data:{productId:n.productId,name:n.name,sku:n.sku,topLevelSku:n.topLevelSku,specialToDate:n.specialToDate,specialFromDate:n.specialFromDate,newToDate:n.newToDate,newFromDate:n.newFromDate,createdAt:n.createdAt,updatedAt:n.updatedAt,manufacturer:n.manufacturer,countryOfManufacture:n.countryOfManufacture,categories:n.categories,productType:n.productType,pricing:h(n),canonicalUrl:n.canonicalUrl,mainImageUrl:n.mainImageUrl}}:{schema:i,data:{}}},y=(e,t)=>(null==t?void 0:t.units.find((t=>t.unitId===e)))||null,w=(e,t,n)=>{const o=y(e,n);if(!o)return null;return o.products.find((e=>e.productId===t))||null},b=(e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getRecommendations();if(!o)return{schema:a,data:{}};const r=y(e,o);return r?{schema:a,data:{name:r.unitName,unitId:r.unitId,itemsCount:r.totalProducts,backupsCount:r.backupProducts,configType:"preconfigured",source:"api",recType:r.typeId,placement:r.pagePlacement,yOffsetTop:r.yOffsetTop,yOffsetBottom:r.yOffsetBottom}}:null},C=(e,t,n)=>{var o,r;const i=window.magentoStorefrontEvents,a=null!=n?n:i.context.getRecommendations();if(!a)return{schema:s,data:{}};if(!y(e,a))return null;const c=w(e,t,a);return c?{schema:s,data:Object.assign(Object.assign({unitId:e,serviceRank:c.rank,displayRank:c.rank,name:c.name,sku:c.sku,url:c.url,imageUrl:null!==(r=null===(o=c.image)||void 0===o?void 0:o.url)&&void 0!==r?r:null},c.prices&&{prices:{maximum:{final:c.prices.maximum.final,regular:c.prices.maximum.regular,finalAdjustments:c.prices.maximum.finalAdjustments.map((e=>({code:e.code,amount:e.amount}))),regularAdjustments:c.prices.maximum.regularAdjustments.map((e=>({code:e.code,amount:e.amount})))},minimum:{final:c.prices.minimum.final,regular:c.prices.minimum.regular,finalAdjustments:c.prices.minimum.finalAdjustments.map((e=>({code:e.code,amount:e.amount}))),regularAdjustments:c.prices.minimum.regularAdjustments.map((e=>({code:e.code,amount:e.amount})))}}}),{currencyCode:c.currency})}:null},E=(e,t)=>t.units.find((t=>t.searchUnitId===e)),I=e=>{const t=[];return e.filter.forEach((e=>{var n,o,r,i,a,s,c;if(e.eq&&t.push({name:e.attribute,values:[e.eq],operator:"eq"}),(null===(n=e.in)||void 0===n?void 0:n.length)&&t.push({name:e.attribute,values:e.in,operator:"in"}),e.range){const n=[];(null===(o=e.range)||void 0===o?void 0:o.from)&&n.push(null===(i=null===(r=e.range)||void 0===r?void 0:r.from)||void 0===i?void 0:i.toString()),(null===(a=e.range)||void 0===a?void 0:a.to)&&n.push(null===(c=null===(s=e.range)||void 0===s?void 0:s.to)||void 0===c?void 0:c.toString()),t.push({name:e.attribute,values:n,operator:"range"})}})),t},x=(e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getSearchResults();if(!o)return{schema:d,data:{}};const r=E(e,o);return r?{schema:d,data:{searchUnitId:r.searchUnitId,searchRequestId:r.searchRequestId,executionTime:r.executionTime,products:r.products,categories:r.categories,suggestions:r.suggestions,productCount:r.products.length,categoryCount:r.categories.length,suggestionCount:r.suggestions.length,page:r.page,perPage:r.perPage,facets:r.facets}}:null},k=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getShoppingCart();return n.items?n.items.map((e=>{var t;return{basePrice:e.prices.price.value,cartItemId:e.id,mainImageUrl:null!==(t=e.product.mainImageUrl)&&void 0!==t?t:void 0,offerPrice:e.prices.price.value,productName:e.product.name,productSku:e.product.sku,qty:e.quantity}})):[]},S=e=>{var t,n,o,r;const i=window.magentoStorefrontEvents,a=null!=e?e:i.context.getShoppingCart();return a?{schema:g,data:{cartId:a.id,itemsCount:a.totalQuantity,items:k(a),possibleOnepageCheckout:a.possibleOnepageCheckout,subtotalExcludingTax:null===(n=null===(t=a.prices)||void 0===t?void 0:t.subtotalExcludingTax)||void 0===n?void 0:n.value,subtotalIncludingTax:null===(r=null===(o=a.prices)||void 0===o?void 0:o.subtotalIncludingTax)||void 0===r?void 0:r.value,giftMessageSelected:a.giftMessageSelected,giftWrappingSelected:a.giftWrappingSelected}}:{schema:g,data:{}}},T=()=>[()=>D(),()=>R(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getMagentoExtension();return n?{schema:o,data:{magentoExtensionVersion:n.magentoExtensionVersion}}:{schema:o,data:{}}})(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getShopper();return n?{schema:p,data:{shopperId:n.shopperId}}:{schema:p,data:{shopperId:"guest"}}})()],R=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getStorefrontInstance();return n?{schema:m,data:{baseCurrencyCode:n.baseCurrencyCode,environment:n.environment,environmentId:n.environmentId,instanceId:n.instanceId,storeCode:n.storeCode,storeId:n.storeId,storeName:n.storeName,storeUrl:n.storeUrl,storeViewCode:n.storeViewCode,storeViewCurrencyCode:n.storeViewCurrencyCode,storeViewId:n.storeViewId,storeViewName:n.storeViewName,websiteCode:n.websiteCode,websiteName:n.websiteName,websiteId:n.websiteId}}:{schema:m,data:{}}},D=()=>({schema:r,data:{magentoJsVersion:"1.1.3"}});var P=function(){return P=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},P.apply(this,arguments)};function O(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}Object.create,Object.create;var A=n(877);function j(e){if(!e)return e;var t=function(e){var t,n,o,r,i,a=0,s=0,c=[];if(!e)return e;e=unescape(encodeURIComponent(e));do{t=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=i>>12&63,o=i>>6&63,r=63&i,c[s++]=N.charAt(t)+N.charAt(n)+N.charAt(o)+N.charAt(r)}while(a<e.length);var u=c.join(""),l=e.length%3;return(l?u.slice(0,l-3):u)+"===".slice(l||3)}(e);return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function q(){var e,t={},n=[],o=[],r=function(e,n){null!=n&&""!==n&&(t[e]=n)};return{add:r,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(t,e[t])},addJson:function(e,t,r){if(r&&M(r)){var i={keyIfEncoded:e,keyIfNotEncoded:t,json:r};o.push(i),n.push(i)}},getPayload:function(){return t},getJson:function(){return n},withJsonProcessor:function(t){e=t},build:function(){return null==e||e(this,o),t}}}function M(e){if(!U(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function U(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}var B,$="Snowplow: ";!function(e){e[e.none=0]="none",e[e.error=1]="error",e[e.warn=2]="warn",e[e.debug=3]="debug",e[e.info=4]="info"}(B||(B={}));var L,_=(void 0===L&&(L=B.warn),{setLogLevel:function(e){L=B[e]?e:B.warn},warn:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(L>=B.warn&&"undefined"!=typeof console){var r=$+e;t?console.warn.apply(console,O([r+"\n",t],n)):console.warn.apply(console,O([r],n))}},error:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(L>=B.error&&"undefined"!=typeof console){var r=$+e+"\n";t?console.error.apply(console,O([r+"\n",t],n)):console.error.apply(console,O([r],n))}},debug:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];L>=B.debug&&"undefined"!=typeof console&&console.debug.apply(console,O([$+e],t))},info:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];L>=B.info&&"undefined"!=typeof console&&console.info.apply(console,O([$+e],t))}});function V(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var o=[],r=[],i=0,a=n;i<a.length;i++){var s=a[i];Z(s)?o.push(s):Q(s)&&r.push(s)}e=e.concat(r),t=t.concat(o)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var o=function(n){Z(n)?t=t.filter((function(e){return JSON.stringify(e)!==JSON.stringify(n)})):Q(n)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(n)})))},r=0,i=n;r<i.length;r++)o(i[r])},getApplicableContexts:function(n){return function(n){var o=function(e){for(var t=0,n=e.getJson();t<n.length;t++){var o=n[t];if("ue_px"===o.keyIfEncoded&&"object"==typeof o.json.data){var r=o.json.data.schema;if("string"==typeof r)return r}}return""}(n),r=function(e){var t=e.getPayload().e;return"string"==typeof t?t:""}(n),i=[],a=ne(e,n,r,o);i.push.apply(i,a);var s=function(e,t,n,o){var r,i=te(e).map((function(e){var r=function(e,t,n,o){if(G(e)){var r=e[0],i=!1;try{i=r({event:t.getPayload(),eventType:n,eventSchema:o})}catch(e){i=!1}if(!0===i)return ne(e[1],t,n,o)}else if(Y(e)&&function(e,t){var n=0,o=0,r=e.accept;Array.isArray(r)?e.accept.some((function(e){return K(e,t)}))&&o++:"string"==typeof r&&K(r,t)&&o++;var i=e.reject;return Array.isArray(i)?e.reject.some((function(e){return K(e,t)}))&&n++:"string"==typeof i&&K(i,t)&&n++,o>0&&0===n}(e[0],o))return ne(e[1],t,n,o);return[]}(e,t,n,o);if(r&&0!==r.length)return r}));return(r=[]).concat.apply(r,i.filter((function(e){return null!=e&&e.filter(Boolean)})))}(t,n,r,o);return i.push.apply(i,s),i}(n)}}}function F(e){var t=e.split(".");return!!(t&&t.length>1)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(e.slice(2).length>0){for(var t=!1,n=0,o=e.slice(2);n<o.length;n++)if("*"===o[n])t=!0;else if(t)return!1;return!0}return 2==e.length}(t)}function H(e){var t=new RegExp("^iglu:((?:(?:[a-zA-Z0-9-_]+|\\*).)+(?:[a-zA-Z0-9-_]+|\\*))/([a-zA-Z0-9-_.]+|\\*)/jsonschema/([1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)$").exec(e);if(null!==t&&F(t[1]))return t.slice(1,6)}function z(e){var t=H(e);if(t){var n=t[0];return 5===t.length&&F(n)}return!1}function J(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return z(e)})):"string"==typeof e&&z(e)}function X(e){var t=e;return!!(M(t)&&"schema"in t&&"data"in t)&&"string"==typeof t.schema&&"object"==typeof t.data}function W(e){return"function"==typeof e&&e.length<=1}function Q(e){return W(e)||X(e)}function G(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?W(e[0])&&e[1].every(Q):W(e[0])&&Q(e[1]))}function Y(e){return!(!Array.isArray(e)||2!==e.length)&&!!function(e){var t=e,n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(t,"accept")){if(!J(t.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(t,"reject")){if(!J(t.reject))return!1;n+=1}return n>0&&n<=2}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(Q):Q(e[1]))}function Z(e){return G(e)||Y(e)}function K(e,t){if(!z(e))return!1;var n=H(e),o=function(e){var t=new RegExp("^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$").exec(e);if(null!==t)return t.slice(1,6)}(t);if(n&&o){if(!function(e,t){var n=t.split("."),o=e.split(".");if(n&&o){if(n.length!==o.length)return!1;for(var r=0;r<o.length;r++)if(!ee(n[r],o[r]))return!1;return!0}return!1}(n[0],o[0]))return!1;for(var r=1;r<5;r++)if(!ee(n[r],o[r]))return!1;return!0}return!1}function ee(e,t){return e&&t&&"*"===e||e===t}function te(e){return Array.isArray(e)?e:Array.of(e)}function ne(e,t,n,o){var r,i=te(e).map((function(e){var r=function(e,t,n,o){if(X(e))return[e];if(W(e)){var r=function(e,t,n,o){var r=void 0;try{return r=e({event:t.getPayload(),eventType:n,eventSchema:o}),Array.isArray(r)&&r.every(X)||X(r)?r:void 0}catch(e){r=void 0}return r}(e,t,n,o);if(X(r))return[r];if(Array.isArray(r))return r}}(e,t,n,o);if(r&&0!==r.length)return r}));return(r=[]).concat.apply(r,i.filter((function(e){return null!=e&&e.filter(Boolean)})))}function oe(e,t){void 0===t&&(t={});var n={};for(var o in e)(t[o]||null!==e[o]&&void 0!==e[o])&&(n[o]=e[o]);return n}var re=n(738),ie=n.n(re);function ae(e){return!(!e||"string"!=typeof e.valueOf())}function se(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function ce(e){if(!ae(e)){e=e.text||"";var t=document.getElementsByTagName("title");t&&null!=t[0]&&(e=t[0].text)}return e}function ue(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)").exec(e);return t?t[1]:e}function le(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function de(e){var t=window,n="",o=ge("referrer",t.location.href)||ge("referer",t.location.href);if(o)return o;if(e)return e;try{n=t.top.document.referrer}catch(e){if(t.parent)try{n=t.parent.document.referrer}catch(e){n=""}}return""===n&&(n=document.referrer),n}function fe(e,t,n,o){return e.addEventListener?(e.addEventListener(t,n,o),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function ge(e,t){var n=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t);return n?decodeURIComponent(n[1].replace(/\+/g," ")):null}function pe(e,t,n){void 0===n&&(n=63072e3);try{var o=window.localStorage,r=Date.now()+1e3*n;return o.setItem(e+".expires",r.toString()),o.setItem(e,t),!0}catch(e){return!1}}function me(e){try{var t=window.localStorage;return t.removeItem(e),t.removeItem(e+".expires"),!0}catch(e){return!1}}function he(e,t,n,o){ye(e,"",-1,"/",t,n,o)}function ve(e){for(var t=document.cookie.split("; "),n=[],o=0;o<t.length;o++)t[o].substring(0,e.length)===e&&n.push(t[o]);return n}function ye(e,t,n,o,r,i,a){return arguments.length>1?document.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(o?"; Path="+o:"")+(r?"; Domain="+r:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function we(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=function(e){var t={},n=e.allowlist||e.denylist;if(n){Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)t[n[o]]=!0}return t}(e);return function(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}(e,(function(e){return function(e,t){for(var n=0,o=be(e);n<o.length;n++)if(t[o[n]])return!0;return!1}(e,n)===t}))}function be(e){return e.className.match(/\S+/g)||[]}function Ce(e,t,n,o,r,i,a,s,c,u,l,d,f){var g,p,m=!1,h=[],v=!0===(o="string"==typeof o?o.toLowerCase():o)||"beacon"===o||"true"===o,y=Boolean(v&&window.navigator&&window.navigator.sendBeacon&&!(function(e,t){var n=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/");return!(!n||!n.length)&&parseInt(n[0])<=13}(0,p=window.navigator.userAgent)||function(e,t,n){var o=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/");return!(!o||!o.length)&&(parseInt(o[0])<=10||10===parseInt(o[0])&&parseInt(o[1])<=15)}(0,0,p)&&function(e){return e.match("Version/.* Safari/")&&!function(e){return e.match("Chrom(e|ium)")}(e)}(p)))&&v,w="get"===o,b=Boolean(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),C=!w&&b&&("post"===o||v),E=C?r:"/i",I="snowplowOutQueue_"+e+"_"+(C?"post2":"get");if(v&&(d={}),i=n&&function(){var e="modernizr";if(!function(){try{return!!window.localStorage}catch(e){return!0}}())return!1;try{var t=window.localStorage;return t.setItem(e,e),t.removeItem(e),!0}catch(e){return!1}}()&&C&&i||1,n)try{var x=window.localStorage.getItem(I);h=x?JSON.parse(x):[]}catch(e){}function k(e){for(var t=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<=127?t+=1:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,n++):t+=o<65535?3:4}return t}Array.isArray(h)||(h=[]),t.outQueues.push(h),b&&i>1&&t.bufferFlushers.push((function(e){m||T(e)}));var S=function(e){return"object"==typeof e[0]};function T(e){for(void 0===e&&(e=!1);h.length&&"string"!=typeof h[0]&&"object"!=typeof h[0];)h.shift();if(h.length<1)m=!1;else{if(!ae(g))throw"No collector configured";if(m=!0,b){var t,o,r=void 0;S(h)?(t=R(r=g,!0,e),o=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=a);)t+=1;return t}(h)):(r=O(h[0]),t=R(r,!1,e),o=1);var i=setTimeout((function(){t.abort(),m=!1}),u),s=function(e){for(var t=0;t<e;t++)h.shift();n&&pe(I,JSON.stringify(h.slice(0,c))),T()};if(t.onreadystatechange=function(){4===t.readyState&&t.status>=200&&t.status<400?(clearTimeout(i),s(o)):4===t.readyState&&t.status>=400&&(clearTimeout(i),m=!1)},S(h)){var d=h.slice(0,o);if(d.length>0){var f=!1,p=d.map((function(e){return e.evt}));if(y){var v=new Blob([D(P(p))],{type:"application/json"});try{f=navigator.sendBeacon(r,v)}catch(e){f=!1}}!0===f?s(o):t.send(D(P(p)))}}else t.send()}else if(l||S(h))m=!1;else{var w=new Image(1,1),C=!0;w.onload=function(){C&&(C=!1,h.shift(),n&&pe(I,JSON.stringify(h.slice(0,c))),T())},w.onerror=function(){C&&(C=!1,m=!1)},w.src=O(h[0]),setTimeout((function(){C&&m&&(C=!1,T())}),u)}}}function R(e,t,n){var o=new XMLHttpRequest;for(var r in t?(o.open("POST",e,!n),o.setRequestHeader("Content-Type","application/json; charset=UTF-8")):o.open("GET",e,!n),o.withCredentials=f,l&&o.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,r)&&o.setRequestHeader(r,d[r]);return o}function D(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function P(e){for(var t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function O(e){return s?g+e.replace("?","?stm="+(new Date).getTime()+"&"):g+e}return{enqueueRequest:function(e,t){if(g=t+E,C){var o=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){var n=t[0],o=t[1];return e[n]=o.toString(),e}),{});return{evt:t,bytes:k(JSON.stringify(t))}}(e);if(o.bytes>=a)return _.warn("Event ("+o.bytes+"B) too big, max is "+a),void R(g,!0,!1).send(D(P([o.evt])));h.push(o)}else h.push(function(e){var t="?",n={co:!0,cx:!0},o=!0;for(var r in e)e.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(o?o=!1:t+="&",t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var i in n)e.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(t+="&"+i+"="+encodeURIComponent(e[i]));return t}(e));var r=!1;n&&(r=pe(I,JSON.stringify(h.slice(0,c)))),m||r&&!(h.length>=i)||T()},executeQueue:function(){m||T()},setUseLocalStorage:function(e){n=e},setAnonymousTracking:function(e){l=e},setCollectorUrl:function(e){g=e+E},setBufferSize:function(e){i=e}}}function Ee(e,t,n){var o,r,i;return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=ue(t=null!==(r=t,"u",o=(i=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)").exec(r))&&(null==i?void 0:i.length)>1?ge("u",i[1]):null)&&void 0!==o?o:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=ue(t=document.links[0].href)),[e,t,n]}function Ie(e,t,n,o,r,i){void 0===i&&(i={});var a=[],s=function(e,t,n,o,r,i){var s,c,u,l,d,f,g,p,m,h,v,y,w,b,C,E,I,x,k,S,T;i.eventMethod=null!==(s=i.eventMethod)&&void 0!==s?s:"post";var R=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},D=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n},O=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n},N=function(e){return!!e.anonymousTracking};a.push({beforeTrack:function(e){var t,n,o,r,i,a,s=function(e){return $e?null:e},c=function(e){return Ue?e:s(e)},u=Math.round((new Date).getTime()/1e3),l=Ke("ses"),d=ft(),f=d[0],g=d[1],p=d[2],m=d[3],h=d[4],v=d[5],y=d[6];t=!!H&&!!ye(H),Ne||t?ut():("0"===f?(Z=y,l||"none"==Le||(m++,v=h,Z=(0,A.v4)()),Ve=m):(new Date).getTime()-_e>1e3*Me&&(Z=(0,A.v4)(),Ve++),e.add("vp",function(){var e,t;if("innerWidth"in window)e=window.innerWidth,t=window.innerHeight;else{var n=document.documentElement||document.body;e=n.clientWidth,t=n.clientHeight}return e>=0&&t>=0?e+"x"+t:null}()),e.add("ds",(n=document.documentElement,r=(o=document.body)?Math.max(o.offsetHeight,o.scrollHeight):0,i=Math.max(n.clientWidth,n.offsetWidth,n.scrollWidth),a=Math.max(n.clientHeight,n.offsetHeight,n.scrollHeight,r),isNaN(i)||isNaN(a)?"":i+"x"+a)),e.add("vid",c(Ve)),e.add("sid",c(Z)),e.add("duid",s(g)),e.add("uid",s(K)),Xe(),e.add("refr",Ge(M||we)),e.add("url",Ge(B||ae)),"none"!=Le&&(st(g,p,Ve,u,v,Z),at()),_e=(new Date).getTime())}}),(null===(u=null===(c=null==i?void 0:i.contexts)||void 0===c?void 0:c.webPage)||void 0===u||u)&&a.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:mt()}}]}}),a.push.apply(a,null!==(l=i.plugins)&&void 0!==l?l:[]);var M,B,$,L,F,H,z,J,X,W,Q,G,Y,Z,K,ee=function(e){void 0===e&&(e={});var t=e.base64,n=e.corePlugins,o=e.callback,r=null!=n?n:[],i=function(e,t,n){var o=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){_.error("Error adding plugin contexts",e)}})),n}}}(t),r=V(),i=e,a={};function s(e,t){a[e]=t}var c={track:function(e,s,c){e.withJsonProcessor(function(e){return function(t,n){for(var o=0,r=n;o<r.length;o++){var i=r[o],a=JSON.stringify(i.json);e?t.add(i.keyIfEncoded,j(a)):t.add(i.keyIfNotEncoded,a)}n.length=0}}(i)),e.add("eid",(0,A.v4)()),e.addDict(a);var u=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(c);e.add(u.type,u.value.toString());var l=function(e,t){var n=r.getApplicableContexts(e),o=[];return t&&t.length&&o.push.apply(o,t),n&&n.length&&o.push.apply(o,n),o}(e,o.addPluginContexts(s)),d=function(e){if(e&&e.length)return{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:e}}(l);void 0!==d&&e.addJson("cx","co",d),t.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){_.error("Plugin beforeTrack",e)}})),"function"==typeof n&&n(e);var f=e.build();return t.forEach((function(e){try{e.afterTrack&&e.afterTrack(f)}catch(e){_.error("Plugin afterTrack",e)}})),f},addPayloadPair:s,getBase64Encoding:function(){return i},setBase64Encoding:function(e){i=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t])},resetPayloadPairs:function(e){a=U(e)?e:{}},setTrackerVersion:function(e){s("tv",e)},setTrackerNamespace:function(e){s("tna",e)},setAppId:function(e){s("aid",e)},setPlatform:function(e){s("p",e)},setUserId:function(e){s("uid",e)},setScreenResolution:function(e,t){s("res",e+"x"+t)},setViewport:function(e,t){s("vp",e+"x"+t)},setColorDepth:function(e){s("cd",e)},setTimezone:function(e){s("tz",e)},setLang:function(e){s("lang",e)},setIpAddress:function(e){s("ip",e)},setUseragent:function(e){s("ua",e)},addGlobalContexts:function(e){r.addGlobalContexts(e)},clearGlobalContexts:function(){r.clearGlobalContexts()},removeGlobalContexts:function(e){r.removeGlobalContexts(e)}};return c}(null==t||t,r,o),a=P(P({},i),{addPlugin:function(e){var t,n,o=e.plugin;r.push(o),null===(t=o.logger)||void 0===t||t.call(o,_),null===(n=o.activateCorePlugin)||void 0===n||n.call(o,a)}});return null==r||r.forEach((function(e){var t,n;null===(t=e.logger)||void 0===t||t.call(e,_),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,a)})),a}({base64:i.encodeBase64,corePlugins:a,callback:function(e){var t;t=!!H&&!!ye(H),Ne||t||Fe.enqueueRequest(e.build(),Ie)}}),te=navigator.userLanguage||navigator.language,ne=document.characterSet||document.charset,oe=Ee(window.location.hostname,window.location.href,de()),re=le(oe[0]),ae=oe[1],we=oe[2],be=null!==(d=i.platform)&&void 0!==d?d:"web",Ie=gt(o),xe=null!==(f=i.postPath)&&void 0!==f?f:"/com.snowplowanalytics.snowplow/tp2",ke=null!==(g=i.appId)&&void 0!==g?g:"",Se=document.title,Te=null===(p=i.resetActivityTrackingOnPageView)||void 0===p||p,Re=null!==(m=i.cookieName)&&void 0!==m?m:"_sp_",De=null!==(h=i.cookieDomain)&&void 0!==h?h:void 0,Pe="/",Oe=null!==(v=i.cookieSameSite)&&void 0!==v?v:"None",Ae=null===(y=i.cookieSecure)||void 0===y||y,je=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,Ne=void 0!==i.respectDoNotTrack&&i.respectDoNotTrack&&("yes"===je||"1"===je),qe=null!==(w=i.cookieLifetime)&&void 0!==w?w:63072e3,Me=null!==(b=i.sessionCookieTimeout)&&void 0!==b?b:1800,Ue=D(i),Be=O(i),$e=N(i),Le=R(i),_e=(new Date).getTime(),Ve=1,Fe=Ce(e,r,"localStorage"==Le||"cookieAndLocalStorage"==Le,i.eventMethod,xe,null!==(C=i.bufferSize)&&void 0!==C?C:1,null!==(E=i.maxPostBytes)&&void 0!==E?E:4e4,null===(I=i.useStm)||void 0===I||I,null!==(x=i.maxLocalStorageQueueSize)&&void 0!==x?x:1e3,null!==(k=i.connectionTimeout)&&void 0!==k?k:5e3,Be,null!==(S=i.customHeaders)&&void 0!==S?S:{},null===(T=i.withCredentials)||void 0===T||T),He=!1,ze=!1,Je={enabled:!1,installed:!1,configurations:{}};function Xe(){(oe=Ee(window.location.hostname,window.location.href,de()))[1]!==ae&&(we=de(ae)),re=le(oe[0]),ae=oe[1]}function We(e){var t=(new Date).getTime(),n=e.currentTarget;(null==n?void 0:n.href)&&(n.href=function(e,t,n){var o="_sp="+n,r=e.split("#"),i=r[0].split("?"),a=i.shift(),s=i.join("?");if(s){for(var c=!0,u=s.split("&"),l=0;l<u.length;l++)if("_sp="===u[l].substr(0,t.length+1)){c=!1,u[l]=o,s=u.join("&");break}c&&(s=o+"&"+s)}else s=o;return r[0]=a+"?"+s,r.join("#")}(n.href,"_sp",Y+"."+t))}function Qe(e){for(var t=0;t<document.links.length;t++){var n=document.links[t];!n.spDecorationEnabled&&e(n)&&(fe(n,"click",We,!0),fe(n,"mousedown",We,!0),n.spDecorationEnabled=!0)}}function Ge(e){var t;return L&&(t=new RegExp("#.*"),e=e.replace(t,"")),F&&(t=new RegExp("[{}]","g"),e=e.replace(t,"")),e}function Ye(e){var t=new RegExp("^([a-z]+):").exec(e);return t?t[1]:null}function Ze(e){return Re+e+"."+G}function Ke(e){var t=Ze(e);return"localStorage"==Le?function(e){try{var t=window.localStorage,n=t.getItem(e+".expires");return null===n||+n>Date.now()?t.getItem(e):(t.removeItem(e),void t.removeItem(e+".expires"))}catch(e){return}}(t):"cookie"==Le||"cookieAndLocalStorage"==Le?ye(t):void 0}function et(){Xe(),G=ie()((De||re)+(Pe||"/")).slice(0,4)}function tt(){var e=new Date;z=e.getTime()}function nt(){!function(){var e=ot(),t=e[0];t<J?J=t:t>X&&(X=t);var n=e[1];n<W?W=n:n>Q&&(Q=n)}(),tt()}function ot(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function rt(){var e=ot(),t=e[0];J=t,X=t;var n=e[1];W=n,Q=n}function it(e){return Math.round(e)}function at(){ct(Ze("ses"),"*",Me)}function st(e,t,n,o,r,i){ct(Ze("id"),e+"."+t+"."+n+"."+o+"."+r+"."+i,qe)}function ct(e,t,n){$e&&!Ue||("localStorage"==Le?pe(e,t,n):"cookie"!=Le&&"cookieAndLocalStorage"!=Le||ye(e,t,n,Pe,De,Oe,Ae))}function ut(e){var t=Ze("id"),n=Ze("ses");me(t),me(n),he(t,De,Oe,Ae),he(n,De,Oe,Ae),(null==e?void 0:e.preserveSession)||(Z=(0,A.v4)(),Ve=0),(null==e?void 0:e.preserveUser)||(Y=(0,A.v4)(),K=null)}function lt(e){e&&e.stateStorageStrategy&&(i.stateStorageStrategy=e.stateStorageStrategy,Le=R(i)),$e=N(i),Ue=D(i),Be=O(i),Fe.setUseLocalStorage("localStorage"==Le||"cookieAndLocalStorage"==Le),Fe.setAnonymousTracking(Be)}function dt(){if(!$e||Ue){var e="none"!=Le&&!!Ke("ses"),t=ft();t[1]?Y=t[1]:$e?(Y="",t[1]=Y):(Y=(0,A.v4)(),t[1]=Y),Z=t[6],e||(t[3]++,Z=(0,A.v4)(),t[6]=Z,t[5]=t[4]),"none"!=Le&&(at(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),st.apply(null,t))}}function ft(){if("none"==Le)return[];var e,t=new Date,n=Math.round(t.getTime()/1e3),o=Ke("id");return o?(e=o.split(".")).unshift("0"):e=["1",Y,n,0,n,""],e[6]&&"undefined"!==e[6]||(e[6]=(0,A.v4)()),e}function gt(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function pt(){He&&null!=r.pageViewId||(r.pageViewId=(0,A.v4)())}function mt(){return null==r.pageViewId&&(r.pageViewId=(0,A.v4)()),r.pageViewId}function ht(e,t){return(e||[]).concat(t?t():[])}function vt(e,t,n){var o=function(e,t){Xe(),e({context:t,pageViewId:mt(),minXOffset:J,minYOffset:W,maxXOffset:X,maxYOffset:Q}),rt()},r=function(){var r=new Date;z+e.configHeartBeatTimer>r.getTime()&&o(e.callback,ht(t,n))};0!=e.configMinimumVisitLength?e.activityInterval=window.setTimeout((function(){var i=new Date;z+e.configMinimumVisitLength>i.getTime()&&o(e.callback,ht(t,n)),e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}),e.configMinimumVisitLength):e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}function yt(e){var t=e.minimumVisitLength,n=e.heartbeatDelay,o=e.callback;if(se(t)&&se(n))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*n,callback:o};_.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function wt(e){var t=e.context,n=e.minXOffset,o=e.minYOffset,r=e.maxXOffset,i=e.maxYOffset,a=document.title;a!==Se&&(Se=a,$=void 0),ee.track(function(e){var t=e.pageUrl,n=e.pageTitle,o=e.referrer,r=e.minXOffset,i=e.maxXOffset,a=e.minYOffset,s=e.maxYOffset,c=q();return c.add("e","pp"),c.add("url",t),c.add("page",n),c.add("refr",o),r&&!isNaN(Number(r))&&c.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&c.add("pp_max",i.toString()),a&&!isNaN(Number(a))&&c.add("pp_miy",a.toString()),s&&!isNaN(Number(s))&&c.add("pp_may",s.toString()),c}({pageUrl:Ge(B||ae),pageTitle:ce($||Se),referrer:Ge(M||we),minXOffset:it(n),maxXOffset:it(r),minYOffset:it(o),maxYOffset:it(i)}),t)}i.hasOwnProperty("discoverRootDomain")&&i.discoverRootDomain&&(De=function(e,t){for(var n=window.location.hostname,o="_sp_root_domain_test_",r=o+(new Date).getTime(),i="_test_value_"+(new Date).getTime(),a=n.split("."),s=a.length-1;s>=0;){var c=a.slice(s,a.length).join(".");if(ye(r,i,0,"/",c,e,t),ye(r)===i){he(r,c,e,t);for(var u=ve(o),l=0;l<u.length;l++)he(u[l],c,e,t);return c}s-=1}return n}(Oe,Ae)),ee.setTrackerVersion(n),ee.setTrackerNamespace(t),ee.setAppId(ke),ee.setPlatform(be),ee.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),ee.addPayloadPair("cs",ne),ee.addPayloadPair("lang",te),ee.addPayloadPair("res",screen.width+"x"+screen.height),ee.addPayloadPair("cd",screen.colorDepth),et(),dt(),i.crossDomainLinker&&Qe(i.crossDomainLinker);var bt={getDomainSessionIndex:function(){return Ve},getPageViewId:function(){return mt()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=ft(),n=t[0],o=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6];"0"===n?(Z=c,"none"!=Le&&(i++,s=a,Z=(0,A.v4)()),Ve=i,at()):(Z=(0,A.v4)(),Ve++),"none"!=Le&&(st(o,r,Ve,e,s,Z),at()),_e=(new Date).getTime()},getCookieName:function(e){return Ze(e)},getUserId:function(){return K},getDomainUserId:function(){return ft()[1]},getDomainUserInfo:function(){return ft()},setReferrerUrl:function(e){M=e},setCustomUrl:function(e){Xe(),B=function(e,t){var n;return Ye(t)?t:"/"===t.slice(0,1)?Ye(e)+"://"+ue(e)+t:((n=(e=Ge(e)).indexOf("?"))>=0&&(e=e.slice(0,n)),(n=e.lastIndexOf("/"))!==e.length-1&&(e=e.slice(0,n+1)),e+t)}(ae,e)},setDocumentTitle:function(e){Se=document.title,$=e},discardHashTag:function(e){L=e},discardBrace:function(e){F=e},setCookiePath:function(e){Pe=e,et()},setVisitorCookieTimeout:function(e){qe=e},crossDomainLinker:function(e){Qe(e)},enableActivityTracking:function(e){Je.configurations.pagePing||(Je.enabled=!0,Je.configurations.pagePing=yt(P(P({},e),{callback:wt})))},enableActivityTrackingCallback:function(e){Je.configurations.callback||(Je.enabled=!0,Je.configurations.callback=yt(e))},updatePageActivity:function(){tt()},setOptOutCookie:function(e){H=e},setUserId:function(e){K=e},setUserIdFromLocation:function(e){Xe(),K=ge(e,ae)},setUserIdFromReferrer:function(e){Xe(),K=ge(e,we)},setUserIdFromCookie:function(e){K=ye(e)},setCollectorUrl:function(e){Ie=gt(e),Fe.setCollectorUrl(Ie)},setBufferSize:function(e){Fe.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Fe.executeQueue(),e.newBufferSize&&Fe.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,o=e.timestamp,r=e.contextCallback;Xe(),ze&&pt(),ze=!0,Se=document.title;var i=ce(($=t)||Se);ee.track(function(e){var t=e.pageUrl,n=e.pageTitle,o=e.referrer,r=q();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",o),r}({pageUrl:Ge(B||ae),pageTitle:i,referrer:Ge(M||we)}),ht(n,r),o);var a=new Date,s=!1;if(Je.enabled&&!Je.installed){Je.installed=!0,s=!0;var c={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),c.hasSupport=e}}};c.update();var u="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(c,"hasSupport")?fe(document,u,tt,{passive:!0}):fe(document,u,tt),rt();var l=function(e,t){return void 0===t&&(t=tt),function(e){return fe(document,e,t)}};["click","mouseup","mousedown","mousemove","keypress","keydown","keyup"].forEach(l(document)),["resize","focus","blur"].forEach(l(window)),l(window,nt)("scroll")}if(Je.enabled&&(Te||s)){z=a.getTime();var d=void 0;for(d in Je.configurations){var f=Je.configurations[d];f&&(window.clearInterval(f.activityInterval),vt(f,n,r))}}}(e)},preservePageViewId:function(){He=!0},disableAnonymousTracking:function(e){i.anonymousTracking=!1,lt(e),dt(),Fe.executeQueue()},enableAnonymousTracking:function(e){var t;i.anonymousTracking=null===(t=e&&(null==e?void 0:e.options))||void 0===t||t,lt(e),Ue||pt()},clearUserData:ut};return P(P({},bt),{id:e,namespace:t,core:ee,sharedState:r})}(e,t,n,o,r,i),c=P(P({},s),{addPlugin:function(e){var t,n;c.core.addPlugin(e),null===(n=(t=e.plugin).activateBrowserPlugin)||void 0===n||n.call(t,c)}});return a.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,c)})),c}var xe={};function ke(e,t){try{(n=null!=e?e:Object.keys(xe),function(e,t){for(var n=[],o=0,r=e;o<r.length;o++){var i=r[o];t.hasOwnProperty(i)?n.push(t[i]):_.warn(i+" not configured")}return n}(n,xe)).forEach(t)}catch(e){_.error("Function failed",e)}var n}var Se=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};function Te(e,t){ke(t,(function(t){t.core.track(function(e){var t=e.category,n=e.action,o=e.label,r=e.property,i=e.value,a=q();return a.add("e","se"),a.add("se_ca",t),a.add("se_ac",n),a.add("se_la",o),a.add("se_pr",r),a.add("se_va",null==i?void 0:i.toString()),a}(e),e.context,e.timestamp)}))}var Re="undefined"!=typeof window?function(){var e=new Se,t=document,n=window;function o(){var t;if(!e.hasLoaded)for(e.hasLoaded=!0,t=0;t<e.registeredOnLoadHandlers.length;t++)e.registeredOnLoadHandlers[t]();return!0}return t.visibilityState&&fe(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&e.bufferFlushers.forEach((function(e){e(!1)}))}),!1),fe(n,"beforeunload",(function(){e.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function e(){t.removeEventListener("DOMContentLoaded",e,!1),o()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function e(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",e),o())})),fe(n,"load",o,!1)):o(),e}():void 0;const De=e=>{const{pageContext:t,orderContext:n,productContext:o,shoppingCartContext:r}=e.eventInfo,i=v(o),a=S(r),s=[i];a&&s.push(a),Te({category:"checkout",action:"instant-purchase",label:null==n?void 0:n.orderId.toString(),property:null==t?void 0:t.pageType,context:s})},Pe=e=>{const{pageContext:t,orderContext:n,shoppingCartContext:o}=e.eventInfo,r=S(o),i=[];r&&i.push(r),Te({category:"checkout",action:"place-order",label:null==n?void 0:n.orderId.toString(),property:null==t?void 0:t.pageType,context:i})},Oe="Chrome",Ae="Edge",je="EdgeChromium",Ne="Unknown",qe=(e,t)=>-1!==e.indexOf(t),Me=[Oe,Ae,je,"IE",Ne],Ue=e=>qe(Me,e);var Be=n(743);const $e=n.n(Be)();var Le=n(252);const _e=n.n(Le)(),Ve=e=>null==e,Fe=e=>!Ve(e)&&!Array.isArray(e)&&"object"==typeof e,He=(e,t)=>{Object.keys(t).forEach((n=>{Fe(e[n])&&Fe(t[n])?He(e[n],t[n]):e[n]=t[n]}))},ze=(e,...t)=>{if(Ve(e))throw new TypeError('deepAssign "target" cannot be null or undefined');const n=Object(e);return t.forEach((e=>He(n,Object(e)))),n},Je=(e,t)=>n=>{const o=t.split(".").reduce(((e,t)=>(e[t]=e[t]||{},e[t])),e);ze(o,n)},Xe=()=>{const e=[];return{add(t){e.push(t)},call:(...t)=>Promise.all(e.map((e=>e(...t))))}},We=(()=>{const e=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e.push(n)}return function(t,n){t=unescape(encodeURIComponent(t)),n||(n=0),n^=-1;for(let o=0;o<t.length;o++){const r=255&(n^t.charCodeAt(o));n=n>>>8^e[r]}return(n^=-1)>>>0}})(),Qe=()=>{const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e},Ge=(e,t)=>{for(let n=0;n<e.length;n+=1){const o=e[n];if(t(o,n,e))return o}},Ye=(e,t)=>e.appendChild(t),Ze=(e,t={},n={},o=[],r=document)=>{const i=r.createElement(e);return Object.keys(t).forEach((e=>{i.setAttribute(e,t[e])})),((e,t)=>{Object.keys(t).forEach((n=>{if("style"===n&&Fe(t[n])){const o=t[n];Object.keys(o).forEach((t=>{e.style[t]=o[t]}))}else e[n]=t[n]}))})(i,n),o.forEach((e=>Ye(i,e))),i},Ke="IMG",et="STYLE",tt="SCRIPT",nt="src",ot=({src:e,currentDocument:t=document})=>new Promise(((n,o)=>{Ze(Ke,{src:e},{onload:n,onerror:o,onabort:o},[],t)})),rt=e=>"function"==typeof e,it=e=>Array.isArray(e)&&e.length>0,at=e=>Array.isArray(e)?e:null==e?[]:[].slice.call(e),st=(e,t)=>at(e.querySelectorAll(t)),ct=(e,t)=>e.substr(0,t.length)===t,ut=":shadow",lt=(e,t)=>{const n=t.trim();return ct(n,">")?window.document.documentMode?n.substring(1).trim():`${e instanceof Element||e instanceof HTMLDocument?":scope":":host"} ${n}`:n},dt=(e,t=document)=>-1===e.indexOf(ut)?st(t,e):((e,t)=>{if(!window.document.documentElement.attachShadow)return st(e,t.replace(ut,""));const n=(e=>e.split(ut))(t);if(n.length<2)return st(e,t);let o=e;for(let e=0;e<n.length;e+=1){const t=lt(o,n[e]),r=st(o,t);if(0===r.length||!r[0]||!r[0].shadowRoot)return r;o=r[0].shadowRoot}})(t,e),ft={childList:!0,subtree:!0},gt=e=>new Error(`Could not find: ${e}`),pt=e=>new Promise(e),mt=(e,t=dt,n=5e3,o=window,r=document)=>{const i=t(e);return it(i)?Promise.resolve(i):(e=>rt(e.MutationObserver))(o)?((e,t,n,o,r)=>pt(((i,a)=>{const s=new e.MutationObserver((()=>{const e=r(n);it(e)&&(s.disconnect(),i(e))}));setTimeout((()=>{s.disconnect(),a(gt(n))}),o),s.observe(t,ft)})))(o,r,e,n,t):(e=>"visible"===e.visibilityState)(r)?((e,t,n,o)=>pt(((r,i)=>{const a=()=>{const n=o(t);it(n)?r(n):e.requestAnimationFrame(a)};a(),setTimeout((()=>{i(gt(t))}),n)})))(o,e,n,t):((e,t,n)=>pt(((o,r)=>{const i=()=>{const t=n(e);it(t)?o(t):setTimeout(i,100)};i(),setTimeout((()=>{r(gt(e))}),t)})))(e,n,t)},ht=e=>{const t=e.parentNode;return t?t.removeChild(e):null},vt=ot,yt={name:"Adobe Alloy"},wt={style:{display:"none",width:0,height:0}},bt=e=>{const{hideReferrer:t,url:n}=e;return t?(({src:e})=>mt("BODY").then((([e])=>{const t=Ze("IFRAME",yt,wt);return Ye(e,t)})).then((t=>{const n=t.contentWindow.document;return ot({src:e,currentDocument:n}).then((()=>{ht(t)}))})))({src:n}):vt({src:n})},Ct=(e,t)=>Array.prototype.concat.apply([],e.map(t)),Et="com.adobe.alloy.",It=`${Et}getTld`,xt=(e,t)=>{let n="";const o=e.location.hostname.toLowerCase().split(".");let r=1;for(;r<o.length&&!t.get(It);)r+=1,n=(i=o,a=r,i.slice(-a)).join("."),t.set(It,It,{domain:n});var i,a;return t.remove(It,{domain:n}),n},kt=e=>e.replace("@","_"),St=(e,t)=>`kndctr_${kt(e)}_${t}`,Tt=({orgId:e})=>{const t=St(e,"identity");return()=>Boolean(_e.get(t))},Rt=(e,t,n)=>({getItem(o){try{return e[t].getItem(n+o)}catch(e){return null}},setItem(o,r){try{return e[t].setItem(n+o,r),!0}catch(e){return!1}},clear(){try{return Object.keys(e[t]).forEach((o=>{ct(o,n)&&e[t].removeItem(o)})),!0}catch(e){return!1}}}),Dt=e=>t=>{const n=Et+t;return{session:Rt(e,"sessionStorage",n),persistent:Rt(e,"localStorage",n)}},Pt=e=>Fe(e)&&0===Object.keys(e).length,Ot=e=>"number"==typeof e&&!isNaN(e),At=e=>{const t=parseInt(e,10);return Ot(t)&&e===t},jt=e=>"string"==typeof e,Nt=e=>jt(e)&&e.length>0,qt=()=>{};var Mt=n(366);const Ut=n.n(Mt)(),Bt=e=>e instanceof Error?e:new Error(e),$t=({error:e,message:t})=>{try{e.message=t}catch(e){}},Lt=({error:e,message:t})=>{const n=Bt(e),o=`${t}\nCaused by: ${n.message}`;return $t({error:n,message:o}),n},_t=(e,t,n)=>{const o=String(e);let r=String(n);if(o.length>=t||0===r.length)return o;const i=t-o.length;for(;i>r.length;)r+=r;return r.slice(0,i)+o},Vt=e=>{const t=e.getFullYear(),n=_t(e.getMonth()+1,2,"0"),o=_t(e.getDate(),2,"0"),r=_t(e.getHours(),2,"0"),i=_t(e.getMinutes(),2,"0"),a=_t(e.getSeconds(),2,"0"),s=_t(e.getMilliseconds(),3,"0"),c=e.getTimezoneOffset();return`${t}-${n}-${o}T${r}:${i}:${a}.${s}${c>0?"-":"+"}${_t(Math.floor(Math.abs(c)/60),2,"0")}:${_t(Math.abs(c)%60,2,"0")}`};var Ft=n(171);const Ht=n.n(Ft)(),zt=(e,t,n={})=>{const o=(n,o)=>t(e(n,o),o);return $e(o,e,n),o},Jt=(e,t,n)=>zt(e,((e,n)=>null==e?e:t(e,n)),n),Xt=(e,t,n,o)=>{if(!e)throw new Error(`'${n}': Expected ${o}, but got ${JSON.stringify(t)}.`)},Wt=(e,t)=>(Xt((e=>"boolean"==typeof e)(e),e,t,"true or false"),e),Qt=(e,t)=>(Xt(rt(e),e,t,"a function"),e),Gt=(e,t)=>(n,o)=>(Xt(n>=t,n,o,`${e} greater than or equal to ${t}`),n),Yt=e=>(t,n)=>(Fe(t)?Xt(!Pt(t),t,n,e):Xt(t.length>0,t,n,e),t),Zt=/^[a-z0-9.-]{1,}$/i,Kt=(e,t)=>(Xt(Zt.test(e),e,t,"a valid domain"),e),en=(e,t)=>(Xt(At(e),e,t,"an integer"),e),tn=(e,t)=>(Xt(Ot(e),e,t,"a number"),e),nn=(e,t)=>(Xt((e=>{try{return null!==new RegExp(e)}catch(e){return!1}})(e),e,t,"a regular expression"),e),on=(e,t)=>{if(null==e)throw new Error(`'${t}' is a required option`);return e},rn=(e,t)=>(Xt(jt(e),e,t,"a string"),e),an=e=>e;an.default=function(e){return zt(this,(e=>t=>null==t?e:t)(e))},an.required=function(){return zt(this,on)};const sn=function(){return Jt(this,Kt)},cn=function(e){return Jt(this,Gt("an integer",e))},un=function(e){return Jt(this,Gt("a number",e))},ln=function(){return Jt(this,en,{minimum:cn})},dn=function(){return Jt(this,Yt("a non-empty string"))},fn=function(){return Jt(this,Yt("a non-empty array"))},gn=function(){return Jt(this,Yt("a non-empty object"))},pn=function(){return Jt(this,nn)},mn=function(){return Jt(this,(()=>{const e=[];return(t,n)=>(Xt(-1===e.indexOf(t),t,n,"a unique value across instances"),e.push(t),t)})())},hn=function(e,t){return zt(this,((e,t)=>(n,o)=>{const r=Ge(e,(e=>{try{return e(n,o),!0}catch(e){return!1}}));return Xt(r,n,o,t),n})(e,t))}.bind(an),vn=function(){return Jt(this,an)}.bind(an),yn=function(e){return Jt(this,(e=>(t,n)=>{Xt(Array.isArray(t),t,n,"an array");const o=[],r=t.map(((t,r)=>{try{return e(t,`${n}[${r}]`)}catch(e){return void o.push(e.message)}}));if(o.length)throw new Error(o.join("\n"));return r})(e),{nonEmpty:fn})}.bind(an),wn=function(){return Jt(this,Wt)}.bind(an),bn=function(){return Jt(this,Qt)}.bind(an),Cn=function(e){return Jt(this,(e=>(t,n)=>(Xt(t===e,t,n,`${e}`),t))(e))}.bind(an),En=(function(){return Jt(this,tn,{minimum:un,integer:ln,unique:mn})}.bind(an),function(e){return Jt(this,(t=e,(e,n)=>{Xt(Fe(e),e,n,"an object");const o=[],r={};if(Object.keys(e).forEach((i=>{const a=e[i],s=n?`${n}.${i}`:i;try{const e=t(a,s);void 0!==e&&(r[i]=e)}catch(e){o.push(e.message)}})),o.length)throw new Error(o.join("\n"));return r}),{nonEmpty:gn});var t}.bind(an)),In=function(e){return Jt(this,(e=>(t,n)=>{Xt(Fe(t),t,n,"an object");const o=[],r={};if(Object.keys(e).forEach((i=>{const a=t[i],s=e[i],c=n?`${n}.${i}`:i;try{const e=s(a,c);void 0!==e&&(r[i]=e)}catch(e){o.push(e.message)}})),Object.keys(t).forEach((e=>{Object.prototype.hasOwnProperty.call(r,e)||(r[e]=t[e])})),o.length)throw new Error(o.join("\n"));return r})(e),{noUnknownFields:function(){return Jt(this,(e=>(t,n)=>{const o=[];if(Object.keys(t).forEach((t=>{if(!e[t]){const e=n?`${n}.${t}`:t;o.push(`'${e}': Unknown field.`)}})),o.length)throw new Error(o.join("\n"));return t})(e))},nonEmpty:gn})}.bind(an),xn=function(){return Jt(this,rn,{regexp:pn,domain:sn,nonEmpty:dn,unique:mn})}.bind(an),kn=function(...e){return hn(e.map(Cn),`one of these values: [${JSON.stringify(e)}]`)},Sn=En(yn(In({authenticatedState:kn("ambiguous","authenticated","loggedOut"),id:xn(),namespace:In({code:xn()}).noUnknownFields(),primary:wn(),xid:xn()})).required()),Tn=["onComponentsRegistered","onBeforeEvent","onBeforeRequest","onResponse","onRequestFailure","onClick"],Rn=(e,t)=>(...n)=>{let o;try{o=e(...n)}catch(e){throw Lt({error:e,message:t})}return o instanceof Promise&&(o=o.catch((e=>{throw Lt({error:e,message:t})}))),o},Dn=()=>{const e={},t={},n={};return{register(o,r){const{commands:i,lifecycle:a}=r;((e,n={})=>{const o=(r=Object.keys(t),i=Object.keys(n),r.filter((e=>qe(i,e))));var r,i;if(o.length)throw new Error(`[ComponentRegistry] Could not register ${e} because it has existing command(s): ${o.join(",")}`);Object.keys(n).forEach((o=>{const r=n[o];r.commandName=o,r.run=Rn(r.run,`[${e}] An error occurred while executing the ${o} command.`),t[o]=r}))})(o,i),((e,t={})=>{Object.keys(t).forEach((o=>{n[o]=n[o]||[],n[o].push(Rn(t[o],`[${e}] An error occurred while executing the ${o} lifecycle hook.`))}))})(o,a),e[o]=r},getCommand:e=>t[e],getCommandNames:()=>Object.keys(t),getLifecycleCallbacks:e=>n[e]||[]}},Pn="in",On="pending",An="declinedConsent",jn="default",Nn="initial",qn="new",Mn=e=>{const t=new Error(e);return t.code=An,t.message=e,t},Un=({logger:e})=>{const t=[],n=()=>Promise.resolve(),o=()=>Promise.resolve(),r=()=>Promise.reject(Mn("No consent preferences have been set.")),i=()=>Promise.reject(Mn("The user declined consent.")),a=()=>{const e=Qe();return t.push(e),e.promise};return{in(r){r===jn?this.awaitConsent=n:(r===Nn?e.info("Loaded user consent preferences. The user previously consented."):r===qn&&this.awaitConsent!==o&&e.info("User consented."),(()=>{for(;t.length;)t.shift().resolve()})(),this.awaitConsent=o)},out(n){n===jn?(e.warn("User consent preferences not found. Default consent of out will be used."),this.awaitConsent=r):(n===Nn?e.warn("Loaded user consent preferences. The user previously declined consent."):n===qn&&this.awaitConsent!==i&&e.warn("User declined consent."),(()=>{for(;t.length;)t.shift().reject(Mn("The user declined consent."))})(),this.awaitConsent=i)},pending(t){t===jn&&e.info("User consent preferences not found. Default consent of pending will be used. Some commands may be delayed."),this.awaitConsent=a},awaitConsent:()=>Promise.reject(new Error("Consent has not been initialized."))}},Bn=()=>{const e={};let t,n,o=!1,r=!1,i=!0;const a=e=>{if(r)throw new Error(`${e} cannot be called after event is finalized.`)},s={setUserXdm(e){a("setUserXdm"),t=e},setUserData(e){a("setUserData"),n=e},mergeXdm(t){a("mergeXdm"),t&&ze(e,{xdm:t})},mergeMeta(t){a("mergeMeta"),t&&ze(e,{meta:t})},mergeQuery(t){a("mergeQuery"),t&&ze(e,{query:t})},documentMayUnload(){o=!0},finalize(o){if(!r&&(t&&s.mergeXdm(t),n&&(e.data=n),r=!0,o)){i=!1;const t={xdm:e.xdm||{},data:e.data||{}},n=o(t);i=!1!==n,e.xdm=t.xdm||{},e.data=t.data||{},Pt(e.xdm)&&delete e.xdm,Pt(e.data)&&delete e.data}},getDocumentMayUnload:()=>o,isEmpty:()=>Pt(e)&&(!t||Pt(t))&&(!n||Pt(n)),shouldSend:()=>i,getViewName(){if(t&&t.web&&t.web.webPageDetails)return t.web.webPageDetails.viewName},toJSON(){if(!r)throw new Error("toJSON called before finalize");return e}};return s},$n={CONFIGURE:"configure",SET_DEBUG:"setDebug"},Ln=({logger:e,configureCommand:t,setDebugCommand:n,handleError:o,validateCommandOptions:r})=>{let i;return(a,s={})=>new Promise((o=>{const c=((o,a)=>{let s;if(o===$n.CONFIGURE){if(i)throw new Error("The library has already been configured and may only be configured once.");s=()=>(i=t(a),i.then((()=>{})))}else{if(!i)throw new Error("The library must be configured first. Please do so by executing the configure command.");s=o===$n.SET_DEBUG?()=>n(a):()=>i.then((e=>{const t=e.getCommand(o);if(!t||!rt(t.run)){const t=(n=$n,Object.keys(n).map((e=>n[e]))).concat(e.getCommandNames()).join(", ");throw new Error(`The ${o} command does not exist. List of available commands: ${t}.`)}var n;const i=r({command:t,options:a});return t.run(i)}),(()=>(e.warn(`An error during configuration is preventing the ${o} command from executing.`),new Promise((()=>{})))))}return s})(a,s);e.logOnBeforeCommand({commandName:a,options:s}),o(c())})).catch((e=>o(e,`${a} command`))).catch((t=>{throw e.logOnCommandRejected({commandName:a,options:s,error:t}),t})).then((t=>{const n=Fe(t)?t:{};return e.logOnCommandResolved({commandName:a,options:s,result:n}),n}))},_n="https://adobe.ly/2UH0qO7",Vn=({command:e,options:t})=>{const{commandName:n,documentationUri:o=_n,optionsValidator:r}=e;let i=t;if(r)try{i=r(t)}catch(e){throw new Error(`Invalid ${n} command options:\n\t - ${e} For command documentation see: ${o}`)}return i},Fn=({eventManager:e,logger:t})=>({commands:{sendEvent:{documentationUri:"https://adobe.ly/2r0uUjh",optionsValidator:e=>(({options:e,logger:t})=>{const n=In({type:xn(),xdm:In({eventType:xn(),identityMap:Sn}),data:In({}),renderDecisions:wn(),decisionScopes:yn(xn()),datasetId:xn()}).required()(e),{type:o,xdm:r}=n;return!r||r.eventType||o||t.warn("No type or xdm.eventType specified."),n})({options:e,logger:t}),run:t=>{const{xdm:n,data:o,documentUnloading:r=!1,type:i,mergeId:a,renderDecisions:s=!1,decisionScopes:c=[],datasetId:u}=t,l=e.createEvent();return r&&l.documentMayUnload(),l.setUserXdm(n),l.setUserData(o),i&&l.mergeXdm({eventType:i}),a&&l.mergeXdm({eventMergeId:a}),u&&l.mergeMeta({collect:{datasetId:u}}),e.sendEvent(l,{renderDecisions:s,decisionScopes:c})}}}});Fn.namespace="DataCollector",Fn.configValidators={};const Hn=Fn,zn={clickCollectionEnabled:wn().default(!0),downloadLinkQualifier:xn().regexp().default("\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$")},Jn=({config:e,eventManager:t,handleError:n})=>{const o=((e,t)=>(n,o)=>{const r=(e=>{let t=e;for(;t;){if((n=t).href&&("A"===n.tagName||"AREA"===n.tagName)&&(!n.onclick||!n.protocol||n.protocol.toLowerCase().indexOf("javascript")<0))return t;t=t.parentNode}var n;return null})(o);if(!r)return;const i=((e,t)=>{const n=e.location;let o=t.href?t.href:"",{protocol:r,host:i}=t;if(!(e=>e&&/^[a-z0-9]+:\/\//i.test(e))(o)){r||(r=n.protocol?n.protocol:""),r=r?`${r}//`:"",i||(i=n.host?n.host:"");let e="";if("/"!==o.substring(0,1)){let t=n.pathname.lastIndexOf("/");t=t<0?0:t,e=n.pathname.substring(0,t)}o=`${r}${i}${e}/${o}`}return o})(e,r);if(!i)return;const a=((e,t,n,o)=>{let r="other";return((e,t,n)=>{const o=new RegExp(e);return!!n.download||o.test(t.toLowerCase())})(t.downloadLinkQualifier,n,o)?r="download":((e,t)=>{const n=e.location.hostname.toLowerCase();return!(t.toLowerCase().indexOf(n)>=0)})(e,n)&&(r="exit"),r})(e,t,i,r);n.documentMayUnload(),n.mergeXdm({eventType:"web.webinteraction.linkClicks",web:{webInteraction:{name:"Link Click",type:a,URL:i,linkClicks:{value:1}}}})})(window,e);return{lifecycle:{onComponentsRegistered(o){const{lifecycle:r}=o;(({config:e,eventManager:t,lifecycle:n,handleError:o})=>{if(!e.clickCollectionEnabled)return;const r=(({eventManager:e,lifecycle:t,handleError:n})=>o=>{const r=o.target,i=e.createEvent();return t.onClick({event:i,clickedElement:r}).then((()=>i.isEmpty()?Promise.resolve():e.sendEvent(i))).then(qt).catch((e=>{n(e,"click collection")}))})({eventManager:t,lifecycle:n,handleError:o});document.addEventListener("click",r,!0)})({config:e,eventManager:t,lifecycle:r,handleError:n})},onClick({event:e,clickedElement:t}){o(e,t)}}}};Jn.namespace="ActivityCollector",Jn.configValidators=zn;const Xn=Jn,Wn=(e,t)=>`ID sync ${t?"succeeded":"failed"}: ${e.spec.url}`,Qn={thirdPartyCookiesEnabled:wn().default(!0),idMigrationEnabled:wn().default(!0)},Gn=e=>(In({namespaces:yn(Cn("ECID")).nonEmpty()}).noUnknownFields()(e),{namespaces:["ECID"]}),Yn=xt(window,_e),Zn=({logger:e})=>new Promise(((t,n)=>{if(Fe(window.adobe)&&Fe(window.adobe.optIn)){const o=window.adobe.optIn;e.info("Delaying request while waiting for legacy opt-in to let Visitor retrieve ECID from server."),o.fetchPermissions((()=>{o.isApproved([o.Categories.ECID])?(e.info("Received legacy opt-in approval to let Visitor retrieve ECID from server."),t()):n(new Error("Legacy opt-in was declined."))}),!0)}else t()})),Kn="ECID",eo=e=>{e.mergeQuery({identity:{fetch:[Kn]}})},to=((e,t)=>{const n=new Map;return(...e)=>{const t=e[0];if(n.has(t))return n.get(t);const o=(e=>{return(t={[Ae]:/Edge\/([0-9\._]+)/,[je]:/Edg\/([0-9\.]+)/,[Oe]:/(?!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/},e=>{const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];if(t[r].test(e))return r}return Ne})(e.navigator.userAgent);var t})(...e);return n.set(t,o),o}})(),no=(e,t)=>{e.addIdentity(Kn,{id:t})},oo=e=>{const t=e.getPayloadsByType("identity:result"),n=Ge(t,(e=>e.namespace&&e.namespace.code===Kn));return n?n.id:void 0},ro=e=>{const{payload:t,getAction:n,getUseSendBeacon:o}=e,r=Ht();let i=!1,a=!1;return{getId:()=>r,getPayload:()=>t,getAction:()=>n({isIdentityEstablished:a}),getUseSendBeacon:()=>o({isIdentityEstablished:a}),getUseIdThirdPartyDomain:()=>i,setUseIdThirdPartyDomain(){i=!0},setIsIdentityEstablished(){a=!0}}},io=e=>ro({payload:e,getAction:()=>"identity/acquire",getUseSendBeacon:()=>!1}),ao=e=>{const{content:t,addIdentity:n}=e;return{mergeState:Je(t,"meta.state"),mergeQuery:Je(t,"query"),addIdentity:n,toJSON:()=>t}},so=e=>(t,n)=>{e.xdm=e.xdm||{},e.xdm.identityMap=e.xdm.identityMap||{},e.xdm.identityMap[t]=e.xdm.identityMap[t]||[],e.xdm.identityMap[t].push(n)},co=e=>{const t={query:{identity:{fetch:e}}};return ao({content:t,addIdentity:so(t)})},uo=({config:e,logger:t,consent:n,sendEdgeNetworkRequest:o})=>{const{orgId:r,thirdPartyCookiesEnabled:i}=e,a=(({logger:e,orgId:t,awaitVisitorOptIn:n})=>{const o=(e=>{const t=e.Visitor;return rt(t)&&rt(t.getInstance)&&t})(window);return()=>o?n({logger:e}).then((()=>(e.info("Delaying request while using Visitor to retrieve ECID from server."),new Promise((n=>{o.getInstance(t,{}).getMarketingCloudVisitorID((t=>{e.info("Resuming previously delayed request that was waiting for ECID from Visitor."),n(t)}),!0)}))))).catch((t=>{t?e.info(`${t.message}, retrieving ECID from experience edge`):e.info("An error occurred while obtaining the ECID from Visitor.")})):Promise.resolve()})({logger:t,orgId:r,awaitVisitorOptIn:Zn}),s=(({config:e,getEcidFromVisitor:t})=>{const{idMigrationEnabled:n,orgId:o}=e,r=`AMCV_${o}`;return{getEcid(){if(n){const e=(()=>{let e=null;const t=_e.get("s_ecid")||_e.get(r);if(t){const n=/(^|\|)MCMID\|(\d+)($|\|)/,o=t.match(n);o&&(e=o[2])}return e})();return e?Promise.resolve(e):t()}return Promise.resolve()},setEcid(e){n&&!_e.get(r)&&_e.set(r,`MCMID|${e}`,{domain:Yn,expires:390})}}})({config:e,getEcidFromVisitor:a}),c=Tt({orgId:r}),u=(({sendEdgeNetworkRequest:e,createIdentityRequestPayload:t,createIdentityRequest:n})=>o=>{const r=t(o),i=n(r);return e({request:i})})({sendEdgeNetworkRequest:o,createIdentityRequestPayload:co,createIdentityRequest:io}),l=(({thirdPartyCookiesEnabled:e,areThirdPartyCookiesSupportedByDefault:t})=>n=>{e&&t(to(window))&&n.setUseIdThirdPartyDomain()})({thirdPartyCookiesEnabled:i,areThirdPartyCookiesSupportedByDefault:Ue}),d=(({getLegacyEcid:e,addEcidToPayload:t})=>n=>e().then((e=>{e&&t(n,e)})))({getLegacyEcid:s.getEcid,addEcidToPayload:no}),f=(({orgId:e,doesIdentityCookieExist:t})=>({onResponse:n,onRequestFailure:o})=>new Promise(((r,i)=>{n((()=>{if(!t()){const t=new Error(`An identity was not set properly. Please verify that the org ID ${e} configured in Alloy matches the org ID specified in the edge configuration.`);throw i(t),t}r()})),o((()=>{t()?r():i(new Error("No identity was set on response."))}))})))({orgId:r,doesIdentityCookieExist:c}),g=(({doesIdentityCookieExist:e,setDomainForInitialIdentityPayload:t,addLegacyEcidToPayload:n,awaitIdentityCookie:o,logger:r})=>{let i;const a=e=>(t(e),n(e.getPayload()));return({request:t,onResponse:n,onRequestFailure:s})=>{if(e())return t.setIsIdentityEstablished(),Promise.resolve();if(i){r.info("Delaying request while retrieving ECID from server.");const e=i;return i=e.catch((()=>o({onResponse:n,onRequestFailure:s}))),e.then((()=>{r.info("Resuming previously delayed request."),t.setIsIdentityEstablished()})).catch((()=>a(t)))}return i=o({onResponse:n,onRequestFailure:s}),a(t)}})({doesIdentityCookieExist:c,setDomainForInitialIdentityPayload:l,addLegacyEcidToPayload:d,awaitIdentityCookie:f,logger:t}),p=(({fireReferrerHideableImage:e,logger:t})=>n=>{const o=n.filter((e=>"url"===e.type));return o.length?Promise.all(o.map((n=>e(n.spec).then((()=>{t.info(Wn(n,!0))})).catch((()=>{t.error(Wn(n,!1))}))))).then(qt):Promise.resolve()})({fireReferrerHideableImage:bt,logger:t}),m=(({processIdSyncs:e})=>t=>e(t.getPayloadsByType("identity:exchange")))({processIdSyncs:p});return(({addEcidQueryToPayload:e,ensureSingleIdentity:t,setLegacyEcid:n,handleResponseForIdSyncs:o,getEcidFromResponse:r,getIdentity:i,consent:a})=>{let s,c={};return{lifecycle:{onBeforeRequest:({request:n,onResponse:o,onRequestFailure:r})=>(e(n.getPayload()),t({request:n,onResponse:o,onRequestFailure:r})),onResponse:({response:e})=>(s||(s=r(e),s&&n(s)),c=$e(c,e.getEdge()),o(e))},commands:{getIdentity:{optionsValidator:Gn,run:e=>a.awaitConsent().then((()=>s?void 0:i(e.namespaces))).then((()=>({identity:{ECID:s},edge:c})))}}}})({ensureSingleIdentity:g,addEcidQueryToPayload:eo,setLegacyEcid:s.setEcid,handleResponseForIdSyncs:m,getEcidFromResponse:oo,getIdentity:u,consent:n})};uo.namespace="Identity",uo.configValidators=Qn;const lo=uo,fo=(e,t)=>`URL destination ${t?"succeeded":"failed"}: ${e.spec.url}`,go=({processDestinations:e})=>({response:t})=>(({response:t})=>{const n=t.getPayloadsByType("activation:push");return e(n)})({response:t}).then((()=>(({response:e})=>({destinations:e.getPayloadsByType("activation:pull")}))({response:t}))),po=({logger:e})=>{const t=(({fireReferrerHideableImage:e,logger:t})=>n=>((e=>{e.filter((e=>"cookie"===e.type)).forEach((e=>{const{name:t,value:n,domain:o,ttlDays:r}=e.spec;_e.set(t,n||"",{domain:o||"",expires:r||10})}))})(n),((e,t,n)=>{const o=n.filter((e=>"url"===e.type));return Promise.all(o.map((n=>e(n.spec).then((()=>{t.info(fo(n,!0))})).catch((()=>{t.error(fo(n,!1))}))))).then(qt)})(e,t,n)))({fireReferrerHideableImage:bt,logger:e});return{lifecycle:{onResponse:go({processDestinations:t})},commands:{}}};po.namespace="Audiences",po.configValidators={};const mo=po,ho="__view__",vo="https://ns.adobe.com/personalization/dom-action",yo="https://ns.adobe.com/personalization/redirect-item",wo=({renderDecisions:e,decisionScopes:t,event:n,viewCache:o})=>{const r=n.getViewName();return{isRenderDecisions:()=>e,getViewName:()=>r,hasScopes:()=>t.length>0,hasViewName:()=>Nt(r),createQueryDetails(){const e=[...t];this.isCacheInitialized()||qe(e,ho)||e.push(ho);const n=["https://ns.adobe.com/personalization/html-content-item","https://ns.adobe.com/personalization/json-content-item",yo];return qe(e,ho)&&n.push(vo),{schemas:n,decisionScopes:e}},isCacheInitialized:()=>o.isInitialized(),shouldFetchData(){return this.hasScopes()||!this.isCacheInitialized()},shouldUseCachedData(){return this.hasViewName()&&this.isCacheInitialized()}}},bo=e=>Ze("DIV",{},{innerHTML:e});var Co=n(269),Eo=n.n(Co);const Io=/:eq\((\d+)\)/g,xo=e=>-1===e.indexOf(":eq("),ko=/(#|\.)(-?\w+)/g,So=/^\s*>?\s*/,To=(e,t,n)=>`${t}${Eo()(n)}`,Ro=e=>{const t=document;if(xo(e))return dt(e,t);const n=(e=>{const t=[],n=(e=>e.split(Io).filter(Nt))(e.trim().replace(ko,To)),{length:o}=n;let r=0;for(;r<o;){const e=n[r].replace(So,"").trim(),o=n[r+1];o?t.push({sel:e,eq:Number(o)}):t.push({sel:e}),r+=2}return t})(e),{length:o}=n;let r=[],i=t,a=0;for(;a<o;){const{sel:e,eq:t}=n[a],s=dt(e,i),{length:c}=s;if(0===c)break;if(null!=t&&t>c-1)break;a<o-1&&(null==t?[i]=s:i=s[t]),a===o-1&&(r=null==t?s:[s[t]]),a+=1}return r},Do=(e,t=document)=>t.getElementById(e),Po=(e,t,n)=>{e.setAttribute(t,n)},Oo=(e,t)=>e.getAttribute(t),Ao=e=>e.parentNode,jo=(e,t)=>{if(!e)return;const n=Ao(e);n&&n.insertBefore(t,(e=>e.nextElementSibling)(e))},No=(e,t)=>{if(!e)return;const n=Ao(e);n&&n.insertBefore(t,e)},qo=e=>{const{childNodes:t}=e;return t?at(t):[]},Mo=e=>e.firstElementChild;let Uo;const Bo=(e=document)=>{if(void 0===Uo){const t=e.querySelector("[nonce]");Uo=t&&(t.nonce||t.getAttribute("nonce"))}return Uo},$o="alloy-prehiding",Lo={},_o=e=>{const t=Lo[e];t&&(ht(t),delete Lo[e])},Vo=e=>{if(!e)return;if(Do($o))return;const t=Bo(),n={id:$o,...t&&{nonce:t}},o=Ze(et,n,{textContent:e});Ye(document.head,o)},Fo=()=>{const e=Do($o);e&&ht(e)},Ho=(e,t)=>{e.textContent=t},zo=e=>Ze(Ke,{src:e}),Jo=e=>{dt(Ke,e).forEach((e=>{const t=Oo(e,nt);t&&zo(t)}))},Xo=e=>((e,t)=>"STYLE"===e.tagName)(e)&&!Oo(e,nt),Wo=e=>{const t=dt(et,e),{length:n}=t,o=Bo();if(o)for(let e=0;e<n;e+=1){const n=t[e];Xo(n)&&(n.nonce=o)}};var Qo=n(658),Go=n.n(Qo);const Yo=(e,t)=>!!e&&e.tagName===t,Zo=e=>Yo(e,tt)&&!Oo(e,nt),Ko=e=>Yo(e,tt)&&Oo(e,nt),er=e=>{const t=dt(tt,e),n=[],{length:o}=t,r=Bo(),i={...r&&{nonce:r}};for(let e=0;e<o;e+=1){const o=t[e];if(!Zo(o))continue;const{textContent:r}=o;r&&n.push(Ze(tt,i,{textContent:r}))}return n},tr=e=>{const t=dt(tt,e),n=[],{length:o}=t;for(let e=0;e<o;e+=1){const o=t[e];if(!Ko(o))continue;const r=Oo(o,nt);r&&n.push(r)}return n},nr=(e,t)=>{t.forEach((t=>{e.appendChild(t),e.removeChild(t)}))},or=e=>Promise.all(e.map(Go())),rr=(e,t)=>{const n=bo(t);Wo(n);const o=qo(n),r=er(n),i=tr(n);return Jo(n),o.forEach((t=>{Ye(e,t)})),nr(e,r),or(i)},ir=(e,t)=>{(e=>{qo(e).forEach(ht)})(e),rr(e,t)},ar=(e,t)=>{const n=bo(t);Wo(n);const o=qo(n),r=er(n),i=tr(n),{length:a}=o;let s=a-1;for(Jo(n);s>=0;){const t=o[s],n=Mo(e);n?No(n,t):Ye(e,t),s-=1}return nr(e,r),or(i)},sr=(e,t)=>{const n=bo(t);Wo(n);const o=qo(n),r=er(n),i=tr(n);return Jo(n),o.forEach((t=>{No(e,t)})),nr(e,r),or(i)},cr=(e,t)=>{sr(e,t),ht(e)},ur=(e,t)=>{const n=bo(t);Wo(n);const o=qo(n),r=er(n),i=tr(n);return Jo(n),o.forEach((t=>{jo(e,t)})),nr(e,r),or(i)},lr=(e,t)=>{const{priority:n,...o}=t;Object.keys(o).forEach((t=>{((e,t,n,o)=>{let r;r=o?`${t}:${n} !${o};`:`${t}:${n};`,e.style.cssText+=`;${r}`})(e,t,o[t],n)}))},dr=(e,t)=>{Object.keys(t).forEach((n=>{Po(e,n,t[n])}))},fr=(e,t)=>{e.tagName===Ke&&(zo(t),e.removeAttribute("src"),Po(e,nt,t))},gr=(e,{from:t,to:n})=>{const o=(e=>{const{children:t}=e;return t?at(t):[]})(e),r=o[t],i=o[n];r&&i&&(t<n?jo(i,r):No(i,r))},pr=e=>t=>{const{selector:n,prehidingSelector:o,content:r,meta:i}=t;return(e=>{if(Lo[e])return;const t=Bo(),n={...t&&{nonce:t}},o=Ze(et,n,{textContent:`${e} { visibility: hidden }`});Ye(document.head,o),Lo[e]=o})(o),mt(n,Ro).then((t=>((e,t,n)=>{const o=e.map((e=>n(e,t)));return Promise.all(o)})(t,r,e))).then((()=>(_o(o),{meta:i})),(e=>(_o(o),{meta:i,error:e})))},mr=(e,t,n)=>{if(e.enabled){const o=JSON.stringify(t),{message:r,stack:i}=n,a=`Failed to execute action ${o}. ${r} ${i?`\n ${i}`:""}`;e.error(a)}},hr=(e,t,n)=>{const o=e.map((e=>{const o=(e=>{const t=$e({},e),{content:n,selector:o}=t;if(!jt(r=n)||!r.trim())return t;var r;const i=Ro(o);return Yo(i[0],"HEAD")?(t.type="appendHtml",t.content=(e=>{const t=bo(e);return dt("SCRIPT,LINK,STYLE",t).map((e=>e.outerHTML)).join("")})(n),t):t})(e),{type:r}=o;return((e,t,n,o)=>{const r=t[n];if(!r){const t=new Error(`DOM action "${n}" not found`);throw mr(e,o[0],t),t}return r(...o)})(n,t,r,[o]).then((e=>(((e,t)=>{if(e.enabled){const n=JSON.stringify(t);e.info(`Action ${n} executed.`)}})(n,o),e))).catch((e=>{throw mr(n,o,e),e}))}));return Promise.all(o)},vr=e=>e,yr=({modules:e,logger:t,executeActions:n,collect:o})=>r=>{const i=r.map((o=>{const r=(e=>{const t={id:e.id,scope:e.scope,scopeDetails:e.scopeDetails};return e.items.map((e=>$e({},e.data,{meta:t})))})(o);return n(r,e,t)}));return Promise.all(i).then((e=>((e,t,n)=>{const o=Ct(n,vr),r=[],i=new Set;o.forEach((e=>{if(!e)return;if(e.error)return void t.warn(e);const{meta:n}=e;i.has(n.id)||(i.add(n.id),r.push(n))})),it(r)&&e({decisionsMeta:r})})(o,t,e))).catch((e=>{t.error(e)}))},wr=(e,t)=>{if(xo(e))return((e,t)=>t.matches?t.matches(e):t.msMatchesSelector(e))(e,t);const n=Ro(e);let o=!1;for(let e=0;e<n.length;e+=1)if(n[e]===t){o=!0;break}return o},br=(e,t,n)=>{const{documentElement:o}=document;let r=e;for(;r&&r!==o;){if(wr(t,r))return n(t);r=r.parentNode}return null},Cr=(e,t,n)=>{const o=[];for(let r=0;r<t.length;r+=1){const i=br(e,t[r],n);i&&o.push(...i)}return o},Er=(e=document)=>-1!==e.location.href.indexOf("adobe_authoring_enabled"),Ir=(e,t)=>{e.mergeXdm({_experience:{decisioning:{propositions:t}}})},xr=(e,t)=>{e.mergeQuery({personalization:{...t}})},kr=({decisions:e,renderAttempted:t})=>e.map((e=>$e({renderAttempted:t},e))),Sr=(e,t)=>({id:e.id,scope:e.scope,items:t,scopeDetails:e.scopeDetails}),Tr=(e,t)=>{const n=[],o=[];return e.forEach((e=>{const{items:r=[]}=e,[i,a]=((e,t)=>{const n=[],o=[];return e.forEach((e=>{e.schema===t?n.push(e):o.push(e)})),[n,o]})(r,t);it(i)&&n.push(Sr(e,i)),it(a)&&o.push(Sr(e,a))})),{matchedDecisions:n,unmatchedDecisions:o}},Rr=e=>{const t=Tr(e,yo),n=Tr(t.unmatchedDecisions,vo),{pageWideScopeDecisions:o,nonPageWideScopeDecisions:r}=((e,t)=>{const n=[],o={};return it(e)&&e.forEach((e=>{"__view__"===e.scope?n.push(e):(o[e.scope]||(o[e.scope]=[]),o[e.scope].push(e))})),{pageWideScopeDecisions:n,nonPageWideScopeDecisions:o}})(n.matchedDecisions);return{redirectDecisions:t.matchedDecisions,pageWideScopeDecisions:o,viewDecisions:r,nonAutoRenderableDecisions:n.unmatchedDecisions}},Dr=({viewCache:e})=>({viewName:t,redirectDecisions:n,pageWideScopeDecisions:o,nonAutoRenderableDecisions:r})=>{const i=[...n,...o,...r];return Promise.resolve(i).then((n=>(({viewCache:e,viewName:t,propositions:n})=>t?e.getView(t).then((e=>[...e,...n])):n)({viewCache:e,viewName:t,propositions:n}))).then((e=>(({propositions:e})=>({decisions:e,propositions:kr({decisions:e,renderAttempted:!1})}))({propositions:e})))},Pr=({config:e,logger:t,eventManager:n})=>{const o=(({eventManager:e,mergeDecisionsMeta:t})=>({decisionsMeta:n,documentMayUnload:o=!1})=>{const r=e.createEvent();return r.mergeXdm({eventType:"decisioning.propositionDisplay"}),t(r,n),o&&r.documentMayUnload(),e.sendEvent(r)})({eventManager:n,mergeDecisionsMeta:Ir}),r=(({eventManager:e,mergeDecisionsMeta:t})=>({decisionsMeta:n,xdm:o})=>{const r={eventType:"decisioning.propositionDisplay"},i=e.createEvent();if(it(n)){const e=n[0].scope;r.web={webPageDetails:{viewName:e}},t(i,n)}return i.mergeXdm(r),i.mergeXdm(o),e.sendEvent(i)})({eventManager:n,mergeDecisionsMeta:Ir}),{getClickMetasBySelector:i,getClickSelectors:a,storeClickMetrics:s}=(()=>{const e={};return{storeClickMetrics:t=>{e[t.selector]||(e[t.selector]={}),e[t.selector][t.meta.id]={scope:t.meta.scope,scopeDetails:t.meta.scopeDetails}},getClickSelectors:()=>Object.keys(e),getClickMetasBySelector:t=>{return e[t]?(n=e[t],Object.keys(n).map((e=>({id:e,scope:n[e].scope,scopeDetails:n[e].scopeDetails})))):{};var n}}})(),c=(()=>{let e;const t=Qe();return{storeViews:n=>{n.then((n=>{void 0===e&&(e={}),$e(e,n),t.resolve()})).catch((()=>{void 0===e&&(e={}),t.resolve()}))},getView:n=>t.promise.then((()=>e[n]||[])),isInitialized:()=>!(void 0===e)}})(),u=(w=s,{setHtml:pr(ir),customCode:pr(ar),setText:pr(Ho),setAttribute:pr(dr),setImageSource:pr(fr),setStyle:pr(lr),move:pr(lr),resize:pr(lr),rearrange:pr(gr),remove:pr(ht),insertAfter:pr(ur),insertBefore:pr(sr),replaceHtml:pr(cr),prependHtml:pr(ar),appendHtml:pr(rr),click:e=>((e,t)=>{const{selector:n,meta:o}=e;return t({selector:n,meta:o}),Promise.resolve()})(e,w)}),l=yr({modules:u,logger:t,executeActions:hr,collect:o}),d=yr({modules:u,logger:t,executeActions:hr,collect:r}),f=(({collect:e,window:t,logger:n,showContainers:o})=>r=>{const{content:i,decisions:a}=(e=>{const t=e[0],{items:n,id:o,scope:r,scopeDetails:i}=t,{content:a}=n[0].data;return{content:a,decisions:[{id:o,scope:r,scopeDetails:i}]}})(r);return e({decisionsMeta:a,documentMayUnload:!0}).then((()=>{t.location.replace(i)})).catch((()=>{o(),n.warn("An error occurred while executing the redirect offer.")}))})({collect:o,window,logger:t,showContainers:Fo}),g=(({executeViewDecisions:e,collect:t})=>({viewName:n,viewDecisions:o})=>{it(o)?e(o):t({decisionsMeta:[],xdm:{web:{webPageDetails:{viewName:n}}}})})({viewCache:c,executeViewDecisions:d,collect:r}),p=(({viewCache:e,executeDecisions:t,executeCachedViewDecisions:n,showContainers:o})=>({viewName:r,pageWideScopeDecisions:i,nonAutoRenderableDecisions:a})=>r?e.getView(r).then((e=>(t(i),n({viewName:r,viewDecisions:e}),o(),{decisions:[...a],propositions:[...kr({decisions:[...i,...e],renderAttempted:!0}),...kr({decisions:a,renderAttempted:!1})]}))):(t(i),o(),{decisions:[...a],propositions:[...kr({decisions:i,renderAttempted:!0}),...kr({decisions:a,renderAttempted:!1})]}))({viewCache:c,executeDecisions:l,executeCachedViewDecisions:g,showContainers:Fo}),m=(({autoRenderingHandler:e,nonRenderingHandler:t,groupDecisions:n,handleRedirectDecisions:o,showContainers:r})=>({decisionsDeferred:i,personalizationDetails:a,response:s})=>{const c=s.getPayloadsByType("personalization:decisions"),u=a.getViewName();if(0===c.length)return r(),i.resolve({}),{decisions:[],propositions:[]};const{redirectDecisions:l,pageWideScopeDecisions:d,viewDecisions:f,nonAutoRenderableDecisions:g}=n(c);return a.isRenderDecisions()&&it(l)?(i.resolve({}),o(l)):(i.resolve(f),a.isRenderDecisions()?e({viewName:u,pageWideScopeDecisions:d,nonAutoRenderableDecisions:g}):t({viewName:u,redirectDecisions:l,pageWideScopeDecisions:d,nonAutoRenderableDecisions:g}))})({autoRenderingHandler:p,nonRenderingHandler:Dr({viewCache:c}),groupDecisions:Rr,handleRedirectDecisions:f,showContainers:Fo}),h=(({config:e,responseHandler:t,showContainers:n,hideContainers:o,mergeQuery:r})=>({decisionsDeferred:i,personalizationDetails:a,event:s,onResponse:c,onRequestFailure:u})=>{const{prehidingStyle:l}=e;a.isRenderDecisions()&&o(l),r(s,a.createQueryDetails()),c((({response:e})=>t({decisionsDeferred:i,personalizationDetails:a,response:e}))),u((()=>{i.reject(),n()}))})({config:e,responseHandler:m,showContainers:Fo,hideContainers:Vo,mergeQuery:xr}),v=(({mergeDecisionsMeta:e,collectClicks:t,getClickSelectors:n,getClickMetasBySelector:o})=>({event:r,clickedElement:i})=>{const a=n();if(it(a)){const n=t(i,a,o);it(n)&&(r.mergeXdm({eventType:"decisioning.propositionInteract"}),e(r,n))}})({mergeDecisionsMeta:Ir,collectClicks:Cr,getClickSelectors:a,getClickMetasBySelector:i}),y=(({executeCachedViewDecisions:e,viewCache:t,showContainers:n})=>({personalizationDetails:o,onResponse:r,onRequestFailure:i})=>{const a=o.getViewName();return t.getView(a).then((t=>{o.isRenderDecisions()&&e({viewName:a,viewDecisions:t}),r((()=>o.isRenderDecisions()?{propositions:kr({decisions:t,renderAttempted:!0})}:{decisions:t,propositions:kr({decisions:t,renderAttempted:!1})})),i((()=>{n()}))}))})({executeCachedViewDecisions:g,viewCache:c,showContainers:Fo});var w;return(({logger:e,fetchDataHandler:t,viewChangeHandler:n,onClickHandler:o,isAuthoringModeEnabled:r,mergeQuery:i,viewCache:a})=>({lifecycle:{onBeforeEvent({event:o,renderDecisions:s,decisionScopes:c=[],onResponse:u=qt,onRequestFailure:l=qt}){if(r())return e.warn("Rendering is disabled for authoring mode."),void i(o,{enabled:!1});const d=wo({renderDecisions:s,decisionScopes:c,event:o,viewCache:a});if(d.shouldFetchData()){const e=Qe();return a.storeViews(e.promise),void t({decisionsDeferred:e,personalizationDetails:d,event:o,onResponse:u,onRequestFailure:l})}d.shouldUseCachedData()&&n({personalizationDetails:d,onResponse:u,onRequestFailure:l})},onClick({event:e,clickedElement:t}){o({event:e,clickedElement:t})}}}))({logger:t,fetchDataHandler:h,viewChangeHandler:y,onClickHandler:v,isAuthoringModeEnabled:Er,mergeQuery:xr,viewCache:c})};Pr.namespace="Personalization",Pr.configValidators={prehidingStyle:xn().nonEmpty()};const Or=Pr,Ar="2.8.0";var jr;const Nr={web:(e=>t=>{const n={webPageDetails:{URL:e.location.href||e.location},webReferrer:{URL:e.document.referrer}};ze(t,{web:n})})(window),device:(e=>t=>{const{screen:{width:n,height:o}}=e,r={screenHeight:o,screenWidth:n},i=(e=>{const{screen:{orientation:t}}=e;if(null==t||null==t.type)return null;const n=t.type.split("-");return 0===n.length||"portrait"!==n[0]&&"landscape"!==n[0]?null:n[0]})(e)||(e=>e.matchMedia("(orientation: portrait)").matches?"portrait":e.matchMedia("(orientation: landscape)").matches?"landscape":null)(e);i&&(r.screenOrientation=i),ze(t,{device:r})})(window),environment:(e=>t=>{const{document:{documentElement:{clientWidth:n,clientHeight:o}={}}}=e,r={type:"browser"};Ot(n)&&n>=0&&Ot(o)&&o>=0&&(r.browserDetails={viewportWidth:Math.round(n),viewportHeight:Math.round(o)}),ze(t,{environment:r})})(window),placeContext:(jr=()=>new Date,e=>{const t=jr(),n={localTime:Vt(t),localTimezoneOffset:t.getTimezoneOffset()};ze(e,{placeContext:n})})},qr=[e=>{const t=(new Date).toISOString();ze(e,{timestamp:t})},e=>{ze(e,{implementationDetails:{name:"https://ns.adobe.com/experience/alloy",version:Ar,environment:"browser"}})}],Mr=({config:e,logger:t})=>((e,t,n,o)=>{const r=e.context,i=Ct(r,((e,o)=>n[e]?[n[e]]:(t.warn(`Invalid context[${o}]: '${e}' is not available.`),[]))).concat(o);return{namespace:"Context",lifecycle:{onBeforeEvent({event:e}){const t={};i.forEach((e=>e(t))),e.mergeXdm(t)}}}})(e,t,Nr,qr);Mr.namespace="Context",Mr.configValidators={context:yn(xn()).default(Object.keys(Nr))};const Ur=Mr,Br=e=>Array.isArray(e)?e.map((e=>Br(e))):"object"==typeof e&&null!==e?Object.keys(e).sort().reduce(((t,n)=>(t[n]=Br(e[n]),t)),{}):e,$r=({standard:e,version:t})=>`${e}.${t}`,Lr=()=>{const e={},t=ao({content:e,addIdentity:(t,n)=>{e.identityMap=e.identityMap||{},e.identityMap[t]=e.identityMap[t]||[],e.identityMap[t].push(n)}});return t.setConsent=t=>{e.consent=t},t},_r=e=>ro({payload:e,getAction:()=>"privacy/set-consent",getUseSendBeacon:()=>!1}),Vr=e=>e.split(";").reduce(((e,t)=>{const[n,o]=t.split("=");return e[n]=o,e}),{}),Fr=In({consent:yn(vn()).required().nonEmpty(),identityMap:Sn}).noUnknownFields().required(),Hr=({config:e,consent:t,sendEdgeNetworkRequest:n,createNamespacedStorage:o})=>{const{orgId:r,defaultConsent:i}=e,a=(({parseConsentCookie:e,orgId:t,cookieJar:n})=>{const o=St(t,"consent");return{read(){const t=n.get(o);return t?e(t):{}},clear(){n.remove(o)}}})({parseConsentCookie:Vr,orgId:r,cookieJar:_e}),s=(()=>{let e=0,t=Promise.resolve();return{addTask(n){e+=1;const o=()=>n().finally((()=>{e-=1}));return t=t.then(o,o),t},get length(){return e}}})(),c=(({createConsentRequestPayload:e,createConsentRequest:t,sendEdgeNetworkRequest:n})=>({consentOptions:o,identityMap:r})=>{const i=e();i.setConsent(o),Fe(r)&&Object.keys(r).forEach((e=>{r[e].forEach((t=>{i.addIdentity(e,t)}))}));const a=t(i);return n({request:a}).then((()=>{}))})({createConsentRequestPayload:Lr,createConsentRequest:_r,sendEdgeNetworkRequest:n}),u=(({storage:e})=>({clear(){e.clear()},lookup(t){const n={},o=e=>{const t=$r(e),{standard:o,version:r,...i}=e;var a;return n[t]||(n[t]=(a=i,We(JSON.stringify(Br(a)))).toString()),n[t]};return{isNew:()=>t.some((t=>{const n=$r(t),r=e.getItem(n);return null===r||r!==o(t)})),save(){t.forEach((t=>{const n=$r(t);e.setItem(n,o(t))}))}}}}))({storage:o(`${kt(r)}.consentHashes.`).persistent}),l=Tt({orgId:r});return(({storedConsent:e,taskQueue:t,defaultConsent:n,consent:o,sendSetConsentRequest:r,validateSetConsentOptions:i,consentHashStore:a,doesIdentityCookieExist:s})=>{const c={general:n};let u=e.read();const l=s(),d=void 0!==u.general;l&&d||a.clear(),l||(e.clear(),u={}),o.initializeConsent(c,u);const f=()=>{if(0===t.length){const t=e.read();void 0!==t.general&&o.setConsent(t)}};return{commands:{setConsent:{optionsValidator:i,run:({consent:e,identityMap:n})=>{o.suspend();const i=a.lookup(e);return t.addTask((()=>i.isNew()?r({consentOptions:e,identityMap:n}):Promise.resolve())).then((()=>i.save())).finally(f)}}},lifecycle:{onResponse:f,onRequestFailure:f}}})({storedConsent:a,taskQueue:s,defaultConsent:i,consent:t,sendSetConsentRequest:c,validateSetConsentOptions:Fr,consentHashStore:u,doesIdentityCookieExist:l})};Hr.namespace="Privacy";const zr=Hr,Jr=()=>({eventMergeId:Ht()}),Xr=()=>(({createEventMergeId:e})=>({commands:{createEventMergeId:{run:e}}}))({createEventMergeId:Jr});Xr.namespace="EventMerge",Xr.configValidators={};const Wr=Xr,Qr=()=>({commands:{getLibraryInfo:{run:()=>({libraryInfo:{version:Ar}})}}});Qr.namespace="LibraryInfo";const Gr=Qr,Yr=({response:e})=>({inferences:e.getPayloadsByType("rtml:inferences")}),Zr=()=>({lifecycle:{onResponse:Yr},commands:{}});Zr.namespace="MachineLearning",Zr.configValidators={};const Kr=[Hn,Xn,lo,mo,Or,Ur,zr,Wr,Gr,Zr],ei=e=>$e({},e),ti=({errorPrefix:e,logger:t})=>(n,o)=>{const r=Bt(n);if(r.code===An)return t.warn(`The ${o} could not fully complete. ${r.message}`),{};throw $t({error:r,message:`${e} ${r.message}`}),r},ni=({getDebugEnabled:e,console:t,getMonitors:n,context:o})=>{let r=`[${o.instanceName}]`;o.componentName&&(r+=` [${o.componentName}]`);const i=(e,t)=>{const r=n();if(r.length>0){const n=$e({},o,t);r.forEach((t=>{t[e]&&t[e](n)}))}},a=(n,...o)=>{i("onBeforeLog",{level:n,arguments:o}),e()&&t[n](r,...o)};return{get enabled(){return n().length>0||e()},logOnInstanceCreated(e){i("onInstanceCreated",e),a("info","Instance initialized.")},logOnInstanceConfigured(e){i("onInstanceConfigured",e),a("info","Instance configured. Computed configuration:",e.config)},logOnBeforeCommand(e){i("onBeforeCommand",e),a("info",`Executing ${e.commandName} command. Options:`,e.options)},logOnCommandResolved(e){i("onCommandResolved",e),a("info",`${e.commandName} command resolved. Result:`,e.result)},logOnCommandRejected(e){i("onCommandRejected",e),a("error",`${e.commandName} command was rejected. Error:`,e.error)},logOnBeforeNetworkRequest(e){i("onBeforeNetworkRequest",e),a("info",`Request ${e.requestId}: Sending request.`,e.payload)},logOnNetworkResponse(e){i("onNetworkResponse",e);const t=e.parsedBody||e.body?"response body:":"no response body.";a("info",`Request ${e.requestId}: Received response with status code ${e.statusCode} and ${t}`,e.parsedBody||e.body)},logOnNetworkError(e){i("onNetworkError",e),a("error",`Request ${e.requestId}: Network request failed.`,e.error)},info:a.bind(null,"info"),warn:a.bind(null,"warn"),error:a.bind(null,"error")}},oi="Event was canceled because the onBeforeEventSend callback returned false.",ri=()=>{const e={},t=ao({content:e,addIdentity:so(e)});return t.addEvent=t=>{e.events=e.events||[],e.events.push(t)},t.getDocumentMayUnload=()=>(e.events||[]).some((e=>e.getDocumentMayUnload())),t},ii=e=>{const t=({isIdentityEstablished:t})=>e.getDocumentMayUnload()&&t;return ro({payload:e,getAction:({isIdentityEstablished:e})=>t({isIdentityEstablished:e})?"collect":"interact",getUseSendBeacon:t})},ai="The server responded with a",si=[429,503,502,504],ci=({response:e,retriesAttempted:t})=>t<3&&qe(si,e.statusCode),ui=({response:e,retriesAttempted:t})=>{let n=(e=>{const t=e.getHeader("Retry-After");let n;if(t){const e=parseInt(t,10);n=At(e)?1e3*e:Math.max(0,new Date(t).getTime()-(new Date).getTime())}return n})(e);return void 0===n&&(n=(e=>{const t=1e3+1e3*e,n=.3*t,o=t-n,r=t+n;return Math.round(o+Math.random()*(r-o))})(t)),n},li=Dt(window),{console:di,fetch:fi,navigator:gi,XMLHttpRequest:pi}=window,mi={debugEnabled:wn().default(!1),defaultConsent:kn(Pn,"out",On).default(Pn),edgeConfigId:xn().unique().required(),edgeDomain:xn().domain().default("edge.adobedc.net"),edgeBasePath:xn().nonEmpty().default("ee"),orgId:xn().unique().required(),onBeforeEventSend:bn().default(qt)},hi=xt(window,_e),vi=rt(fi)?(({fetch:e})=>(t,n)=>e(t,{method:"POST",cache:"no-cache",credentials:"include",headers:{"Content-Type":"text/plain; charset=UTF-8"},referrer:"client",body:n}).then((e=>e.text().then((t=>({statusCode:e.status,getHeader:t=>e.headers.get(t),body:t}))))))({fetch:fi}):(({XMLHttpRequest:e})=>(t,n)=>new Promise(((o,r)=>{const i=new e;i.onreadystatechange=()=>{4===i.readyState&&(0===i.status?r(new Error("Request aborted.")):o({statusCode:i.status,getHeader:e=>i.getResponseHeader(e),body:i.responseText}))},i.onloadstart=()=>{i.responseType="text"},i.open("POST",t,!0),i.setRequestHeader("Content-Type","text/plain; charset=UTF-8"),i.withCredentials=!0,i.onerror=r,i.onabort=r,i.send(n)})))({XMLHttpRequest:pi}),yi=({instanceName:e,logController:{setDebugEnabled:t,logger:n,createComponentLogger:o}})=>{const r=Dn(),i=(e=>Tn.reduce(((t,n)=>{var o;return t[n]=(o=((e,t)=>(...n)=>Promise.all(e.getLifecycleCallbacks(t).map((e=>new Promise((t=>{t(e(...n))}))))))(e,n),(...e)=>Promise.resolve().then((()=>o(...e)))),t}),{}))(r),a=ti({errorPrefix:`[${e}]`,logger:n}),s=Ln({logger:n,configureCommand:a=>{const s=(({options:e,componentCreators:t,coreConfigValidators:n,createConfig:o,logger:r,setDebugEnabled:i})=>{const a=((e,t)=>{const n={};return $e(n,e),t.forEach((e=>{const{configValidators:t}=e;$e(n,t)})),n})(n,t),s=o(((e,t)=>{try{return In(e).noUnknownFields().required()(t)}catch(e){throw new Error(`Resolve these configuration problems:\n\t - ${e.message.split("\n").join("\n\t - ")}\nFor configuration documentation see: https://adobe.ly/2M4ErNE`)}})(a,e));return i(s.debugEnabled,{fromConfig:!0}),r.logOnInstanceConfigured({config:s}),s})({options:a,componentCreators:Kr,coreConfigValidators:mi,createConfig:ei,logger:n,setDebugEnabled:t}),c=(({cookieJar:e,orgId:t,apexDomain:n})=>({cookiesToPayload(o,r){const i=(a=n,r.substr(-a.length)===a);var a;const s={domain:n,cookiesEnabled:!0};if(!i){const n=e.get(),o=Object.keys(n).filter((e=>((e,t)=>0===t.indexOf(`kndctr_${kt(e)}_`))(t,e))).map((e=>({key:e,value:n[e]})));o.length&&(s.entries=o)}o.mergeState(s)},responseToCookies(t){t.getPayloadsByType("state:store").forEach((t=>{const o={domain:n};void 0!==t.maxAge&&(o.expires=1e3*t.maxAge/864e5),e.set(t.key,t.value,o)}))}}))({cookieJar:_e,orgId:s.orgId,apexDomain:hi}),u=rt(gi.sendBeacon)?(({sendBeacon:e,sendFetchRequest:t,logger:n})=>(o,r)=>{const i=new Blob([r],{type:"text/plain; charset=UTF-8"});return e(o,i)?Promise.resolve({statusCode:204,getHeader:()=>null,body:""}):(n.info("Unable to use `sendBeacon`; falling back to `fetch`."),t(o,r))})({sendBeacon:gi.sendBeacon.bind(gi),sendFetchRequest:vi,logger:n}):vi,l=(({logger:e,sendFetchRequest:t,sendBeaconRequest:n,isRequestRetryable:o,getRequestRetryDelay:r})=>({requestId:i,url:a,payload:s,useSendBeacon:c})=>{const u=JSON.stringify(s),l=JSON.parse(u);e.logOnBeforeNetworkRequest({url:a,requestId:i,payload:l});const d=(s=0)=>(c?n:t)(a,u).then((t=>{if(o({response:t,retriesAttempted:s})){const e=r({response:t,retriesAttempted:s});return new Promise((t=>{setTimeout((()=>{t(d(s+1))}),e)}))}let n;try{n=JSON.parse(t.body)}catch(e){}return e.logOnNetworkResponse({requestId:i,url:a,payload:l,...t,parsedBody:n,retriesAttempted:s}),{statusCode:t.statusCode,body:t.body,parsedBody:n,getHeader:t.getHeader}}));return d().catch((t=>{throw e.logOnNetworkError({requestId:i,url:a,payload:l,error:t}),Lt({error:t,message:"Network request failed."})}))})({logger:n,sendFetchRequest:vi,sendBeaconRequest:u,isRequestRetryable:ci,getRequestRetryDelay:ui}),d=(({logger:e})=>t=>{const{statusCode:n,body:o,parsedBody:r}=t;if(n<200||n>=300||!r&&204!==n||r&&!Array.isArray(r.handle)){const e=r?JSON.stringify(r,null,2):o;throw new Error(`${ai} status code ${n} and ${e?`response body:\n${e}`:"no response body."}`)}if(r){const{warnings:t=[],errors:n=[]}=r;t.forEach((t=>{e.warn(`${ai} warning:`,t)})),n.forEach((t=>{e.error(`${ai} non-fatal error:`,t)}))}})({logger:n}),f=(({logger:e})=>t=>{if(t){const n=t.split(";");if(n.length>=2&&n[1].length>0)try{const e=parseInt(n[1],10);if(!isNaN(e))return{regionId:e}}catch(e){}e.warn(`Invalid adobe edge: "${t}"`)}return{}})({logger:n}),g=(({extractEdgeInfo:e})=>({content:t={},getHeader:n})=>{const{handle:o=[],errors:r=[],warnings:i=[]}=t;return{getPayloadsByType:e=>Ct(o.filter((t=>t.type===e)),(e=>e.payload)),getErrors:()=>r,getWarnings:()=>i,getEdge:()=>e(n("x-adobe-edge")),toJSON:()=>t}})({extractEdgeInfo:f}),p=(({config:e,lifecycle:t,cookieTransfer:n,sendNetworkRequest:o,createResponse:r,processWarningsAndErrors:i})=>{const{edgeDomain:a,edgeBasePath:s,edgeConfigId:c}=e;return({request:e,runOnResponseCallbacks:u=qt,runOnRequestFailureCallbacks:l=qt})=>{const d=Xe();d.add(t.onResponse),d.add(u);const f=Xe();return f.add(t.onRequestFailure),f.add(l),t.onBeforeRequest({request:e,onResponse:d.add,onRequestFailure:f.add}).then((()=>{const t=e.getUseIdThirdPartyDomain()?"adobedc.demdex.net":a,r=`https://${t}/${s}/v1/${e.getAction()}?configId=${c}&requestId=${e.getId()}`;return n.cookiesToPayload(e.getPayload(),t),o({requestId:e.getId(),url:r,payload:e.getPayload(),useSendBeacon:e.getUseSendBeacon()})})).then((e=>(i(e),e))).catch((e=>{const t=()=>{throw e};return f.call({error:e}).then(t,t)})).then((({parsedBody:e,getHeader:t})=>{const o=r({content:e,getHeader:t});return n.responseToCookies(o),d.call({response:o}).then((e=>{const t=e.shift()||[],n=e.shift()||[];return $e({},...t,...n,...e)}))}))}})({config:s,lifecycle:i,cookieTransfer:c,sendNetworkRequest:l,createResponse:g,processWarningsAndErrors:d}),m=(({generalConsentState:e,logger:t})=>{const n=(n,o)=>{switch(n.general){case Pn:e.in(o);break;case"out":e.out(o);break;case On:e.pending(o);break;default:t.warn(`Unknown consent value: ${n.general}`)}};return{initializeConsent(e,t){t.general?n(t,Nn):n(e,jn)},setConsent(e){n(e,qn)},suspend(){e.pending()},awaitConsent:()=>e.awaitConsent()}})({generalConsentState:Un({logger:n}),logger:n}),h=(({config:e,logger:t,lifecycle:n,consent:o,createEvent:r,createDataCollectionRequestPayload:i,createDataCollectionRequest:a,sendEdgeNetworkRequest:s})=>{const{onBeforeEventSend:c}=e;return{createEvent:r,sendEvent(e,r={}){const{renderDecisions:u=!1,decisionScopes:l}=r,d=i(),f=a(d),g=Xe(),p=Xe();return n.onBeforeEvent({event:e,renderDecisions:u,decisionScopes:l,onResponse:g.add,onRequestFailure:p.add}).then((()=>(d.addEvent(e),o.awaitConsent()))).then((()=>{try{e.finalize(c)}catch(e){const t=()=>{throw e};return p.add(n.onRequestFailure),p.call({error:e}).then(t,t)}if(!e.shouldSend()){p.add(n.onRequestFailure),t.info(oi);const e=new Error(oi);return p.call({error:e}).then((()=>{}))}return s({request:f,runOnResponseCallbacks:g.call,runOnRequestFailureCallbacks:p.call})}))}}})({config:s,logger:n,lifecycle:i,consent:m,createEvent:Bn,createDataCollectionRequestPayload:ri,createDataCollectionRequest:ii,sendEdgeNetworkRequest:p});return(({componentCreators:e,lifecycle:t,componentRegistry:n,getImmediatelyAvailableTools:o})=>(e.forEach((e=>{const{namespace:t}=e,r=o(t);let i;try{i=e(r)}catch(e){throw Lt({error:e,message:`[${t}] An error occurred during component creation.`})}n.register(t,i)})),t.onComponentsRegistered({lifecycle:t}).then((()=>n))))({componentCreators:Kr,lifecycle:i,componentRegistry:r,getImmediatelyAvailableTools(t){const n=o(t);return{config:s,consent:m,eventManager:h,logger:n,lifecycle:i,sendEdgeNetworkRequest:p,handleError:ti({errorPrefix:`[${e}] [${t}]`,logger:n}),createNamespacedStorage:li}}})},setDebugCommand:e=>{t(e.enabled,{fromConfig:!1})},handleError:a,validateCommandOptions:Vn});return s},{console:wi}=window,bi=Dt(window),Ci=((e={})=>{const t=In({name:xn().default("alloy"),monitors:yn(In({})).default([])}).noUnknownFields(),{name:n,monitors:o}=t(e),r=(({console:e,locationSearch:t,createLogger:n,instanceName:o,createNamespacedStorage:r,getMonitors:i})=>{const a=Ut.parse(t),s=r(`instance.${o}.`),c=s.session.getItem("debug");let u="true"===c,l=null===c;const d=()=>u,f=(e,{fromConfig:t})=>{t&&!l||(u=e),t||(s.session.setItem("debug",e.toString()),l=!1)};var g;return void 0!==a.alloy_debug&&f((g=a.alloy_debug,jt(g)&&"true"===g.toLowerCase()),{fromConfig:!1}),{setDebugEnabled:f,logger:n({getDebugEnabled:d,context:{instanceName:o},getMonitors:i,console:e}),createComponentLogger:t=>n({getDebugEnabled:d,context:{instanceName:o,componentName:t},getMonitors:i,console:e})}})({console:wi,locationSearch:window.location.search,createLogger:ni,instanceName:n,createNamespacedStorage:bi,getMonitors:()=>(window.__alloyMonitors||[]).concat(o)}),i=yi({instanceName:n,logController:r});return r.logger.logOnInstanceCreated({instance:i}),i})({name:"alloy"}),Ei=()=>(window.alloy||function(){const e=(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getAEP();return n?{imsOrgId:n.imsOrgId,datastreamId:n.datastreamId}:{}})();(function(e){return e.datastreamId&&""!==e.datastreamId&&e.imsOrgId&&""!==e.imsOrgId})(e)&&Ci("configure",{edgeConfigId:e.datastreamId,orgId:e.imsOrgId,debugEnabled:!0}).then((()=>{window.alloy=Ci}))}(),window.alloy),Ii=e=>{const{pageContext:t,productContext:n,shoppingCartContext:o}=e.eventInfo,r=v(n),i=S(o),a=[r];i&&a.push(i),Te({category:"product",action:"add-to-cart",property:null==t?void 0:t.pageType,context:a})},xi=e=>{const{pageContext:t,productContext:n,shoppingCartContext:o}=e.eventInfo,r=v(n),i=S(o),a=[r];i&&a.push(i),Te({category:"product",action:"view",property:null==t?void 0:t.pageType,context:a})},ki=e=>{const{unitId:t,productId:n,pageContext:o,recommendationsContext:r}=e.eventInfo,i=[],a=b(t,r);a&&i.push(a);const s=C(t,n,r);s&&i.push(s);const c=w(t,n,r);Te({category:"recommendation-unit",action:"rec-add-to-cart-click",property:null==o?void 0:o.pageType,value:null==c?void 0:c.rank,context:i})},Si=e=>{const{unitId:t,productId:n,pageContext:o,recommendationsContext:r}=e.eventInfo,i=[],a=b(t,r);a&&i.push(a);const s=C(t,n,r);s&&i.push(s);const c=w(t,n,r);Te({category:"recommendation-unit",action:"rec-click",property:null==o?void 0:o.pageType,value:null==c?void 0:c.rank,context:i})},Ti=e=>{const{pageContext:t}=e.eventInfo;Te({category:"recommendation-unit",action:"api-request-sent",property:null==t?void 0:t.pageType})},Ri=e=>{const{pageContext:t,recommendationsContext:n}=e.eventInfo,o=[],r=[];null==n||n.units.forEach((e=>{const t=b(e.unitId,n);t&&o.push(t),e.products.forEach((t=>{{const o=C(e.unitId,t.productId,n);o&&r.push(o)}}))})),Te({category:"recommendation-unit",action:"api-response-received",property:null==t?void 0:t.pageType,context:[...o,...r]})},Di=e=>{const{unitId:t,pageContext:n,recommendationsContext:o}=e.eventInfo,r=[],i=b(t,o);i&&r.push(i);const a=y(t,o);null==a||a.products.forEach((e=>{const n=C(t,e.productId,o);n&&r.push(n)})),Te({category:"recommendation-unit",action:"impression-render",property:null==n?void 0:n.pageType,context:r})},Pi=e=>{const{unitId:t,pageContext:n,recommendationsContext:o}=e.eventInfo,r=[],i=b(t,o);i&&r.push(i),Te({category:"recommendation-unit",action:"view",property:null==n?void 0:n.pageType,context:r})},Oi=e=>{const{searchUnitId:t,name:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=x(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:u,data:{}};const i=E(e,r);if(!i)return null;const a=((e,t)=>t.categories.find((t=>t.name===e))||null)(t,i);return a?{schema:u,data:{name:a.name,url:a.url,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Te({category:"search",action:"category-click",label:null==a?void 0:a.data.url,property:null==o?void 0:o.pageType,context:s})},Ai=e=>{const{searchUnitId:t,sku:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=x(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:l,data:{}};const i=E(e,r);if(!i)return null;const a=((e,t)=>t.products.find((t=>t.sku===e))||null)(t,i);return a?{schema:l,data:{name:a.name,sku:a.sku,url:a.url,imageUrl:a.imageUrl,price:a.price,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Te({category:"search",action:"product-click",label:null==a?void 0:a.data.sku,property:null==o?void 0:o.pageType,context:s})},ji=e=>{const{searchUnitId:t,pageContext:n,searchInputContext:o}=e.eventInfo,r=((e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getSearchInput();if(!o)return{schema:c,data:{}};const r=((e,t)=>t.units.find((t=>t.searchUnitId===e)))(e,o);return r?{schema:c,data:{searchUnitId:r.searchUnitId,source:null,queryTypes:r.queryTypes,searchRequestId:r.searchRequestId,query:r.phrase,page:r.currentPage,perPage:r.pageSize,filter:I(r),sort:r.sort}}:null})(t,o),i=[];r&&i.push(r),Te({category:"search",action:"api-request-sent",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})},Ni=e=>{const{searchUnitId:t,pageContext:n,searchResultsContext:o}=e.eventInfo,r=x(t,o),i=[];r&&i.push(r),Te({category:"search",action:"api-response-received",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})},qi=e=>{const{searchUnitId:t,pageContext:n,searchResultsContext:o}=e.eventInfo,r=x(t,o),i=[];r&&i.push(r),Te({category:"search",action:"results-view",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})},Mi=e=>{const{searchUnitId:t,suggestion:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=x(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:f,data:{}};const i=E(e,r);if(!i)return null;const a=((e,t)=>t.suggestions.find((t=>t.suggestion===e))||null)(t,i);return a?{schema:f,data:{suggestion:a.suggestion,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Te({category:"search",action:"suggestion-click",label:null==a?void 0:a.data.suggestion,property:null==o?void 0:o.pageType,context:s})},Ui=e=>{const{pageContext:t,shoppingCartContext:n}=e.eventInfo,o=S(n),r=[];o&&r.push(o),Te({category:"shopping-cart",action:"view",property:null==t?void 0:t.pageType,context:r})},Bi=(e,t)=>n=>{e(n)&&t(n)},$i=Bi((e=>!0),(()=>{ke(undefined,(function(e){e.trackPageView(undefined)}))})),Li=Bi((e=>{var t;return null!==(t=(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getEventForwarding();return n?{aep:n.aep,snowplow:n.snowplow}:{}})(e.eventInfo.eventForwardingContext).aep)&&void 0!==t&&t}),(()=>{const e=Ei();e&&e("sendEvent",{web:{webPageDetails:{pageViews:{id:"1",value:1}}}})}));var _i={},Vi={};function Fi(e,t,n){for(var o,r,i,a,s,c;null!==(o=t.parentElement)&&null!=o&&"A"!==(r=t.tagName.toUpperCase())&&"AREA"!==r;)t=o;var u,l=t;if(null!=l.href){var d=l.hostname||ue(l.href),f=d.toLowerCase(),g=l.href.replace(d,f);new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):","i").test(g)||(i=l.id,a=be(l),s=l.target,c=Vi[e.id].linkTrackingContent?l.innerHTML:void 0,g=unescape(g),e.core.track(function(e){var t=e.event,n=t.schema,o=t.data,r=q(),i={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:n,data:o}};return r.add("e","ue"),r.addJson("ue_px","ue_pr",i),r}({event:{schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:oe({targetUrl:(u={targetUrl:g,elementId:i,elementClasses:a,elementTarget:s,elementContent:c}).targetUrl,elementId:u.elementId,elementClasses:u.elementClasses,elementTarget:u.elementTarget,elementContent:u.elementContent})}}),function(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return null!==(t=null==e?void 0:e.map((function(e){if("function"!=typeof e)return e;try{return e.apply(void 0,n)}catch(e){return}})).filter(Boolean))&&void 0!==t?t:[]}(n,t)))}}function Hi(e,t){return function(n){var o,r;o=(n=n||window.event).which||n.button,r=n.target||n.srcElement,"click"===n.type?r&&Fi(_i[e],r,t):"mousedown"===n.type?1!==o&&2!==o||!r?Vi[e].lastButton=Vi[e].lastTarget=null:(Vi[e].lastButton=o,Vi[e].lastTarget=r):"mouseup"===n.type&&(o===Vi[e].lastButton&&r===Vi[e].lastTarget&&Fi(_i[e],r,t),Vi[e].lastButton=Vi[e].lastTarget=null)}}function zi(e,t){Vi[e].linkTrackingPseudoClicks?(fe(t,"mouseup",Hi(e,Vi[e].linkTrackingContext),!1),fe(t,"mousedown",Hi(e,Vi[e].linkTrackingContext),!1)):fe(t,"click",Hi(e,Vi[e].linkTrackingContext),!1)}function Ji(e,t){var n=void 0===e?{}:e,o=n.options,r=n.pseudoClicks,i=n.trackContent,a=n.context;Vi[t]={linkTrackingContent:i,linkTrackingContext:a,linkTrackingPseudoClicks:r,linkTrackingFilter:we(o)}}function Xi(e){var t,n,o,r=document.links;for(o=0;o<r.length;o++)(null===(n=(t=Vi[e]).linkTrackingFilter)||void 0===n?void 0:n.call(t,r[o]))&&!r[o][e]&&(zi(e,r[o]),r[o][e]=!0)}const Wi=({appId:e,collectorUrl:t,collectorPath:n})=>{const o={appId:e,platform:"web",discoverRootDomain:!0,cookieName:"mg",encodeBase64:!0,respectDoNotTrack:!1,sessionCookieTimeout:1800,eventMethod:"beacon",bufferSize:1,maxPostBytes:4e4,crossDomainLinker:void 0,cookieLifetime:63072e3,stateStorageStrategy:"localStorage",postPath:n,contexts:{webPage:!0},plugins:[{contexts:function(){return n=(t=(e=window).performance||e.mozPerformance||e.msPerformance||e.webkitPerformance).timing,t?[{schema:"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",data:{navigationStart:n.navigationStart,redirectStart:n.redirectStart,redirectEnd:n.redirectEnd,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,domainLookupEnd:n.domainLookupEnd,connectStart:n.connectStart,secureConnectionStart:n.secureConnectionStart,connectEnd:n.connectEnd,requestStart:n.requestStart,responseStart:n.responseStart,responseEnd:n.responseEnd,unloadEventStart:n.unloadEventStart,unloadEventEnd:n.unloadEventEnd,domLoading:n.domLoading,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoadedEventEnd:n.domContentLoadedEventEnd,domComplete:n.domComplete,loadEventStart:n.loadEventStart,loadEventEnd:n.loadEventEnd,msFirstPaint:n.msFirstPaint,chromeFirstPaint:n.chromeFirstPaint,requestEnd:n.requestEnd,proxyStart:n.proxyStart,proxyEnd:n.proxyEnd}}]:[];var e,t,n}},{activateBrowserPlugin:function(e){_i[e.id]=e}}]};!function(e,t,n){void 0===n&&(n={}),Re&&function(e,t,n,o,r,i){xe.hasOwnProperty(e)||(xe[e]=Ie(e,t,"js-3.2.3",o,r,i),xe[e])}(e,e,0,t,Re,n)}("sp",t,o);const r=T();var i;i=r,ke(undefined,(function(e){e.core.addGlobalContexts(i)})),ke(void 0,(function(e){e.setOptOutCookie("mg_dnt")})),function(e,t){ke(void 0,(function(t){t.enableActivityTracking(e)}))}({minimumVisitLength:5,heartbeatDelay:5}),function(e,t){void 0===e&&(e={}),void 0===t&&(t=Object.keys(_i)),t.forEach((function(t){_i[t]&&(_i[t].sharedState.hasLoaded?(Ji(e,t),Xi(t)):_i[t].sharedState.registeredOnLoadHandlers.push((function(){Ji(e,t),Xi(t)})))}))}()},Qi=()=>{Wi({appId:"magento-storefront-event-collector",collectorUrl:"https://commerce.adobedc.net",collectorPath:"/collector/tp2"}),(()=>{const e=window.magentoStorefrontEvents;e.subscribe.addToCart(Ii),e.subscribe.instantPurchase(De),e.subscribe.pageView($i),e.subscribe.pageView(Li),e.subscribe.placeOrder(Pe),e.subscribe.productPageView(xi),e.subscribe.recsItemAddToCartClick(ki),e.subscribe.recsItemClick(Si),e.subscribe.recsRequestSent(Ti),e.subscribe.recsResponseReceived(Ri),e.subscribe.recsUnitRender(Di),e.subscribe.recsUnitView(Pi),e.subscribe.searchCategoryClick(Oi),e.subscribe.searchProductClick(Ai),e.subscribe.searchRequestSent(ji),e.subscribe.searchResponseReceived(Ni),e.subscribe.searchResultsView(qi),e.subscribe.searchSuggestionClick(Mi),e.subscribe.shoppingCartView(Ui)})()};window.magentoStorefrontEvents?Qi():window.addEventListener("message",(e=>{"magento-storefront-events-sdk"===e.data&&window.magentoStorefrontEvents&&(Qi(),window.removeEventListener("message",Qi))}),!1)},877:(e,t,n)=>{var o=n(570),r=n(171),i=r;i.v1=o,i.v4=r,e.exports=i},327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},570:(e,t,n)=>{var o,r,i=n(217),a=n(327),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,l=t||[],d=(e=e||{}).node||o,f=void 0!==e.clockseq?e.clockseq:r;if(null==d||null==f){var g=i();null==d&&(d=o=[1|g[0],g[1],g[2],g[3],g[4],g[5]]),null==f&&(f=r=16383&(g[6]<<8|g[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,h=p-s+(m-c)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||p>s)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,c=m,r=f;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;l[u++]=v>>>24&255,l[u++]=v>>>16&255,l[u++]=v>>>8&255,l[u++]=255&v;var y=p/4294967296*1e4&268435455;l[u++]=y>>>8&255,l[u++]=255&y,l[u++]=y>>>24&15|16,l[u++]=y>>>16&255,l[u++]=f>>>8|128,l[u++]=255&f;for(var w=0;w<6;++w)l[u+w]=d[w];return t||a(l)}},171:(e,t,n)=>{var o=n(217),r=n(327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||r(a)}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o=n(787);return o.default})()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("magentoStorefrontEventCollector",[],t):"object"==typeof exports?exports.magentoStorefrontEventCollector=t():e.magentoStorefrontEventCollector=t()}(self,(function(){return(()=>{var e={252:(e,t,n)=>{"use strict";var o=n(808);e.exports={get:o.get,set:o.set,remove:o.remove}},658:(e,t,n)=>{"use strict";var o=n(387);e.exports=function(e){var t=document.createElement("script");t.src=e,t.async=!0;var n=function(e,t){return new o((function(n,o){t.onload=function(){n(t)},t.onerror=function(){o(new Error("Failed to load script "+e))}}))}(e,t);return document.getElementsByTagName("head")[0].appendChild(t),n}},743:(e,t,n)=>{"use strict";e.exports=n(418)},387:(e,t,n)=>{"use strict";e.exports="undefined"!=typeof window&&window.Promise||void 0!==n.g&&n.g.Promise||n(595).default||n(595)},366:(e,t,n)=>{"use strict";var o=n(673);e.exports={parse:function(e){return"string"==typeof e&&(e=e.trim().replace(/^[?#&]/,"")),o.parse(e)},stringify:function(e){return o.stringify(e)}}},487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},12:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],i=0;i<4;i++)8*o+6*i<=8*e.length?n.push(t.charAt(r>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},269:function(e,t,n){var o;o=void 0!==n.g?n.g:this,e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),o=n.length,r=-1,i="",a=n.charCodeAt(0);++r<o;)0!=(t=n.charCodeAt(r))?i+=t>=1&&t<=31||127==t||0==r&&t>=48&&t<=57||1==r&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":0==r&&1==o&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(r):n.charAt(r):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(o)},808:(e,t,n)=>{var o,r,i;i=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(o){function r(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=o.write?o.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(o.read||o)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(e){}if(r[u]=c,e===u)break}catch(e){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return a(e,!1)},r.getJSON=function(e){return a(e,!0)},r.remove=function(t,n){i(t,"",e(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}((function(){}))},void 0===(r="function"==typeof(o=i)?o.call(t,n,t,e):o)||(e.exports=r),e.exports=i()},418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,c=r(e),u=1;u<arguments.length;u++){for(var d in a=Object(arguments[u]))n.call(a,d)&&(c[d]=a[d]);if(t){s=t(a);for(var l=0;l<s.length;l++)o.call(a,s[l])&&(c[s[l]]=a[s[l]])}}return c}},595:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var o=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function i(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void u(t.promise,e)}c(t.promise,o)}else(1===e._state?c:u)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void d(e);if("function"==typeof n)return void f((o=n,r=t,function(){o.apply(r,arguments)}),e)}e._state=1,e._value=t,d(e)}catch(t){u(e,t)}var o,r}function u(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&a._immediateFn((function(){e._handled||a._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1;try{e((function(e){n||(n=!0,c(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(e){if(n)return;n=!0,u(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(i);return s(this,new l(e,t,n)),n},a.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))},a.all=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var i=o.length;function a(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,(function(t){a(e,t)}),n)}o[e]=r,0==--i&&t(o)}catch(e){n(e)}}for(var s=0;s<o.length;s++)a(s,o[s])}))},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a((function(t){t(e)}))},a.reject=function(e){return new a((function(t,n){n(e)}))},a.race=function(e){return new a((function(t,n){if(!r(e))return n(new TypeError("Promise.race accepts an array"));for(var o=0,i=e.length;o<i;o++)a.resolve(e[o]).then(t,n)}))},a._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){o(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const p=a},587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,o,r){n=n||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var d,l,f,p,g=e[u].replace(a,"%20"),m=g.indexOf(o);m>=0?(d=g.substr(0,m),l=g.substr(m+1)):(d=g,l=""),f=decodeURIComponent(d),p=decodeURIComponent(l),t(i,f)?Array.isArray(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i}},361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,o,r){return n=n||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var i=encodeURIComponent(t(r))+o;return Array.isArray(e[r])?e[r].map((function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[r]))})).join(n):r?encodeURIComponent(t(r))+o+encodeURIComponent(t(e)):""}},673:(e,t,n)=>{"use strict";t.decode=t.parse=n(587),t.encode=t.stringify=n(361)},738:(e,t,n)=>{var o,r,i,a;o=n(12),r=n(487).utf8,i=n(487).bin,(a=function(e,t){var n=o.wordsToBytes(function(e){e.constructor==String?e=r.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var t=o.bytesToWords(e),n=8*e.length,i=[],a=1732584193,s=-271733879,c=-1732584194,u=271733878,d=-1009589776;t[n>>5]|=128<<24-n%32,t[15+(n+64>>>9<<4)]=n;for(var l=0;l<t.length;l+=16){for(var f=a,p=s,g=c,m=u,h=d,v=0;v<80;v++){if(v<16)i[v]=t[l+v];else{var y=i[v-3]^i[v-8]^i[v-14]^i[v-16];i[v]=y<<1|y>>>31}var w=(a<<5|a>>>27)+d+(i[v]>>>0)+(v<20?1518500249+(s&c|~s&u):v<40?1859775393+(s^c^u):v<60?(s&c|s&u|c&u)-1894007588:(s^c^u)-899497514);d=u,u=c,c=s<<30|s>>>2,s=a,a=w}a+=f,s+=p,c+=g,u+=m,d+=h}return[a,s,c,u,d]}(e));return t&&t.asBytes?n:t&&t.asString?i.bytesToString(n):o.bytesToHex(n)})._blocksize=16,a._digestsize=20,e.exports=a},934:(e,t,n)=>{"use strict";const o="iglu:com.adobe.magento.entity/magento-extension/jsonschema/1-0-0",r="iglu:com.adobe.magento.entity/data-services-extension/jsonschema/1-0-1",i="iglu:com.adobe.magento.entity/recommendations-extension/jsonschema/1-0-0",a="iglu:com.adobe.magento.entity/search-extension/jsonschema/1-0-0",s="iglu:com.adobe.magento.entity/magento-js-tracker/jsonschema/2-0-0",c="iglu:com.adobe.magento.entity/product/jsonschema/2-0-3",u="iglu:com.adobe.magento.entity/recommendation-unit/jsonschema/1-0-4",d="iglu:com.adobe.magento.entity/recommended-item/jsonschema/1-0-4",l="iglu:com.adobe.magento.entity/search-input/jsonschema/1-0-11",f="iglu:com.adobe.magento.entity/search-result-category/jsonschema/1-0-1",p="iglu:com.adobe.magento.entity/search-result-product/jsonschema/1-0-2",g="iglu:com.adobe.magento.entity/search-results/jsonschema/1-0-9",m="iglu:com.adobe.magento.entity/search-result-suggestion/jsonschema/1-0-1",h="iglu:com.adobe.magento.entity/shopping-cart/jsonschema/2-0-0",v="iglu:com.adobe.magento.entity/shopper/jsonschema/1-0-0",y="iglu:com.adobe.magento.entity/storefront-instance/jsonschema/3-0-0",w=e=>{var t,n;if(e.pricing)return{regularPrice:e.pricing.regularPrice,minimalPrice:e.pricing.minimalPrice,maximalPrice:e.pricing.maximalPrice,specialPrice:e.pricing.specialPrice,tierPricing:null===(t=e.pricing.tierPricing)||void 0===t?void 0:t.map((e=>{var t;return{customerGroupId:null!==(t=e.customerGroupId)&&void 0!==t?t:null,qty:e.qty,value:e.value}})),currencyCode:null!==(n=e.pricing.currencyCode)&&void 0!==n?n:null}},b=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getProduct();return n?{schema:c,data:{productId:n.productId,name:n.name,sku:n.sku,topLevelSku:n.topLevelSku,specialToDate:n.specialToDate,specialFromDate:n.specialFromDate,newToDate:n.newToDate,newFromDate:n.newFromDate,createdAt:n.createdAt,updatedAt:n.updatedAt,manufacturer:n.manufacturer,countryOfManufacture:n.countryOfManufacture,categories:n.categories,productType:n.productType,pricing:w(n),canonicalUrl:n.canonicalUrl,mainImageUrl:n.mainImageUrl}}:{schema:c,data:{}}},C=(e,t)=>(null==t?void 0:t.units.find((t=>t.unitId===e)))||null,x=(e,t,n)=>{const o=C(e,n);if(!o)return null;return o.products.find((e=>e.productId===t))||null},I=(e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getRecommendations();if(!o)return{schema:u,data:{}};const r=C(e,o);return r?{schema:u,data:{name:r.unitName,unitId:r.unitId,itemsCount:r.totalProducts,backupsCount:r.backupProducts,configType:"preconfigured",source:"api",recType:r.typeId,placement:r.pagePlacement,yOffsetTop:r.yOffsetTop,yOffsetBottom:r.yOffsetBottom}}:null},E=(e,t,n)=>{var o,r;const i=window.magentoStorefrontEvents,a=null!=n?n:i.context.getRecommendations();if(!a)return{schema:d,data:{}};if(!C(e,a))return null;const s=x(e,t,a);return s?{schema:d,data:Object.assign(Object.assign({unitId:e,serviceRank:s.rank,displayRank:s.rank,name:s.name,sku:s.sku,url:s.url,imageUrl:null!==(r=null===(o=s.image)||void 0===o?void 0:o.url)&&void 0!==r?r:null},s.prices&&{prices:{maximum:{final:s.prices.maximum.final,regular:s.prices.maximum.regular,finalAdjustments:s.prices.maximum.finalAdjustments.map((e=>({code:e.code,amount:e.amount}))),regularAdjustments:s.prices.maximum.regularAdjustments.map((e=>({code:e.code,amount:e.amount})))},minimum:{final:s.prices.minimum.final,regular:s.prices.minimum.regular,finalAdjustments:s.prices.minimum.finalAdjustments.map((e=>({code:e.code,amount:e.amount}))),regularAdjustments:s.prices.minimum.regularAdjustments.map((e=>({code:e.code,amount:e.amount})))}}}),{currencyCode:s.currency})}:null},k=(e,t)=>t.units.find((t=>t.searchUnitId===e)),S=e=>{const t=[];return e.filter.forEach((e=>{var n,o,r,i,a,s,c;if(e.eq&&t.push({name:e.attribute,values:[e.eq],operator:"eq"}),(null===(n=e.in)||void 0===n?void 0:n.length)&&t.push({name:e.attribute,values:e.in,operator:"in"}),e.range){const n=[];(null===(o=e.range)||void 0===o?void 0:o.from)&&n.push(null===(i=null===(r=e.range)||void 0===r?void 0:r.from)||void 0===i?void 0:i.toString()),(null===(a=e.range)||void 0===a?void 0:a.to)&&n.push(null===(c=null===(s=e.range)||void 0===s?void 0:s.to)||void 0===c?void 0:c.toString()),t.push({name:e.attribute,values:n,operator:"range"})}})),t},T=(e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getSearchInput();if(!o)return{schema:l,data:{}};const r=((e,t)=>t.units.find((t=>t.searchUnitId===e)))(e,o);return r?{schema:l,data:{searchUnitId:r.searchUnitId,source:null,queryTypes:r.queryTypes,searchRequestId:r.searchRequestId,query:r.phrase,page:r.currentPage,perPage:r.pageSize,filter:S(r),sort:r.sort}}:null},R=(e,t)=>{const n=window.magentoStorefrontEvents,o=null!=t?t:n.context.getSearchResults();if(!o)return{schema:g,data:{}};const r=k(e,o);return r?{schema:g,data:{searchUnitId:r.searchUnitId,searchRequestId:r.searchRequestId,executionTime:r.executionTime,products:r.products,categories:r.categories,suggestions:r.suggestions,productCount:r.products.length,categoryCount:r.categories.length,suggestionCount:r.suggestions.length,page:r.page,perPage:r.perPage,facets:r.facets}}:null},D=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getShoppingCart();return n.items?n.items.map((e=>{var t;return{basePrice:e.prices.price.value,cartItemId:e.id,mainImageUrl:null!==(t=e.product.mainImageUrl)&&void 0!==t?t:void 0,offerPrice:e.prices.price.value,productName:e.product.name,productSku:e.product.sku,qty:e.quantity}})):[]},P=e=>{var t,n,o,r;const i=window.magentoStorefrontEvents,a=null!=e?e:i.context.getShoppingCart();return a?{schema:h,data:{cartId:a.id,itemsCount:a.totalQuantity,items:D(a),possibleOnepageCheckout:a.possibleOnepageCheckout,subtotalExcludingTax:null===(n=null===(t=a.prices)||void 0===t?void 0:t.subtotalExcludingTax)||void 0===n?void 0:n.value,subtotalIncludingTax:null===(r=null===(o=a.prices)||void 0===o?void 0:o.subtotalIncludingTax)||void 0===r?void 0:r.value,giftMessageSelected:a.giftMessageSelected,giftWrappingSelected:a.giftWrappingSelected}}:{schema:h,data:{}}},O=()=>[()=>j(),()=>A(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getMagentoExtension();return n?{schema:o,data:{magentoExtensionVersion:n.magentoExtensionVersion}}:{schema:o,data:{}}})(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getDataServicesExtension();return n?{schema:r,data:{version:n.version}}:{schema:r,data:{}}})(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getRecommendationsExtension();return n?{schema:i,data:{version:n.version}}:{schema:i,data:{}}})(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getSearchExtension();return n?{schema:a,data:{version:n.version}}:{schema:a,data:{}}})(),()=>(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getShopper();return n?{schema:v,data:{shopperId:n.shopperId}}:{schema:v,data:{shopperId:"guest"}}})()],A=e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getStorefrontInstance();return n?{schema:y,data:{baseCurrencyCode:n.baseCurrencyCode,environment:n.environment,environmentId:n.environmentId,instanceId:n.instanceId,storeCode:n.storeCode,storeId:n.storeId,storeName:n.storeName,storeUrl:n.storeUrl,storeViewCode:n.storeViewCode,storeViewCurrencyCode:n.storeViewCurrencyCode,storeViewId:n.storeViewId,storeViewName:n.storeViewName,websiteCode:n.websiteCode,websiteName:n.websiteName,websiteId:n.websiteId}}:{schema:y,data:{}}},j=()=>({schema:s,data:{magentoJsVersion:"1.1.6"}});var q=function(){return q=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},q.apply(this,arguments)};function N(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}Object.create,Object.create;var M=n(877);function U(e){if(!e)return e;var t=function(e){var t,n,o,r,i,a=0,s=0,c=[];if(!e)return e;e=unescape(encodeURIComponent(e));do{t=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=i>>12&63,o=i>>6&63,r=63&i,c[s++]=L.charAt(t)+L.charAt(n)+L.charAt(o)+L.charAt(r)}while(a<e.length);var u=c.join(""),d=e.length%3;return(d?u.slice(0,d-3):u)+"===".slice(d||3)}(e);return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function B(){var e,t={},n=[],o=[],r=function(e,n){null!=n&&""!==n&&(t[e]=n)};return{add:r,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(t,e[t])},addJson:function(e,t,r){if(r&&$(r)){var i={keyIfEncoded:e,keyIfNotEncoded:t,json:r};o.push(i),n.push(i)}},getPayload:function(){return t},getJson:function(){return n},withJsonProcessor:function(t){e=t},build:function(){return null==e||e(this,o),t}}}function $(e){if(!_(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function _(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}var V,F="Snowplow: ";!function(e){e[e.none=0]="none",e[e.error=1]="error",e[e.warn=2]="warn",e[e.debug=3]="debug",e[e.info=4]="info"}(V||(V={}));var H,z=(void 0===H&&(H=V.warn),{setLogLevel:function(e){H=V[e]?e:V.warn},warn:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(H>=V.warn&&"undefined"!=typeof console){var r=F+e;t?console.warn.apply(console,N([r+"\n",t],n)):console.warn.apply(console,N([r],n))}},error:function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(H>=V.error&&"undefined"!=typeof console){var r=F+e+"\n";t?console.error.apply(console,N([r+"\n",t],n)):console.error.apply(console,N([r],n))}},debug:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];H>=V.debug&&"undefined"!=typeof console&&console.debug.apply(console,N([F+e],t))},info:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];H>=V.info&&"undefined"!=typeof console&&console.info.apply(console,N([F+e],t))}});function J(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var o=[],r=[],i=0,a=n;i<a.length;i++){var s=a[i];ne(s)?o.push(s):Z(s)&&r.push(s)}e=e.concat(r),t=t.concat(o)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var o=function(n){ne(n)?t=t.filter((function(e){return JSON.stringify(e)!==JSON.stringify(n)})):Z(n)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(n)})))},r=0,i=n;r<i.length;r++)o(i[r])},getApplicableContexts:function(n){return function(n){var o=function(e){for(var t=0,n=e.getJson();t<n.length;t++){var o=n[t];if("ue_px"===o.keyIfEncoded&&"object"==typeof o.json.data){var r=o.json.data.schema;if("string"==typeof r)return r}}return""}(n),r=function(e){var t=e.getPayload().e;return"string"==typeof t?t:""}(n),i=[],a=ae(e,n,r,o);i.push.apply(i,a);var s=function(e,t,n,o){var r,i=ie(e).map((function(e){var r=function(e,t,n,o){if(ee(e)){var r=e[0],i=!1;try{i=r({event:t.getPayload(),eventType:n,eventSchema:o})}catch(e){i=!1}if(!0===i)return ae(e[1],t,n,o)}else if(te(e)&&function(e,t){var n=0,o=0,r=e.accept;Array.isArray(r)?e.accept.some((function(e){return oe(e,t)}))&&o++:"string"==typeof r&&oe(r,t)&&o++;var i=e.reject;return Array.isArray(i)?e.reject.some((function(e){return oe(e,t)}))&&n++:"string"==typeof i&&oe(i,t)&&n++,o>0&&0===n}(e[0],o))return ae(e[1],t,n,o);return[]}(e,t,n,o);if(r&&0!==r.length)return r}));return(r=[]).concat.apply(r,i.filter((function(e){return null!=e&&e.filter(Boolean)})))}(t,n,r,o);return i.push.apply(i,s),i}(n)}}}function X(e){var t=e.split(".");return!!(t&&t.length>1)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(e.slice(2).length>0){for(var t=!1,n=0,o=e.slice(2);n<o.length;n++)if("*"===o[n])t=!0;else if(t)return!1;return!0}return 2==e.length}(t)}function W(e){var t=new RegExp("^iglu:((?:(?:[a-zA-Z0-9-_]+|\\*).)+(?:[a-zA-Z0-9-_]+|\\*))/([a-zA-Z0-9-_.]+|\\*)/jsonschema/([1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)-(0|[1-9][0-9]*|\\*)$").exec(e);if(null!==t&&X(t[1]))return t.slice(1,6)}function Q(e){var t=W(e);if(t){var n=t[0];return 5===t.length&&X(n)}return!1}function G(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return Q(e)})):"string"==typeof e&&Q(e)}function Y(e){var t=e;return!!($(t)&&"schema"in t&&"data"in t)&&"string"==typeof t.schema&&"object"==typeof t.data}function K(e){return"function"==typeof e&&e.length<=1}function Z(e){return K(e)||Y(e)}function ee(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?K(e[0])&&e[1].every(Z):K(e[0])&&Z(e[1]))}function te(e){return!(!Array.isArray(e)||2!==e.length)&&!!function(e){var t=e,n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(t,"accept")){if(!G(t.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(t,"reject")){if(!G(t.reject))return!1;n+=1}return n>0&&n<=2}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(Z):Z(e[1]))}function ne(e){return ee(e)||te(e)}function oe(e,t){if(!Q(e))return!1;var n=W(e),o=function(e){var t=new RegExp("^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$").exec(e);if(null!==t)return t.slice(1,6)}(t);if(n&&o){if(!function(e,t){var n=t.split("."),o=e.split(".");if(n&&o){if(n.length!==o.length)return!1;for(var r=0;r<o.length;r++)if(!re(n[r],o[r]))return!1;return!0}return!1}(n[0],o[0]))return!1;for(var r=1;r<5;r++)if(!re(n[r],o[r]))return!1;return!0}return!1}function re(e,t){return e&&t&&"*"===e||e===t}function ie(e){return Array.isArray(e)?e:Array.of(e)}function ae(e,t,n,o){var r,i=ie(e).map((function(e){var r=function(e,t,n,o){if(Y(e))return[e];if(K(e)){var r=function(e,t,n,o){var r=void 0;try{return r=e({event:t.getPayload(),eventType:n,eventSchema:o}),Array.isArray(r)&&r.every(Y)||Y(r)?r:void 0}catch(e){r=void 0}return r}(e,t,n,o);if(Y(r))return[r];if(Array.isArray(r))return r}}(e,t,n,o);if(r&&0!==r.length)return r}));return(r=[]).concat.apply(r,i.filter((function(e){return null!=e&&e.filter(Boolean)})))}function se(e,t){void 0===t&&(t={});var n={};for(var o in e)(t[o]||null!==e[o]&&void 0!==e[o])&&(n[o]=e[o]);return n}var ce=n(738),ue=n.n(ce);function de(e){return!(!e||"string"!=typeof e.valueOf())}function le(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function fe(e){if(!de(e)){e=e.text||"";var t=document.getElementsByTagName("title");t&&null!=t[0]&&(e=t[0].text)}return e}function pe(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)").exec(e);return t?t[1]:e}function ge(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function me(e){var t=window,n="",o=ve("referrer",t.location.href)||ve("referer",t.location.href);if(o)return o;if(e)return e;try{n=t.top.document.referrer}catch(e){if(t.parent)try{n=t.parent.document.referrer}catch(e){n=""}}return""===n&&(n=document.referrer),n}function he(e,t,n,o){return e.addEventListener?(e.addEventListener(t,n,o),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function ve(e,t){var n=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t);return n?decodeURIComponent(n[1].replace(/\+/g," ")):null}function ye(e,t,n){void 0===n&&(n=63072e3);try{var o=window.localStorage,r=Date.now()+1e3*n;return o.setItem(e+".expires",r.toString()),o.setItem(e,t),!0}catch(e){return!1}}function we(e){try{var t=window.localStorage;return t.removeItem(e),t.removeItem(e+".expires"),!0}catch(e){return!1}}function be(e,t,n,o){xe(e,"",-1,"/",t,n,o)}function Ce(e){for(var t=document.cookie.split("; "),n=[],o=0;o<t.length;o++)t[o].substring(0,e.length)===e&&n.push(t[o]);return n}function xe(e,t,n,o,r,i,a){return arguments.length>1?document.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(o?"; Path="+o:"")+(r?"; Domain="+r:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function Ie(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=function(e){var t={},n=e.allowlist||e.denylist;if(n){Array.isArray(n)||(n=[n]);for(var o=0;o<n.length;o++)t[n[o]]=!0}return t}(e);return function(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}(e,(function(e){return function(e,t){for(var n=0,o=Ee(e);n<o.length;n++)if(t[o[n]])return!0;return!1}(e,n)===t}))}function Ee(e){return e.className.match(/\S+/g)||[]}function ke(e,t,n,o,r,i,a,s,c,u,d,l,f){var p,g,m=!1,h=[],v=!0===(o="string"==typeof o?o.toLowerCase():o)||"beacon"===o||"true"===o,y=Boolean(v&&window.navigator&&window.navigator.sendBeacon&&!(function(e,t){var n=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/");return!(!n||!n.length)&&parseInt(n[0])<=13}(0,g=window.navigator.userAgent)||function(e,t,n){var o=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/");return!(!o||!o.length)&&(parseInt(o[0])<=10||10===parseInt(o[0])&&parseInt(o[1])<=15)}(0,0,g)&&function(e){return e.match("Version/.* Safari/")&&!function(e){return e.match("Chrom(e|ium)")}(e)}(g)))&&v,w="get"===o,b=Boolean(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),C=!w&&b&&("post"===o||v),x=C?r:"/i",I="snowplowOutQueue_"+e+"_"+(C?"post2":"get");if(v&&(l={}),i=n&&function(){var e="modernizr";if(!function(){try{return!!window.localStorage}catch(e){return!0}}())return!1;try{var t=window.localStorage;return t.setItem(e,e),t.removeItem(e),!0}catch(e){return!1}}()&&C&&i||1,n)try{var E=window.localStorage.getItem(I);h=E?JSON.parse(E):[]}catch(e){}function k(e){for(var t=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<=127?t+=1:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,n++):t+=o<65535?3:4}return t}Array.isArray(h)||(h=[]),t.outQueues.push(h),b&&i>1&&t.bufferFlushers.push((function(e){m||T(e)}));var S=function(e){return"object"==typeof e[0]};function T(e){for(void 0===e&&(e=!1);h.length&&"string"!=typeof h[0]&&"object"!=typeof h[0];)h.shift();if(h.length<1)m=!1;else{if(!de(p))throw"No collector configured";if(m=!0,b){var t,o,r=void 0;S(h)?(t=R(r=p,!0,e),o=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=a);)t+=1;return t}(h)):(r=O(h[0]),t=R(r,!1,e),o=1);var i=setTimeout((function(){t.abort(),m=!1}),u),s=function(e){for(var t=0;t<e;t++)h.shift();n&&ye(I,JSON.stringify(h.slice(0,c))),T()};if(t.onreadystatechange=function(){4===t.readyState&&t.status>=200&&t.status<400?(clearTimeout(i),s(o)):4===t.readyState&&t.status>=400&&(clearTimeout(i),m=!1)},S(h)){var l=h.slice(0,o);if(l.length>0){var f=!1,g=l.map((function(e){return e.evt}));if(y){var v=new Blob([D(P(g))],{type:"application/json"});try{f=navigator.sendBeacon(r,v)}catch(e){f=!1}}!0===f?s(o):t.send(D(P(g)))}}else t.send()}else if(d||S(h))m=!1;else{var w=new Image(1,1),C=!0;w.onload=function(){C&&(C=!1,h.shift(),n&&ye(I,JSON.stringify(h.slice(0,c))),T())},w.onerror=function(){C&&(C=!1,m=!1)},w.src=O(h[0]),setTimeout((function(){C&&m&&(C=!1,T())}),u)}}}function R(e,t,n){var o=new XMLHttpRequest;for(var r in t?(o.open("POST",e,!n),o.setRequestHeader("Content-Type","application/json; charset=UTF-8")):o.open("GET",e,!n),o.withCredentials=f,d&&o.setRequestHeader("SP-Anonymous","*"),l)Object.prototype.hasOwnProperty.call(l,r)&&o.setRequestHeader(r,l[r]);return o}function D(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function P(e){for(var t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function O(e){return s?p+e.replace("?","?stm="+(new Date).getTime()+"&"):p+e}return{enqueueRequest:function(e,t){if(p=t+x,C){var o=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){var n=t[0],o=t[1];return e[n]=o.toString(),e}),{});return{evt:t,bytes:k(JSON.stringify(t))}}(e);if(o.bytes>=a)return z.warn("Event ("+o.bytes+"B) too big, max is "+a),void R(p,!0,!1).send(D(P([o.evt])));h.push(o)}else h.push(function(e){var t="?",n={co:!0,cx:!0},o=!0;for(var r in e)e.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(o?o=!1:t+="&",t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var i in n)e.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(t+="&"+i+"="+encodeURIComponent(e[i]));return t}(e));var r=!1;n&&(r=ye(I,JSON.stringify(h.slice(0,c)))),m||r&&!(h.length>=i)||T()},executeQueue:function(){m||T()},setUseLocalStorage:function(e){n=e},setAnonymousTracking:function(e){d=e},setCollectorUrl:function(e){p=e+x},setBufferSize:function(e){i=e}}}function Se(e,t,n){var o,r,i;return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=pe(t=null!==(r=t,"u",o=(i=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)").exec(r))&&(null==i?void 0:i.length)>1?ve("u",i[1]):null)&&void 0!==o?o:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=pe(t=document.links[0].href)),[e,t,n]}function Te(e,t,n,o,r,i){void 0===i&&(i={});var a=[],s=function(e,t,n,o,r,i){var s,c,u,d,l,f,p,g,m,h,v,y,w,b,C,x,I,E,k,S,T;i.eventMethod=null!==(s=i.eventMethod)&&void 0!==s?s:"post";var R=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},D=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n},P=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n},O=function(e){return!!e.anonymousTracking};a.push({beforeTrack:function(e){var t,n,o,r,i,a,s=function(e){return Be?null:e},c=function(e){return Ue?e:s(e)},u=Math.round((new Date).getTime()/1e3),d=Ze("ses"),l=ft(),f=l[0],p=l[1],g=l[2],m=l[3],h=l[4],v=l[5],y=l[6];t=!!V&&!!xe(V),qe||t?ut():("0"===f?(K=y,d||"none"==$e||(m++,v=h,K=(0,M.v4)()),Ve=m):(new Date).getTime()-_e>1e3*Me&&(K=(0,M.v4)(),Ve++),e.add("vp",function(){var e,t;if("innerWidth"in window)e=window.innerWidth,t=window.innerHeight;else{var n=document.documentElement||document.body;e=n.clientWidth,t=n.clientHeight}return e>=0&&t>=0?e+"x"+t:null}()),e.add("ds",(n=document.documentElement,r=(o=document.body)?Math.max(o.offsetHeight,o.scrollHeight):0,i=Math.max(n.clientWidth,n.offsetWidth,n.scrollWidth),a=Math.max(n.clientHeight,n.offsetHeight,n.scrollHeight,r),isNaN(i)||isNaN(a)?"":i+"x"+a)),e.add("vid",c(Ve)),e.add("sid",c(K)),e.add("duid",s(p)),e.add("uid",s(Z)),Xe(),e.add("refr",Ge(A||ae)),e.add("url",Ge(j||ie)),"none"!=$e&&(st(p,g,Ve,u,v,K),at()),_e=(new Date).getTime())}}),(null===(u=null===(c=null==i?void 0:i.contexts)||void 0===c?void 0:c.webPage)||void 0===u||u)&&a.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:mt()}}]}}),a.push.apply(a,null!==(d=i.plugins)&&void 0!==d?d:[]);var A,j,N,L,$,V,F,H,X,W,Q,G,Y,K,Z,ee=function(e){void 0===e&&(e={});var t=e.base64,n=e.corePlugins,o=e.callback,r=null!=n?n:[],i=function(e,t,n){var o=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){z.error("Error adding plugin contexts",e)}})),n}}}(t),r=J(),i=e,a={};function s(e,t){a[e]=t}var c={track:function(e,s,c){e.withJsonProcessor(function(e){return function(t,n){for(var o=0,r=n;o<r.length;o++){var i=r[o],a=JSON.stringify(i.json);e?t.add(i.keyIfEncoded,U(a)):t.add(i.keyIfNotEncoded,a)}n.length=0}}(i)),e.add("eid",(0,M.v4)()),e.addDict(a);var u=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(c);e.add(u.type,u.value.toString());var d=function(e,t){var n=r.getApplicableContexts(e),o=[];return t&&t.length&&o.push.apply(o,t),n&&n.length&&o.push.apply(o,n),o}(e,o.addPluginContexts(s)),l=function(e){if(e&&e.length)return{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:e}}(d);void 0!==l&&e.addJson("cx","co",l),t.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){z.error("Plugin beforeTrack",e)}})),"function"==typeof n&&n(e);var f=e.build();return t.forEach((function(e){try{e.afterTrack&&e.afterTrack(f)}catch(e){z.error("Plugin afterTrack",e)}})),f},addPayloadPair:s,getBase64Encoding:function(){return i},setBase64Encoding:function(e){i=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t])},resetPayloadPairs:function(e){a=_(e)?e:{}},setTrackerVersion:function(e){s("tv",e)},setTrackerNamespace:function(e){s("tna",e)},setAppId:function(e){s("aid",e)},setPlatform:function(e){s("p",e)},setUserId:function(e){s("uid",e)},setScreenResolution:function(e,t){s("res",e+"x"+t)},setViewport:function(e,t){s("vp",e+"x"+t)},setColorDepth:function(e){s("cd",e)},setTimezone:function(e){s("tz",e)},setLang:function(e){s("lang",e)},setIpAddress:function(e){s("ip",e)},setUseragent:function(e){s("ua",e)},addGlobalContexts:function(e){r.addGlobalContexts(e)},clearGlobalContexts:function(){r.clearGlobalContexts()},removeGlobalContexts:function(e){r.removeGlobalContexts(e)}};return c}(null==t||t,r,o),a=q(q({},i),{addPlugin:function(e){var t,n,o=e.plugin;r.push(o),null===(t=o.logger)||void 0===t||t.call(o,z),null===(n=o.activateCorePlugin)||void 0===n||n.call(o,a)}});return null==r||r.forEach((function(e){var t,n;null===(t=e.logger)||void 0===t||t.call(e,z),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,a)})),a}({base64:i.encodeBase64,corePlugins:a,callback:function(e){var t;t=!!V&&!!xe(V),qe||t||Fe.enqueueRequest(e.build(),ce)}}),te=navigator.userLanguage||navigator.language,ne=document.characterSet||document.charset,oe=Se(window.location.hostname,window.location.href,me()),re=ge(oe[0]),ie=oe[1],ae=oe[2],se=null!==(l=i.platform)&&void 0!==l?l:"web",ce=pt(o),de=null!==(f=i.postPath)&&void 0!==f?f:"/com.snowplowanalytics.snowplow/tp2",Ie=null!==(p=i.appId)&&void 0!==p?p:"",Ee=document.title,Te=null===(g=i.resetActivityTrackingOnPageView)||void 0===g||g,Re=null!==(m=i.cookieName)&&void 0!==m?m:"_sp_",De=null!==(h=i.cookieDomain)&&void 0!==h?h:void 0,Pe="/",Oe=null!==(v=i.cookieSameSite)&&void 0!==v?v:"None",Ae=null===(y=i.cookieSecure)||void 0===y||y,je=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,qe=void 0!==i.respectDoNotTrack&&i.respectDoNotTrack&&("yes"===je||"1"===je),Ne=null!==(w=i.cookieLifetime)&&void 0!==w?w:63072e3,Me=null!==(b=i.sessionCookieTimeout)&&void 0!==b?b:1800,Ue=D(i),Le=P(i),Be=O(i),$e=R(i),_e=(new Date).getTime(),Ve=1,Fe=ke(e,r,"localStorage"==$e||"cookieAndLocalStorage"==$e,i.eventMethod,de,null!==(C=i.bufferSize)&&void 0!==C?C:1,null!==(x=i.maxPostBytes)&&void 0!==x?x:4e4,null===(I=i.useStm)||void 0===I||I,null!==(E=i.maxLocalStorageQueueSize)&&void 0!==E?E:1e3,null!==(k=i.connectionTimeout)&&void 0!==k?k:5e3,Le,null!==(S=i.customHeaders)&&void 0!==S?S:{},null===(T=i.withCredentials)||void 0===T||T),He=!1,ze=!1,Je={enabled:!1,installed:!1,configurations:{}};function Xe(){(oe=Se(window.location.hostname,window.location.href,me()))[1]!==ie&&(ae=me(ie)),re=ge(oe[0]),ie=oe[1]}function We(e){var t=(new Date).getTime(),n=e.currentTarget;(null==n?void 0:n.href)&&(n.href=function(e,t,n){var o="_sp="+n,r=e.split("#"),i=r[0].split("?"),a=i.shift(),s=i.join("?");if(s){for(var c=!0,u=s.split("&"),d=0;d<u.length;d++)if("_sp="===u[d].substr(0,t.length+1)){c=!1,u[d]=o,s=u.join("&");break}c&&(s=o+"&"+s)}else s=o;return r[0]=a+"?"+s,r.join("#")}(n.href,"_sp",Y+"."+t))}function Qe(e){for(var t=0;t<document.links.length;t++){var n=document.links[t];!n.spDecorationEnabled&&e(n)&&(he(n,"click",We,!0),he(n,"mousedown",We,!0),n.spDecorationEnabled=!0)}}function Ge(e){var t;return L&&(t=new RegExp("#.*"),e=e.replace(t,"")),$&&(t=new RegExp("[{}]","g"),e=e.replace(t,"")),e}function Ye(e){var t=new RegExp("^([a-z]+):").exec(e);return t?t[1]:null}function Ke(e){return Re+e+"."+G}function Ze(e){var t=Ke(e);return"localStorage"==$e?function(e){try{var t=window.localStorage,n=t.getItem(e+".expires");return null===n||+n>Date.now()?t.getItem(e):(t.removeItem(e),void t.removeItem(e+".expires"))}catch(e){return}}(t):"cookie"==$e||"cookieAndLocalStorage"==$e?xe(t):void 0}function et(){Xe(),G=ue()((De||re)+(Pe||"/")).slice(0,4)}function tt(){var e=new Date;F=e.getTime()}function nt(){!function(){var e=ot(),t=e[0];t<H?H=t:t>X&&(X=t);var n=e[1];n<W?W=n:n>Q&&(Q=n)}(),tt()}function ot(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function rt(){var e=ot(),t=e[0];H=t,X=t;var n=e[1];W=n,Q=n}function it(e){return Math.round(e)}function at(){ct(Ke("ses"),"*",Me)}function st(e,t,n,o,r,i){ct(Ke("id"),e+"."+t+"."+n+"."+o+"."+r+"."+i,Ne)}function ct(e,t,n){Be&&!Ue||("localStorage"==$e?ye(e,t,n):"cookie"!=$e&&"cookieAndLocalStorage"!=$e||xe(e,t,n,Pe,De,Oe,Ae))}function ut(e){var t=Ke("id"),n=Ke("ses");we(t),we(n),be(t,De,Oe,Ae),be(n,De,Oe,Ae),(null==e?void 0:e.preserveSession)||(K=(0,M.v4)(),Ve=0),(null==e?void 0:e.preserveUser)||(Y=(0,M.v4)(),Z=null)}function dt(e){e&&e.stateStorageStrategy&&(i.stateStorageStrategy=e.stateStorageStrategy,$e=R(i)),Be=O(i),Ue=D(i),Le=P(i),Fe.setUseLocalStorage("localStorage"==$e||"cookieAndLocalStorage"==$e),Fe.setAnonymousTracking(Le)}function lt(){if(!Be||Ue){var e="none"!=$e&&!!Ze("ses"),t=ft();t[1]?Y=t[1]:Be?(Y="",t[1]=Y):(Y=(0,M.v4)(),t[1]=Y),K=t[6],e||(t[3]++,K=(0,M.v4)(),t[6]=K,t[5]=t[4]),"none"!=$e&&(at(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),st.apply(null,t))}}function ft(){if("none"==$e)return[];var e,t=new Date,n=Math.round(t.getTime()/1e3),o=Ze("id");return o?(e=o.split(".")).unshift("0"):e=["1",Y,n,0,n,""],e[6]&&"undefined"!==e[6]||(e[6]=(0,M.v4)()),e}function pt(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function gt(){He&&null!=r.pageViewId||(r.pageViewId=(0,M.v4)())}function mt(){return null==r.pageViewId&&(r.pageViewId=(0,M.v4)()),r.pageViewId}function ht(e,t){return(e||[]).concat(t?t():[])}function vt(e,t,n){var o=function(e,t){Xe(),e({context:t,pageViewId:mt(),minXOffset:H,minYOffset:W,maxXOffset:X,maxYOffset:Q}),rt()},r=function(){var r=new Date;F+e.configHeartBeatTimer>r.getTime()&&o(e.callback,ht(t,n))};0!=e.configMinimumVisitLength?e.activityInterval=window.setTimeout((function(){var i=new Date;F+e.configMinimumVisitLength>i.getTime()&&o(e.callback,ht(t,n)),e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}),e.configMinimumVisitLength):e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}function yt(e){var t=e.minimumVisitLength,n=e.heartbeatDelay,o=e.callback;if(le(t)&&le(n))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*n,callback:o};z.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function wt(e){var t=e.context,n=e.minXOffset,o=e.minYOffset,r=e.maxXOffset,i=e.maxYOffset,a=document.title;a!==Ee&&(Ee=a,N=void 0),ee.track(function(e){var t=e.pageUrl,n=e.pageTitle,o=e.referrer,r=e.minXOffset,i=e.maxXOffset,a=e.minYOffset,s=e.maxYOffset,c=B();return c.add("e","pp"),c.add("url",t),c.add("page",n),c.add("refr",o),r&&!isNaN(Number(r))&&c.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&c.add("pp_max",i.toString()),a&&!isNaN(Number(a))&&c.add("pp_miy",a.toString()),s&&!isNaN(Number(s))&&c.add("pp_may",s.toString()),c}({pageUrl:Ge(j||ie),pageTitle:fe(N||Ee),referrer:Ge(A||ae),minXOffset:it(n),maxXOffset:it(r),minYOffset:it(o),maxYOffset:it(i)}),t)}i.hasOwnProperty("discoverRootDomain")&&i.discoverRootDomain&&(De=function(e,t){for(var n=window.location.hostname,o="_sp_root_domain_test_",r=o+(new Date).getTime(),i="_test_value_"+(new Date).getTime(),a=n.split("."),s=a.length-1;s>=0;){var c=a.slice(s,a.length).join(".");if(xe(r,i,0,"/",c,e,t),xe(r)===i){be(r,c,e,t);for(var u=Ce(o),d=0;d<u.length;d++)be(u[d],c,e,t);return c}s-=1}return n}(Oe,Ae)),ee.setTrackerVersion(n),ee.setTrackerNamespace(t),ee.setAppId(Ie),ee.setPlatform(se),ee.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),ee.addPayloadPair("cs",ne),ee.addPayloadPair("lang",te),ee.addPayloadPair("res",screen.width+"x"+screen.height),ee.addPayloadPair("cd",screen.colorDepth),et(),lt(),i.crossDomainLinker&&Qe(i.crossDomainLinker);var bt={getDomainSessionIndex:function(){return Ve},getPageViewId:function(){return mt()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=ft(),n=t[0],o=t[1],r=t[2],i=t[3],a=t[4],s=t[5],c=t[6];"0"===n?(K=c,"none"!=$e&&(i++,s=a,K=(0,M.v4)()),Ve=i,at()):(K=(0,M.v4)(),Ve++),"none"!=$e&&(st(o,r,Ve,e,s,K),at()),_e=(new Date).getTime()},getCookieName:function(e){return Ke(e)},getUserId:function(){return Z},getDomainUserId:function(){return ft()[1]},getDomainUserInfo:function(){return ft()},setReferrerUrl:function(e){A=e},setCustomUrl:function(e){Xe(),j=function(e,t){var n;return Ye(t)?t:"/"===t.slice(0,1)?Ye(e)+"://"+pe(e)+t:((n=(e=Ge(e)).indexOf("?"))>=0&&(e=e.slice(0,n)),(n=e.lastIndexOf("/"))!==e.length-1&&(e=e.slice(0,n+1)),e+t)}(ie,e)},setDocumentTitle:function(e){Ee=document.title,N=e},discardHashTag:function(e){L=e},discardBrace:function(e){$=e},setCookiePath:function(e){Pe=e,et()},setVisitorCookieTimeout:function(e){Ne=e},crossDomainLinker:function(e){Qe(e)},enableActivityTracking:function(e){Je.configurations.pagePing||(Je.enabled=!0,Je.configurations.pagePing=yt(q(q({},e),{callback:wt})))},enableActivityTrackingCallback:function(e){Je.configurations.callback||(Je.enabled=!0,Je.configurations.callback=yt(e))},updatePageActivity:function(){tt()},setOptOutCookie:function(e){V=e},setUserId:function(e){Z=e},setUserIdFromLocation:function(e){Xe(),Z=ve(e,ie)},setUserIdFromReferrer:function(e){Xe(),Z=ve(e,ae)},setUserIdFromCookie:function(e){Z=xe(e)},setCollectorUrl:function(e){ce=pt(e),Fe.setCollectorUrl(ce)},setBufferSize:function(e){Fe.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Fe.executeQueue(),e.newBufferSize&&Fe.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,o=e.timestamp,r=e.contextCallback;Xe(),ze&>(),ze=!0,Ee=document.title;var i=fe((N=t)||Ee);ee.track(function(e){var t=e.pageUrl,n=e.pageTitle,o=e.referrer,r=B();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",o),r}({pageUrl:Ge(j||ie),pageTitle:i,referrer:Ge(A||ae)}),ht(n,r),o);var a=new Date,s=!1;if(Je.enabled&&!Je.installed){Je.installed=!0,s=!0;var c={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),c.hasSupport=e}}};c.update();var u="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(c,"hasSupport")?he(document,u,tt,{passive:!0}):he(document,u,tt),rt();var d=function(e,t){return void 0===t&&(t=tt),function(e){return he(document,e,t)}};["click","mouseup","mousedown","mousemove","keypress","keydown","keyup"].forEach(d(document)),["resize","focus","blur"].forEach(d(window)),d(window,nt)("scroll")}if(Je.enabled&&(Te||s)){F=a.getTime();var l=void 0;for(l in Je.configurations){var f=Je.configurations[l];f&&(window.clearInterval(f.activityInterval),vt(f,n,r))}}}(e)},preservePageViewId:function(){He=!0},disableAnonymousTracking:function(e){i.anonymousTracking=!1,dt(e),lt(),Fe.executeQueue()},enableAnonymousTracking:function(e){var t;i.anonymousTracking=null===(t=e&&(null==e?void 0:e.options))||void 0===t||t,dt(e),Ue||gt()},clearUserData:ut};return q(q({},bt),{id:e,namespace:t,core:ee,sharedState:r})}(e,t,n,o,r,i),c=q(q({},s),{addPlugin:function(e){var t,n;c.core.addPlugin(e),null===(n=(t=e.plugin).activateBrowserPlugin)||void 0===n||n.call(t,c)}});return a.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,c)})),c}var Re={};function De(e,t){try{(n=null!=e?e:Object.keys(Re),function(e,t){for(var n=[],o=0,r=e;o<r.length;o++){var i=r[o];t.hasOwnProperty(i)?n.push(t[i]):z.warn(i+" not configured")}return n}(n,Re)).forEach(t)}catch(e){z.error("Function failed",e)}var n}var Pe=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};function Oe(e,t){De(t,(function(t){t.core.track(function(e){var t=e.category,n=e.action,o=e.label,r=e.property,i=e.value,a=B();return a.add("e","se"),a.add("se_ca",t),a.add("se_ac",n),a.add("se_la",o),a.add("se_pr",r),a.add("se_va",null==i?void 0:i.toString()),a}(e),e.context,e.timestamp)}))}var Ae="undefined"!=typeof window?function(){var e=new Pe,t=document,n=window;function o(){var t;if(!e.hasLoaded)for(e.hasLoaded=!0,t=0;t<e.registeredOnLoadHandlers.length;t++)e.registeredOnLoadHandlers[t]();return!0}return t.visibilityState&&he(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&e.bufferFlushers.forEach((function(e){e(!1)}))}),!1),he(n,"beforeunload",(function(){e.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function e(){t.removeEventListener("DOMContentLoaded",e,!1),o()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function e(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",e),o())})),he(n,"load",o,!1)):o(),e}():void 0;const je="Chrome",qe="Edge",Ne="EdgeChromium",Me="Unknown",Ue=(e,t)=>-1!==e.indexOf(t),Le=[je,qe,Ne,"IE",Me],Be=e=>Ue(Le,e);var $e=n(743);const _e=n.n($e)();var Ve=n(252);const Fe=n.n(Ve)(),He=e=>null==e,ze=e=>!He(e)&&!Array.isArray(e)&&"object"==typeof e,Je=(e,t)=>{Object.keys(t).forEach((n=>{ze(e[n])&&ze(t[n])?Je(e[n],t[n]):e[n]=t[n]}))},Xe=(e,...t)=>{if(He(e))throw new TypeError('deepAssign "target" cannot be null or undefined');const n=Object(e);return t.forEach((e=>Je(n,Object(e)))),n},We=(e,t)=>n=>{const o=t.split(".").reduce(((e,t)=>(e[t]=e[t]||{},e[t])),e);Xe(o,n)},Qe=()=>{const e=[];return{add(t){e.push(t)},call:(...t)=>Promise.all(e.map((e=>e(...t))))}},Ge=(()=>{const e=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=1&n?3988292384^n>>>1:n>>>1;e.push(n)}return function(t,n){t=unescape(encodeURIComponent(t)),n||(n=0),n^=-1;for(let o=0;o<t.length;o++){const r=255&(n^t.charCodeAt(o));n=n>>>8^e[r]}return(n^=-1)>>>0}})(),Ye=()=>{const e={};return e.promise=new Promise(((t,n)=>{e.resolve=t,e.reject=n})),e},Ke=(e,t)=>{for(let n=0;n<e.length;n+=1){const o=e[n];if(t(o,n,e))return o}},Ze=(e,t)=>e.appendChild(t),et=(e,t={},n={},o=[],r=document)=>{const i=r.createElement(e);return Object.keys(t).forEach((e=>{i.setAttribute(e,t[e])})),((e,t)=>{Object.keys(t).forEach((n=>{if("style"===n&&ze(t[n])){const o=t[n];Object.keys(o).forEach((t=>{e.style[t]=o[t]}))}else e[n]=t[n]}))})(i,n),o.forEach((e=>Ze(i,e))),i},tt="IMG",nt="STYLE",ot="SCRIPT",rt="src",it=({src:e,currentDocument:t=document})=>new Promise(((n,o)=>{et(tt,{src:e},{onload:n,onerror:o,onabort:o},[],t)})),at=e=>"function"==typeof e,st=e=>Array.isArray(e)&&e.length>0,ct=e=>Array.isArray(e)?e:null==e?[]:[].slice.call(e),ut=(e,t)=>ct(e.querySelectorAll(t)),dt=(e,t)=>e.substr(0,t.length)===t,lt=":shadow",ft=(e,t)=>{const n=t.trim();return dt(n,">")?window.document.documentMode?n.substring(1).trim():`${e instanceof Element||e instanceof HTMLDocument?":scope":":host"} ${n}`:n},pt=(e,t=document)=>-1===e.indexOf(lt)?ut(t,e):((e,t)=>{if(!window.document.documentElement.attachShadow)return ut(e,t.replace(lt,""));const n=(e=>e.split(lt))(t);if(n.length<2)return ut(e,t);let o=e;for(let e=0;e<n.length;e+=1){const t=ft(o,n[e]),r=ut(o,t);if(0===r.length||!r[0]||!r[0].shadowRoot)return r;o=r[0].shadowRoot}})(t,e),gt={childList:!0,subtree:!0},mt=e=>new Error(`Could not find: ${e}`),ht=e=>new Promise(e),vt=(e,t=pt,n=5e3,o=window,r=document)=>{const i=t(e);return st(i)?Promise.resolve(i):(e=>at(e.MutationObserver))(o)?((e,t,n,o,r)=>ht(((i,a)=>{const s=new e.MutationObserver((()=>{const e=r(n);st(e)&&(s.disconnect(),i(e))}));setTimeout((()=>{s.disconnect(),a(mt(n))}),o),s.observe(t,gt)})))(o,r,e,n,t):(e=>"visible"===e.visibilityState)(r)?((e,t,n,o)=>ht(((r,i)=>{const a=()=>{const n=o(t);st(n)?r(n):e.requestAnimationFrame(a)};a(),setTimeout((()=>{i(mt(t))}),n)})))(o,e,n,t):((e,t,n)=>ht(((o,r)=>{const i=()=>{const t=n(e);st(t)?o(t):setTimeout(i,100)};i(),setTimeout((()=>{r(mt(e))}),t)})))(e,n,t)},yt=e=>{const t=e.parentNode;return t?t.removeChild(e):null},wt=it,bt={name:"Adobe Alloy"},Ct={style:{display:"none",width:0,height:0}},xt=e=>{const{hideReferrer:t,url:n}=e;return t?(({src:e})=>vt("BODY").then((([e])=>{const t=et("IFRAME",bt,Ct);return Ze(e,t)})).then((t=>{const n=t.contentWindow.document;return it({src:e,currentDocument:n}).then((()=>{yt(t)}))})))({src:n}):wt({src:n})},It=(e,t)=>Array.prototype.concat.apply([],e.map(t)),Et="com.adobe.alloy.",kt=`${Et}getTld`,St=(e,t)=>{let n="";const o=e.location.hostname.toLowerCase().split(".");let r=1;for(;r<o.length&&!t.get(kt);)r+=1,n=(i=o,a=r,i.slice(-a)).join("."),t.set(kt,kt,{domain:n});var i,a;return t.remove(kt,{domain:n}),n},Tt=e=>e.replace("@","_"),Rt=(e,t)=>`kndctr_${Tt(e)}_${t}`,Dt=({orgId:e})=>{const t=Rt(e,"identity");return()=>Boolean(Fe.get(t))},Pt=(e,t,n)=>({getItem(o){try{return e[t].getItem(n+o)}catch(e){return null}},setItem(o,r){try{return e[t].setItem(n+o,r),!0}catch(e){return!1}},clear(){try{return Object.keys(e[t]).forEach((o=>{dt(o,n)&&e[t].removeItem(o)})),!0}catch(e){return!1}}}),Ot=e=>t=>{const n=Et+t;return{session:Pt(e,"sessionStorage",n),persistent:Pt(e,"localStorage",n)}},At=e=>ze(e)&&0===Object.keys(e).length,jt=e=>"number"==typeof e&&!isNaN(e),qt=e=>{const t=parseInt(e,10);return jt(t)&&e===t},Nt=e=>"string"==typeof e,Mt=e=>Nt(e)&&e.length>0,Ut=()=>{};var Lt=n(366);const Bt=n.n(Lt)(),$t=e=>e instanceof Error?e:new Error(e),_t=({error:e,message:t})=>{try{e.message=t}catch(e){}},Vt=({error:e,message:t})=>{const n=$t(e),o=`${t}\nCaused by: ${n.message}`;return _t({error:n,message:o}),n},Ft=(e,t,n)=>{const o=String(e);let r=String(n);if(o.length>=t||0===r.length)return o;const i=t-o.length;for(;i>r.length;)r+=r;return r.slice(0,i)+o},Ht=e=>{const t=e.getFullYear(),n=Ft(e.getMonth()+1,2,"0"),o=Ft(e.getDate(),2,"0"),r=Ft(e.getHours(),2,"0"),i=Ft(e.getMinutes(),2,"0"),a=Ft(e.getSeconds(),2,"0"),s=Ft(e.getMilliseconds(),3,"0"),c=e.getTimezoneOffset();return`${t}-${n}-${o}T${r}:${i}:${a}.${s}${c>0?"-":"+"}${Ft(Math.floor(Math.abs(c)/60),2,"0")}:${Ft(Math.abs(c)%60,2,"0")}`};var zt=n(171);const Jt=n.n(zt)(),Xt=(e,t,n={})=>{const o=(n,o)=>t(e(n,o),o);return _e(o,e,n),o},Wt=(e,t,n)=>Xt(e,((e,n)=>null==e?e:t(e,n)),n),Qt=(e,t,n,o)=>{if(!e)throw new Error(`'${n}': Expected ${o}, but got ${JSON.stringify(t)}.`)},Gt=(e,t)=>(Qt((e=>"boolean"==typeof e)(e),e,t,"true or false"),e),Yt=(e,t)=>(Qt(at(e),e,t,"a function"),e),Kt=(e,t)=>(n,o)=>(Qt(n>=t,n,o,`${e} greater than or equal to ${t}`),n),Zt=e=>(t,n)=>(ze(t)?Qt(!At(t),t,n,e):Qt(t.length>0,t,n,e),t),en=/^[a-z0-9.-]{1,}$/i,tn=(e,t)=>(Qt(en.test(e),e,t,"a valid domain"),e),nn=(e,t)=>(Qt(qt(e),e,t,"an integer"),e),on=(e,t)=>(Qt(jt(e),e,t,"a number"),e),rn=(e,t)=>(Qt((e=>{try{return null!==new RegExp(e)}catch(e){return!1}})(e),e,t,"a regular expression"),e),an=(e,t)=>{if(null==e)throw new Error(`'${t}' is a required option`);return e},sn=(e,t)=>(Qt(Nt(e),e,t,"a string"),e),cn=e=>e;cn.default=function(e){return Xt(this,(e=>t=>null==t?e:t)(e))},cn.required=function(){return Xt(this,an)};const un=function(){return Wt(this,tn)},dn=function(e){return Wt(this,Kt("an integer",e))},ln=function(e){return Wt(this,Kt("a number",e))},fn=function(){return Wt(this,nn,{minimum:dn})},pn=function(){return Wt(this,Zt("a non-empty string"))},gn=function(){return Wt(this,Zt("a non-empty array"))},mn=function(){return Wt(this,Zt("a non-empty object"))},hn=function(){return Wt(this,rn)},vn=function(){return Wt(this,(()=>{const e=[];return(t,n)=>(Qt(-1===e.indexOf(t),t,n,"a unique value across instances"),e.push(t),t)})())},yn=function(e,t){return Xt(this,((e,t)=>(n,o)=>{const r=Ke(e,(e=>{try{return e(n,o),!0}catch(e){return!1}}));return Qt(r,n,o,t),n})(e,t))}.bind(cn),wn=function(){return Wt(this,cn)}.bind(cn),bn=function(e){return Wt(this,(e=>(t,n)=>{Qt(Array.isArray(t),t,n,"an array");const o=[],r=t.map(((t,r)=>{try{return e(t,`${n}[${r}]`)}catch(e){return void o.push(e.message)}}));if(o.length)throw new Error(o.join("\n"));return r})(e),{nonEmpty:gn})}.bind(cn),Cn=function(){return Wt(this,Gt)}.bind(cn),xn=function(){return Wt(this,Yt)}.bind(cn),In=function(e){return Wt(this,(e=>(t,n)=>(Qt(t===e,t,n,`${e}`),t))(e))}.bind(cn),En=(function(){return Wt(this,on,{minimum:ln,integer:fn,unique:vn})}.bind(cn),function(e){return Wt(this,(t=e,(e,n)=>{Qt(ze(e),e,n,"an object");const o=[],r={};if(Object.keys(e).forEach((i=>{const a=e[i],s=n?`${n}.${i}`:i;try{const e=t(a,s);void 0!==e&&(r[i]=e)}catch(e){o.push(e.message)}})),o.length)throw new Error(o.join("\n"));return r}),{nonEmpty:mn});var t}.bind(cn)),kn=function(e){return Wt(this,(e=>(t,n)=>{Qt(ze(t),t,n,"an object");const o=[],r={};if(Object.keys(e).forEach((i=>{const a=t[i],s=e[i],c=n?`${n}.${i}`:i;try{const e=s(a,c);void 0!==e&&(r[i]=e)}catch(e){o.push(e.message)}})),Object.keys(t).forEach((e=>{Object.prototype.hasOwnProperty.call(r,e)||(r[e]=t[e])})),o.length)throw new Error(o.join("\n"));return r})(e),{noUnknownFields:function(){return Wt(this,(e=>(t,n)=>{const o=[];if(Object.keys(t).forEach((t=>{if(!e[t]){const e=n?`${n}.${t}`:t;o.push(`'${e}': Unknown field.`)}})),o.length)throw new Error(o.join("\n"));return t})(e))},nonEmpty:mn})}.bind(cn),Sn=function(){return Wt(this,sn,{regexp:hn,domain:un,nonEmpty:pn,unique:vn})}.bind(cn),Tn=function(...e){return yn(e.map(In),`one of these values: [${JSON.stringify(e)}]`)},Rn=En(bn(kn({authenticatedState:Tn("ambiguous","authenticated","loggedOut"),id:Sn(),namespace:kn({code:Sn()}).noUnknownFields(),primary:Cn(),xid:Sn()})).required()),Dn=["onComponentsRegistered","onBeforeEvent","onBeforeRequest","onResponse","onRequestFailure","onClick"],Pn=(e,t)=>(...n)=>{let o;try{o=e(...n)}catch(e){throw Vt({error:e,message:t})}return o instanceof Promise&&(o=o.catch((e=>{throw Vt({error:e,message:t})}))),o},On=()=>{const e={},t={},n={};return{register(o,r){const{commands:i,lifecycle:a}=r;((e,n={})=>{const o=(r=Object.keys(t),i=Object.keys(n),r.filter((e=>Ue(i,e))));var r,i;if(o.length)throw new Error(`[ComponentRegistry] Could not register ${e} because it has existing command(s): ${o.join(",")}`);Object.keys(n).forEach((o=>{const r=n[o];r.commandName=o,r.run=Pn(r.run,`[${e}] An error occurred while executing the ${o} command.`),t[o]=r}))})(o,i),((e,t={})=>{Object.keys(t).forEach((o=>{n[o]=n[o]||[],n[o].push(Pn(t[o],`[${e}] An error occurred while executing the ${o} lifecycle hook.`))}))})(o,a),e[o]=r},getCommand:e=>t[e],getCommandNames:()=>Object.keys(t),getLifecycleCallbacks:e=>n[e]||[]}},An="in",jn="pending",qn="declinedConsent",Nn="default",Mn="initial",Un="new",Ln=e=>{const t=new Error(e);return t.code=qn,t.message=e,t},Bn=({logger:e})=>{const t=[],n=()=>Promise.resolve(),o=()=>Promise.resolve(),r=()=>Promise.reject(Ln("No consent preferences have been set.")),i=()=>Promise.reject(Ln("The user declined consent.")),a=()=>{const e=Ye();return t.push(e),e.promise};return{in(r){r===Nn?this.awaitConsent=n:(r===Mn?e.info("Loaded user consent preferences. The user previously consented."):r===Un&&this.awaitConsent!==o&&e.info("User consented."),(()=>{for(;t.length;)t.shift().resolve()})(),this.awaitConsent=o)},out(n){n===Nn?(e.warn("User consent preferences not found. Default consent of out will be used."),this.awaitConsent=r):(n===Mn?e.warn("Loaded user consent preferences. The user previously declined consent."):n===Un&&this.awaitConsent!==i&&e.warn("User declined consent."),(()=>{for(;t.length;)t.shift().reject(Ln("The user declined consent."))})(),this.awaitConsent=i)},pending(t){t===Nn&&e.info("User consent preferences not found. Default consent of pending will be used. Some commands may be delayed."),this.awaitConsent=a},awaitConsent:()=>Promise.reject(new Error("Consent has not been initialized."))}},$n=()=>{const e={};let t,n,o=!1,r=!1,i=!0;const a=e=>{if(r)throw new Error(`${e} cannot be called after event is finalized.`)},s={setUserXdm(e){a("setUserXdm"),t=e},setUserData(e){a("setUserData"),n=e},mergeXdm(t){a("mergeXdm"),t&&Xe(e,{xdm:t})},mergeMeta(t){a("mergeMeta"),t&&Xe(e,{meta:t})},mergeQuery(t){a("mergeQuery"),t&&Xe(e,{query:t})},documentMayUnload(){o=!0},finalize(o){if(!r&&(t&&s.mergeXdm(t),n&&(e.data=n),r=!0,o)){i=!1;const t={xdm:e.xdm||{},data:e.data||{}},n=o(t);i=!1!==n,e.xdm=t.xdm||{},e.data=t.data||{},At(e.xdm)&&delete e.xdm,At(e.data)&&delete e.data}},getDocumentMayUnload:()=>o,isEmpty:()=>At(e)&&(!t||At(t))&&(!n||At(n)),shouldSend:()=>i,getViewName(){if(t&&t.web&&t.web.webPageDetails)return t.web.webPageDetails.viewName},toJSON(){if(!r)throw new Error("toJSON called before finalize");return e}};return s},_n={CONFIGURE:"configure",SET_DEBUG:"setDebug"},Vn=({logger:e,configureCommand:t,setDebugCommand:n,handleError:o,validateCommandOptions:r})=>{let i;return(a,s={})=>new Promise((o=>{const c=((o,a)=>{let s;if(o===_n.CONFIGURE){if(i)throw new Error("The library has already been configured and may only be configured once.");s=()=>(i=t(a),i.then((()=>{})))}else{if(!i)throw new Error("The library must be configured first. Please do so by executing the configure command.");s=o===_n.SET_DEBUG?()=>n(a):()=>i.then((e=>{const t=e.getCommand(o);if(!t||!at(t.run)){const t=(n=_n,Object.keys(n).map((e=>n[e]))).concat(e.getCommandNames()).join(", ");throw new Error(`The ${o} command does not exist. List of available commands: ${t}.`)}var n;const i=r({command:t,options:a});return t.run(i)}),(()=>(e.warn(`An error during configuration is preventing the ${o} command from executing.`),new Promise((()=>{})))))}return s})(a,s);e.logOnBeforeCommand({commandName:a,options:s}),o(c())})).catch((e=>o(e,`${a} command`))).catch((t=>{throw e.logOnCommandRejected({commandName:a,options:s,error:t}),t})).then((t=>{const n=ze(t)?t:{};return e.logOnCommandResolved({commandName:a,options:s,result:n}),n}))},Fn="https://adobe.ly/2UH0qO7",Hn=({command:e,options:t})=>{const{commandName:n,documentationUri:o=Fn,optionsValidator:r}=e;let i=t;if(r)try{i=r(t)}catch(e){throw new Error(`Invalid ${n} command options:\n\t - ${e} For command documentation see: ${o}`)}return i},zn=({eventManager:e,logger:t})=>({commands:{sendEvent:{documentationUri:"https://adobe.ly/2r0uUjh",optionsValidator:e=>(({options:e,logger:t})=>{const n=kn({type:Sn(),xdm:kn({eventType:Sn(),identityMap:Rn}),data:kn({}),renderDecisions:Cn(),decisionScopes:bn(Sn()),datasetId:Sn()}).required()(e),{type:o,xdm:r}=n;return!r||r.eventType||o||t.warn("No type or xdm.eventType specified."),n})({options:e,logger:t}),run:t=>{const{xdm:n,data:o,documentUnloading:r=!1,type:i,mergeId:a,renderDecisions:s=!1,decisionScopes:c=[],datasetId:u}=t,d=e.createEvent();return r&&d.documentMayUnload(),d.setUserXdm(n),d.setUserData(o),i&&d.mergeXdm({eventType:i}),a&&d.mergeXdm({eventMergeId:a}),u&&d.mergeMeta({collect:{datasetId:u}}),e.sendEvent(d,{renderDecisions:s,decisionScopes:c})}}}});zn.namespace="DataCollector",zn.configValidators={};const Jn=zn,Xn={clickCollectionEnabled:Cn().default(!0),downloadLinkQualifier:Sn().regexp().default("\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$")},Wn=({config:e,eventManager:t,handleError:n})=>{const o=((e,t)=>(n,o)=>{const r=(e=>{let t=e;for(;t;){if((n=t).href&&("A"===n.tagName||"AREA"===n.tagName)&&(!n.onclick||!n.protocol||n.protocol.toLowerCase().indexOf("javascript")<0))return t;t=t.parentNode}var n;return null})(o);if(!r)return;const i=((e,t)=>{const n=e.location;let o=t.href?t.href:"",{protocol:r,host:i}=t;if(!(e=>e&&/^[a-z0-9]+:\/\//i.test(e))(o)){r||(r=n.protocol?n.protocol:""),r=r?`${r}//`:"",i||(i=n.host?n.host:"");let e="";if("/"!==o.substring(0,1)){let t=n.pathname.lastIndexOf("/");t=t<0?0:t,e=n.pathname.substring(0,t)}o=`${r}${i}${e}/${o}`}return o})(e,r);if(!i)return;const a=((e,t,n,o)=>{let r="other";return((e,t,n)=>{const o=new RegExp(e);return!!n.download||o.test(t.toLowerCase())})(t.downloadLinkQualifier,n,o)?r="download":((e,t)=>{const n=e.location.hostname.toLowerCase();return!(t.toLowerCase().indexOf(n)>=0)})(e,n)&&(r="exit"),r})(e,t,i,r);n.documentMayUnload(),n.mergeXdm({eventType:"web.webinteraction.linkClicks",web:{webInteraction:{name:"Link Click",type:a,URL:i,linkClicks:{value:1}}}})})(window,e);return{lifecycle:{onComponentsRegistered(o){const{lifecycle:r}=o;(({config:e,eventManager:t,lifecycle:n,handleError:o})=>{if(!e.clickCollectionEnabled)return;const r=(({eventManager:e,lifecycle:t,handleError:n})=>o=>{const r=o.target,i=e.createEvent();return t.onClick({event:i,clickedElement:r}).then((()=>i.isEmpty()?Promise.resolve():e.sendEvent(i))).then(Ut).catch((e=>{n(e,"click collection")}))})({eventManager:t,lifecycle:n,handleError:o});document.addEventListener("click",r,!0)})({config:e,eventManager:t,lifecycle:r,handleError:n})},onClick({event:e,clickedElement:t}){o(e,t)}}}};Wn.namespace="ActivityCollector",Wn.configValidators=Xn;const Qn=Wn,Gn=(e,t)=>`ID sync ${t?"succeeded":"failed"}: ${e.spec.url}`,Yn={thirdPartyCookiesEnabled:Cn().default(!0),idMigrationEnabled:Cn().default(!0)},Kn=e=>(kn({namespaces:bn(In("ECID")).nonEmpty()}).noUnknownFields()(e),{namespaces:["ECID"]}),Zn=St(window,Fe),eo=({logger:e})=>new Promise(((t,n)=>{if(ze(window.adobe)&&ze(window.adobe.optIn)){const o=window.adobe.optIn;e.info("Delaying request while waiting for legacy opt-in to let Visitor retrieve ECID from server."),o.fetchPermissions((()=>{o.isApproved([o.Categories.ECID])?(e.info("Received legacy opt-in approval to let Visitor retrieve ECID from server."),t()):n(new Error("Legacy opt-in was declined."))}),!0)}else t()})),to="ECID",no=e=>{e.mergeQuery({identity:{fetch:[to]}})},oo=((e,t)=>{const n=new Map;return(...e)=>{const t=e[0];if(n.has(t))return n.get(t);const o=(e=>{return(t={[qe]:/Edge\/([0-9\._]+)/,[Ne]:/Edg\/([0-9\.]+)/,[je]:/(?!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/},e=>{const n=Object.keys(t);for(let o=0;o<n.length;o+=1){const r=n[o];if(t[r].test(e))return r}return Me})(e.navigator.userAgent);var t})(...e);return n.set(t,o),o}})(),ro=(e,t)=>{e.addIdentity(to,{id:t})},io=e=>{const t=e.getPayloadsByType("identity:result"),n=Ke(t,(e=>e.namespace&&e.namespace.code===to));return n?n.id:void 0},ao=e=>{const{payload:t,getAction:n,getUseSendBeacon:o}=e,r=Jt();let i=!1,a=!1;return{getId:()=>r,getPayload:()=>t,getAction:()=>n({isIdentityEstablished:a}),getUseSendBeacon:()=>o({isIdentityEstablished:a}),getUseIdThirdPartyDomain:()=>i,setUseIdThirdPartyDomain(){i=!0},setIsIdentityEstablished(){a=!0}}},so=e=>ao({payload:e,getAction:()=>"identity/acquire",getUseSendBeacon:()=>!1}),co=e=>{const{content:t,addIdentity:n}=e;return{mergeState:We(t,"meta.state"),mergeQuery:We(t,"query"),addIdentity:n,toJSON:()=>t}},uo=e=>(t,n)=>{e.xdm=e.xdm||{},e.xdm.identityMap=e.xdm.identityMap||{},e.xdm.identityMap[t]=e.xdm.identityMap[t]||[],e.xdm.identityMap[t].push(n)},lo=e=>{const t={query:{identity:{fetch:e}}};return co({content:t,addIdentity:uo(t)})},fo=({config:e,logger:t,consent:n,sendEdgeNetworkRequest:o})=>{const{orgId:r,thirdPartyCookiesEnabled:i}=e,a=(({logger:e,orgId:t,awaitVisitorOptIn:n})=>{const o=(e=>{const t=e.Visitor;return at(t)&&at(t.getInstance)&&t})(window);return()=>o?n({logger:e}).then((()=>(e.info("Delaying request while using Visitor to retrieve ECID from server."),new Promise((n=>{o.getInstance(t,{}).getMarketingCloudVisitorID((t=>{e.info("Resuming previously delayed request that was waiting for ECID from Visitor."),n(t)}),!0)}))))).catch((t=>{t?e.info(`${t.message}, retrieving ECID from experience edge`):e.info("An error occurred while obtaining the ECID from Visitor.")})):Promise.resolve()})({logger:t,orgId:r,awaitVisitorOptIn:eo}),s=(({config:e,getEcidFromVisitor:t})=>{const{idMigrationEnabled:n,orgId:o}=e,r=`AMCV_${o}`;return{getEcid(){if(n){const e=(()=>{let e=null;const t=Fe.get("s_ecid")||Fe.get(r);if(t){const n=/(^|\|)MCMID\|(\d+)($|\|)/,o=t.match(n);o&&(e=o[2])}return e})();return e?Promise.resolve(e):t()}return Promise.resolve()},setEcid(e){n&&!Fe.get(r)&&Fe.set(r,`MCMID|${e}`,{domain:Zn,expires:390})}}})({config:e,getEcidFromVisitor:a}),c=Dt({orgId:r}),u=(({sendEdgeNetworkRequest:e,createIdentityRequestPayload:t,createIdentityRequest:n})=>o=>{const r=t(o),i=n(r);return e({request:i})})({sendEdgeNetworkRequest:o,createIdentityRequestPayload:lo,createIdentityRequest:so}),d=(({thirdPartyCookiesEnabled:e,areThirdPartyCookiesSupportedByDefault:t})=>n=>{e&&t(oo(window))&&n.setUseIdThirdPartyDomain()})({thirdPartyCookiesEnabled:i,areThirdPartyCookiesSupportedByDefault:Be}),l=(({getLegacyEcid:e,addEcidToPayload:t})=>n=>e().then((e=>{e&&t(n,e)})))({getLegacyEcid:s.getEcid,addEcidToPayload:ro}),f=(({orgId:e,doesIdentityCookieExist:t})=>({onResponse:n,onRequestFailure:o})=>new Promise(((r,i)=>{n((()=>{if(!t()){const t=new Error(`An identity was not set properly. Please verify that the org ID ${e} configured in Alloy matches the org ID specified in the edge configuration.`);throw i(t),t}r()})),o((()=>{t()?r():i(new Error("No identity was set on response."))}))})))({orgId:r,doesIdentityCookieExist:c}),p=(({doesIdentityCookieExist:e,setDomainForInitialIdentityPayload:t,addLegacyEcidToPayload:n,awaitIdentityCookie:o,logger:r})=>{let i;const a=e=>(t(e),n(e.getPayload()));return({request:t,onResponse:n,onRequestFailure:s})=>{if(e())return t.setIsIdentityEstablished(),Promise.resolve();if(i){r.info("Delaying request while retrieving ECID from server.");const e=i;return i=e.catch((()=>o({onResponse:n,onRequestFailure:s}))),e.then((()=>{r.info("Resuming previously delayed request."),t.setIsIdentityEstablished()})).catch((()=>a(t)))}return i=o({onResponse:n,onRequestFailure:s}),a(t)}})({doesIdentityCookieExist:c,setDomainForInitialIdentityPayload:d,addLegacyEcidToPayload:l,awaitIdentityCookie:f,logger:t}),g=(({fireReferrerHideableImage:e,logger:t})=>n=>{const o=n.filter((e=>"url"===e.type));return o.length?Promise.all(o.map((n=>e(n.spec).then((()=>{t.info(Gn(n,!0))})).catch((()=>{t.error(Gn(n,!1))}))))).then(Ut):Promise.resolve()})({fireReferrerHideableImage:xt,logger:t}),m=(({processIdSyncs:e})=>t=>e(t.getPayloadsByType("identity:exchange")))({processIdSyncs:g});return(({addEcidQueryToPayload:e,ensureSingleIdentity:t,setLegacyEcid:n,handleResponseForIdSyncs:o,getEcidFromResponse:r,getIdentity:i,consent:a})=>{let s,c={};return{lifecycle:{onBeforeRequest:({request:n,onResponse:o,onRequestFailure:r})=>(e(n.getPayload()),t({request:n,onResponse:o,onRequestFailure:r})),onResponse:({response:e})=>(s||(s=r(e),s&&n(s)),c=_e(c,e.getEdge()),o(e))},commands:{getIdentity:{optionsValidator:Kn,run:e=>a.awaitConsent().then((()=>s?void 0:i(e.namespaces))).then((()=>({identity:{ECID:s},edge:c})))}}}})({ensureSingleIdentity:p,addEcidQueryToPayload:no,setLegacyEcid:s.setEcid,handleResponseForIdSyncs:m,getEcidFromResponse:io,getIdentity:u,consent:n})};fo.namespace="Identity",fo.configValidators=Yn;const po=fo,go=(e,t)=>`URL destination ${t?"succeeded":"failed"}: ${e.spec.url}`,mo=({processDestinations:e})=>({response:t})=>(({response:t})=>{const n=t.getPayloadsByType("activation:push");return e(n)})({response:t}).then((()=>(({response:e})=>({destinations:e.getPayloadsByType("activation:pull")}))({response:t}))),ho=({logger:e})=>{const t=(({fireReferrerHideableImage:e,logger:t})=>n=>((e=>{e.filter((e=>"cookie"===e.type)).forEach((e=>{const{name:t,value:n,domain:o,ttlDays:r}=e.spec;Fe.set(t,n||"",{domain:o||"",expires:r||10})}))})(n),((e,t,n)=>{const o=n.filter((e=>"url"===e.type));return Promise.all(o.map((n=>e(n.spec).then((()=>{t.info(go(n,!0))})).catch((()=>{t.error(go(n,!1))}))))).then(Ut)})(e,t,n)))({fireReferrerHideableImage:xt,logger:e});return{lifecycle:{onResponse:mo({processDestinations:t})},commands:{}}};ho.namespace="Audiences",ho.configValidators={};const vo=ho,yo="__view__",wo="https://ns.adobe.com/personalization/dom-action",bo="https://ns.adobe.com/personalization/redirect-item",Co=({renderDecisions:e,decisionScopes:t,event:n,viewCache:o})=>{const r=n.getViewName();return{isRenderDecisions:()=>e,getViewName:()=>r,hasScopes:()=>t.length>0,hasViewName:()=>Mt(r),createQueryDetails(){const e=[...t];this.isCacheInitialized()||Ue(e,yo)||e.push(yo);const n=["https://ns.adobe.com/personalization/html-content-item","https://ns.adobe.com/personalization/json-content-item",bo];return Ue(e,yo)&&n.push(wo),{schemas:n,decisionScopes:e}},isCacheInitialized:()=>o.isInitialized(),shouldFetchData(){return this.hasScopes()||!this.isCacheInitialized()},shouldUseCachedData(){return this.hasViewName()&&this.isCacheInitialized()}}},xo=e=>et("DIV",{},{innerHTML:e});var Io=n(269),Eo=n.n(Io);const ko=/:eq\((\d+)\)/g,So=e=>-1===e.indexOf(":eq("),To=/(#|\.)(-?\w+)/g,Ro=/^\s*>?\s*/,Do=(e,t,n)=>`${t}${Eo()(n)}`,Po=e=>{const t=document;if(So(e))return pt(e,t);const n=(e=>{const t=[],n=(e=>e.split(ko).filter(Mt))(e.trim().replace(To,Do)),{length:o}=n;let r=0;for(;r<o;){const e=n[r].replace(Ro,"").trim(),o=n[r+1];o?t.push({sel:e,eq:Number(o)}):t.push({sel:e}),r+=2}return t})(e),{length:o}=n;let r=[],i=t,a=0;for(;a<o;){const{sel:e,eq:t}=n[a],s=pt(e,i),{length:c}=s;if(0===c)break;if(null!=t&&t>c-1)break;a<o-1&&(null==t?[i]=s:i=s[t]),a===o-1&&(r=null==t?s:[s[t]]),a+=1}return r},Oo=(e,t=document)=>t.getElementById(e),Ao=(e,t,n)=>{e.setAttribute(t,n)},jo=(e,t)=>e.getAttribute(t),qo=e=>e.parentNode,No=(e,t)=>{if(!e)return;const n=qo(e);n&&n.insertBefore(t,(e=>e.nextElementSibling)(e))},Mo=(e,t)=>{if(!e)return;const n=qo(e);n&&n.insertBefore(t,e)},Uo=e=>{const{childNodes:t}=e;return t?ct(t):[]},Lo=e=>e.firstElementChild;let Bo;const $o=(e=document)=>{if(void 0===Bo){const t=e.querySelector("[nonce]");Bo=t&&(t.nonce||t.getAttribute("nonce"))}return Bo},_o="alloy-prehiding",Vo={},Fo=e=>{const t=Vo[e];t&&(yt(t),delete Vo[e])},Ho=e=>{if(!e)return;if(Oo(_o))return;const t=$o(),n={id:_o,...t&&{nonce:t}},o=et(nt,n,{textContent:e});Ze(document.head,o)},zo=()=>{const e=Oo(_o);e&&yt(e)},Jo=(e,t)=>{e.textContent=t},Xo=e=>et(tt,{src:e}),Wo=e=>{pt(tt,e).forEach((e=>{const t=jo(e,rt);t&&Xo(t)}))},Qo=e=>((e,t)=>"STYLE"===e.tagName)(e)&&!jo(e,rt),Go=e=>{const t=pt(nt,e),{length:n}=t,o=$o();if(o)for(let e=0;e<n;e+=1){const n=t[e];Qo(n)&&(n.nonce=o)}};var Yo=n(658),Ko=n.n(Yo);const Zo=(e,t)=>!!e&&e.tagName===t,er=e=>Zo(e,ot)&&!jo(e,rt),tr=e=>Zo(e,ot)&&jo(e,rt),nr=e=>{const t=pt(ot,e),n=[],{length:o}=t,r=$o(),i={...r&&{nonce:r}};for(let e=0;e<o;e+=1){const o=t[e];if(!er(o))continue;const{textContent:r}=o;r&&n.push(et(ot,i,{textContent:r}))}return n},or=e=>{const t=pt(ot,e),n=[],{length:o}=t;for(let e=0;e<o;e+=1){const o=t[e];if(!tr(o))continue;const r=jo(o,rt);r&&n.push(r)}return n},rr=(e,t)=>{t.forEach((t=>{e.appendChild(t),e.removeChild(t)}))},ir=e=>Promise.all(e.map(Ko())),ar=(e,t)=>{const n=xo(t);Go(n);const o=Uo(n),r=nr(n),i=or(n);return Wo(n),o.forEach((t=>{Ze(e,t)})),rr(e,r),ir(i)},sr=(e,t)=>{(e=>{Uo(e).forEach(yt)})(e),ar(e,t)},cr=(e,t)=>{const n=xo(t);Go(n);const o=Uo(n),r=nr(n),i=or(n),{length:a}=o;let s=a-1;for(Wo(n);s>=0;){const t=o[s],n=Lo(e);n?Mo(n,t):Ze(e,t),s-=1}return rr(e,r),ir(i)},ur=(e,t)=>{const n=xo(t);Go(n);const o=Uo(n),r=nr(n),i=or(n);return Wo(n),o.forEach((t=>{Mo(e,t)})),rr(e,r),ir(i)},dr=(e,t)=>{ur(e,t),yt(e)},lr=(e,t)=>{const n=xo(t);Go(n);const o=Uo(n),r=nr(n),i=or(n);return Wo(n),o.forEach((t=>{No(e,t)})),rr(e,r),ir(i)},fr=(e,t)=>{const{priority:n,...o}=t;Object.keys(o).forEach((t=>{((e,t,n,o)=>{let r;r=o?`${t}:${n} !${o};`:`${t}:${n};`,e.style.cssText+=`;${r}`})(e,t,o[t],n)}))},pr=(e,t)=>{Object.keys(t).forEach((n=>{Ao(e,n,t[n])}))},gr=(e,t)=>{e.tagName===tt&&(Xo(t),e.removeAttribute("src"),Ao(e,rt,t))},mr=(e,{from:t,to:n})=>{const o=(e=>{const{children:t}=e;return t?ct(t):[]})(e),r=o[t],i=o[n];r&&i&&(t<n?No(i,r):Mo(i,r))},hr=e=>t=>{const{selector:n,prehidingSelector:o,content:r,meta:i}=t;return(e=>{if(Vo[e])return;const t=$o(),n={...t&&{nonce:t}},o=et(nt,n,{textContent:`${e} { visibility: hidden }`});Ze(document.head,o),Vo[e]=o})(o),vt(n,Po).then((t=>((e,t,n)=>{const o=e.map((e=>n(e,t)));return Promise.all(o)})(t,r,e))).then((()=>(Fo(o),{meta:i})),(e=>(Fo(o),{meta:i,error:e})))},vr=(e,t,n)=>{if(e.enabled){const o=JSON.stringify(t),{message:r,stack:i}=n,a=`Failed to execute action ${o}. ${r} ${i?`\n ${i}`:""}`;e.error(a)}},yr=(e,t,n)=>{const o=e.map((e=>{const o=(e=>{const t=_e({},e),{content:n,selector:o}=t;if(!Nt(r=n)||!r.trim())return t;var r;const i=Po(o);return Zo(i[0],"HEAD")?(t.type="appendHtml",t.content=(e=>{const t=xo(e);return pt("SCRIPT,LINK,STYLE",t).map((e=>e.outerHTML)).join("")})(n),t):t})(e),{type:r}=o;return((e,t,n,o)=>{const r=t[n];if(!r){const t=new Error(`DOM action "${n}" not found`);throw vr(e,o[0],t),t}return r(...o)})(n,t,r,[o]).then((e=>(((e,t)=>{if(e.enabled){const n=JSON.stringify(t);e.info(`Action ${n} executed.`)}})(n,o),e))).catch((e=>{throw vr(n,o,e),e}))}));return Promise.all(o)},wr=e=>e,br=({modules:e,logger:t,executeActions:n,collect:o})=>r=>{const i=r.map((o=>{const r=(e=>{const t={id:e.id,scope:e.scope,scopeDetails:e.scopeDetails};return e.items.map((e=>_e({},e.data,{meta:t})))})(o);return n(r,e,t)}));return Promise.all(i).then((e=>((e,t,n)=>{const o=It(n,wr),r=[],i=new Set;o.forEach((e=>{if(!e)return;if(e.error)return void t.warn(e);const{meta:n}=e;i.has(n.id)||(i.add(n.id),r.push(n))})),st(r)&&e({decisionsMeta:r})})(o,t,e))).catch((e=>{t.error(e)}))},Cr=(e,t)=>{if(So(e))return((e,t)=>t.matches?t.matches(e):t.msMatchesSelector(e))(e,t);const n=Po(e);let o=!1;for(let e=0;e<n.length;e+=1)if(n[e]===t){o=!0;break}return o},xr=(e,t,n)=>{const{documentElement:o}=document;let r=e;for(;r&&r!==o;){if(Cr(t,r))return n(t);r=r.parentNode}return null},Ir=(e,t,n)=>{const o=[];for(let r=0;r<t.length;r+=1){const i=xr(e,t[r],n);i&&o.push(...i)}return o},Er=(e=document)=>-1!==e.location.href.indexOf("adobe_authoring_enabled"),kr=(e,t)=>{e.mergeXdm({_experience:{decisioning:{propositions:t}}})},Sr=(e,t)=>{e.mergeQuery({personalization:{...t}})},Tr=({decisions:e,renderAttempted:t})=>e.map((e=>_e({renderAttempted:t},e))),Rr=(e,t)=>({id:e.id,scope:e.scope,items:t,scopeDetails:e.scopeDetails}),Dr=(e,t)=>{const n=[],o=[];return e.forEach((e=>{const{items:r=[]}=e,[i,a]=((e,t)=>{const n=[],o=[];return e.forEach((e=>{e.schema===t?n.push(e):o.push(e)})),[n,o]})(r,t);st(i)&&n.push(Rr(e,i)),st(a)&&o.push(Rr(e,a))})),{matchedDecisions:n,unmatchedDecisions:o}},Pr=e=>{const t=Dr(e,bo),n=Dr(t.unmatchedDecisions,wo),{pageWideScopeDecisions:o,nonPageWideScopeDecisions:r}=((e,t)=>{const n=[],o={};return st(e)&&e.forEach((e=>{"__view__"===e.scope?n.push(e):(o[e.scope]||(o[e.scope]=[]),o[e.scope].push(e))})),{pageWideScopeDecisions:n,nonPageWideScopeDecisions:o}})(n.matchedDecisions);return{redirectDecisions:t.matchedDecisions,pageWideScopeDecisions:o,viewDecisions:r,nonAutoRenderableDecisions:n.unmatchedDecisions}},Or=({viewCache:e})=>({viewName:t,redirectDecisions:n,pageWideScopeDecisions:o,nonAutoRenderableDecisions:r})=>{const i=[...n,...o,...r];return Promise.resolve(i).then((n=>(({viewCache:e,viewName:t,propositions:n})=>t?e.getView(t).then((e=>[...e,...n])):n)({viewCache:e,viewName:t,propositions:n}))).then((e=>(({propositions:e})=>({decisions:e,propositions:Tr({decisions:e,renderAttempted:!1})}))({propositions:e})))},Ar=({config:e,logger:t,eventManager:n})=>{const o=(({eventManager:e,mergeDecisionsMeta:t})=>({decisionsMeta:n,documentMayUnload:o=!1})=>{const r=e.createEvent();return r.mergeXdm({eventType:"decisioning.propositionDisplay"}),t(r,n),o&&r.documentMayUnload(),e.sendEvent(r)})({eventManager:n,mergeDecisionsMeta:kr}),r=(({eventManager:e,mergeDecisionsMeta:t})=>({decisionsMeta:n,xdm:o})=>{const r={eventType:"decisioning.propositionDisplay"},i=e.createEvent();if(st(n)){const e=n[0].scope;r.web={webPageDetails:{viewName:e}},t(i,n)}return i.mergeXdm(r),i.mergeXdm(o),e.sendEvent(i)})({eventManager:n,mergeDecisionsMeta:kr}),{getClickMetasBySelector:i,getClickSelectors:a,storeClickMetrics:s}=(()=>{const e={};return{storeClickMetrics:t=>{e[t.selector]||(e[t.selector]={}),e[t.selector][t.meta.id]={scope:t.meta.scope,scopeDetails:t.meta.scopeDetails}},getClickSelectors:()=>Object.keys(e),getClickMetasBySelector:t=>{return e[t]?(n=e[t],Object.keys(n).map((e=>({id:e,scope:n[e].scope,scopeDetails:n[e].scopeDetails})))):{};var n}}})(),c=(()=>{let e;const t=Ye();return{storeViews:n=>{n.then((n=>{void 0===e&&(e={}),_e(e,n),t.resolve()})).catch((()=>{void 0===e&&(e={}),t.resolve()}))},getView:n=>t.promise.then((()=>e[n]||[])),isInitialized:()=>!(void 0===e)}})(),u=(w=s,{setHtml:hr(sr),customCode:hr(cr),setText:hr(Jo),setAttribute:hr(pr),setImageSource:hr(gr),setStyle:hr(fr),move:hr(fr),resize:hr(fr),rearrange:hr(mr),remove:hr(yt),insertAfter:hr(lr),insertBefore:hr(ur),replaceHtml:hr(dr),prependHtml:hr(cr),appendHtml:hr(ar),click:e=>((e,t)=>{const{selector:n,meta:o}=e;return t({selector:n,meta:o}),Promise.resolve()})(e,w)}),d=br({modules:u,logger:t,executeActions:yr,collect:o}),l=br({modules:u,logger:t,executeActions:yr,collect:r}),f=(({collect:e,window:t,logger:n,showContainers:o})=>r=>{const{content:i,decisions:a}=(e=>{const t=e[0],{items:n,id:o,scope:r,scopeDetails:i}=t,{content:a}=n[0].data;return{content:a,decisions:[{id:o,scope:r,scopeDetails:i}]}})(r);return e({decisionsMeta:a,documentMayUnload:!0}).then((()=>{t.location.replace(i)})).catch((()=>{o(),n.warn("An error occurred while executing the redirect offer.")}))})({collect:o,window,logger:t,showContainers:zo}),p=(({executeViewDecisions:e,collect:t})=>({viewName:n,viewDecisions:o})=>{st(o)?e(o):t({decisionsMeta:[],xdm:{web:{webPageDetails:{viewName:n}}}})})({viewCache:c,executeViewDecisions:l,collect:r}),g=(({viewCache:e,executeDecisions:t,executeCachedViewDecisions:n,showContainers:o})=>({viewName:r,pageWideScopeDecisions:i,nonAutoRenderableDecisions:a})=>r?e.getView(r).then((e=>(t(i),n({viewName:r,viewDecisions:e}),o(),{decisions:[...a],propositions:[...Tr({decisions:[...i,...e],renderAttempted:!0}),...Tr({decisions:a,renderAttempted:!1})]}))):(t(i),o(),{decisions:[...a],propositions:[...Tr({decisions:i,renderAttempted:!0}),...Tr({decisions:a,renderAttempted:!1})]}))({viewCache:c,executeDecisions:d,executeCachedViewDecisions:p,showContainers:zo}),m=(({autoRenderingHandler:e,nonRenderingHandler:t,groupDecisions:n,handleRedirectDecisions:o,showContainers:r})=>({decisionsDeferred:i,personalizationDetails:a,response:s})=>{const c=s.getPayloadsByType("personalization:decisions"),u=a.getViewName();if(0===c.length)return r(),i.resolve({}),{decisions:[],propositions:[]};const{redirectDecisions:d,pageWideScopeDecisions:l,viewDecisions:f,nonAutoRenderableDecisions:p}=n(c);return a.isRenderDecisions()&&st(d)?(i.resolve({}),o(d)):(i.resolve(f),a.isRenderDecisions()?e({viewName:u,pageWideScopeDecisions:l,nonAutoRenderableDecisions:p}):t({viewName:u,redirectDecisions:d,pageWideScopeDecisions:l,nonAutoRenderableDecisions:p}))})({autoRenderingHandler:g,nonRenderingHandler:Or({viewCache:c}),groupDecisions:Pr,handleRedirectDecisions:f,showContainers:zo}),h=(({config:e,responseHandler:t,showContainers:n,hideContainers:o,mergeQuery:r})=>({decisionsDeferred:i,personalizationDetails:a,event:s,onResponse:c,onRequestFailure:u})=>{const{prehidingStyle:d}=e;a.isRenderDecisions()&&o(d),r(s,a.createQueryDetails()),c((({response:e})=>t({decisionsDeferred:i,personalizationDetails:a,response:e}))),u((()=>{i.reject(),n()}))})({config:e,responseHandler:m,showContainers:zo,hideContainers:Ho,mergeQuery:Sr}),v=(({mergeDecisionsMeta:e,collectClicks:t,getClickSelectors:n,getClickMetasBySelector:o})=>({event:r,clickedElement:i})=>{const a=n();if(st(a)){const n=t(i,a,o);st(n)&&(r.mergeXdm({eventType:"decisioning.propositionInteract"}),e(r,n))}})({mergeDecisionsMeta:kr,collectClicks:Ir,getClickSelectors:a,getClickMetasBySelector:i}),y=(({executeCachedViewDecisions:e,viewCache:t,showContainers:n})=>({personalizationDetails:o,onResponse:r,onRequestFailure:i})=>{const a=o.getViewName();return t.getView(a).then((t=>{o.isRenderDecisions()&&e({viewName:a,viewDecisions:t}),r((()=>o.isRenderDecisions()?{propositions:Tr({decisions:t,renderAttempted:!0})}:{decisions:t,propositions:Tr({decisions:t,renderAttempted:!1})})),i((()=>{n()}))}))})({executeCachedViewDecisions:p,viewCache:c,showContainers:zo});var w;return(({logger:e,fetchDataHandler:t,viewChangeHandler:n,onClickHandler:o,isAuthoringModeEnabled:r,mergeQuery:i,viewCache:a})=>({lifecycle:{onBeforeEvent({event:o,renderDecisions:s,decisionScopes:c=[],onResponse:u=Ut,onRequestFailure:d=Ut}){if(r())return e.warn("Rendering is disabled for authoring mode."),void i(o,{enabled:!1});const l=Co({renderDecisions:s,decisionScopes:c,event:o,viewCache:a});if(l.shouldFetchData()){const e=Ye();return a.storeViews(e.promise),void t({decisionsDeferred:e,personalizationDetails:l,event:o,onResponse:u,onRequestFailure:d})}l.shouldUseCachedData()&&n({personalizationDetails:l,onResponse:u,onRequestFailure:d})},onClick({event:e,clickedElement:t}){o({event:e,clickedElement:t})}}}))({logger:t,fetchDataHandler:h,viewChangeHandler:y,onClickHandler:v,isAuthoringModeEnabled:Er,mergeQuery:Sr,viewCache:c})};Ar.namespace="Personalization",Ar.configValidators={prehidingStyle:Sn().nonEmpty()};const jr=Ar,qr="2.8.0";var Nr;const Mr={web:(e=>t=>{const n={webPageDetails:{URL:e.location.href||e.location},webReferrer:{URL:e.document.referrer}};Xe(t,{web:n})})(window),device:(e=>t=>{const{screen:{width:n,height:o}}=e,r={screenHeight:o,screenWidth:n},i=(e=>{const{screen:{orientation:t}}=e;if(null==t||null==t.type)return null;const n=t.type.split("-");return 0===n.length||"portrait"!==n[0]&&"landscape"!==n[0]?null:n[0]})(e)||(e=>e.matchMedia("(orientation: portrait)").matches?"portrait":e.matchMedia("(orientation: landscape)").matches?"landscape":null)(e);i&&(r.screenOrientation=i),Xe(t,{device:r})})(window),environment:(e=>t=>{const{document:{documentElement:{clientWidth:n,clientHeight:o}={}}}=e,r={type:"browser"};jt(n)&&n>=0&&jt(o)&&o>=0&&(r.browserDetails={viewportWidth:Math.round(n),viewportHeight:Math.round(o)}),Xe(t,{environment:r})})(window),placeContext:(Nr=()=>new Date,e=>{const t=Nr(),n={localTime:Ht(t),localTimezoneOffset:t.getTimezoneOffset()};Xe(e,{placeContext:n})})},Ur=[e=>{const t=(new Date).toISOString();Xe(e,{timestamp:t})},e=>{Xe(e,{implementationDetails:{name:"https://ns.adobe.com/experience/alloy",version:qr,environment:"browser"}})}],Lr=({config:e,logger:t})=>((e,t,n,o)=>{const r=e.context,i=It(r,((e,o)=>n[e]?[n[e]]:(t.warn(`Invalid context[${o}]: '${e}' is not available.`),[]))).concat(o);return{namespace:"Context",lifecycle:{onBeforeEvent({event:e}){const t={};i.forEach((e=>e(t))),e.mergeXdm(t)}}}})(e,t,Mr,Ur);Lr.namespace="Context",Lr.configValidators={context:bn(Sn()).default(Object.keys(Mr))};const Br=Lr,$r=e=>Array.isArray(e)?e.map((e=>$r(e))):"object"==typeof e&&null!==e?Object.keys(e).sort().reduce(((t,n)=>(t[n]=$r(e[n]),t)),{}):e,_r=({standard:e,version:t})=>`${e}.${t}`,Vr=()=>{const e={},t=co({content:e,addIdentity:(t,n)=>{e.identityMap=e.identityMap||{},e.identityMap[t]=e.identityMap[t]||[],e.identityMap[t].push(n)}});return t.setConsent=t=>{e.consent=t},t},Fr=e=>ao({payload:e,getAction:()=>"privacy/set-consent",getUseSendBeacon:()=>!1}),Hr=e=>e.split(";").reduce(((e,t)=>{const[n,o]=t.split("=");return e[n]=o,e}),{}),zr=kn({consent:bn(wn()).required().nonEmpty(),identityMap:Rn}).noUnknownFields().required(),Jr=({config:e,consent:t,sendEdgeNetworkRequest:n,createNamespacedStorage:o})=>{const{orgId:r,defaultConsent:i}=e,a=(({parseConsentCookie:e,orgId:t,cookieJar:n})=>{const o=Rt(t,"consent");return{read(){const t=n.get(o);return t?e(t):{}},clear(){n.remove(o)}}})({parseConsentCookie:Hr,orgId:r,cookieJar:Fe}),s=(()=>{let e=0,t=Promise.resolve();return{addTask(n){e+=1;const o=()=>n().finally((()=>{e-=1}));return t=t.then(o,o),t},get length(){return e}}})(),c=(({createConsentRequestPayload:e,createConsentRequest:t,sendEdgeNetworkRequest:n})=>({consentOptions:o,identityMap:r})=>{const i=e();i.setConsent(o),ze(r)&&Object.keys(r).forEach((e=>{r[e].forEach((t=>{i.addIdentity(e,t)}))}));const a=t(i);return n({request:a}).then((()=>{}))})({createConsentRequestPayload:Vr,createConsentRequest:Fr,sendEdgeNetworkRequest:n}),u=(({storage:e})=>({clear(){e.clear()},lookup(t){const n={},o=e=>{const t=_r(e),{standard:o,version:r,...i}=e;var a;return n[t]||(n[t]=(a=i,Ge(JSON.stringify($r(a)))).toString()),n[t]};return{isNew:()=>t.some((t=>{const n=_r(t),r=e.getItem(n);return null===r||r!==o(t)})),save(){t.forEach((t=>{const n=_r(t);e.setItem(n,o(t))}))}}}}))({storage:o(`${Tt(r)}.consentHashes.`).persistent}),d=Dt({orgId:r});return(({storedConsent:e,taskQueue:t,defaultConsent:n,consent:o,sendSetConsentRequest:r,validateSetConsentOptions:i,consentHashStore:a,doesIdentityCookieExist:s})=>{const c={general:n};let u=e.read();const d=s(),l=void 0!==u.general;d&&l||a.clear(),d||(e.clear(),u={}),o.initializeConsent(c,u);const f=()=>{if(0===t.length){const t=e.read();void 0!==t.general&&o.setConsent(t)}};return{commands:{setConsent:{optionsValidator:i,run:({consent:e,identityMap:n})=>{o.suspend();const i=a.lookup(e);return t.addTask((()=>i.isNew()?r({consentOptions:e,identityMap:n}):Promise.resolve())).then((()=>i.save())).finally(f)}}},lifecycle:{onResponse:f,onRequestFailure:f}}})({storedConsent:a,taskQueue:s,defaultConsent:i,consent:t,sendSetConsentRequest:c,validateSetConsentOptions:zr,consentHashStore:u,doesIdentityCookieExist:d})};Jr.namespace="Privacy";const Xr=Jr,Wr=()=>({eventMergeId:Jt()}),Qr=()=>(({createEventMergeId:e})=>({commands:{createEventMergeId:{run:e}}}))({createEventMergeId:Wr});Qr.namespace="EventMerge",Qr.configValidators={};const Gr=Qr,Yr=()=>({commands:{getLibraryInfo:{run:()=>({libraryInfo:{version:qr}})}}});Yr.namespace="LibraryInfo";const Kr=Yr,Zr=({response:e})=>({inferences:e.getPayloadsByType("rtml:inferences")}),ei=()=>({lifecycle:{onResponse:Zr},commands:{}});ei.namespace="MachineLearning",ei.configValidators={};const ti=[Jn,Qn,po,vo,jr,Br,Xr,Gr,Kr,ei],ni=e=>_e({},e),oi=({errorPrefix:e,logger:t})=>(n,o)=>{const r=$t(n);if(r.code===qn)return t.warn(`The ${o} could not fully complete. ${r.message}`),{};throw _t({error:r,message:`${e} ${r.message}`}),r},ri=({getDebugEnabled:e,console:t,getMonitors:n,context:o})=>{let r=`[${o.instanceName}]`;o.componentName&&(r+=` [${o.componentName}]`);const i=(e,t)=>{const r=n();if(r.length>0){const n=_e({},o,t);r.forEach((t=>{t[e]&&t[e](n)}))}},a=(n,...o)=>{i("onBeforeLog",{level:n,arguments:o}),e()&&t[n](r,...o)};return{get enabled(){return n().length>0||e()},logOnInstanceCreated(e){i("onInstanceCreated",e),a("info","Instance initialized.")},logOnInstanceConfigured(e){i("onInstanceConfigured",e),a("info","Instance configured. Computed configuration:",e.config)},logOnBeforeCommand(e){i("onBeforeCommand",e),a("info",`Executing ${e.commandName} command. Options:`,e.options)},logOnCommandResolved(e){i("onCommandResolved",e),a("info",`${e.commandName} command resolved. Result:`,e.result)},logOnCommandRejected(e){i("onCommandRejected",e),a("error",`${e.commandName} command was rejected. Error:`,e.error)},logOnBeforeNetworkRequest(e){i("onBeforeNetworkRequest",e),a("info",`Request ${e.requestId}: Sending request.`,e.payload)},logOnNetworkResponse(e){i("onNetworkResponse",e);const t=e.parsedBody||e.body?"response body:":"no response body.";a("info",`Request ${e.requestId}: Received response with status code ${e.statusCode} and ${t}`,e.parsedBody||e.body)},logOnNetworkError(e){i("onNetworkError",e),a("error",`Request ${e.requestId}: Network request failed.`,e.error)},info:a.bind(null,"info"),warn:a.bind(null,"warn"),error:a.bind(null,"error")}},ii="Event was canceled because the onBeforeEventSend callback returned false.",ai=()=>{const e={},t=co({content:e,addIdentity:uo(e)});return t.addEvent=t=>{e.events=e.events||[],e.events.push(t)},t.getDocumentMayUnload=()=>(e.events||[]).some((e=>e.getDocumentMayUnload())),t},si=e=>{const t=({isIdentityEstablished:t})=>e.getDocumentMayUnload()&&t;return ao({payload:e,getAction:({isIdentityEstablished:e})=>t({isIdentityEstablished:e})?"collect":"interact",getUseSendBeacon:t})},ci="The server responded with a",ui=[429,503,502,504],di=({response:e,retriesAttempted:t})=>t<3&&Ue(ui,e.statusCode),li=({response:e,retriesAttempted:t})=>{let n=(e=>{const t=e.getHeader("Retry-After");let n;if(t){const e=parseInt(t,10);n=qt(e)?1e3*e:Math.max(0,new Date(t).getTime()-(new Date).getTime())}return n})(e);return void 0===n&&(n=(e=>{const t=1e3+1e3*e,n=.3*t,o=t-n,r=t+n;return Math.round(o+Math.random()*(r-o))})(t)),n},fi=Ot(window),{console:pi,fetch:gi,navigator:mi,XMLHttpRequest:hi}=window,vi={debugEnabled:Cn().default(!1),defaultConsent:Tn(An,"out",jn).default(An),edgeConfigId:Sn().unique().required(),edgeDomain:Sn().domain().default("edge.adobedc.net"),edgeBasePath:Sn().nonEmpty().default("ee"),orgId:Sn().unique().required(),onBeforeEventSend:xn().default(Ut)},yi=St(window,Fe),wi=at(gi)?(({fetch:e})=>(t,n)=>e(t,{method:"POST",cache:"no-cache",credentials:"include",headers:{"Content-Type":"text/plain; charset=UTF-8"},referrer:"client",body:n}).then((e=>e.text().then((t=>({statusCode:e.status,getHeader:t=>e.headers.get(t),body:t}))))))({fetch:gi}):(({XMLHttpRequest:e})=>(t,n)=>new Promise(((o,r)=>{const i=new e;i.onreadystatechange=()=>{4===i.readyState&&(0===i.status?r(new Error("Request aborted.")):o({statusCode:i.status,getHeader:e=>i.getResponseHeader(e),body:i.responseText}))},i.onloadstart=()=>{i.responseType="text"},i.open("POST",t,!0),i.setRequestHeader("Content-Type","text/plain; charset=UTF-8"),i.withCredentials=!0,i.onerror=r,i.onabort=r,i.send(n)})))({XMLHttpRequest:hi}),bi=({instanceName:e,logController:{setDebugEnabled:t,logger:n,createComponentLogger:o}})=>{const r=On(),i=(e=>Dn.reduce(((t,n)=>{var o;return t[n]=(o=((e,t)=>(...n)=>Promise.all(e.getLifecycleCallbacks(t).map((e=>new Promise((t=>{t(e(...n))}))))))(e,n),(...e)=>Promise.resolve().then((()=>o(...e)))),t}),{}))(r),a=oi({errorPrefix:`[${e}]`,logger:n}),s=Vn({logger:n,configureCommand:a=>{const s=(({options:e,componentCreators:t,coreConfigValidators:n,createConfig:o,logger:r,setDebugEnabled:i})=>{const a=((e,t)=>{const n={};return _e(n,e),t.forEach((e=>{const{configValidators:t}=e;_e(n,t)})),n})(n,t),s=o(((e,t)=>{try{return kn(e).noUnknownFields().required()(t)}catch(e){throw new Error(`Resolve these configuration problems:\n\t - ${e.message.split("\n").join("\n\t - ")}\nFor configuration documentation see: https://adobe.ly/2M4ErNE`)}})(a,e));return i(s.debugEnabled,{fromConfig:!0}),r.logOnInstanceConfigured({config:s}),s})({options:a,componentCreators:ti,coreConfigValidators:vi,createConfig:ni,logger:n,setDebugEnabled:t}),c=(({cookieJar:e,orgId:t,apexDomain:n})=>({cookiesToPayload(o,r){const i=(a=n,r.substr(-a.length)===a);var a;const s={domain:n,cookiesEnabled:!0};if(!i){const n=e.get(),o=Object.keys(n).filter((e=>((e,t)=>0===t.indexOf(`kndctr_${Tt(e)}_`))(t,e))).map((e=>({key:e,value:n[e]})));o.length&&(s.entries=o)}o.mergeState(s)},responseToCookies(t){t.getPayloadsByType("state:store").forEach((t=>{const o={domain:n};void 0!==t.maxAge&&(o.expires=1e3*t.maxAge/864e5),e.set(t.key,t.value,o)}))}}))({cookieJar:Fe,orgId:s.orgId,apexDomain:yi}),u=at(mi.sendBeacon)?(({sendBeacon:e,sendFetchRequest:t,logger:n})=>(o,r)=>{const i=new Blob([r],{type:"text/plain; charset=UTF-8"});return e(o,i)?Promise.resolve({statusCode:204,getHeader:()=>null,body:""}):(n.info("Unable to use `sendBeacon`; falling back to `fetch`."),t(o,r))})({sendBeacon:mi.sendBeacon.bind(mi),sendFetchRequest:wi,logger:n}):wi,d=(({logger:e,sendFetchRequest:t,sendBeaconRequest:n,isRequestRetryable:o,getRequestRetryDelay:r})=>({requestId:i,url:a,payload:s,useSendBeacon:c})=>{const u=JSON.stringify(s),d=JSON.parse(u);e.logOnBeforeNetworkRequest({url:a,requestId:i,payload:d});const l=(s=0)=>(c?n:t)(a,u).then((t=>{if(o({response:t,retriesAttempted:s})){const e=r({response:t,retriesAttempted:s});return new Promise((t=>{setTimeout((()=>{t(l(s+1))}),e)}))}let n;try{n=JSON.parse(t.body)}catch(e){}return e.logOnNetworkResponse({requestId:i,url:a,payload:d,...t,parsedBody:n,retriesAttempted:s}),{statusCode:t.statusCode,body:t.body,parsedBody:n,getHeader:t.getHeader}}));return l().catch((t=>{throw e.logOnNetworkError({requestId:i,url:a,payload:d,error:t}),Vt({error:t,message:"Network request failed."})}))})({logger:n,sendFetchRequest:wi,sendBeaconRequest:u,isRequestRetryable:di,getRequestRetryDelay:li}),l=(({logger:e})=>t=>{const{statusCode:n,body:o,parsedBody:r}=t;if(n<200||n>=300||!r&&204!==n||r&&!Array.isArray(r.handle)){const e=r?JSON.stringify(r,null,2):o;throw new Error(`${ci} status code ${n} and ${e?`response body:\n${e}`:"no response body."}`)}if(r){const{warnings:t=[],errors:n=[]}=r;t.forEach((t=>{e.warn(`${ci} warning:`,t)})),n.forEach((t=>{e.error(`${ci} non-fatal error:`,t)}))}})({logger:n}),f=(({logger:e})=>t=>{if(t){const n=t.split(";");if(n.length>=2&&n[1].length>0)try{const e=parseInt(n[1],10);if(!isNaN(e))return{regionId:e}}catch(e){}e.warn(`Invalid adobe edge: "${t}"`)}return{}})({logger:n}),p=(({extractEdgeInfo:e})=>({content:t={},getHeader:n})=>{const{handle:o=[],errors:r=[],warnings:i=[]}=t;return{getPayloadsByType:e=>It(o.filter((t=>t.type===e)),(e=>e.payload)),getErrors:()=>r,getWarnings:()=>i,getEdge:()=>e(n("x-adobe-edge")),toJSON:()=>t}})({extractEdgeInfo:f}),g=(({config:e,lifecycle:t,cookieTransfer:n,sendNetworkRequest:o,createResponse:r,processWarningsAndErrors:i})=>{const{edgeDomain:a,edgeBasePath:s,edgeConfigId:c}=e;return({request:e,runOnResponseCallbacks:u=Ut,runOnRequestFailureCallbacks:d=Ut})=>{const l=Qe();l.add(t.onResponse),l.add(u);const f=Qe();return f.add(t.onRequestFailure),f.add(d),t.onBeforeRequest({request:e,onResponse:l.add,onRequestFailure:f.add}).then((()=>{const t=e.getUseIdThirdPartyDomain()?"adobedc.demdex.net":a,r=`https://${t}/${s}/v1/${e.getAction()}?configId=${c}&requestId=${e.getId()}`;return n.cookiesToPayload(e.getPayload(),t),o({requestId:e.getId(),url:r,payload:e.getPayload(),useSendBeacon:e.getUseSendBeacon()})})).then((e=>(i(e),e))).catch((e=>{const t=()=>{throw e};return f.call({error:e}).then(t,t)})).then((({parsedBody:e,getHeader:t})=>{const o=r({content:e,getHeader:t});return n.responseToCookies(o),l.call({response:o}).then((e=>{const t=e.shift()||[],n=e.shift()||[];return _e({},...t,...n,...e)}))}))}})({config:s,lifecycle:i,cookieTransfer:c,sendNetworkRequest:d,createResponse:p,processWarningsAndErrors:l}),m=(({generalConsentState:e,logger:t})=>{const n=(n,o)=>{switch(n.general){case An:e.in(o);break;case"out":e.out(o);break;case jn:e.pending(o);break;default:t.warn(`Unknown consent value: ${n.general}`)}};return{initializeConsent(e,t){t.general?n(t,Mn):n(e,Nn)},setConsent(e){n(e,Un)},suspend(){e.pending()},awaitConsent:()=>e.awaitConsent()}})({generalConsentState:Bn({logger:n}),logger:n}),h=(({config:e,logger:t,lifecycle:n,consent:o,createEvent:r,createDataCollectionRequestPayload:i,createDataCollectionRequest:a,sendEdgeNetworkRequest:s})=>{const{onBeforeEventSend:c}=e;return{createEvent:r,sendEvent(e,r={}){const{renderDecisions:u=!1,decisionScopes:d}=r,l=i(),f=a(l),p=Qe(),g=Qe();return n.onBeforeEvent({event:e,renderDecisions:u,decisionScopes:d,onResponse:p.add,onRequestFailure:g.add}).then((()=>(l.addEvent(e),o.awaitConsent()))).then((()=>{try{e.finalize(c)}catch(e){const t=()=>{throw e};return g.add(n.onRequestFailure),g.call({error:e}).then(t,t)}if(!e.shouldSend()){g.add(n.onRequestFailure),t.info(ii);const e=new Error(ii);return g.call({error:e}).then((()=>{}))}return s({request:f,runOnResponseCallbacks:p.call,runOnRequestFailureCallbacks:g.call})}))}}})({config:s,logger:n,lifecycle:i,consent:m,createEvent:$n,createDataCollectionRequestPayload:ai,createDataCollectionRequest:si,sendEdgeNetworkRequest:g});return(({componentCreators:e,lifecycle:t,componentRegistry:n,getImmediatelyAvailableTools:o})=>(e.forEach((e=>{const{namespace:t}=e,r=o(t);let i;try{i=e(r)}catch(e){throw Vt({error:e,message:`[${t}] An error occurred during component creation.`})}n.register(t,i)})),t.onComponentsRegistered({lifecycle:t}).then((()=>n))))({componentCreators:ti,lifecycle:i,componentRegistry:r,getImmediatelyAvailableTools(t){const n=o(t);return{config:s,consent:m,eventManager:h,logger:n,lifecycle:i,sendEdgeNetworkRequest:g,handleError:oi({errorPrefix:`[${e}] [${t}]`,logger:n}),createNamespacedStorage:fi}}})},setDebugCommand:e=>{t(e.enabled,{fromConfig:!1})},handleError:a,validateCommandOptions:Hn});return s},{console:Ci}=window,xi=Ot(window),Ii=((e={})=>{const t=kn({name:Sn().default("alloy"),monitors:bn(kn({})).default([])}).noUnknownFields(),{name:n,monitors:o}=t(e),r=(({console:e,locationSearch:t,createLogger:n,instanceName:o,createNamespacedStorage:r,getMonitors:i})=>{const a=Bt.parse(t),s=r(`instance.${o}.`),c=s.session.getItem("debug");let u="true"===c,d=null===c;const l=()=>u,f=(e,{fromConfig:t})=>{t&&!d||(u=e),t||(s.session.setItem("debug",e.toString()),d=!1)};var p;return void 0!==a.alloy_debug&&f((p=a.alloy_debug,Nt(p)&&"true"===p.toLowerCase()),{fromConfig:!1}),{setDebugEnabled:f,logger:n({getDebugEnabled:l,context:{instanceName:o},getMonitors:i,console:e}),createComponentLogger:t=>n({getDebugEnabled:l,context:{instanceName:o,componentName:t},getMonitors:i,console:e})}})({console:Ci,locationSearch:window.location.search,createLogger:ri,instanceName:n,createNamespacedStorage:xi,getMonitors:()=>(window.__alloyMonitors||[]).concat(o)}),i=bi({instanceName:n,logController:r});return r.logger.logOnInstanceCreated({instance:i}),i})({name:"alloy"}),Ei=()=>window.alloy?Promise.resolve(window.alloy):function(){const e=(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getAEP();return n?{imsOrgId:n.imsOrgId,datastreamId:n.datastreamId}:{}})();return new Promise(((t,n)=>{!function(e){return e.datastreamId&&""!==e.datastreamId&&e.imsOrgId&&""!==e.imsOrgId}(e)?n():Ii("configure",{edgeConfigId:e.datastreamId,orgId:e.imsOrgId,debugEnabled:!0}).then((()=>{t(Ii)}))}))}().then((e=>(window.alloy=e,e))),ki=(e,t)=>{const n={transactionID:e.orderId.toString(),paymentAmount:e.grandTotal,paymentType:e.paymentMethodName,currencyCode:t.storeViewCurrencyCode};return{purchaseID:e.orderId.toString(),payments:[n]}},Si=({pricing:e})=>{if(!e)return;const{regularPrice:t,specialPrice:n}=e;return t-(null!=n?n:t)},Ti=e=>{var t;const n=[];return(null===(t=e.items)||void 0===t?void 0:t.length)&&e.items.forEach((e=>{var t;const o=[];null===(t=e.configurableOptions)||void 0===t||t.forEach((e=>{o.push({type:e.optionLabel,value:e.valueLabel})}));const r={SKU:e.product.sku,name:e.product.name,quantity:e.quantity,priceTotal:e.prices.price.value,currencyCode:e.prices.price.currency,discountAmount:Si(e.product),selectedOptions:o};n.push(r)})),n};const Ri=e=>{const{unitId:t,productId:n,pageContext:o,recommendationsContext:r}=e.eventInfo,i=[],a=I(t,r);a&&i.push(a);const s=E(t,n,r);s&&i.push(s);const c=x(t,n,r);Oe({category:"recommendation-unit",action:"rec-add-to-cart-click",property:null==o?void 0:o.pageType,value:null==c?void 0:c.rank,context:i})},Di=e=>{const{unitId:t,productId:n,pageContext:o,recommendationsContext:r}=e.eventInfo,i=[],a=I(t,r);a&&i.push(a);const s=E(t,n,r);s&&i.push(s);const c=x(t,n,r);Oe({category:"recommendation-unit",action:"rec-click",property:null==o?void 0:o.pageType,value:null==c?void 0:c.rank,context:i})},Pi=e=>{const{pageContext:t}=e.eventInfo;Oe({category:"recommendation-unit",action:"api-request-sent",property:null==t?void 0:t.pageType})},Oi=e=>{const{pageContext:t,recommendationsContext:n}=e.eventInfo,o=[],r=[];null==n||n.units.forEach((e=>{const t=I(e.unitId,n);t&&o.push(t),e.products.forEach((t=>{{const o=E(e.unitId,t.productId,n);o&&r.push(o)}}))})),Oe({category:"recommendation-unit",action:"api-response-received",property:null==t?void 0:t.pageType,context:[...o,...r]})},Ai=e=>{const{unitId:t,pageContext:n,recommendationsContext:o}=e.eventInfo,r=[],i=I(t,o);i&&r.push(i);const a=C(t,o);null==a||a.products.forEach((e=>{const n=E(t,e.productId,o);n&&r.push(n)})),Oe({category:"recommendation-unit",action:"impression-render",property:null==n?void 0:n.pageType,context:r})},ji=e=>{const{unitId:t,pageContext:n,recommendationsContext:o}=e.eventInfo,r=[],i=I(t,o);i&&r.push(i),Oe({category:"recommendation-unit",action:"view",property:null==n?void 0:n.pageType,context:r})},qi=e=>{const{searchUnitId:t,name:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=R(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:f,data:{}};const i=k(e,r);if(!i)return null;const a=((e,t)=>t.categories.find((t=>t.name===e))||null)(t,i);return a?{schema:f,data:{name:a.name,url:a.url,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Oe({category:"search",action:"category-click",label:null==a?void 0:a.data.url,property:null==o?void 0:o.pageType,context:s})},Ni=e=>{const{searchUnitId:t,sku:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=R(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:p,data:{}};const i=k(e,r);if(!i)return null;const a=((e,t)=>t.products.find((t=>t.sku===e))||null)(t,i);return a?{schema:p,data:{name:a.name,sku:a.sku,url:a.url,imageUrl:a.imageUrl,price:a.price,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Oe({category:"search",action:"product-click",label:null==a?void 0:a.data.sku,property:null==o?void 0:o.pageType,context:s})};const Mi=e=>{const{searchUnitId:t,pageContext:n,searchResultsContext:o}=e.eventInfo,r=R(t,o),i=[];r&&i.push(r),Oe({category:"search",action:"results-view",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})},Ui=e=>{const{searchUnitId:t,suggestion:n,pageContext:o,searchResultsContext:r}=e.eventInfo,i=R(t,r),a=((e,t,n)=>{const o=window.magentoStorefrontEvents,r=null!=n?n:o.context.getSearchResults();if(!r)return{schema:m,data:{}};const i=k(e,r);if(!i)return null;const a=((e,t)=>t.suggestions.find((t=>t.suggestion===e))||null)(t,i);return a?{schema:m,data:{suggestion:a.suggestion,rank:a.rank}}:null})(t,n,r),s=[];i&&s.push(i),a&&s.push(a),Oe({category:"search",action:"suggestion-click",label:null==a?void 0:a.data.suggestion,property:null==o?void 0:o.pageType,context:s})};const Li=e=>!0,Bi=e=>{var t;return null!==(t=(e=>{const t=window.magentoStorefrontEvents,n=null!=e?e:t.context.getEventForwarding();return n?{aep:n.aep}:{}})(e.eventInfo.eventForwardingContext).aep)&&void 0!==t&&t},$i=(e,t)=>n=>{e(n)&&t(n)},_i=$i(Li,(()=>{De(undefined,(function(e){e.trackPageView(undefined)}))})),Vi=$i(Bi,(()=>{Ei().then((e=>e("sendEvent",{xdm:{eventType:"web.webpagedetails.pageViews",web:{webPageDetails:{pageViews:{id:"1",value:1}}}}})))})),Fi=$i(Li,(e=>{const{pageContext:t,shoppingCartContext:n}=e.eventInfo,o=P(n),r=[];o&&r.push(o),Oe({category:"shopping-cart",action:"initiate-checkout",property:null==t?void 0:t.pageType,context:r})})),Hi=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){const t=yield Ei(),{shoppingCartContext:n}=e.eventInfo;t("sendEvent",{xdm:{eventType:"commerce.checkouts",commerce:{checkouts:{id:"1",value:1},cart:{ID:n.id}},productListItems:Ti(n)}})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),zi=$i(Li,(e=>{const{pageContext:t,shoppingCartContext:n}=e.eventInfo,o=P(n),r=[];o&&r.push(o),Oe({category:"shopping-cart",action:"abandon",property:null==t?void 0:t.pageType,context:r})})),Ji=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){const t=yield Ei(),{shoppingCartContext:n}=e.eventInfo;t("sendEvent",{xdm:{eventType:"commerce.cartAbandons",commerce:{cartAbandons:{id:"1",value:1},cart:{ID:n.id}},productListItems:Ti(n)}})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),Xi=$i(Li,(e=>{const{pageContext:t,productContext:n,shoppingCartContext:o}=e.eventInfo,r=b(n),i=P(o),a=[r];i&&a.push(i),Oe({category:"product",action:"add-to-cart",property:null==t?void 0:t.pageType,context:a})})),Wi=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){var t,n,o;const r=yield Ei(),{productContext:i,shoppingCartContext:a}=e.eventInfo,s={commerce:{productListAdds:{id:i.productId.toString(),value:1},cart:{ID:a.id}},productListItems:[{SKU:i.sku,name:i.name,priceTotal:null===(t=i.pricing)||void 0===t?void 0:t.regularPrice,currencyCode:null!==(o=null===(n=i.pricing)||void 0===n?void 0:n.currencyCode)&&void 0!==o?o:void 0,discountAmount:Si(i)}]};r&&r("sendEvent",s)},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),Qi=$i(Li,(e=>{const{pageContext:t,shoppingCartContext:n}=e.eventInfo,o=P(n),r=[];o&&r.push(o),Oe({category:"shopping-cart",action:"view",property:null==t?void 0:t.pageType,context:r})})),Gi=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){const t=yield Ei(),{shoppingCartContext:n}=e.eventInfo,o={eventType:"commerce.productListViews",commerce:{cart:{ID:n.id},productListViews:{id:"1",value:1}},productListItems:Ti(n)};t&&t("sendEvent",{xdm:Object.assign({},o)})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),Yi=$i(Li,(e=>{const{pageContext:t,productContext:n,shoppingCartContext:o}=e.eventInfo,r=b(n),i=P(o),a=[r];i&&a.push(i),Oe({category:"product",action:"view",property:null==t?void 0:t.pageType,context:a})})),Ki=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){var t,n,o,r;const i=yield Ei(),{productContext:a}=e.eventInfo,s={SKU:a.sku,name:a.name,priceTotal:null===(t=a.pricing)||void 0===t?void 0:t.regularPrice,currencyCode:null!==(o=null===(n=a.pricing)||void 0===n?void 0:n.currencyCode)&&void 0!==o?o:void 0};a.pricing&&(s.discountAmount=a.pricing.regularPrice-(null!==(r=a.pricing.specialPrice)&&void 0!==r?r:a.pricing.regularPrice)),i("sendEvent",{xdm:{eventType:"commerce.productViews",commerce:{productViews:{id:a.productId.toString(),value:1}},productListItems:[s]}})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),Zi=$i(Li,(e=>{const{pageContext:t,orderContext:n,shoppingCartContext:o}=e.eventInfo,r=P(o),i=[];r&&i.push(r),Oe({category:"checkout",action:"place-order",label:null==n?void 0:n.orderId.toString(),property:null==t?void 0:t.pageType,context:i})})),ea=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){const t=yield Ei(),{storefrontInstanceContext:n,orderContext:o,shoppingCartContext:r}=e.eventInfo,i={eventType:"commerce.order",commerce:{order:ki(o,n),promotionID:o.appliedCouponCode},productListItems:Ti(r)};t&&t("sendEvent",{xdm:i})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),ta=$i(Li,(e=>{const{pageContext:t,orderContext:n,productContext:o,shoppingCartContext:r}=e.eventInfo,i=b(o),a=P(r),s=[i];a&&s.push(a),Oe({category:"checkout",action:"instant-purchase",label:null==n?void 0:n.orderId.toString(),property:null==t?void 0:t.pageType,context:s})})),na=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){const t=yield Ei(),{storefrontInstanceContext:n,orderContext:o,shoppingCartContext:r}=e.eventInfo,i={eventType:"commerce.instantPurchase",commerce:{order:ki(o,n),promotionID:o.appliedCouponCode},productListItems:Ti(r)};t&&t("sendEvent",{xdm:i})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),oa=$i(Li,(e=>{const{searchUnitId:t,pageContext:n,searchInputContext:o}=e.eventInfo,r=T(t,o),i=[];r&&i.push(r),Oe({category:"search",action:"api-request-sent",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})})),ra=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){var t,n;const o=yield Ei(),{searchUnitId:r,searchInputContext:i}=e.eventInfo,a=T(r,i),s=(null!==(t=null==a?void 0:a.data.sort)&&void 0!==t?t:[]).map((e=>({attribute:e.attribute,order:e.direction}))),c=(null!==(n=null==a?void 0:a.data.filter)&&void 0!==n?n:[]).map((e=>{let t=[],n=!1;return e.eq?t.push(e.eq):e.in?t=e.in:e.range&&(n=!0,t.push(String(e.range.from)),t.push(String(e.range.to))),{attribute:e.attribute,value:t,isRange:n}}));o("sendEvent",{xdm:{eventType:"commerce.searchRequest",commerce:{searchRequest:{value:1,id:"1"},search:{queryString:i.units[0].phrase,sort:s,refinements:c}}}})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r})),ia=$i(Li,(e=>{const{searchUnitId:t,pageContext:n,searchResultsContext:o}=e.eventInfo,r=R(t,o),i=[];r&&i.push(r),Oe({category:"search",action:"api-response-received",label:null==r?void 0:r.data.searchRequestId,property:null==n?void 0:n.pageType,context:i})})),aa=$i(Bi,(e=>{return t=void 0,n=void 0,r=function*(){var t,n,o,r,i;const a=yield Ei(),{searchUnitId:s,searchResultsContext:c}=e.eventInfo,u=R(s,c),d=(null!==(n=null===(t=null==u?void 0:u.data)||void 0===t?void 0:t.suggestions)&&void 0!==n?n:[]).map((e=>e.suggestion)),l=(null!==(r=null===(o=null==u?void 0:u.data)||void 0===o?void 0:o.products)&&void 0!==r?r:[]).map((e=>({SKU:e.sku,name:e.name})));a("sendEvent",{xdm:{eventType:"commerce.searchResponse",commerce:{searchResponse:{value:1,id:"1"},search:{suggestions:d,numberOfResults:null===(i=null==u?void 0:u.data)||void 0===i?void 0:i.productCount}},productListItems:l}})},new((o=void 0)||(o=Promise))((function(e,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(a,s)}c((r=r.apply(t,n||[])).next())}));var t,n,o,r}));var sa={},ca={};function ua(e,t,n){for(var o,r,i,a,s,c;null!==(o=t.parentElement)&&null!=o&&"A"!==(r=t.tagName.toUpperCase())&&"AREA"!==r;)t=o;var u,d=t;if(null!=d.href){var l=d.hostname||pe(d.href),f=l.toLowerCase(),p=d.href.replace(l,f);new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):","i").test(p)||(i=d.id,a=Ee(d),s=d.target,c=ca[e.id].linkTrackingContent?d.innerHTML:void 0,p=unescape(p),e.core.track(function(e){var t=e.event,n=t.schema,o=t.data,r=B(),i={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:n,data:o}};return r.add("e","ue"),r.addJson("ue_px","ue_pr",i),r}({event:{schema:"iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1",data:se({targetUrl:(u={targetUrl:p,elementId:i,elementClasses:a,elementTarget:s,elementContent:c}).targetUrl,elementId:u.elementId,elementClasses:u.elementClasses,elementTarget:u.elementTarget,elementContent:u.elementContent})}}),function(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return null!==(t=null==e?void 0:e.map((function(e){if("function"!=typeof e)return e;try{return e.apply(void 0,n)}catch(e){return}})).filter(Boolean))&&void 0!==t?t:[]}(n,t)))}}function da(e,t){return function(n){var o,r;o=(n=n||window.event).which||n.button,r=n.target||n.srcElement,"click"===n.type?r&&ua(sa[e],r,t):"mousedown"===n.type?1!==o&&2!==o||!r?ca[e].lastButton=ca[e].lastTarget=null:(ca[e].lastButton=o,ca[e].lastTarget=r):"mouseup"===n.type&&(o===ca[e].lastButton&&r===ca[e].lastTarget&&ua(sa[e],r,t),ca[e].lastButton=ca[e].lastTarget=null)}}function la(e,t){ca[e].linkTrackingPseudoClicks?(he(t,"mouseup",da(e,ca[e].linkTrackingContext),!1),he(t,"mousedown",da(e,ca[e].linkTrackingContext),!1)):he(t,"click",da(e,ca[e].linkTrackingContext),!1)}function fa(e,t){var n=void 0===e?{}:e,o=n.options,r=n.pseudoClicks,i=n.trackContent,a=n.context;ca[t]={linkTrackingContent:i,linkTrackingContext:a,linkTrackingPseudoClicks:r,linkTrackingFilter:Ie(o)}}function pa(e){var t,n,o,r=document.links;for(o=0;o<r.length;o++)(null===(n=(t=ca[e]).linkTrackingFilter)||void 0===n?void 0:n.call(t,r[o]))&&!r[o][e]&&(la(e,r[o]),r[o][e]=!0)}const ga=({appId:e,collectorUrl:t,collectorPath:n})=>{const o={appId:e,platform:"web",discoverRootDomain:!0,cookieName:"mg",encodeBase64:!0,respectDoNotTrack:!1,sessionCookieTimeout:1800,eventMethod:"beacon",bufferSize:1,maxPostBytes:4e4,crossDomainLinker:void 0,cookieLifetime:63072e3,stateStorageStrategy:"localStorage",postPath:n,contexts:{webPage:!0},plugins:[{contexts:function(){return n=(t=(e=window).performance||e.mozPerformance||e.msPerformance||e.webkitPerformance).timing,t?[{schema:"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",data:{navigationStart:n.navigationStart,redirectStart:n.redirectStart,redirectEnd:n.redirectEnd,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,domainLookupEnd:n.domainLookupEnd,connectStart:n.connectStart,secureConnectionStart:n.secureConnectionStart,connectEnd:n.connectEnd,requestStart:n.requestStart,responseStart:n.responseStart,responseEnd:n.responseEnd,unloadEventStart:n.unloadEventStart,unloadEventEnd:n.unloadEventEnd,domLoading:n.domLoading,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoadedEventEnd:n.domContentLoadedEventEnd,domComplete:n.domComplete,loadEventStart:n.loadEventStart,loadEventEnd:n.loadEventEnd,msFirstPaint:n.msFirstPaint,chromeFirstPaint:n.chromeFirstPaint,requestEnd:n.requestEnd,proxyStart:n.proxyStart,proxyEnd:n.proxyEnd}}]:[];var e,t,n}},{activateBrowserPlugin:function(e){sa[e.id]=e}}]};!function(e,t,n){void 0===n&&(n={}),Ae&&function(e,t,n,o,r,i){Re.hasOwnProperty(e)||(Re[e]=Te(e,t,"js-3.2.3",o,r,i),Re[e])}(e,e,0,t,Ae,n)}("sp",t,o);const r=O();var i;i=r,De(undefined,(function(e){e.core.addGlobalContexts(i)})),De(void 0,(function(e){e.setOptOutCookie("mg_dnt")})),function(e,t){De(void 0,(function(t){t.enableActivityTracking(e)}))}({minimumVisitLength:5,heartbeatDelay:5}),function(e,t){void 0===e&&(e={}),void 0===t&&(t=Object.keys(sa)),t.forEach((function(t){sa[t]&&(sa[t].sharedState.hasLoaded?(fa(e,t),pa(t)):sa[t].sharedState.registeredOnLoadHandlers.push((function(){fa(e,t),pa(t)})))}))}()},ma=()=>{ga({appId:"magento-storefront-event-collector",collectorUrl:"https://commerce.adobedc.net",collectorPath:"/collector/tp2"}),(()=>{const e=window.magentoStorefrontEvents;e.subscribe.abandonCart(zi),e.subscribe.abandonCart(Ji),e.subscribe.addToCart(Xi),e.subscribe.addToCart(Wi),e.subscribe.initiateCheckout(Fi),e.subscribe.initiateCheckout(Hi),e.subscribe.instantPurchase(ta),e.subscribe.instantPurchase(na),e.subscribe.pageView(_i),e.subscribe.pageView(Vi),e.subscribe.placeOrder(Zi),e.subscribe.placeOrder(ea),e.subscribe.productPageView(Yi),e.subscribe.productPageView(Ki),e.subscribe.recsItemAddToCartClick(Ri),e.subscribe.recsItemClick(Di),e.subscribe.recsRequestSent(Pi),e.subscribe.recsResponseReceived(Oi),e.subscribe.recsUnitRender(Ai),e.subscribe.recsUnitView(ji),e.subscribe.searchCategoryClick(qi),e.subscribe.searchProductClick(Ni),e.subscribe.searchRequestSent(oa),e.subscribe.searchRequestSent(ra),e.subscribe.searchResponseReceived(ia),e.subscribe.searchResponseReceived(aa),e.subscribe.searchResultsView(Mi),e.subscribe.searchSuggestionClick(Ui),e.subscribe.shoppingCartView(Qi),e.subscribe.shoppingCartView(Gi)})()};window.magentoStorefrontEvents?ma():window.addEventListener("message",(e=>{"magento-storefront-events-sdk"===e.data&&window.magentoStorefrontEvents&&(ma(),window.removeEventListener("message",ma))}),!1)},877:(e,t,n)=>{var o=n(570),r=n(171),i=r;i.v1=o,i.v4=r,e.exports=i},327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},570:(e,t,n)=>{var o,r,i=n(217),a=n(327),s=0,c=0;e.exports=function(e,t,n){var u=t&&n||0,d=t||[],l=(e=e||{}).node||o,f=void 0!==e.clockseq?e.clockseq:r;if(null==l||null==f){var p=i();null==l&&(l=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=r=16383&(p[6]<<8|p[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,h=g-s+(m-c)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||g>s)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=g,c=m,r=f;var v=(1e4*(268435455&(g+=122192928e5))+m)%4294967296;d[u++]=v>>>24&255,d[u++]=v>>>16&255,d[u++]=v>>>8&255,d[u++]=255&v;var y=g/4294967296*1e4&268435455;d[u++]=y>>>8&255,d[u++]=255&y,d[u++]=y>>>24&15|16,d[u++]=y>>>16&255,d[u++]=f>>>8|128,d[u++]=255&f;for(var w=0;w<6;++w)d[u+w]=l[w];return t||a(d)}},171:(e,t,n)=>{var o=n(217),r=n(327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||r(a)}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o=n(934);return o.default})()}));
|
|
@@ -4,6 +4,11 @@ object-assign
|
|
|
4
4
|
@license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/*!
|
|
8
|
+
* @adobe/magento-storefront-event-collector@v1.1.6
|
|
9
|
+
* Copyright © Adobe, Inc. All rights reserved.See COPYING.txt for license details.
|
|
10
|
+
*/
|
|
11
|
+
|
|
7
12
|
/*!
|
|
8
13
|
* JavaScript Cookie v2.2.1
|
|
9
14
|
* https://github.com/js-cookie/js-cookie
|
|
@@ -17,5 +22,3 @@ object-assign
|
|
|
17
22
|
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
|
|
18
23
|
* Licensed under BSD-3-Clause
|
|
19
24
|
*/
|
|
20
|
-
|
|
21
|
-
/*! @adobe/magento-storefront-event-collector@v1.1.3 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getAlloy: () => any
|
|
1
|
+
declare const getAlloy: () => Promise<any>;
|
|
2
2
|
export { getAlloy };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataServicesExtension } from "@adobe/magento-storefront-events-sdk/dist/types/types/schemas";
|
|
2
|
+
import { DataServicesExtensionContext } from "../types/contexts";
|
|
3
|
+
declare const createContext: (extension?: DataServicesExtension | undefined) => DataServicesExtensionContext;
|
|
4
|
+
export default createContext;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export { default as createAEPCtx } from "./aep";
|
|
2
|
+
export { default as createDataServicesExtensionCtx } from "./dataServicesExtension";
|
|
2
3
|
export { default as createEventForwardingCtx } from "./eventForwarding";
|
|
3
4
|
export { default as createMagentoExtensionCtx } from "./extension";
|
|
4
5
|
export { default as createProductCtx } from "./product";
|
|
6
|
+
export { default as createRecommendationsExtensionCtx } from "./recommendationsExtension";
|
|
5
7
|
export { default as createRecommendationUnitCtx } from "./recommendationUnit";
|
|
6
8
|
export { default as createRecommendedItemCtx } from "./recommendedItem";
|
|
9
|
+
export { default as createSearchExtensionCtx } from "./searchExtension";
|
|
7
10
|
export { default as createSearchInputCtx } from "./searchInput";
|
|
8
11
|
export { default as createSearchResultCategoryCtx } from "./searchResultCategory";
|
|
9
12
|
export { default as createSearchResultProductCtx } from "./searchResultProduct";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RecommendationsExtension } from "@adobe/magento-storefront-events-sdk/dist/types/types/schemas";
|
|
2
|
+
import { RecommendationsExtensionContext } from "../types/contexts";
|
|
3
|
+
declare const createContext: (extension?: RecommendationsExtension | undefined) => RecommendationsExtensionContext;
|
|
4
|
+
export default createContext;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SearchExtension } from "@adobe/magento-storefront-events-sdk/dist/types/types/schemas";
|
|
2
|
+
import { SearchExtensionContext } from "../types/contexts";
|
|
3
|
+
declare const createContext: (extension?: SearchExtension | undefined) => SearchExtensionContext;
|
|
4
|
+
export default createContext;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { default as instantPurchaseHandler } from "./instantPurchase";
|
|
2
|
+
export { default as instantPurchaseHandlerAEP } from "./instantPurchaseAEP";
|
|
2
3
|
export { default as placeOrderHandler } from "./placeOrder";
|
|
4
|
+
export { default as placeOrderHandlerAEP } from "./placeOrderAEP";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as pageViewHandler } from "./view";
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as pageViewHandlerAEP } from "./viewAEP";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as searchCategoryClickHandler } from "./searchCategoryClick";
|
|
2
2
|
export { default as searchProductClickHandler } from "./searchProductClick";
|
|
3
3
|
export { default as searchRequestSentHandler } from "./searchRequestSent";
|
|
4
|
+
export { default as searchRequestSentHandlerAEP } from "./searchRequestSentAEP";
|
|
4
5
|
export { default as searchResponseReceivedHandler } from "./searchResponseReceived";
|
|
6
|
+
export { default as searchResponseReceivedHandlerAEP } from "./searchResponseReceivedAEP";
|
|
5
7
|
export { default as searchResultsViewHandler } from "./searchResultsView";
|
|
6
8
|
export { default as searchSuggestionClickHandler } from "./searchSuggestionClick";
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
export { default as abandonCartHandler } from "./abandonCart";
|
|
2
|
+
export { default as abandonCartHandlerAEP } from "./abandonCartAEP";
|
|
3
|
+
export { default as initiateCheckoutHandler } from "./initiateCheckout";
|
|
4
|
+
export { default as initiateCheckoutHandlerAEP } from "./initiateCheckoutAEP";
|
|
1
5
|
export { default as shoppingCartViewHandler } from "./view";
|
|
6
|
+
export { default as shoppingCartViewHandlerAEP } from "./viewAEP";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare const schemas: {
|
|
2
2
|
MAGENTO_EXTENSION_SCHEMA_URL: string;
|
|
3
|
+
DATA_SERVICES_EXTENSION_SCHEMA_URL: string;
|
|
4
|
+
RECOMMENDATIONS_EXTENSION_SCHEMA_URL: string;
|
|
5
|
+
SEARCH_EXTENSION_SCHEMA_URL: string;
|
|
3
6
|
MAGENTO_JS_TRACKER_SCHEMA_URL: string;
|
|
4
7
|
PRODUCT_SCHEMA_URL: string;
|
|
5
8
|
RECOMMENDATION_UNIT_SCHEMA_URL: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Commerce } from "./commerce";
|
|
2
|
+
import { PageView } from "./pageView";
|
|
3
|
+
import { ProductListItem } from "./productListItem";
|
|
4
|
+
/** The Beacon Schema that matches our schema object in AEP */
|
|
5
|
+
export declare type BeaconSchema = {
|
|
6
|
+
eventType?: string;
|
|
7
|
+
web?: PageView;
|
|
8
|
+
commerce?: Commerce;
|
|
9
|
+
productListItems?: ProductListItem[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare type Commerce = {
|
|
2
|
+
productListAdds?: ProductListAdds;
|
|
3
|
+
productListViews?: ProductListViews;
|
|
4
|
+
cart?: Cart;
|
|
5
|
+
cartAbandons?: CartAbandon;
|
|
6
|
+
checkouts?: Checkout;
|
|
7
|
+
order?: Order;
|
|
8
|
+
shipping?: Shipping;
|
|
9
|
+
promotionID?: string;
|
|
10
|
+
productViews?: ProductView;
|
|
11
|
+
search?: Search;
|
|
12
|
+
searchRequest?: SearchRequest;
|
|
13
|
+
searchResponse?: SearchResponse;
|
|
14
|
+
};
|
|
15
|
+
export declare type ProductView = {
|
|
16
|
+
id?: string;
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
export declare type Cart = {
|
|
20
|
+
ID?: string | null;
|
|
21
|
+
};
|
|
22
|
+
export declare type Shipping = {
|
|
23
|
+
shippingMethod?: string;
|
|
24
|
+
shippingAmount?: number;
|
|
25
|
+
};
|
|
26
|
+
export declare type Order = {
|
|
27
|
+
purchaseID: string;
|
|
28
|
+
payments: Payment[];
|
|
29
|
+
};
|
|
30
|
+
export declare type Payment = {
|
|
31
|
+
transactionID?: string;
|
|
32
|
+
paymentAmount?: number;
|
|
33
|
+
paymentType?: string;
|
|
34
|
+
currencyCode?: string;
|
|
35
|
+
};
|
|
36
|
+
export declare type Checkout = {
|
|
37
|
+
id?: string;
|
|
38
|
+
value: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Addition of a product to the product list, for example a product is added
|
|
42
|
+
* to a shopping cart.
|
|
43
|
+
*/
|
|
44
|
+
export declare type ProductListAdds = {
|
|
45
|
+
id?: string;
|
|
46
|
+
value: number;
|
|
47
|
+
};
|
|
48
|
+
/** View or views of a product-list has occurred. */
|
|
49
|
+
export declare type ProductListViews = {
|
|
50
|
+
id?: string;
|
|
51
|
+
value: number;
|
|
52
|
+
};
|
|
53
|
+
export declare type CartAbandon = {
|
|
54
|
+
id?: string;
|
|
55
|
+
value: number;
|
|
56
|
+
};
|
|
57
|
+
export declare type Search = {
|
|
58
|
+
queryString?: string;
|
|
59
|
+
refinements?: Filter[];
|
|
60
|
+
sort?: Sort[];
|
|
61
|
+
suggestions?: string[];
|
|
62
|
+
numberOfResults?: number;
|
|
63
|
+
};
|
|
64
|
+
export declare type Filter = {
|
|
65
|
+
attribute: string;
|
|
66
|
+
value: string[];
|
|
67
|
+
isRange: boolean;
|
|
68
|
+
};
|
|
69
|
+
export declare type Sort = {
|
|
70
|
+
attribute: string;
|
|
71
|
+
order: "ASC" | "DESC";
|
|
72
|
+
};
|
|
73
|
+
export declare type SearchRequest = {
|
|
74
|
+
id?: string;
|
|
75
|
+
value: number;
|
|
76
|
+
};
|
|
77
|
+
export declare type SearchResponse = {
|
|
78
|
+
id?: string;
|
|
79
|
+
value: number;
|
|
80
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** View(s) of a webpage has occurred. */
|
|
2
|
+
export declare type PageView = {
|
|
3
|
+
pageViews: {
|
|
4
|
+
id?: string;
|
|
5
|
+
value: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
/** Details about the web page where the web interaction occurred. */
|
|
9
|
+
export declare type WebPageDetails = {
|
|
10
|
+
webPageDetails: PageView;
|
|
11
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Items representing a product selected by a customer with specific
|
|
3
|
+
* options and pricing.
|
|
4
|
+
*/
|
|
5
|
+
export declare type ProductListItem = {
|
|
6
|
+
/**
|
|
7
|
+
* product sku
|
|
8
|
+
*/
|
|
9
|
+
SKU: string;
|
|
10
|
+
/**
|
|
11
|
+
* product name as displayed on page
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* number of this item added/purchased, defaults to 1
|
|
16
|
+
*/
|
|
17
|
+
quantity?: number;
|
|
18
|
+
/**
|
|
19
|
+
* price of one item, excluding tax
|
|
20
|
+
*/
|
|
21
|
+
priceTotal?: number;
|
|
22
|
+
/**
|
|
23
|
+
* currency code (USD, EUR, MXN, etc)
|
|
24
|
+
*/
|
|
25
|
+
currencyCode?: string;
|
|
26
|
+
/**
|
|
27
|
+
* amount by which regular price is reduced on this item
|
|
28
|
+
*/
|
|
29
|
+
discountAmount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* product configurable options (ex: {type: 'color', value: 'red'})
|
|
32
|
+
*/
|
|
33
|
+
selectedOptions?: SelectedOption[];
|
|
34
|
+
};
|
|
35
|
+
export declare type SelectedOption = {
|
|
36
|
+
type: string;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as sdkSchemas from "@adobe/magento-storefront-events-sdk/dist/types/types/schemas";
|
|
2
|
+
import { Order } from "../../types/aep";
|
|
3
|
+
declare const createOrder: (orderContext: sdkSchemas.Order, storefrontInstanceContext: sdkSchemas.StorefrontInstance) => Order;
|
|
4
|
+
export { createOrder };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShoppingCart } from "@adobe/magento-storefront-events-sdk/dist/types/types/schemas";
|
|
2
|
+
import { ProductListItem } from "../../types/aep";
|
|
3
|
+
/**
|
|
4
|
+
* create a list of shopping cart items from the `ShoppingCart` context for AEP
|
|
5
|
+
*
|
|
6
|
+
* @remarks `discountAmount` and `selectedOtions` are not supported in the sdk type yet
|
|
7
|
+
*/
|
|
8
|
+
declare const createProductListItems: (shoppingCartContext: ShoppingCart) => ProductListItem[];
|
|
9
|
+
export { createProductListItems };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/magento-storefront-event-collector",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "Event collector for Adobe Commerce storefronts",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
@@ -38,28 +38,29 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/adobe/magento-storefront-event-collector#readme",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@adobe/alloy": "^2.7.0",
|
|
42
41
|
"@adobe/adobe-client-data-layer": "^2.0.2",
|
|
42
|
+
"@adobe/alloy": "^2.7.0",
|
|
43
43
|
"@snowplow/browser-plugin-link-click-tracking": "^3.0.2",
|
|
44
44
|
"@snowplow/browser-plugin-performance-timing": "^3.0.1",
|
|
45
45
|
"@snowplow/browser-tracker": "^3.0.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@adobe/magento-storefront-events-sdk": "^1.1.
|
|
48
|
+
"@adobe/magento-storefront-events-sdk": "^1.1.8",
|
|
49
49
|
"@types/jest": "^26.0.23",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
|
51
51
|
"@typescript-eslint/parser": "^4.2.0",
|
|
52
52
|
"babel-loader": "^8.1.0",
|
|
53
|
-
"commitizen": "4.2.2",
|
|
54
53
|
"cross-env": "^7.0.3",
|
|
55
54
|
"cz-conventional-changelog": "3.3.0",
|
|
56
55
|
"eslint": "^7.9.0",
|
|
56
|
+
"eslint-config-prettier": "^8.3.0",
|
|
57
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
57
58
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
58
59
|
"html-webpack-plugin": "^5.3.1",
|
|
59
|
-
"husky": "4.3.
|
|
60
|
+
"husky": "^4.3.8",
|
|
60
61
|
"jest": "^27.0.4",
|
|
61
62
|
"prettier": "^2.2.1",
|
|
62
|
-
"standard-version": "9.
|
|
63
|
+
"standard-version": "^9.3.2",
|
|
63
64
|
"ts-jest": "^27.0.2",
|
|
64
65
|
"ts-loader": "^9.1.1",
|
|
65
66
|
"typescript": "^4.0.3",
|