(()=>{var e={248:(e,t,r)=>{const{initialize:n,whenAvailable:i,activate:o}=r(840);function a(e){window&&window.location&&window.location.search.match(/debug=true/g)&&console.log(`aa-experiment: ${e}`)}function s(e){try{o(e)||a(`Not part of ${e}, check you have the right whitelisted values`)}catch(t){console.error(`Impression for ${e} failed`,t)}}function c(e){e?(s("metric_testing_aa"),s("internal_aa")):a("ab-reader not available")}e.exports={impressionForAAExperiment:function(){n(),a("initialized, calling whenAvaialable"),i(c,5e3)}}},840:(e,t,r)=>{"use strict";r.r(t),r.d(t,{activate:()=>y,fireImpression:()=>v,getAllExperiments:()=>m,getTestUserId:()=>h,getVariation:()=>f,initialize:()=>I,isAvailable:()=>d,isFeatureEnabled:()=>x,waitTillAvailable:()=>w,whenAvailable:()=>b});const n=()=>"undefined"==typeof window;function i(){let e=window?.tracking?.visit();if(e)return e;const t=document.cookie.split(";").find((e=>e.trim().startsWith("visit")));return t&&(e=t.split("=")[1].trim()),e}const o=()=>window?.abReader||{getVariation:()=>null,getAllExperiments:()=>[],checkFeature:()=>null,isAvailable:()=>!1,getTestUserId:()=>null,fireImpression:()=>!1,fireFeatureImpression:()=>!1},a=function(){const e={};return{log:async t=>{try{const r="string"==typeof t?t:t.message;if(e[r])return;e[r]=!0;let n={};"string"==typeof t?n.message=t:n={...t},await(async e=>await fetch(function(e){let t="https://nrlogger-prod.cf-exp.vpsvc.com?partition=exp";return("localhost"===e||e.startsWith("staging"))&&(t="https://nrlogger-dev.cf-exp.vpsvc.com?partition=exp"),t}(window.location.hostname),{method:"POST",body:e,headers:{"Content-Type":"application/json"}}))(JSON.stringify([{common:{attributes:{host:window.location.href,agent:window.navigator.userAgent,serviceName:"ab-reader",visit:i(),version:"3.3.3"}},logs:[{...n,logtype:"browser"}]}]))}catch(e){console.error("ab-reader failed sending logs",e?.message)}}}}();let s=()=>{};const c="ab-script-loaded",l=(e,t)=>{if(n())return!1;const r=t?` with experiment key [${t}]`:"";return!!window.abReaderInitialized||(A({message:`Library not initialized before using method ${e}${r}.`}),!1)},u=(e,t,r)=>{try{return e()}catch(e){A({message:`ab-reader library failed when calling ${t}.`,error:JSON.stringify(e)})}return r},d=()=>!!l("isAvailable")&&p(),p=()=>u((()=>window.abReader?.isAvailable()??!1),"isAvailable",!1),f=e=>E("getVariation",e)?u((()=>o().getVariation(e)),"getVariation",null):null,m=()=>E("getAllExperiments")?u(o().getAllExperiments,"getAllExperiments",[]):[],v=(e,t,r)=>g((()=>o().fireImpression(e,t,r||null)),"fireImpression"),g=(e,t)=>{n()&&A({message:`${t} called serverside. `,error:"Tracking is not available."});const r=()=>u(e,t,!1),i=async()=>{r(),window.removeEventListener(c,i)};return E(t)?r():(window.abReaderInitialized||s(),window.addEventListener(c,i),!1)},h=()=>E("getTestUserId")?u(o().getTestUserId,"getTestUserId",null):null,w=e=>new Promise((t=>{b((e=>t(!!e)),e)})),b=(e,t)=>{if(n())return void e(!1);if(p())return void e(!0);let r;const i=new Promise((e=>{r=e})),o=()=>{window.removeEventListener(c,o),p()?r(!0):l()},a="variationsResolved",s=()=>{window.removeEventListener(a,s),r(!0)},l=()=>{window.addEventListener(a,s)},u=[i];t&&u.push(new Promise((e=>{setTimeout(e,t)}))),window.abReader?l():window.addEventListener(c,o),Promise.race(u).then((()=>{e(p())}))},y=e=>{const t=f(e);return t&&v(e,t),t},x=e=>{const t=(e=>E("checkFeature",e)?u((()=>o().checkFeature(e)),"checkFeature",null):null)(e);return null!==t&&((e=>{g((()=>o().fireFeatureImpression(e.featureName,e.ruleName,e.enabled)),"fireFeatureImpression")})(t),"true"===t.enabled)},E=(e,t)=>{if(!l(e,t))return!1;const r=t?` with experiment key [${t}]`:"";return void 0!==window.abReader||(A({message:`ab-reader library not ready before using method ${e}${r}.`}),!1)};function A(e){a.log(e)}const I=()=>{if(n())return;if(window.abReaderInitialized)return;const e=document.createElement("script");e.type="application/javascript",e.async=!0,e.src=function(e){let t="https://wexp.exp.vpsvc.com/experimentation/ab-lib/ab-reader.js";try{let r=e.match(/vistaprint\.[a-z]{2,3}(\.[a-z]{2,3})?/);return r&&r[0]&&(t=`https://www.${r[0]}/experimentation/ab-lib/ab-reader.js`),("localhost"===e||e.startsWith("staging.vistaprint"))&&(t="https://staging.vistaprint.com/experimentation/ab-lib/ab-reader.js"),t}catch(r){return A({message:`There was an error trying to get the script source for the following hostname: '${e}'`}),t}}(window.location.hostname),e.onload=()=>window.dispatchEvent(new CustomEvent(c)),document.head.appendChild(e),window.abReaderInitialized=!0};s=I},506:(e,t,r)=>{const n=r(378),{deserializeCF:i}=r(630),o=()=>{const e=n.get("userContext");return e?i(e):(console.warn("ctc-reader: Context cookie are missing. If you are developing locally check the readme;)"),[])};e.exports={isTreatmentEnabled:e=>{try{return o().includes(e)}catch(e){console.warn("ctc-reader in isTreatmentEnabled failed.",e)}},getAllTreatments:()=>{try{return o()}catch(e){return console.warn("ctc-reader in getAllTreatments failed.",e),[]}}}},630:e=>{e.exports.deserializeCF=e=>{const t=JSON.parse(decodeURIComponent(e));return t.ctc&&t.ctc.v1?t.ctc.v1:[]}},765:(e,t,r)=>{const n=r(378),{deserialize:i,deserializeCF:o}=r(170),a="puc-up",s="userContext",c=()=>{const e=n.get(s);if(!e){const e=n.get(a);return e?i(e):(console.warn("up-reader: Context cookie are missing. If you are developing locally check the readme;)"),{})}return o(e)};e.exports={getTrait:e=>{try{return c()[e]}catch(e){console.warn("up-reader in getTrait failed.",e)}},getAllTraits:()=>{try{return c()}catch(e){return console.warn("up-reader in getAllTraits failed.",e),{}}},isAvailable:function(){try{return!!n.get(s)||!!n.get(a)}catch(e){return console.warn("up-reader in isAvailable failed.",e),!1}}}},170:e=>{e.exports.deserialize=e=>{const t={};return decodeURIComponent(e).split(",").map((e=>e.trim())).filter((e=>""!=e)).forEach((r=>{const n=r.split(":");if(2!=n.length)throw new Error("malformed puc-up cookie",e);t[n[0]]=n[1]})),t},e.exports.deserializeCF=e=>{const t=JSON.parse(decodeURIComponent(e));return t.userProfile&&t.userProfile.v1?t.userProfile.v1:{}}},319:(e,t,r)=>{"use strict";var n=r(638);e.exports={publish:function(e,t){var r=new n(e,{detail:t});window.dispatchEvent(r)}}},468:(e,t,r)=>{"use strict";var n=i((function(){var e=l.isTreatmentEnabled("site_tagging_new_customer");if(e!==l.isTreatmentEnabled("site_tagging_repeat_customer")){var t,r=e?"New":"Repeat";return window.localStorage.setItem("NewOrRepeat",r),t&&t.then||(t=Promise.resolve(t)),t}e&&console.debug("new and repeat at the same time, value is "+e)}));function i(e){return function(){for(var t=[],r=0;r{var n=r.g.CustomEvent;e.exports=function(){try{var e=new n("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?n:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var r=document.createEvent("CustomEvent");return t?r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):r.initCustomEvent(e,!1,!1,void 0),r}:function(e,t){var r=document.createEventObject();return r.type=e,t?(r.bubbles=Boolean(t.bubbles),r.cancelable=Boolean(t.cancelable),r.detail=t.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r}},378:function(e,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(){}var t,n=r(468).initialize;(t=function(){return function(t){if(t&&t.then)return t.then(e)}(function(t,r){try{var i=function(t,r){return function(e,t,r){if(r)return t?t(e()):e();try{var n=Promise.resolve(e());return t?n.then(t):n}catch(e){return Promise.reject(e)}}(t,e,r)}(n)}catch(e){return r(e)}return i&&i.then?i.then(void 0,r):i}(0,(function(e){console.error("Initialization failed on: ".concat(e))})))},function(){for(var e=[],r=0;r