(()=>{var e={187:()=>{!function(){"use strict";var e=/\[object (Boolean|Number|String|Function|Array|Date|RegExp|Arguments)\]/;function t(t){return null==t?String(t):(t=e.exec(Object.prototype.toString.call(Object(t))))?t[1].toLowerCase():"object"}function r(e,t){return Object.prototype.hasOwnProperty.call(Object(e),t)}function n(e){if(!e||"object"!=t(e)||e.nodeType||e==e.window)return!1;try{if(e.constructor&&!r(e,"constructor")&&!r(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(var n in e);return void 0===n||r(e,n)}function o(e,t){var r={},n=r;e=e.split(".");for(var o=0;o<e.length-1;o++)n=n[e[o]]={};return n[e[e.length-1]]=t,r}function i(e,o){var a,c=!e._clear;for(a in e)if(r(e,a)){var s=e[a];"array"===t(s)&&c?("array"===t(o[a])||(o[a]=[]),i(s,o[a])):n(s)&&c?(n(o[a])||(o[a]={}),i(s,o[a])):o[a]=s}delete o._clear}function a(e,t,r){t="function"==typeof(t=void 0===t?{}:t)?{listener:t,listenToPast:void 0!==r&&r,processNow:!0,commandProcessors:{}}:{listener:t.listener||function(){},listenToPast:t.listenToPast||!1,processNow:void 0===t.processNow||t.processNow,commandProcessors:t.commandProcessors||{}},this.a=e,this.l=t.listener,this.j=t.listenToPast,this.g=this.i=!1,this.c={},this.f=[],this.b=t.commandProcessors,this.h=function(e){return{set:function(t,r){i(o(t,r),e.c)},get:function(t){return e.get(t)}}}(this);var n=this.a.push,a=this;this.a.push=function(){var e=[].slice.call(arguments,0),t=n.apply(a.a,e);return c(a,e),t},t.processNow&&this.process()}function c(e,r,a){if(a=void 0!==a&&a,e.i&&(e.f.push.apply(e.f,r),!e.g))for(;0<e.f.length;){if("array"===t(r=e.f.shift()))e:{var c=e.c;t(r[0]);for(var s=r[0].split("."),u=s.pop(),f=r.slice(1),d=0;d<s.length;d++){if(void 0===c[s[d]])break e;c=c[s[d]]}try{c[u].apply(c,f)}catch(e){}}else if("arguments"===t(r)){if(s=e,u=[],f=r[0],s.b[f])for(c=s.b[f].length,d=0;d<c;d++)u.push(s.b[f][d].apply(s.h,[].slice.call(r,1)));e.f.push.apply(e.f,u)}else if("function"==typeof r)try{r.call(e.h)}catch(e){}else{if(!n(r))continue;for(var l in r)i(o(l,r[l]),e.c)}a||(e.g=!0,e.l(e.c,r),e.g=!1)}}a.prototype.process=function(){this.registerProcessor("set",(function(){var e={};return 1===arguments.length&&"object"===t(arguments[0])?e=arguments[0]:2===arguments.length&&"string"===t(arguments[0])&&(e=o(arguments[0],arguments[1])),e})),this.i=!0;for(var e=this.a.length,r=0;r<e;r++)c(this,[this.a[r]],!this.j)},a.prototype.get=function(e){var t=this.c;e=e.split(".");for(var r=0;r<e.length;r++){if(void 0===t[e[r]])return;t=t[e[r]]}return t},a.prototype.flatten=function(){this.a.splice(0,this.a.length),this.a[0]={},i(this.c,this.a[0])},a.prototype.registerProcessor=function(e,t){e in this.b||(this.b[e]=[]),this.b[e].push(t)},a.prototype.registerProcessor=a.prototype.registerProcessor,a.prototype.flatten=a.prototype.flatten,a.prototype.get=a.prototype.get,a.prototype.process=a.prototype.process,window.DataLayerHelper=a}()}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{"use strict";var e=/\[object (Boolean|Number|String|Function|Array|Date|RegExp)\]/;function t(t){if(null==t)return String(t);var r=e.exec(Object.prototype.toString.call(Object(t)));return r?r[1].toLowerCase():"object"}function n(e){return null!=e}function o(e){return"string"===t(e)}function i(e){return"object"===t(e)}function a(e){return"array"===t(e)}function c(e,t){try{return JSON.parse(e)}catch(r){return console.error("Error parsing configuration JSON",e),t}}function s(e,t){if(null==e)return null;var r=e,n=r.length>>>0;if("function"!=typeof t)return null;for(var o=arguments[2],i=0;i<n;){var a=r[i];if(t.call(o,a,i,r))return a;i++}}function u(e,t){return"true"===e||!(""!==e&&n(e)||void 0===t)&&t}function f(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];if(null!=r)for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}function d(){return Math.round(2147483647*Math.random())}var l=[];function p(){window.setTimeout((function(){for(;0<l.length;)l.shift()()}),0)}function v(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}"complete"!==document.readyState?window.addEventListener("load",p):p();var h=function e(t,r){function n(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=v({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in o)o[a]&&(i+="; "+a,!0!==o[a]&&(i+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(n,e)+i}}return Object.create({set:n,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(n[c]=t.read(a,c),e===c)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){n(e,"",v({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,v({},this.attributes,t))},withConverter:function(t){return e(v({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const g=h;function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(){return{query:[],add:function(e,t){return this.query.push(e+"="+encodeURIComponent(t))},build:function(){return this.query.join("&")}}}function _(e,t){var r=document.createElement("iframe");0!==e.indexOf("http")&&0!==e.indexOf("//")&&(e="//"+e),r.src=e,r.width=0,r.height=0,r.frameBorder=0,r.style="display: none;",t&&(r.onload=t),document.getElementsByTagName("body")[0].appendChild(r)}function x(e,t,r){var n;n=function(){r&&r(),_(e,t)},"complete"!==document.readyState?l.push(n):n()}function I(e,t){0}var O=!0;function j(e,t){o(t.type)&&o(t.id)&&e.add("id_"+t.type,t.id)}var P="velocidi_uid",k=void 0,D=void 0;function C(e,t){e&&!k&&(k=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})).replace(/-/g,"")),void 0===D&&(D=!!t)}function S(e,t){if(t("useLocalUserId")){var r=function(){var e=g.get(P);if(!e){k||C(!0),e=function(e,t,r){var n,o=window.location.hostname.split("."),i=o.length,a=Math.min(i,2);do{var c=o.slice(-a).join(".");g.set(e,t,b(b({},r),{},{domain:c})),n=g.get(e),a++}while(!n&&a<=i);return n}(P,k,{expires:3650,secure:void 0===D||D}),e||(I(),e="")}return{id:e,type:"1pCookie"}}();""!==r.id&&j(e,r),e.add("cookies",!1)}}var U=c("false",!1),E=c("[]",[]),L={protocol:"https://",mainDomain:"cdp.digitalmarketinginstitute.com",extraDomains:c("[]",[]),subdomain:""},N="domain",R="use_local_userid",q=function(){var e,t=U;try{var r=window.location.hostname.split(".").reverse(),o=s(E,(function(e){try{for(var t=e[N].split(".").reverse(),n=!0,o=0;o<t.length&&n;++o)n=t[o]===r[o];return n}catch(e){return!1}}));o&&(n(o[R])&&(t=o[R]),e=s(L.extraDomains,(function(e){return t=e,!!(r=o[N])&&((void 0===n||n>t.length)&&(n=t.length),t.substring(n-r.length,n)===r);var t,r,n}))||void 0)}catch(e){I("There may be a problem with the variables interpolated with liquid: ".concat(e))}return{defaultOverriddenHost:e,useLocalUserId:t}}(),T=q.useLocalUserId,B=q.defaultOverriddenHost;C(T,"https://"===L.protocol);var A={global:{globalId:d(),useLocalUserId:T},track:{prefix:"tr",host:void 0,enabled:u("true"),uniqueEventIds:u("",!0)&&{purchase:"transaction.id",orderPlace:"order.id"}},match:{prefix:"match",host:void 0,enabled:u("true")},activation:{prefix:"match",host:void 0,enabled:u("true"),reactivationDelay:parseInt("5000")},cookiesync:{prefix:"match",host:void 0,enabled:u("true")}};function z(e){if(e.host)return e.host;var t=B||L.mainDomain;return L.protocol+e.prefix+(0!==t.length?".":"")+L.subdomain+t}function F(e,t){var r=window.localStorage;if(!n(r))return!0;var c=e.type;if(!o(c))return!0;if(!t.uniqueEventIds)return I(),!0;var s=t.uniqueEventIds[c];if(!o(s))return!0;var u=function(e,t){for(var r=t.split(".").reverse(),n=e;(a(n)||i(n))&&r.length>0;)n=n[r.pop()];return r.length>0?void 0:n}(e,s);if(!n(u))return!0;u=JSON.stringify(u);var f,d="pcdp_"+c+"_uids";try{f=JSON.parse(r.getItem(d))}finally{a(f)||(f=[])}for(var l=0;l<f.length;++l)if(f[l]===u)return I(),!1;return f.push(u),r.setItem(d,JSON.stringify(f.slice(-10))),!0}function J(e,t,r,n,a){var c=z(r)+"/activation?",s=f(t,e),u=w(),d=s.reactivationDelay||r.reactivationDelay;o(s.containerId)?u.add("configId",s.containerId):o(s.configId)&&u.add("configId",s.configId),o(s.receiverId)&&u.add("receiverId",s.receiverId),i(s.user)?j(u,s.user):S(u,n),u.add("_v","1.2.3"),a&&u.add("_reactivation","true");var l=c+u.build();x(l,(function(){!a&&d&&setTimeout((function(){J(e,t,r,n,!0)}),d)}),(function(){I()}))}r(187);function H(e,t){var r={set:{},config:t,exec:function(t){if(r.config.enabled&&r.config.prefix)return e(t,r.set,r.config,V)}};return r}function M(e){return function(t){if(3===t.length&&i(t[2])){var r=G[t[1]];r&&e(r,t[2])}}}function V(e){return G.global.config[e]}var G={track:H((function(e,t,r,o){var c=z(r)+"/events?",s={};s._gid=o("globalId"),s._dl=window.location.href,s._v="1.2.3",s._cb=d();var u=f(s,t,e);if("p"!==u.interaction){var l=function(){if(O){if(O=!1,document.referrer&&""!==document.referrer)return document.referrer}else if(window.location.href)return window.location.href}();l&&(u._referrer=l)}var p=w();S(p,o);var v=p.build();""!==v&&(v="&"+v);var h,g=c+(function e(t,r,o){if(a(t)||i(t)){for(var c in t)if(Object.prototype.hasOwnProperty.call(t,c)){var s=encodeURIComponent(o?"["+c+"]":c);e(t[c],r,o+s)}}else n(t)&&(r[r.length]=o+"="+encodeURIComponent(t))}(u,h=[],""),h.join("&").replace(/%20/g,"+"))+v;F(u,r)&&(I(),_(g))}),A.track),match:H((function(e,t,r,n){var c=z(r)+"/match?",s=f(t,e),u=w();if(o(s.providerId)&&u.add("providerId",s.providerId),o(s.containerId)?u.add("configId",s.containerId):o(s.configId)&&u.add("configId",s.configId),S(u,n),i(s.user))j(u,s.user);else if(a(s.user))for(var d=0;d<s.user.length;++d)j(u,s.user[d]);u.add("_gid",n("globalId")),u.add("_v","1.2.3");var l=c+u.build();x(l,null,(function(){I()}))}),A.match),activation:H((function(e,t,r,n){J(e,t,r,n,!1)}),A.activation),cookiesync:H((function(e,t,r,n){var i=z(r)+"/cookiesync?",a=f(t,e),c=w();o(a.cookiesyncId)&&c.add("cookiesyncId",a.cookiesyncId),o(a.receiverId)&&c.add("receiverId",a.receiverId),o(a.uid)&&c.add("uid",a.uid),S(c,n),c.add("_gid",n("globalId")),c.add("_v","1.2.3");var s=i+c.build();x(s,null,(function(){I()}))}),A.cookiesync),global:{config:A.global}},K={event:M((function(e,t){e.exec&&e.exec(t)})),set:M((function(e,t){e.set&&(e.set=f(e.set,t))})),config:M((function(e,t){e.config&&(e.config=f(e.config,t))})),observe:function(e){if(n(e[1])&&i(e[2])){var t=o(e[3])?e[3]:"event",r=f({},e[2]);!function(e,t,r){new DataLayerHelper(e,{listener:function(e,n){var o=n[r],i=t[o];i?(I(),i(n)):I()}})}(e[1],r,t)}}};I();var Q=[];function W(){for(;0<Q.length;){var e=Q.shift();if(e.length&&o(e[0])){var t=K[e[0]];t&&t(e)}}}function X(){var e=window.pcdpLayer=window.pcdpLayer||[],t=e.push;e.push=function(){var r=[].slice.call(arguments,0);for(t.apply(e,r),Q.push.apply(Q,r);300<this.length;)this.shift();return W()},Q.push.apply(Q,e.slice(0)),window.setTimeout((function(){return W()}),0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",X):X()})()})();
