@d8a-tech/wt 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.mjs +2 -2
- package/dist/wt.min.js +2 -2
- package/package.json +1 -1
package/dist/index.min.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* web-tracker - built 2026-05-
|
|
2
|
-
function Y(e,n){return e[n]}function se(e,n,t){e[n]=t}function ae(e,n){let t=Y(e,n);if(Array.isArray(t))return t;let o=[];return se(e,n,o),o}function Ge({windowRef:e,dataLayerName:n="d8aLayer"}){let t=e;if(!t)throw new Error("createD8aGlobal: windowRef is required");function o(...r){ae(t,n).push(arguments)}return o.js=r=>o("js",r),o.config=(r,i)=>o("config",r,i),o.event=(r,i)=>o("event",r,i),o.set=(r,i)=>i===void 0?o("set",r):o("set",r,i),o.consent=(r,i)=>o("consent",r,i),o}function Sn(){return{jsDate:null,pageLoadMs:null,propertyIds:[],propertyConfigs:{},primaryPropertyId:"",consent:{},consentDefault:{},consentUpdate:{},consentGtag:{},consentDefaultGtag:{},consentUpdateGtag:{},userId:null,set:{},linker:{domains:[]},incomingDl:null,events:[],__onEvent:null,__onConfig:null,__onSet:null,hitCounter:0,sessionEngagementMs:0,sessionEngaged:!1,anonCid:null,cookieAttrsSig:null,sharedSessionTokens:null,sharedSessionValue:null,emInstalled:!1,emSiteSearchFired:!1,__lastEffectiveAnalyticsStorage:void 0}}function pe(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{};return t&&Object.keys(t).length>0?t:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{}}function hn(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{},o=n!=null&&n.consentDefaultGtag&&typeof n.consentDefaultGtag=="object"?n.consentDefaultGtag:{},r=n!=null&&n.consentUpdateGtag&&typeof n.consentUpdateGtag=="object"?n.consentUpdateGtag:{};return t&&Object.keys(t).length>0||o&&Object.keys(o).length>0||r&&Object.keys(r).length>0?{consent:t,consentDefault:o,consentUpdate:r}:{consent:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{},consentDefault:n!=null&&n.consentDefault&&typeof n.consentDefault=="object"?n.consentDefault:{},consentUpdate:n!=null&&n.consentUpdate&&typeof n.consentUpdate=="object"?n.consentUpdate:{}}}function Dt(e){if(typeof queueMicrotask=="function"){queueMicrotask(e);return}Promise.resolve().then(e)}function Ie(e){let n=typeof e=="function"?e():null;if(!n)return;let t=pe(e),o=t&&typeof t.analytics_storage=="string"?t.analytics_storage:void 0,r=n.__lastEffectiveAnalyticsStorage;if(r===void 0){n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitScheduled||(n.__consentPingInitScheduled=!0,Dt(()=>{n.__consentPingInitDone=!0}));return}o!==r&&(n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitDone&&(!Array.isArray(n.propertyIds)||n.propertyIds.length===0||typeof n.__onEvent=="function"&&n.__onEvent("user_engagement",{consent_update:1})))}function R(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _n(e){if(!R(e))return null;let n=e.user_id;if(typeof n!="string")return null;let t=n.trim();return t||null}function Pt(e){if(!R(e))return;let n=e.send_page_view;return typeof n=="boolean"?n:void 0}function Nt(e){return R(e)?e:{}}function wn(e,n){if(!e||!R(n))return;let t={...e.linker||{domains:[]}},o=n.domains;if(Array.isArray(o)){let m=o.filter(l=>typeof l=="string"&&l.trim()).map(l=>l.trim());t.domains=m}let r=n.accept_incoming;typeof r=="boolean"&&(t.accept_incoming=r);let i=n.decorate_forms;typeof i=="boolean"&&(t.decorate_forms=i);let a=n.url_position,s=typeof a=="string"?a:"";(s==="query"||s==="fragment")&&(t.url_position=s),Array.isArray(t.domains)||(t.domains=[]),e.linker=t}function bn({windowRef:e,dataLayerName:n="d8aLayer"}){if(!e)throw new Error("createQueueConsumer: windowRef is required");let t=e,o=Sn(),r=!1,i=null,a=!1;function s(f){let d=R(f)?f.length:null;return f&&typeof d=="number"&&typeof f!="string"?Array.from(f):Array.isArray(f)?f:null}function m(f){var p,c;let d=f[0],y=f[1],g=f[2];switch(String(d||"")){case"js":{o.jsDate=y instanceof Date?y:new Date(y),o.pageLoadMs==null&&o.jsDate instanceof Date&&!Number.isNaN(o.jsDate.getTime())&&(o.pageLoadMs=o.jsDate.getTime());return}case"config":{let k=String(y||"");if(!k)return;o.propertyIds.includes(k)||o.propertyIds.push(k),o.primaryPropertyId||(o.primaryPropertyId=k);let S=o.propertyConfigs[k]||{},w=R(g)?g:{};o.propertyConfigs[k]={...S,...w};let u=_n(w);u&&(o.userId=u),typeof o.__onConfig=="function"&&o.__onConfig(k,w),Pt(w)!==!1&&typeof o.__onEvent=="function"&&o.__onEvent("page_view",{send_to:k});return}case"consent":{let k=String(y||"");if(k==="default"||k==="update"){let S=Nt(g);k==="default"?o.consentDefault={...o.consentDefault||{},...S||{}}:o.consentUpdate={...o.consentUpdate||{},...S||{}},o.consent={...o.consentDefault||{},...o.consentUpdate||{}},Ie(()=>o)}return}case"set":{if(typeof y=="string"&&y.trim()){let k=y.trim();k==="linker"?wn(o,g):o.set={...o.set||{},[k]:g},k==="user_id"&&typeof g=="string"&&g.trim()&&(o.userId=g.trim());let S={type:"field",field:k,value:g};(p=o.__onSet)==null||p.call(o,S);return}if(R(y)){o.set={...o.set||{},...y};let k=_n(y);k&&(o.userId=k),"linker"in y&&wn(o,y.linker);let S={type:"object",obj:y};(c=o.__onSet)==null||c.call(o,S)}return}case"event":{let k=R(g)?g:{};o.events.push({name:String(y||""),params:k}),typeof o.__onEvent=="function"&&o.__onEvent(String(y||""),k);return}default:return}}function l(){let f=n,d=Y(t,f),y=Array.isArray(d)?d:ae(t,f);for(let g of y){let p=s(g);p&&m(p)}}function b(){let d=ae(t,n);if(d.__d8aQueueConsumerPatched){i=d.__d8aQueueConsumerOriginalPush||null,a=!1;return}i=d.push.bind(d),d.__d8aQueueConsumerOriginalPush=i,d.push=function(...g){let p=g[0],c=s(p);return c&&m(c),i(...g)},d.__d8aQueueConsumerPatched=!0,a=!0}function h(){r||(r=!0,l(),b())}return{start:h,getState:()=>o,setOnEvent:f=>{o.__onEvent=f},setOnConfig:f=>{o.__onConfig=f},setOnSet:f=>{o.__onSet=f},stop:()=>{if(!r)return;let d=Y(t,n);if(a&&i&&Array.isArray(d)){let y=d;y.push=i;try{delete y.__d8aQueueConsumerPatched,delete y.__d8aQueueConsumerOriginalPush}catch(g){}}r=!1}}}function qe(e){return Math.floor((Number(e!=null?e:Date.now())||Date.now())/1e3)}function Ue(){return Math.floor(Math.random()*2147483647)}function He(e,n){let t=typeof e=="string"?e:"",o=String(n||"");return t?t.endsWith("_")&&o.startsWith("_")?`${t.slice(0,-1)}${o}`:`${t}${o}`:o}function ce(e){return He(e,"_d8a")}function ue(e,n){return He(n,`_d8a_${e}`)}function te(e){let t=String(e||"").match(/^C1\.1\.([0-9]+)\.([0-9]+)$/);return t?{cid:`${t[1]}.${t[2]}`}:null}function ze({nowMs:e}={}){return{random:Ue(),timestampSec:qe(e)}}function xn({random:e,timestampSec:n}){return`${e}.${n}`}function Ln({nowMs:e}={}){let{random:n,timestampSec:t}=ze({nowMs:e});return`C1.1.${n}.${t}`}function vn(e){let t=String(e||"").trim().match(/^([0-9]+)\.([0-9]+)$/);return t?`C1.1.${t[1]}.${t[2]}`:null}var Te="S1.1.",Ve=new Set(["s","o","g","t","j","d"]);function Rn(e){let n=String(e||"");return n.startsWith(Te)?n.slice(Te.length).split("$").map(i=>i.trim()).filter(Boolean).map(i=>{let a=i[0],s=i.slice(1);return{key:a,val:s,raw:i,known:Ve.has(a)}}):null}function An(e){let n=e.map(t=>`${t.key}${t.val}`);return`${Te}${n.join("$")}`}function de(e,n){let t=e.find(o=>o.key===n);return t?t.val:null}function K(e,n,t){let o=e.findIndex(r=>r.key===n);o>=0?e[o]={...e[o],val:String(t),known:Ve.has(n)}:e.push({key:n,val:String(t),known:Ve.has(n)})}function Cn(){let e=Ue().toString(36),n=Ue().toString(36),t=Ue().toString(36);return`${e}${n}${t}`}function le(e){let n=Rn(e);if(!n)return null;let t=de(n,"s"),o=de(n,"o"),r=de(n,"t"),i=de(n,"g"),a=t!=null?Number(t):NaN,s=o!=null?Number(o):NaN,m=r!=null?Number(r):NaN,l=i!=null?Number(i):NaN;return{tokens:n,sid:Number.isFinite(a)?a:null,sct:Number.isFinite(s)?s:null,lastEventTs:Number.isFinite(m)?m:null,seg:Number.isFinite(l)?l:null}}function je(e,{nowMs:n,sessionTimeoutMs:t}={}){var h,f,d;let o=qe(n),r=Math.floor((Number(t!=null?t:1800*1e3)||0)/1e3),i=Array.isArray(e)&&e.length>0,a=i?e.map(y=>({...y})):[];if(!i)return K(a,"s",o),K(a,"o",1),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",Cn()),{tokens:a,isNewSession:!0};let s=Number((h=de(a,"t"))!=null?h:NaN);if(!Number.isFinite(s)||o-s>r){let y=Number((f=de(a,"o"))!=null?f:NaN),g=Number.isFinite(y)?y+1:1;return K(a,"s",o),K(a,"o",g),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",Cn()),{tokens:a,isNewSession:!0}}let b=Number((d=de(a,"j"))!=null?d:0);return K(a,"j",Number.isFinite(b)?b+1:1),K(a,"t",o),{tokens:a,isNewSession:!1}}function Ke(e){return An(e)}var Me={SESSION_PREFIX:Te,tokenizeSessionCookie:Rn,detokenizeSessionCookie:An,getToken:de,setToken:K,nowSeconds:qe,applyCookiePrefix:He};function Dn(e){let n=String(e||"").trim();if(!n)return["none"];let t=n.split(".");if(t.length===4){let r=t[t.length-1];if(String(Number(r))===r)return["none"]}let o=[];for(let r=t.length-2;r>=0;r-=1)o.push(t.slice(r).join("."));return o.push("none"),o}function Pn(e){return String(e).replace(/\/+$/,"")}function ke(e){let n=new Map,t=String(e||"");if(!t)return n;for(let o of t.split(";")){let r=o.trim();if(!r)continue;let i=r.indexOf("=");if(i<0)continue;let a=r.slice(0,i).trim(),s=r.slice(i+1).trim();a&&n.set(a,s)}return n}function Et(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function Nn(e,n,t){let o=[];return o.push(`${e}=${n}`),t.path&&o.push(`Path=${String(t.path)}`),t.expires&&o.push(`Expires=${t.expires.toUTCString()}`),t.maxAgeSeconds!=null&&o.push(`Max-Age=${String(t.maxAgeSeconds)}`),t.sameSite&&o.push(`SameSite=${String(t.sameSite)}`),t.domain&&o.push(`Domain=${String(t.domain)}`),t.secure&&o.push("Secure"),o.join("; ")}function It(e){return e&&(e==="none"?null:e.startsWith(".")?e:`.${e}`)}function We({windowRef:e}){let n=e;if(!(n!=null&&n.document))throw new Error("createCookieJar: windowRef.document is required");let t=n.document;function o(){var s;return ke((s=n.document)==null?void 0:s.cookie)}function r(s){return o().get(s)}function i(s,m,l={}){var v,P,N;let b=l.path||"/",h=Et(n),f=l.sameSite||"Lax",d=!h&&String(f).toLowerCase()==="none"?"Lax":f,y=l.secure!=null?!!l.secure&&h:h,g=(v=l.maxAgeSeconds)!=null?v:null,p=(P=l.expires)!=null?P:null,c={path:b,sameSite:d,secure:y,maxAgeSeconds:g,expires:p},k=l.domain||"auto",S=String(((N=n.location)==null?void 0:N.hostname)||""),w=k==="auto"?Dn(S):[k],u=[];for(let W of w){let x=It(W),U=Nn(s,m,{...c,domain:x}),I=String(t.cookie||"");t.cookie=U;let H=String(t.cookie||""),z=I!==H||r(s)===m;if(u.push({candidate:W,domain:W==="none"?null:x,cookieStr:U,before:I,after:H,readBack:r(s),stuck:z}),z)return{ok:!0,domain:W==="none"?null:x,cookieStr:U,attempts:u}}return{ok:!1,domain:null,cookieStr:null,attempts:u}}function a(s,m={}){return i(s,"deleted",{...m,expires:new Date(0)})}return{get:r,set:i,del:a,__internal:{parseCookieHeader:ke,buildSetCookieString:Nn}}}var En=new Set(["value","tax","shipping"]),In={item_id:"id",item_name:"nm",affiliation:"af",coupon:"cp",discount:"ds",index:"lp",item_brand:"br",item_category:"ca",item_category2:"c2",item_category3:"c3",item_category4:"c4",item_category5:"c5",item_list_id:"li",item_list_name:"ln",item_variant:"va",location_id:"lo",price:"pr",quantity:"qt",promotion_id:"pi",promotion_name:"pn"};function Ut(e){return!!e&&typeof e=="object"}function Se(e){return e==null?null:typeof e=="string"?e:typeof e=="boolean"?e?"1":"0":typeof e=="number"?String(e):Array.isArray(e)?e.join(","):String(e)}function Tt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return e?1:0;if(typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:null}return null}function ye(e,n,t){t!=null&&e.set(`ep.${n}`,String(t))}function Un(e,n,t){t!=null&&e.set(`epn.${n}`,String(t))}function Mt(e){let n=Ut(e)?e:{},t=[],o=[];for(let[i,a]of Object.entries(In)){if(!(i in n))continue;let s=n[i],m=Se(s);m!=null&&t.push(`${a}${m}`)}let r=0;for(let i of Object.keys(n)){if(i in In)continue;let a=n[i],s=Se(a);s!=null&&(o.push(`k${r}${i}`),o.push(`v${r}${s}`),r+=1)}return[...t,...o].join("~")}function Tn({propertyId:e,eventName:n,eventParams:t,cookieHeader:o,clientId:r,userId:i,cookiePrefix:a,ignoreReferrer:s,browser:m,pageLoadMs:l,hitCounter:b,engagementTimeMs:h,uachParams:f,campaign:d,contentGroup:y,consentParams:g,debugMode:p}){let c=new URLSearchParams;c.set("v","2"),c.set("tid",String(e||"")),c.set("en",String(n||"")),p===!0&&c.set("_dbg","1"),l!=null&&c.set("_p",String(l)),b!=null&&c.set("_s",String(b)),h!=null&&c.set("_et",String(h));let k=ke(o);if(r!=null&&String(r))c.set("cid",String(r));else{let x=te(k.get(ce(a)));x!=null&&x.cid&&c.set("cid",x.cid)}typeof i=="string"&&i.trim()&&c.set("uid",i.trim());let S=d||{};typeof S.campaign_id=="string"&&S.campaign_id.trim()&&c.set("ci",S.campaign_id.trim()),typeof S.campaign_source=="string"&&S.campaign_source.trim()&&c.set("cs",S.campaign_source.trim()),typeof S.campaign_medium=="string"&&S.campaign_medium.trim()&&c.set("cm",S.campaign_medium.trim()),typeof S.campaign_name=="string"&&S.campaign_name.trim()&&c.set("cn",S.campaign_name.trim()),typeof S.campaign_term=="string"&&S.campaign_term.trim()&&c.set("ct",S.campaign_term.trim()),typeof S.campaign_content=="string"&&S.campaign_content.trim()&&c.set("cc",S.campaign_content.trim()),typeof y=="string"&&y.trim()&&ye(c,"content_group",y.trim());let w=ue(e,a),u=le(k.get(w));(u==null?void 0:u.sid)!=null?c.set("sid",String(u.sid)):c.set("sid",String(Math.floor(Date.now()/1e3))),(u==null?void 0:u.sct)!=null?c.set("sct",String(u.sct)):c.set("sct","1"),(u==null?void 0:u.seg)!=null&&c.set("seg",String(u.seg));let v=m;if(v.dl&&c.set("dl",String(v.dl)),v.dt&&c.set("dt",String(v.dt)),s===!0&&c.set("ir","1"),c.set("dr",String(v.dr)),v.ul&&c.set("ul",String(v.ul)),v.sr&&c.set("sr",String(v.sr)),f)for(let[x,U]of Object.entries(f))U==null||U===""||c.set(x,String(U));g&&(g.gcs&&c.set("gcs",String(g.gcs)),g.gcd&&c.set("gcd",String(g.gcd)));let P=t||{};p===!0&&!Object.prototype.hasOwnProperty.call(P,"debug_mode")&&ye(c,"debug_mode","1");let N=P.currency;typeof N=="string"&&c.set("cu",N),P.transaction_id!=null&&ye(c,"transaction_id",Se(P.transaction_id)),P.coupon!=null&&ye(c,"coupon",Se(P.coupon)),P.customer_type!=null&&ye(c,"customer_type",Se(P.customer_type));for(let x of En)P[x]!=null&&Un(c,x,Tt(P[x]));let W=P.items;if(Array.isArray(W)){let x=W.slice(0,200);for(let U=0;U<x.length;U+=1){let I=Mt(x[U]);I&&c.set(`pr${U+1}`,I)}}for(let x of Object.keys(P)){if(x==="items"||x==="currency"||x==="transaction_id"||x==="coupon"||x==="customer_type"||En.has(x)||x==="user_id"||x==="client_id"||x==="campaign_id"||x==="campaign_source"||x==="campaign_medium"||x==="campaign_name"||x==="campaign_term"||x==="campaign_content"||x==="page_location"||x==="page_title"||x==="page_referrer"||x==="content_group"||x==="ignore_referrer"||x==="language"||x==="screen_resolution"||x==="cookie_domain"||x==="cookie_expires"||x==="cookie_flags"||x==="cookie_path"||x==="cookie_prefix"||x==="cookie_update"||x==="send_page_view"||x==="send_to")continue;let U=P[x];typeof U=="number"?Un(c,x,U):ye(c,x,Se(U))}return c}function Wt(e){return/^https?:\/\//i.test(String(e||""))}function Qe(e){if(typeof e=="string"&&Wt(e))return Qe({server_container_url:e});let t=((e&&typeof e=="object"?e:{}).server_container_url||"").trim();if(!t)throw new Error("server_container_url is required");return Pn(t)}function Mn(e){let n=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.href)||"")}catch(m){return""}})(),t=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.title)||"")}catch(m){return""}})(),o=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.referrer)||"")}catch(m){return""}})(),r=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.hostname)||"")}catch(m){return""}})(),i=(()=>{var s;try{return String(((s=e==null?void 0:e.navigator)==null?void 0:s.language)||"").toLowerCase()}catch(m){return""}})(),a=(()=>{var s,m;try{let l=(s=e==null?void 0:e.screen)==null?void 0:s.width,b=(m=e==null?void 0:e.screen)==null?void 0:m.height;if(typeof l=="number"&&typeof b=="number")return`${l}x${b}`}catch(l){}return""})();return{dl:n,dt:t,dr:o,dh:r,ul:i,sr:a}}function $t(e){return new Promise(n=>setTimeout(n,e))}function Ot(e){return e===429||e>=500}async function Wn({url:e,windowRef:n,useBeacon:t,maxRetries:o=1,initialBackoffMs:r=200}){var h;let i=n,a=(h=i==null?void 0:i.navigator)==null?void 0:h.sendBeacon;if(t&&typeof a=="function")try{return a.call(i.navigator,e),{ok:!0,via:"beacon"}}catch(f){}let s=i==null?void 0:i.fetch;if(typeof s!="function")throw new Error("fetch is not available");let m={method:"POST",keepalive:!0,credentials:"include",cache:"no-store",redirect:"follow",mode:"no-cors"},l=0,b=r;for(;;){l+=1;try{let f=await s.call(i,e,m),d=typeof(f==null?void 0:f.status)=="number"?f.status:0;if(!Ot(d))return{ok:!0,via:"fetch",status:d}}catch(f){}if(l>o)return{ok:!1,via:"fetch",status:null};await $t(b),b*=2}}function Re(e){return String((e||{}).analytics_storage||"").toLowerCase()!=="denied"}var Je=2*365*24*60*60;function Ye({jar:e,consent:n,nowMs:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=ce(r),f=e==null?void 0:e.get(h),d=te(f);if(d!=null&&d.cid)return Re(n||{})?l===!1&&!b?{cid:d.cid,wrote:!1}:(e==null||e.set(h,String(f||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:d.cid,wrote:!0}):{cid:d.cid,wrote:!1};let y=Ln({nowMs:t}),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(n||{})?l===!1&&f?{cid:p,wrote:!1}:(e==null||e.set(h,y,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p,wrote:!0}):{cid:p,wrote:!1}}function $n({jar:e,cid:n,consent:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=typeof n=="string"?n.trim():String(n||"").trim(),f=vn(h);if(!f)return{cid:null,wrote:!1};let d=ce(r),y=e==null?void 0:e.get(d),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(t||{})?y&&l===!1?b?(e==null||e.set(d,String(y||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p||h,wrote:!0}):{cid:p||h,wrote:!1}:(e==null||e.set(d,f,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:h,wrote:!0}):{cid:h,wrote:!1}}function On({jar:e,propertyId:n,value:t,consent:o,cookieDomain:r="auto",cookiePrefix:i="",cookiePath:a="/",cookieSameSite:s="Lax",cookieSecure:m=void 0,cookieMaxAgeSeconds:l=Je,cookieUpdate:b=!0,forceCookieAttrsWrite:h=!1}={}){var p;let f=String(n||"");if(!f)return{wrote:!1};let d=String(t||"");if(!((p=le(d))!=null&&p.tokens))return{wrote:!1};let y=ue(f,i),g=e==null?void 0:e.get(y);return Re(o||{})?g&&b===!1?h?(e==null||e.set(y,String(g||""),{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}:(e==null||e.set(y,d,{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}}var Bt=["platform","platformVersion","architecture","model","bitness","fullVersionList","wow64","mobile"];function Fn(e){e.d8a_tag_data=e.d8a_tag_data||{};let n=e.d8a_tag_data,t=n.uach_store;return R(t)||(n.uach_store={}),n.uach_store}function Ft(e){let n=e.navigator;if(!R(n))return!1;let t=n.userAgentData;return R(t)?typeof t.getHighEntropyValues=="function":!1}function Gn(e){return Fn(e).uach||null}function Vn(e){if(!Ft(e))return null;let n=Fn(e);return n.uach_promise||(n.uach_promise=e.navigator.userAgentData.getHighEntropyValues(Bt).then(t=>(n.uach=n.uach||t,n.uach))),n.uach_promise}function Bn(e){return encodeURIComponent(String(e||""))}function qn(e){if(!e)return null;let n={};return e.architecture&&(n.uaa=String(e.architecture)),e.bitness&&(n.uab=String(e.bitness)),Array.isArray(e.fullVersionList)&&(n.uafvl=e.fullVersionList.map(t=>`${Bn(t.brand||"")};${Bn(t.version||"")}`).join("|")),n.uamb=e.mobile?"1":"0",e.model&&(n.uam=String(e.model)),e.platform&&(n.uap=String(e.platform)),e.platformVersion&&(n.uapv=String(e.platformVersion)),n.uaw=e.wow64?"1":"0",n}function Hn(e){switch(e){case 1:return"1";case 2:case 4:return"0";default:return"-"}}function zn(e){return String(e||"").toLowerCase()==="denied"?2:1}function jn({consent:e}){let n=e||{},t=zn(n.ad_storage),o=zn(n.analytics_storage);return`G1${Hn(t)}${Hn(o)}`}function Kn({consentDefault:e,consentUpdate:n}){let t=e||{},o=n||{};function r(m){let l=String(m||"").toLowerCase();return l==="granted"?"granted":l==="denied"?"denied":null}function i(m,l){let b=r(m),h=r(l);return!b&&!h?"l":b==="denied"&&!h?"p":b==="granted"&&!h?"t":!b&&h==="denied"?"m":!b&&h==="granted"?"n":b==="denied"&&h==="denied"?"q":b==="granted"&&h==="granted"?"v":b==="denied"&&h==="granted"?"r":b==="granted"&&h==="denied"?"u":"l"}let a=[["ad_storage","3"],["analytics_storage","3"],["ad_user_data","2"],["ad_personalization","5"]],s="13";for(let[m,l]of a)s+=`${i(t[m],o[m])}${l}`;return s+="l1",s}function Qn(){let e=ze({nowMs:Date.now()});return xn(e)}function Jn({windowRef:e,state:n}){return n?(typeof n.anonCid=="string"&&n.anonCid||(n.anonCid=Qn()),n.anonCid):Qn()}function Yn({windowRef:e,nowMs:n=()=>Date.now()}={}){if(!e)throw new Error("createEngagementTimer: windowRef is required");let t=e,o=!1,r=!0,i=!0,a=!0,s=null,m=0;function l(){var u;try{if(typeof t.hasFocus=="function")return!!t.hasFocus();if(typeof((u=t.document)==null?void 0:u.hasFocus)=="function")return!!t.document.hasFocus()}catch(v){}return!0}function b(){var u,v;try{if(typeof((u=t.document)==null?void 0:u.hidden)=="boolean")return!t.document.hidden;if(typeof((v=t.document)==null?void 0:v.visibilityState)=="string")return t.document.visibilityState!=="hidden"}catch(P){}return!0}function h(){return r&&i&&a}function f(){let u=n();if(s!=null){let v=Math.max(0,u-s);m+=v,s=u}h()?s==null&&(s=u):s=null}function d(){f(),r=!0,f()}function y(){f(),r=!1,f()}function g(){f(),i=b(),f()}function p(){f(),a=!0,f()}function c(){f(),a=!1,f()}function k(){var u;o||(o=!0,r=l(),i=b(),a=!0,f(),typeof t.addEventListener=="function"&&(t.addEventListener("focus",d),t.addEventListener("blur",y),t.addEventListener("pageshow",p),t.addEventListener("pagehide",c)),typeof((u=t.document)==null?void 0:u.addEventListener)=="function"&&t.document.addEventListener("visibilitychange",g))}function S(){return f(),m|0}function w(){f();let u=m|0;return m=0,s=h()?n():null,u}return{start:k,peek:S,getAndReset:w,__internal:{sync:f}}}function oe(e){let n=typeof e=="function"?e():null;return Array.isArray(n==null?void 0:n.propertyIds)&&n.propertyIds.length>0?n.propertyIds.slice():[]}function ne(e,n){var r;let t=typeof e=="function"?e():null,o=(r=t==null?void 0:t.propertyConfigs)==null?void 0:r[n];return o&&typeof o=="object"?o:{}}function he(e){let n=typeof e=="function"?e():null;return n!=null&&n.set&&typeof n.set=="object"?n.set:{}}function Xn({enabled:e}){return{enabled:e===!0,log:(...n)=>{if(e===!0)try{console.log(...n)}catch(t){}}}}function Zn({key:e,eventParams:n,config:t,setParams:o}){let r=n||{},i=t||{},a=o||{};return Object.prototype.hasOwnProperty.call(r,e)&&r[e]!=null?r[e]:Object.prototype.hasOwnProperty.call(i,e)&&i[e]!=null?i[e]:Object.prototype.hasOwnProperty.call(a,e)&&a[e]!=null?a[e]:null}function Q({key:e,eventParams:n,config:t,setParams:o}){let r=Zn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="string"&&r.trim()?r.trim():null}function Xe({key:e,eventParams:n,config:t,setParams:o}){let r=Zn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="boolean"?r:null}function Gt(e){let n=typeof e=="string"?e:"";if(!n.trim())return{};let t=n.split(";").map(r=>r.trim()).filter(Boolean),o={};for(let r of t){let i=r.toLowerCase();if(i==="secure"&&(o.secure=!0),i.startsWith("samesite=")){let s=r.split("=").slice(1).join("=").trim().toLowerCase();s==="lax"&&(o.sameSite="Lax"),s==="strict"&&(o.sameSite="Strict"),s==="none"&&(o.sameSite="None")}}return o}function _e({propertyCfg:e,setParams:n,https:t,state:o,isDebugEnabled:r}){var U,I,H,z,J,T,re;let i=R(e)?e:{},a=R(n)?n:{},s=(U=i.cookie_domain)!=null?U:a.cookie_domain,m=typeof s=="string"&&s.trim()?s:s==null?"auto":String(s),l=(I=i.cookie_prefix)!=null?I:a.cookie_prefix,b=typeof l=="string"?l:"",h=(H=i.cookie_path)!=null?H:a.cookie_path,f=typeof h=="string"&&h.trim()?h:"/",d=(z=i.cookie_update)!=null?z:a.cookie_update,y=typeof d=="boolean"?d:!0,g=(J=i.cookie_expires)!=null?J:a.cookie_expires,p=Number.isFinite(Number(g))?Number(g):null,c=p!=null?p:2*365*24*60*60,k=(re=(T=i.cookie_flags)!=null?T:a.cookie_flags)!=null?re:"",S=Gt(k),w=S.sameSite||"Lax",u=t===!0&&S.secure===!0?!0:t===!0,v=typeof r=="function"?r({config:i,setParams:a}):!1,P=JSON.stringify({domain:m,prefix:b,path:f,sameSite:w,secure:u,maxAgeSeconds:c}),N=`${b}|${m}|${f}`;o&&!o.cookieAttrsSig&&(o.cookieAttrsSig={});let x=(o!=null&&o.cookieAttrsSig?o.cookieAttrsSig[N]:void 0)!==P;return o!=null&&o.cookieAttrsSig&&(o.cookieAttrsSig[N]=P),{cookieDomain:m,cookiePrefix:b,cookiePath:f,cookieSameSite:w,cookieSecure:u,cookieUpdate:y,cookieMaxAgeSeconds:c,forceCookieAttrsWrite:x,debug:v}}function Ze(e){return R(e)?{ok:e.ok,domain:e.domain,cookieStr:e.cookieStr,attempts:e.attempts}:{}}function et({state:e,destinations:n,jar:t,getPropertyConfig:o,resolveCookieSettings:r,sessionTimeoutMs:i,engagementTimeMs:a,engagedThresholdMs:s,nowMs:m,log:l}){var p,c,k;if(!e||!Array.isArray(n)||n.length===0||!t||typeof o!="function"||typeof r!="function")return;let b=Number.isFinite(Number(m))?Number(m):Date.now(),h=Array.isArray(e.sharedSessionTokens)?e.sharedSessionTokens:null;if(!h)for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v),N=le(P);if(N!=null&&N.tokens){h=N.tokens;break}}let f=je(h||null,{nowMs:b,sessionTimeoutMs:i});f.isNewSession&&(e.sessionEngagementMs=0,e.sessionEngaged=!1);let d=Me.getToken(f.tokens,"g");e.sessionEngagementMs=(Number(e.sessionEngagementMs)||0)+(Number(a)||0),!e.sessionEngaged&&Number(s)>0&&e.sessionEngagementMs>=Number(s)&&(Me.setToken(f.tokens,"g",1),e.sessionEngaged=!0);let y=Me.getToken(f.tokens,"g"),g=f.isNewSession||d!==y;e.sharedSessionTokens=f.tokens,e.sharedSessionValue=Ke(f.tokens);for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v);if(!P){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(p=u.cookieMaxAgeSeconds)!=null?p:void 0});u.debug&&(l==null||l("[d8a] set session cookie (create)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.cookieUpdate===!0||g){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(c=u.cookieMaxAgeSeconds)!=null?c:void 0});u.debug&&(l==null||l("[d8a] set session cookie (value+attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.forceCookieAttrsWrite){let N=t.set(v,P,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(k=u.cookieMaxAgeSeconds)!=null?k:void 0});u.debug&&(l==null||l("[d8a] set session cookie (attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}u.debug&&(l==null||l("[d8a] set session cookie (no write)",{pid:S,cookieName:v,reason:"cookie_update=false and session value unchanged and force_cookie_attrs_write=false",cookieUpdate:u.cookieUpdate,shouldWriteSessionValue:g,forceCookieAttrsWrite:u.forceCookieAttrsWrite,cookieReadBack:t.get(v)}))}}var en="v1.1.0";var Vt="wt";function nt(e){e.set("_dtv",en),e.set("_dtn",Vt)}function qt(e){return typeof e=="string"&&e.trim()?[e.trim()]:Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()).map(n=>String(n).trim()):null}var Ht=new Set(["send_to","user_id","client_id","campaign_id","campaign_source","campaign_medium","campaign_name","campaign_term","campaign_content","page_location","page_title","page_referrer","content_group","ignore_referrer","language","screen_resolution","cookie_domain","cookie_expires","cookie_flags","cookie_path","cookie_prefix","cookie_update","send_page_view","session_engagement_time_sec","site_search_enabled","site_search_query_params","outbound_clicks_enabled","outbound_exclude_domains","file_downloads_enabled","file_download_extensions","linker"]);function zt(e){let n={};for(let[t,o]of Object.entries(e||{}))Ht.has(t)||(n[t]=o);return n}function tt({windowRef:e,getState:n}){let t=e;if(!t)throw new Error("createDispatcher: windowRef is required");let o=[],r=null,i=!1,a=We({windowRef:t});Vn(t);let s=Yn({windowRef:t});s.start();let m=1e4;function l(){let S=oe(n)[0]||"";return S?ne(n,S):{}}function b({config:k,setParams:S}){let w=R(k)?k:{},u=R(S)?S:{};return w.debug_mode===!0||u.debug_mode===!0}function h(){var k;try{return String(((k=t==null?void 0:t.location)==null?void 0:k.protocol)||"").toLowerCase()==="https:"}catch(S){return!1}}function f(){let k=n();return k?k.pageLoadMs!=null?k.pageLoadMs:k.jsDate instanceof Date&&!Number.isNaN(k.jsDate.getTime())?(k.pageLoadMs=k.jsDate.getTime(),k.pageLoadMs):(k.pageLoadMs=Date.now(),k.pageLoadMs):null}function d(k,S){var v;o.push({name:k,params:S||{}});let w=l(),u=Number((v=w==null?void 0:w.max_batch_size)!=null?v:25);if(o.length>=u){g({useBeacon:!1});return}y()}function y(){var w;if(r!=null)return;let k=l(),S=Number((w=k==null?void 0:k.flush_interval_ms)!=null?w:1e3);r=t.setTimeout(()=>{r=null,g({useBeacon:!1})},S)}async function g({useBeacon:k}){var M,$,D,j,ie,q,Le,Z,X,Ae;if(r!=null&&(t.clearTimeout(r),r=null),o.length===0)return{sent:0};let S=oe(n),w=S[0]||"",u=w?ne(n,w):{},v=Number((M=u==null?void 0:u.max_batch_size)!=null?M:25),P=o.splice(0,v),N=pe(n),W=hn(n),x=u.session_timeout_ms,U=typeof x=="number"?x:1800*1e3,I=n(),H=f(),z=String((N==null?void 0:N.analytics_storage)||"").toLowerCase(),J=z==="denied",T=I!=null&&I.set&&typeof I.set=="object"?I.set:{},re=zt(T),fe=h(),_=b({config:u,setParams:T}),C=(D=($=u==null?void 0:u.session_engagement_time_sec)!=null?$:T==null?void 0:T.session_engagement_time_sec)!=null?D:10,L=Number.isFinite(Number(C))?Number(C):10,A=Math.max(0,Math.floor(L*1e3)),E=Xn({enabled:_});E.log("[d8a] flush",{href:String(((j=t==null?void 0:t.location)==null?void 0:j.href)||""),propertyIds:S,analyticsStorage:z||"(unset)",analyticsDenied:J,cookieHeader:String(((ie=t==null?void 0:t.document)==null?void 0:ie.cookie)||"")});function O(ee){return _e({propertyCfg:ee,setParams:T,https:fe,state:I,isDebugEnabled:b})}let V=0;for(let ee of P){let De=R(ee.params)?ee.params:{},ln=qt(De.send_to),Pe=ln||S;if(!Pe||Pe.length===0)continue;let F={...re,...De};delete F.send_to;let Be=s.getAndReset();!J&&I&&et({state:I,destinations:Pe,jar:a,getPropertyConfig:ve=>ne(n,ve),resolveCookieSettings:O,sessionTimeoutMs:U,engagementTimeMs:Be,engagedThresholdMs:A,nowMs:Date.now(),log:E.enabled?E.log:null}),I&&(I.hitCounter=(I.hitCounter||0)+1);let Ne=[];for(let ve of Pe){let G=ne(n,ve),_t=Qe(G),B=O(G),wt=Q({key:"user_id",eventParams:F,config:G,setParams:T}),bt=Q({key:"client_id",eventParams:F,config:G,setParams:T}),Ct=Xe({key:"debug_mode",eventParams:F,config:G,setParams:T})===!0,xt={campaign_id:Q({key:"campaign_id",eventParams:F,config:G,setParams:T}),campaign_source:Q({key:"campaign_source",eventParams:F,config:G,setParams:T}),campaign_medium:Q({key:"campaign_medium",eventParams:F,config:G,setParams:T}),campaign_name:Q({key:"campaign_name",eventParams:F,config:G,setParams:T}),campaign_term:Q({key:"campaign_term",eventParams:F,config:G,setParams:T}),campaign_content:Q({key:"campaign_content",eventParams:F,config:G,setParams:T})},Lt=Q({key:"content_group",eventParams:F,config:G,setParams:T}),vt=Xe({key:"ignore_referrer",eventParams:F,config:G,setParams:T})===!0,me={...Mn(t)},fn=Q({key:"page_location",eventParams:F,config:G,setParams:T}),dn=Q({key:"page_title",eventParams:F,config:G,setParams:T}),gn=Q({key:"page_referrer",eventParams:F,config:G,setParams:T}),mn=Q({key:"language",eventParams:F,config:G,setParams:T}),pn=Q({key:"screen_resolution",eventParams:F,config:G,setParams:T});if(fn&&(me.dl=fn),dn&&(me.dt=dn),gn!=null&&(me.dr=gn),mn&&(me.ul=mn),pn&&(me.sr=pn),!J)if(B.debug){let Fe=ce(B.cookiePrefix),yn=a.get(Fe),Ee=Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(q=B.cookieMaxAgeSeconds)!=null?q:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite}),At=Ee!=null&&Ee.wrote?yn?"attrs update":"create":"no write";E.log(`[d8a] set client cookie (${At})`,{pid:ve,cookiePrefix:B.cookiePrefix,result:Ee,cookieName:Fe,cookieBefore:yn,cookieReadBack:a.get(Fe),documentCookie:String(((Le=t==null?void 0:t.document)==null?void 0:Le.cookie)||"")})}else Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(Z=B.cookieMaxAgeSeconds)!=null?Z:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite});let kn=Tn({propertyId:ve,eventName:ee.name,eventParams:F,cookieHeader:J?"":String(((X=t.document)==null?void 0:X.cookie)||""),clientId:bt||(J?Jn({windowRef:t,state:I}):null),userId:wt,cookiePrefix:B.cookiePrefix,browser:me,ignoreReferrer:vt,pageLoadMs:H!=null?Number(H):null,hitCounter:(Ae=I==null?void 0:I.hitCounter)!=null?Ae:null,engagementTimeMs:Be!=null?Number(Be):null,uachParams:qn(Gn(t)),campaign:xt,contentGroup:Lt||null,consentParams:{gcs:jn({consent:W.consent}),gcd:Kn({consentDefault:W.consentDefault,consentUpdate:W.consentUpdate})},debugMode:Ct});nt(kn);let Rt=`${_t}?${kn.toString()}`;Ne.push(Wn({url:Rt,windowRef:t,useBeacon:k}))}Ne.length>0&&(await Promise.all(Ne),V+=Ne.length)}return o.length>0&&y(),{sent:V}}function p({useBeacon:k=!1}={}){return g({useBeacon:k===!0})}function c(){var k;t!=null&&t.addEventListener&&(i||(i=!0,t.addEventListener("pagehide",()=>{try{oe(n).length>0&&s.peek()>0&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}),(k=t.document)!=null&&k.addEventListener&&t.document.addEventListener("visibilitychange",()=>{if(t.document.hidden){try{oe(n).length>0&&s.peek()>=m&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}})))}return{enqueueEvent:d,flush:g,flushNow:p,attachLifecycleFlush:c}}function we(e){return typeof e=="string"?e:""}function nn(e,n){var t;try{let o=R(e)?e:null,r=o&&R(o.currentScript)?o.currentScript:null,i=we(r==null?void 0:r.src);if(!i)return"";let a=o&&R(o.location)?we((t=o.location)==null?void 0:t.href):"",s=new URL(i,a||void 0);return we(s.searchParams.get(n))}catch(o){return""}}function ot({windowRef:e,dataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aDataLayerName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"l");return o.trim()?o.trim():"d8aLayer"}function rt({windowRef:e,globalName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGlobalName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"g");return o.trim()?o.trim():"d8a"}function it({windowRef:e,gtagDataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGtagDataLayerName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"gl");return o.trim()?o.trim():"dataLayer"}var $e="__d8aConsentBridgeHubs";function jt(e){return R(e)}function tn(e,n){if(!e)return null;let t=String(n||"dataLayer"),o=Y(e,$e),r=jt(o)?o:{};(!o||o!==r)&&se(e,$e,r);let i=r[t];if(i&&typeof i=="object")return i;let a={subscribers:new Set,originalPush:null,patched:!1,dataLayerName:t};return r[t]=a,a}function st({windowRef:e,getState:n,dataLayerName:t="dataLayer"}){if(!e)throw new Error("createGtagConsentBridge: windowRef is required");let o=e;if(!o)throw new Error("createGtagConsentBridge: windowRef is required");if(typeof n!="function")throw new Error("createGtagConsentBridge: getState is required");let r=!1,i=null;function a(d){let y=R(d)?d.length:null;if(d&&typeof y=="number"&&typeof d!="string")try{return Array.from(d)}catch(g){return null}return Array.isArray(d)?d:null}function s({action:d,patch:y}){let g=n();if(g){if(d==="default")g.consentDefaultGtag={...g.consentDefaultGtag||{},...y||{}};else if(d==="update")g.consentUpdateGtag={...g.consentUpdateGtag||{},...y||{}};else return;g.consentGtag={...g.consentDefaultGtag||{},...g.consentUpdateGtag||{}},Ie(n)}}function m(d){let[y,g,p]=d;if(y!=="consent")return null;let c=String(g||"");return c!=="default"&&c!=="update"||!R(p)?null:["consent",c,p]}function l(d){let y=m(d);if(!y)return;let[,g,p]=y;s({action:g,patch:p})}function b(){let y=Y(o,t);if(Array.isArray(y))for(let g of y){let p=a(g);p&&l(p)}}function h(){let d=t,y=ae(o,d),g=tn(o,d);g&&(g.patched||(g.originalPush=y.push.bind(y),y.push=function(...c){let k=c[0],S=a(k);if(S)for(let w of g.subscribers)try{w(S)}catch(u){}return g.originalPush(...c)},g.patched=!0,y.__d8aConsentBridgePatched=!0))}function f(){if(r)return;r=!0;let d=tn(o,t);d&&(d.subscribers.add(l),i=()=>{d.subscribers.delete(l)},b(),h())}return{start:f,stop:()=>{if(!r)return;let d=t,y=tn(o,d);if(!y)return;typeof i=="function"&&i(),i=null;let g=Y(o,d);if(y.subscribers.size===0&&y.originalPush&&Array.isArray(g)){let p=g;p.push=y.originalPush,y.originalPush=null,y.patched=!1;try{delete p.__d8aConsentBridgePatched;let c=Y(o,$e),k=R(c)?c:null;k&&(delete k[d],Object.keys(k).length===0&&se(o,$e,void 0))}catch(c){}}r=!1}}}function at(e,n=[]){return Array.isArray(e)?e.map(t=>String(t).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):n}function Kt(e,n){try{return new URL(String(e||""),n?String(n):void 0)}catch(t){return null}}function Qt(e){let n=e;for(let t=0;t<100&&n;t+=1){let o=R(n)?n:null,r=String((o==null?void 0:o.tagName)||"").toLowerCase();if(r==="a"||r==="area")return n;n=(o==null?void 0:o.parentNode)||null}return null}function ge(e,n){if(!e)return null;let t=R(e)?e:null;try{if(typeof(t==null?void 0:t.getAttribute)=="function"){let r=t.getAttribute(n);if(r!=null)return r}}catch(r){}let o=t?t[n]:null;return o!=null?String(o):null}function Jt(e){let n=String((e==null?void 0:e.protocol)||"").toLowerCase();return n==="http:"||n==="https:"}function Yt(e,n){let t=String(e||"").toLowerCase(),o=String(n||"").toLowerCase().replace(/^\./,"");return!t||!o?!1:t===o||t.endsWith(`.${o}`)}function Xt(e){return String((e==null?void 0:e.pathname)||"").split("/").filter(Boolean).slice(-1)[0]||""}function Zt(e){let n=String(e||""),t=n.lastIndexOf(".");return t<0?"":n.slice(t+1).toLowerCase()}function on(e){return String(e||"").replace(/\s+/g," ").trim()}function eo(e){let n=ge(e,"id");return on(n)||null}function no(e){let n=ge(e,"className")||ge(e,"class");return on(n)||null}function to(e){let n=ge(e,"textContent")||ge(e,"innerText");return on(n)||null}function ct({windowRef:e,getState:n,dispatcher:t}){let o=e;if(!o)throw new Error("createEnhancedMeasurement: windowRef is required");if(typeof n!="function")throw new Error("createEnhancedMeasurement: getState is required");if(!t)throw new Error("createEnhancedMeasurement: dispatcher is required");function r(p,c){let k=p[c];return typeof k=="boolean"?k:void 0}function i(p,c){return p[c]}function a({propertyId:p,key:c,defaultValue:k}){let S=he(n),w=ne(n,p),u=r(w,c);if(u!=null)return u;let v=r(S,c);return v!=null?v:k}function s({propertyId:p,key:c,defaultList:k}){let S=he(n),w=ne(n,p),u=i(w,c),v=i(S,c);return u!=null?at(u,k):v!=null?at(v,k):k}function m(){let p=n();return!p||p.emInstalled?!1:(p.emInstalled=!0,!0)}function l(){let p=n();return!p||p.emSiteSearchFired?!1:(p.emSiteSearchFired=!0,!0)}function b(){var u;let p=oe(n);if(p.length===0||!l())return;let c=String(((u=o==null?void 0:o.location)==null?void 0:u.search)||"");if(!c||c==="?")return;let k=new URLSearchParams(c.startsWith("?")?c.slice(1):c),S=["q","s","search","query","keyword"],w=new Map;for(let v of p){if(!a({propertyId:v,key:"site_search_enabled",defaultValue:!0}))continue;let N=s({propertyId:v,key:"site_search_query_params",defaultList:S}),W="";for(let U of N){let I=k.get(U);if(I&&String(I).trim()){W=String(I).trim();break}}if(!W)continue;let x=w.get(W)||[];x.push(v),w.set(W,x)}for(let[v,P]of w.entries())t.enqueueEvent("view_search_results",{search_term:v,send_to:P})}function h({propertyId:p,linkHostname:c}){var w;if(!a({propertyId:p,key:"outbound_clicks_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"outbound_exclude_domains",defaultList:[String(((w=o==null?void 0:o.location)==null?void 0:w.hostname)||"")]});for(let u of S)if(Yt(c,u))return!1;return!0}function f({propertyId:p,ext:c}){if(!a({propertyId:p,key:"file_downloads_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"file_download_extensions",defaultList:["pdf","doc","docx","xls","xlsx","ppt","pptx","csv","txt","rtf","zip","rar","7z","dmg","exe","apk"]}),w=new Set(S.map(u=>String(u).toLowerCase().replace(/^\./,"")));return!!c&&w.has(String(c).toLowerCase().replace(/^\./,""))}function d(p){var J,T,re;let c=oe(n);if(c.length===0)return;let k=R(p)?p.target:null,S=Qt(k);if(!S)return;let w=ge(S,"href");if(!w)return;let u=Kt(w,String(((J=o==null?void 0:o.location)==null?void 0:J.href)||""));if(!u||!Jt(u))return;let v=String(u.href||""),P=String(u.hostname||""),N=eo(S),W=no(S),x=to(S),U=Xt(u)||ge(S,"download")||"",I=Zt(U),H=[],z=[];for(let fe of c)f({propertyId:fe,ext:I})&&H.push(fe),h({propertyId:fe,linkHostname:P})&&z.push(fe);if(H.length>0){t.enqueueEvent("file_download",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},...x?{link_text:x}:{},file_name:U,file_extension:I,send_to:H}),(T=t.flushNow)==null||T.call(t,{useBeacon:!1});return}z.length>0&&(t.enqueueEvent("click",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},link_domain:P,outbound:"1",send_to:z}),(re=t.flushNow)==null||re.call(t,{useBeacon:!1}))}function y(){var c;if(!m())return;try{b(),!((c=n())!=null&&c.emSiteSearchFired)&&typeof(o==null?void 0:o.setTimeout)=="function"&&o.setTimeout(()=>{try{b()}catch(k){}},0)}catch(k){}let p=o==null?void 0:o.document;p&&typeof p.addEventListener=="function"&&(p.addEventListener("click",d,!0),p.addEventListener("auxclick",d,!0))}function g(){try{b()}catch(p){}}return{start:y,onConfig:g}}var be="_dl",kt="1",Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",cn="=",rn=null;function oo(){if(rn)return rn;let e={};for(let n=0;n<Ce.length;n+=1)e[Ce[n]]=n;return e[cn]=64,e["."]=64,rn=e,e}function ro(e){try{if(typeof TextEncoder!="undefined")return new TextEncoder().encode(e)}catch(t){}let n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=e.charCodeAt(t)&255;return n}function io(e){try{if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e)}catch(t){}let n="";for(let t=0;t<e.length;t+=1)n+=String.fromCharCode(e[t]);return n}function so(e){let n=ro(e),t=[];for(let o=0;o<n.length;o+=3){let r=o+1<n.length,i=o+2<n.length,a=n[o],s=r?n[o+1]:0,m=i?n[o+2]:0,l=a>>2,b=(a&3)<<4|s>>4,h=(s&15)<<2|m>>6,f=m&63;i||(f=64,r||(h=64)),t.push(Ce[l],Ce[b],h===64?cn:Ce[h],f===64?cn:Ce[f])}return t.join("").replace(/=+$/,"")}function ao(e){let n=String(e||""),t=oo(),o=[],r=0;function i(a){for(;r<n.length;){let s=n.charAt(r++),m=t[s];if(m!=null)return m;if(!/^[\s\xa0]*$/.test(s))throw new Error(`Invalid base64 char: ${s}`)}return a}for(;;){let a=i(-1),s=i(0),m=i(64),l=i(64);if(l===64&&a===-1)break;o.push((a<<2|s>>4)&255),m!==64&&(o.push((s<<4&240|m>>2)&255),l!==64&&o.push((m<<6&192|l)&255))}return io(new Uint8Array(o))}function yt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function co(e){let n=Array.isArray(e==null?void 0:e.domains)?e.domains.filter(o=>typeof o=="string"):[],t=n.length>0;return{domains:n,accept_incoming:typeof(e==null?void 0:e.accept_incoming)=="boolean"?e.accept_incoming:t,decorate_forms:typeof(e==null?void 0:e.decorate_forms)=="boolean"?e.decorate_forms:!1,url_position:(e==null?void 0:e.url_position)==="fragment"?"fragment":"query"}}function un(e){let n=String(e||"").match(/([^?#]+)(\?[^#]*)?(#.*)?/);return n?{base:n[1]||"",query:n[2]||"",fragment:n[3]||""}:{base:String(e||""),query:"",fragment:""}}function xe(e,n){let t=String(e||""),o=t.startsWith(n)?t.slice(1):t,r=[];if(!o)return r;for(let i of o.split("&")){let a=i.trim();if(!a)continue;let s=a.indexOf("=");if(s<0){r.push([decodeURIComponent(a),""]);continue}let m=decodeURIComponent(a.slice(0,s)),l=decodeURIComponent(a.slice(s+1));r.push([m,l])}return r}function Oe(e,n){if(!e||e.length===0)return"";let t=e.map(([o,r])=>`${encodeURIComponent(o)}=${encodeURIComponent(r)}`).join("&");return n+t}function uo(e,n){let{query:t,fragment:o}=un(e);for(let[r,i]of xe(t,"?"))if(r===n)return{value:i,where:"query"};for(let[r,i]of xe(o,"#"))if(r===n)return{value:i,where:"fragment"};return{value:null,where:null}}function ut(e,n){let{base:t,query:o,fragment:r}=un(e),i=xe(o,"?").filter(([s])=>s!==n),a=xe(r,"#").filter(([s])=>s!==n);return`${t}${Oe(i,"?")}${Oe(a,"#")}`}function sn(e,n,t,o){let{base:r,query:i,fragment:a}=un(e);if(o==="fragment"){let m=xe(a,"#").filter(([l])=>l!==n);return m.push([n,t]),`${r}${i}${Oe(m,"#")}`}let s=xe(i,"?").filter(([m])=>m!==n);return s.push([n,t]),`${r}${Oe(s,"?")}${a}`}function lt(e,n){try{let t=new URL(e,n||"https://example.invalid/");return String(t.hostname||"")}catch(t){let o=String(e||"").match(/^https?:\/\/([^/]+)/i);return o?String(o[1]||""):""}}function ft(e,n){let t=String(e||"");if(!t)return!1;for(let o of n){let r=String(o||"").trim();if(r&&t.indexOf(r)>=0)return!0}return!1}var an=null;function lo(){if(an)return an;let e=new Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?t>>>1^3988292384:t>>>1;e[n]=t>>>0}return an=e,e}function fo(e){let n=lo(),t=4294967295;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);t=t>>>8^n[(t^i)&255]}return((t^4294967295)>>>0).toString(36)}function St({payload:e,offset:n,windowRef:t}){var s,m,l,b;let o=String(((s=t.navigator)==null?void 0:s.userAgent)||"")||String(((m=t==null?void 0:t.navigator)==null?void 0:m.userAgent)||""),r=new Date().getTimezoneOffset(),i=String(((l=t.navigator)==null?void 0:l.language)||"")||String(((b=t.navigator)==null?void 0:b.userLanguage)||""),a=Math.floor(Date.now()/6e4)-(Number(n)||0);return fo([o,r,i,a,e].join("*"))}function dt({cookies:e,ts:n,windowRef:t}){let o=[];o.push(["ts",String(n)]);for(let[m,l]of Object.entries(e||{}))m&&l!=null&&o.push([m,String(l)]);let r=o.slice(1).sort((m,l)=>m[0].localeCompare(l[0])),a=[o[0],...r].map(([m,l])=>`${m}*${so(l)}`).join("*"),s=St({payload:a,offset:0,windowRef:t});return`${kt}*${s}*${a}`}function gt({value:e,windowRef:n,ttlMs:t=120*1e3}){let o=String(e||"");if(!o)return null;let r=o.split("*").filter(g=>g!=="");if(r.length<5)return null;let i=r[0],a=r[1];if(i!==kt)return null;let s=r.slice(2),m=s.join("*"),l=!1;for(let g=0;g<3;g+=1)if(St({payload:m,offset:g,windowRef:n})===a){l=!0;break}if(!l)return null;let b=s,h={};for(let g=0;g+1<b.length;g+=2){let p=b[g],c=b[g+1];if(p)try{h[p]=ao(c||"")}catch(k){h[p]=decodeURIComponent(c||"")}}let f=Number(h.ts);if(!Number.isFinite(f))return null;let d=Date.now()-f;if(!(d>=0&&d<=t))return null;let y={};for(let[g,p]of Object.entries(h))g!=="ts"&&g&&p!=null&&(y[g]=String(p));return{ts:f,cookies:y}}var mt="__d8a_linker_coordinator";function pt({getStates:e,windowRef:n}){let t=yt(n),o={},r=new Map;for(let i of e){let a=i(),s=he(i),m=oe(i);if(m&&m.length>0){for(let b of m){let h=ne(i,b),f=_e({propertyCfg:h,setParams:s,https:t,state:a}),d=ue(b,f.cookiePrefix);o[d]||(o[d]={kind:"session",name:d,propertyId:b,settings:f,getState:i}),r.has(f.cookiePrefix)||r.set(f.cookiePrefix,{settings:f,getState:i})}continue}let l=_e({propertyCfg:{},setParams:s,https:t,state:a});r.has(l.cookiePrefix)||r.set(l.cookiePrefix,{settings:l,getState:i})}for(let[i,a]of r.entries()){let s=ce(i);o[s]||(o[s]={kind:"client",name:s,settings:a.settings,getState:a.getState})}return o}function go({windowRef:e}){let n=e;if(!n)throw new Error("createSharedLinkerCoordinator: windowRef is required");let t=We({windowRef:n}),o=new Set;function r(){for(let _ of o.values())try{let C=_();if(C!=null&&C.set&&C.set.debug_mode===!0)return!0;let L=C==null?void 0:C.propertyConfigs;if(L&&typeof L=="object"){for(let A of Object.values(L))if(R(A)&&A.debug_mode===!0)return!0}}catch(C){}return!1}function i(..._){if(r())try{console.log("[d8a][linker]",..._)}catch(C){}}let a=0,s=new Set,m=null,l=null,b=null,h=null,f=!1,d=!1,y=null;function g(){return Array.from(o.values())}function p(){let _=Array.from(s.values()).sort(),C=_.length>0;return{domains:_,accept_incoming:m?m.value:C,decorate_forms:l?l.value:!1,url_position:b?b.value:"query"}}function c(_){if(!R(_))return;a+=1;let C=_.domains;if(Array.isArray(C))for(let V of C){if(typeof V!="string")continue;let M=V.trim();M&&s.add(M)}let L=_.accept_incoming;typeof L=="boolean"&&(m={value:L,rev:a});let A=_.decorate_forms;typeof A=="boolean"&&(l={value:A,rev:a});let E=_.url_position,O=typeof E=="string"?E:"";(O==="query"||O==="fragment")&&(b={value:O,rev:a})}function k(_){c(_)}function S(_){o.add(_);try{k(_().linker)}catch(C){}return()=>{o.delete(_)}}function w(_){var A,E;if(!_)return;let C=String(((A=n.location)==null?void 0:A.href)||"");if(!C)return;let L=ut(C,be);if(L!==C&&typeof((E=n.history)==null?void 0:E.replaceState)=="function"){try{n.history.replaceState({},"",L)}catch(O){}n.location&&(n.location.href=L)}}function u(){var E;let _=String(((E=n.location)==null?void 0:E.href)||"");if(!_)return;let{value:C,where:L}=uo(_,be);if(!C)return;let A=gt({value:C,windowRef:n});A&&(h=A,i("parsed incoming _dl",{cookieNames:Object.keys(A.cookies||{}),ts:A.ts,where:L})),w(L)}function v(){var E,O,V;let _=pt({getStates:g(),windowRef:n}),C=String(((E=n.document)==null?void 0:E.cookie)||""),L=ke(C),A={};for(let M of Object.values(_)){let $=L.get(M.name);$&&(M.kind==="client"&&!((O=te($))!=null&&O.cid)||M.kind==="session"&&!((V=le($))!=null&&V.tokens)||(A[M.name]=$))}return A}function P(){let _=p();if(!_.domains||_.domains.length===0)return null;let C=v();if(!C||Object.keys(C).length===0)return null;let L=Date.now();return dt({cookies:C,ts:L,windowRef:n})}function N(_){var E;let C=p();if(!C.domains||C.domains.length===0)return _;let L=P();if(!L)return _;let A=lt(_,String(((E=n.location)==null?void 0:E.href)||""));return ft(A,C.domains)?sn(_,be,L,C.url_position):_}function W(_){if(!R(_))return;let C=typeof _.href=="string"?_.href:null;if(!C)return;let L=N(C);if(L!==C)try{_.href=L}catch(A){}}function x(_){var M,$,D;if(!R(_))return;let C=p();if(!C.decorate_forms)return;let L=typeof _.action=="string"?_.action:"";if(!L)return;let A=P();if(!A)return;let E=lt(L,String(((M=n.location)==null?void 0:M.href)||""));if(!ft(E,C.domains))return;let O=typeof _.method=="string"?_.method.toLowerCase():"";if(C.url_position==="query"&&O==="get"){let j=Array.isArray(_.childNodes)?_.childNodes:[],ie=!1;for(let q of j)if(R(q)&&String(q.name||"")===be){try{q.value=A}catch(Le){}ie=!0;break}if(!ie&&typeof(($=n.document)==null?void 0:$.createElement)=="function")try{let q=n.document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name",be),q.setAttribute("value",A),(D=_.appendChild)==null||D.call(_,q)}catch(q){}return}let V=sn(L,be,A,C.url_position);if(V!==L)try{_.action=V}catch(j){}}function U(_,C){let L=_;for(let A=0;A<8;A+=1){if(!L||typeof L!="object")return null;let E=String(L.tagName||"").toUpperCase();if(C.includes(E))return L;L=L.parentElement||L.parentNode||null}return null}function I(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function H(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function z(_){let C=R(_)?_.target:null,L=U(C,["FORM"]);L&&x(L)}function J(){if(!p().accept_incoming||!h)return;let C=g(),L=C[0]||null,A=L?pe(L):{};if(String((A==null?void 0:A.analytics_storage)||"").toLowerCase()==="denied"){let M=null;for(let $ of Object.values(h.cookies)){let D=te($);if(D!=null&&D.cid){M=D.cid;break}}if(M)for(let $ of C)try{$().anonCid=M,$().incomingDl=null}catch(D){}h=null;return}let O=pt({getStates:C,windowRef:n}),V=!1;for(let M of Object.keys(h.cookies||{}))if(O[M]){V=!0;break}if(V){for(let[M,$]of Object.entries(h.cookies||{})){let D=O[M];if(D){if(D.kind==="client"){let j=te($);if(!(j!=null&&j.cid))continue;let ie=t.get(D.name);$n({jar:t,cid:j.cid,consent:A,cookieDomain:D.settings.cookieDomain,cookiePrefix:D.settings.cookiePrefix,cookiePath:D.settings.cookiePath,cookieSameSite:D.settings.cookieSameSite,cookieSecure:D.settings.cookieSecure,cookieMaxAgeSeconds:D.settings.cookieMaxAgeSeconds,cookieUpdate:D.settings.cookieUpdate,forceCookieAttrsWrite:D.settings.forceCookieAttrsWrite});let q=t.get(D.name);i("applied client cookie",{name:D.name,cid:j.cid,cookieUpdate:D.settings.cookieUpdate,before:ie,after:q}),delete h.cookies[M];continue}if(D.kind==="session"){let j=D.getState(),ie=he(D.getState),q=yt(n),Le=ne(D.getState,D.propertyId),Z=_e({propertyCfg:Le,setParams:ie,https:q,state:j}),X=le($),Ae=t.get(D.name),ee=On({jar:t,propertyId:D.propertyId,value:$,consent:A,cookieDomain:Z.cookieDomain,cookiePrefix:Z.cookiePrefix,cookiePath:Z.cookiePath,cookieSameSite:Z.cookieSameSite,cookieSecure:Z.cookieSecure,cookieMaxAgeSeconds:Z.cookieMaxAgeSeconds,cookieUpdate:Z.cookieUpdate,forceCookieAttrsWrite:Z.forceCookieAttrsWrite}),De=t.get(D.name);i("applied session cookie",{name:D.name,propertyId:D.propertyId,cookieUpdate:Z.cookieUpdate,wrote:(ee==null?void 0:ee.wrote)===!0,sid:X==null?void 0:X.sid,sct:X==null?void 0:X.sct,before:Ae,after:De}),ee!=null&&ee.wrote&&(X!=null&&X.tokens)&&(j.sharedSessionTokens=X.tokens,j.sharedSessionValue=String($||""),i("seeded shared session state",{propertyId:D.propertyId})),delete h.cookies[M]}}}if(!h.cookies||Object.keys(h.cookies).length===0){for(let M of C)try{M().incomingDl=null}catch($){}h=null}}}function T(){var L;if(d)return;let _=(L=n.HTMLFormElement)==null?void 0:L.prototype,C=_==null?void 0:_.submit;typeof C=="function"&&(y=C,_.submit=function(){try{x(this)}catch(E){}return C.call(this)},d=!0)}function re(){var _,C,L,A,E,O;f||(f=!0,u(),J(),(C=(_=n.document)==null?void 0:_.addEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.addEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.addEventListener)==null||O.call(E,"submit",z),T())}function fe(){var _,C,L,A,E,O,V;if(f&&(f=!1,(C=(_=n.document)==null?void 0:_.removeEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.removeEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.removeEventListener)==null||O.call(E,"submit",z),d)){let M=(V=n.HTMLFormElement)==null?void 0:V.prototype;if(M&&y)try{M.submit=y}catch($){}d=!1,y=null}}return{start:re,stop:fe,applyIncomingIfReady:J,registerRuntime:S,updateConfigPatch:c,__internal:{encodeDl:dt,decodeDl:gt,decorateUrlIfNeeded:N,stripParamFromUrl:ut,setParamInUrl:sn,resolveLinkerConfig:co}}}function mo({windowRef:e}){let n=e,t=Y(n,mt);if(t)return t;let o=go({windowRef:n});return se(n,mt,o),o}function ht({windowRef:e,getState:n}){let t=mo({windowRef:e}),o=t.registerRuntime(n);return{start:()=>t.start(),stop:()=>o(),applyIncomingIfReady:()=>t.applyIncomingIfReady(),updateConfigPatch:r=>t.updateConfigPatch(r),__internal:t.__internal}}function po({windowRef:e=window,dataLayerName:n,globalName:t,gtagDataLayerName:o}={}){let r=e;if(!r)throw new Error("installD8a: window is required");r.d8a_tag_data=r.d8a_tag_data||{};let i=r.d8a_tag_data,a=ot({windowRef:r,dataLayerName:n}),s=rt({windowRef:r,globalName:t}),m=it({windowRef:r,gtagDataLayerName:o});i.__d8aInstallResults||(i.__d8aInstallResults={}),i.__d8aInstallResultsByDataLayer||(i.__d8aInstallResultsByDataLayer={});let l=i.__d8aInstallResults,b=i.__d8aInstallResultsByDataLayer,h=`${a}|${s}`;if(l[h])return l[h];ae(r,a);let f=b[a]||null;if(f){typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let w={consumer:f.consumer,dispatcher:f.dispatcher,dataLayerName:a,globalName:s};return l[h]=w,w}typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let d=bn({windowRef:r,dataLayerName:a}),y=[];d.setOnConfig((w,u)=>{for(let v of y)v(w,u)});let g=[];d.setOnSet(w=>{for(let u of g)u(w)});let p=tt({windowRef:r,getState:d.getState});p.attachLifecycleFlush(),d.setOnEvent((w,u)=>{p.enqueueEvent(w,u)});let c=ht({windowRef:r,getState:d.getState});c.start(),g.push(w=>{var u;w&&typeof w=="object"&&w.type==="field"&&w.field==="linker"&&c.updateConfigPatch(w.value),w&&typeof w=="object"&&w.type==="object"&&c.updateConfigPatch((u=w==null?void 0:w.obj)==null?void 0:u.linker),c.applyIncomingIfReady()}),y.push(()=>c.applyIncomingIfReady());let k=st({windowRef:r,getState:d.getState,dataLayerName:m});d.start(),k.start();try{let w=ct({windowRef:r,getState:d.getState,dispatcher:p});y.push(()=>w.onConfig()),w.start()}catch(w){}let S={consumer:d,dispatcher:p,dataLayerName:a,globalName:s};return l[h]=S,b[a]=S,S}export{po as installD8a,en as version};
|
|
1
|
+
/* web-tracker - built 2026-05-14T12:55:39.054Z */
|
|
2
|
+
function Y(e,n){return e[n]}function se(e,n,t){e[n]=t}function ae(e,n){let t=Y(e,n);if(Array.isArray(t))return t;let o=[];return se(e,n,o),o}function Ge({windowRef:e,dataLayerName:n="d8aLayer"}){let t=e;if(!t)throw new Error("createD8aGlobal: windowRef is required");function o(...r){ae(t,n).push(arguments)}return o.js=r=>o("js",r),o.config=(r,i)=>o("config",r,i),o.event=(r,i)=>o("event",r,i),o.set=(r,i)=>i===void 0?o("set",r):o("set",r,i),o.consent=(r,i)=>o("consent",r,i),o}function Sn(){return{jsDate:null,pageLoadMs:null,propertyIds:[],propertyConfigs:{},primaryPropertyId:"",consent:{},consentDefault:{},consentUpdate:{},consentGtag:{},consentDefaultGtag:{},consentUpdateGtag:{},userId:null,set:{},linker:{domains:[]},incomingDl:null,events:[],__onEvent:null,__onConfig:null,__onSet:null,hitCounter:0,sessionEngagementMs:0,sessionEngaged:!1,anonCid:null,cookieAttrsSig:null,sharedSessionTokens:null,sharedSessionValue:null,emInstalled:!1,emSiteSearchFired:!1,__lastEffectiveAnalyticsStorage:void 0}}function pe(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{};return t&&Object.keys(t).length>0?t:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{}}function hn(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{},o=n!=null&&n.consentDefaultGtag&&typeof n.consentDefaultGtag=="object"?n.consentDefaultGtag:{},r=n!=null&&n.consentUpdateGtag&&typeof n.consentUpdateGtag=="object"?n.consentUpdateGtag:{};return t&&Object.keys(t).length>0||o&&Object.keys(o).length>0||r&&Object.keys(r).length>0?{consent:t,consentDefault:o,consentUpdate:r}:{consent:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{},consentDefault:n!=null&&n.consentDefault&&typeof n.consentDefault=="object"?n.consentDefault:{},consentUpdate:n!=null&&n.consentUpdate&&typeof n.consentUpdate=="object"?n.consentUpdate:{}}}function Dt(e){if(typeof queueMicrotask=="function"){queueMicrotask(e);return}Promise.resolve().then(e)}function Ie(e){let n=typeof e=="function"?e():null;if(!n)return;let t=pe(e),o=t&&typeof t.analytics_storage=="string"?t.analytics_storage:void 0,r=n.__lastEffectiveAnalyticsStorage;if(r===void 0){n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitScheduled||(n.__consentPingInitScheduled=!0,Dt(()=>{n.__consentPingInitDone=!0}));return}o!==r&&(n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitDone&&(!Array.isArray(n.propertyIds)||n.propertyIds.length===0||typeof n.__onEvent=="function"&&n.__onEvent("user_engagement",{consent_update:1})))}function R(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _n(e){if(!R(e))return null;let n=e.user_id;if(typeof n!="string")return null;let t=n.trim();return t||null}function Pt(e){if(!R(e))return;let n=e.send_page_view;return typeof n=="boolean"?n:void 0}function Nt(e){return R(e)?e:{}}function wn(e,n){if(!e||!R(n))return;let t={...e.linker||{domains:[]}},o=n.domains;if(Array.isArray(o)){let m=o.filter(l=>typeof l=="string"&&l.trim()).map(l=>l.trim());t.domains=m}let r=n.accept_incoming;typeof r=="boolean"&&(t.accept_incoming=r);let i=n.decorate_forms;typeof i=="boolean"&&(t.decorate_forms=i);let a=n.url_position,s=typeof a=="string"?a:"";(s==="query"||s==="fragment")&&(t.url_position=s),Array.isArray(t.domains)||(t.domains=[]),e.linker=t}function bn({windowRef:e,dataLayerName:n="d8aLayer"}){if(!e)throw new Error("createQueueConsumer: windowRef is required");let t=e,o=Sn(),r=!1,i=null,a=!1;function s(f){let d=R(f)?f.length:null;return f&&typeof d=="number"&&typeof f!="string"?Array.from(f):Array.isArray(f)?f:null}function m(f){var p,c;let d=f[0],y=f[1],g=f[2];switch(String(d||"")){case"js":{o.jsDate=y instanceof Date?y:new Date(y),o.pageLoadMs==null&&o.jsDate instanceof Date&&!Number.isNaN(o.jsDate.getTime())&&(o.pageLoadMs=o.jsDate.getTime());return}case"config":{let k=String(y||"");if(!k)return;o.propertyIds.includes(k)||o.propertyIds.push(k),o.primaryPropertyId||(o.primaryPropertyId=k);let S=o.propertyConfigs[k]||{},w=R(g)?g:{};o.propertyConfigs[k]={...S,...w};let u=_n(w);u&&(o.userId=u),typeof o.__onConfig=="function"&&o.__onConfig(k,w),Pt(w)!==!1&&typeof o.__onEvent=="function"&&o.__onEvent("page_view",{send_to:k});return}case"consent":{let k=String(y||"");if(k==="default"||k==="update"){let S=Nt(g);k==="default"?o.consentDefault={...o.consentDefault||{},...S||{}}:o.consentUpdate={...o.consentUpdate||{},...S||{}},o.consent={...o.consentDefault||{},...o.consentUpdate||{}},Ie(()=>o)}return}case"set":{if(typeof y=="string"&&y.trim()){let k=y.trim();k==="linker"?wn(o,g):o.set={...o.set||{},[k]:g},k==="user_id"&&typeof g=="string"&&g.trim()&&(o.userId=g.trim());let S={type:"field",field:k,value:g};(p=o.__onSet)==null||p.call(o,S);return}if(R(y)){o.set={...o.set||{},...y};let k=_n(y);k&&(o.userId=k),"linker"in y&&wn(o,y.linker);let S={type:"object",obj:y};(c=o.__onSet)==null||c.call(o,S)}return}case"event":{let k=R(g)?g:{};o.events.push({name:String(y||""),params:k}),typeof o.__onEvent=="function"&&o.__onEvent(String(y||""),k);return}default:return}}function l(){let f=n,d=Y(t,f),y=Array.isArray(d)?d:ae(t,f);for(let g of y){let p=s(g);p&&m(p)}}function b(){let d=ae(t,n);if(d.__d8aQueueConsumerPatched){i=d.__d8aQueueConsumerOriginalPush||null,a=!1;return}i=d.push.bind(d),d.__d8aQueueConsumerOriginalPush=i,d.push=function(...g){let p=g[0],c=s(p);return c&&m(c),i(...g)},d.__d8aQueueConsumerPatched=!0,a=!0}function h(){r||(r=!0,l(),b())}return{start:h,getState:()=>o,setOnEvent:f=>{o.__onEvent=f},setOnConfig:f=>{o.__onConfig=f},setOnSet:f=>{o.__onSet=f},stop:()=>{if(!r)return;let d=Y(t,n);if(a&&i&&Array.isArray(d)){let y=d;y.push=i;try{delete y.__d8aQueueConsumerPatched,delete y.__d8aQueueConsumerOriginalPush}catch(g){}}r=!1}}}function qe(e){return Math.floor((Number(e!=null?e:Date.now())||Date.now())/1e3)}function Ue(){return Math.floor(Math.random()*2147483647)}function He(e,n){let t=typeof e=="string"?e:"",o=String(n||"");return t?t.endsWith("_")&&o.startsWith("_")?`${t.slice(0,-1)}${o}`:`${t}${o}`:o}function ce(e){return He(e,"_d8a")}function ue(e,n){return He(n,`_d8a_${e}`)}function te(e){let t=String(e||"").match(/^C1\.1\.([0-9]+)\.([0-9]+)$/);return t?{cid:`${t[1]}.${t[2]}`}:null}function ze({nowMs:e}={}){return{random:Ue(),timestampSec:qe(e)}}function xn({random:e,timestampSec:n}){return`${e}.${n}`}function Ln({nowMs:e}={}){let{random:n,timestampSec:t}=ze({nowMs:e});return`C1.1.${n}.${t}`}function vn(e){let t=String(e||"").trim().match(/^([0-9]+)\.([0-9]+)$/);return t?`C1.1.${t[1]}.${t[2]}`:null}var Te="S1.1.",Ve=new Set(["s","o","g","t","j","d"]);function Rn(e){let n=String(e||"");return n.startsWith(Te)?n.slice(Te.length).split("$").map(i=>i.trim()).filter(Boolean).map(i=>{let a=i[0],s=i.slice(1);return{key:a,val:s,raw:i,known:Ve.has(a)}}):null}function An(e){let n=e.map(t=>`${t.key}${t.val}`);return`${Te}${n.join("$")}`}function de(e,n){let t=e.find(o=>o.key===n);return t?t.val:null}function K(e,n,t){let o=e.findIndex(r=>r.key===n);o>=0?e[o]={...e[o],val:String(t),known:Ve.has(n)}:e.push({key:n,val:String(t),known:Ve.has(n)})}function Cn(){let e=Ue().toString(36),n=Ue().toString(36),t=Ue().toString(36);return`${e}${n}${t}`}function le(e){let n=Rn(e);if(!n)return null;let t=de(n,"s"),o=de(n,"o"),r=de(n,"t"),i=de(n,"g"),a=t!=null?Number(t):NaN,s=o!=null?Number(o):NaN,m=r!=null?Number(r):NaN,l=i!=null?Number(i):NaN;return{tokens:n,sid:Number.isFinite(a)?a:null,sct:Number.isFinite(s)?s:null,lastEventTs:Number.isFinite(m)?m:null,seg:Number.isFinite(l)?l:null}}function je(e,{nowMs:n,sessionTimeoutMs:t}={}){var h,f,d;let o=qe(n),r=Math.floor((Number(t!=null?t:1800*1e3)||0)/1e3),i=Array.isArray(e)&&e.length>0,a=i?e.map(y=>({...y})):[];if(!i)return K(a,"s",o),K(a,"o",1),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",Cn()),{tokens:a,isNewSession:!0};let s=Number((h=de(a,"t"))!=null?h:NaN);if(!Number.isFinite(s)||o-s>r){let y=Number((f=de(a,"o"))!=null?f:NaN),g=Number.isFinite(y)?y+1:1;return K(a,"s",o),K(a,"o",g),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",Cn()),{tokens:a,isNewSession:!0}}let b=Number((d=de(a,"j"))!=null?d:0);return K(a,"j",Number.isFinite(b)?b+1:1),K(a,"t",o),{tokens:a,isNewSession:!1}}function Ke(e){return An(e)}var Me={SESSION_PREFIX:Te,tokenizeSessionCookie:Rn,detokenizeSessionCookie:An,getToken:de,setToken:K,nowSeconds:qe,applyCookiePrefix:He};function Dn(e){let n=String(e||"").trim();if(!n)return["none"];let t=n.split(".");if(t.length===4){let r=t[t.length-1];if(String(Number(r))===r)return["none"]}let o=[];for(let r=t.length-2;r>=0;r-=1)o.push(t.slice(r).join("."));return o.push("none"),o}function Pn(e){return String(e).replace(/\/+$/,"")}function ke(e){let n=new Map,t=String(e||"");if(!t)return n;for(let o of t.split(";")){let r=o.trim();if(!r)continue;let i=r.indexOf("=");if(i<0)continue;let a=r.slice(0,i).trim(),s=r.slice(i+1).trim();a&&n.set(a,s)}return n}function Et(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function Nn(e,n,t){let o=[];return o.push(`${e}=${n}`),t.path&&o.push(`Path=${String(t.path)}`),t.expires&&o.push(`Expires=${t.expires.toUTCString()}`),t.maxAgeSeconds!=null&&o.push(`Max-Age=${String(t.maxAgeSeconds)}`),t.sameSite&&o.push(`SameSite=${String(t.sameSite)}`),t.domain&&o.push(`Domain=${String(t.domain)}`),t.secure&&o.push("Secure"),o.join("; ")}function It(e){return e&&(e==="none"?null:e.startsWith(".")?e:`.${e}`)}function We({windowRef:e}){let n=e;if(!(n!=null&&n.document))throw new Error("createCookieJar: windowRef.document is required");let t=n.document;function o(){var s;return ke((s=n.document)==null?void 0:s.cookie)}function r(s){return o().get(s)}function i(s,m,l={}){var v,P,N;let b=l.path||"/",h=Et(n),f=l.sameSite||"Lax",d=!h&&String(f).toLowerCase()==="none"?"Lax":f,y=l.secure!=null?!!l.secure&&h:h,g=(v=l.maxAgeSeconds)!=null?v:null,p=(P=l.expires)!=null?P:null,c={path:b,sameSite:d,secure:y,maxAgeSeconds:g,expires:p},k=l.domain||"auto",S=String(((N=n.location)==null?void 0:N.hostname)||""),w=k==="auto"?Dn(S):[k],u=[];for(let W of w){let x=It(W),U=Nn(s,m,{...c,domain:x}),I=String(t.cookie||"");t.cookie=U;let H=String(t.cookie||""),z=I!==H||r(s)===m;if(u.push({candidate:W,domain:W==="none"?null:x,cookieStr:U,before:I,after:H,readBack:r(s),stuck:z}),z)return{ok:!0,domain:W==="none"?null:x,cookieStr:U,attempts:u}}return{ok:!1,domain:null,cookieStr:null,attempts:u}}function a(s,m={}){return i(s,"deleted",{...m,expires:new Date(0)})}return{get:r,set:i,del:a,__internal:{parseCookieHeader:ke,buildSetCookieString:Nn}}}var En=new Set(["value","tax","shipping"]),In={item_id:"id",item_name:"nm",affiliation:"af",coupon:"cp",discount:"ds",index:"lp",item_brand:"br",item_category:"ca",item_category2:"c2",item_category3:"c3",item_category4:"c4",item_category5:"c5",item_list_id:"li",item_list_name:"ln",item_variant:"va",location_id:"lo",price:"pr",quantity:"qt",promotion_id:"pi",promotion_name:"pn"};function Ut(e){return!!e&&typeof e=="object"}function Se(e){return e==null?null:typeof e=="string"?e:typeof e=="boolean"?e?"1":"0":typeof e=="number"?String(e):Array.isArray(e)?e.join(","):String(e)}function Tt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return e?1:0;if(typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:null}return null}function ye(e,n,t){t!=null&&e.set(`ep.${n}`,String(t))}function Un(e,n,t){t!=null&&e.set(`epn.${n}`,String(t))}function Mt(e){let n=Ut(e)?e:{},t=[],o=[];for(let[i,a]of Object.entries(In)){if(!(i in n))continue;let s=n[i],m=Se(s);m!=null&&t.push(`${a}${m}`)}let r=0;for(let i of Object.keys(n)){if(i in In)continue;let a=n[i],s=Se(a);s!=null&&(o.push(`k${r}${i}`),o.push(`v${r}${s}`),r+=1)}return[...t,...o].join("~")}function Tn({propertyId:e,eventName:n,eventParams:t,cookieHeader:o,clientId:r,userId:i,cookiePrefix:a,ignoreReferrer:s,browser:m,pageLoadMs:l,hitCounter:b,engagementTimeMs:h,uachParams:f,campaign:d,contentGroup:y,consentParams:g,debugMode:p}){let c=new URLSearchParams;c.set("v","2"),c.set("tid",String(e||"")),c.set("en",String(n||"")),p===!0&&c.set("_dbg","1"),l!=null&&c.set("_p",String(l)),b!=null&&c.set("_s",String(b)),h!=null&&c.set("_et",String(h));let k=ke(o);if(r!=null&&String(r))c.set("cid",String(r));else{let x=te(k.get(ce(a)));x!=null&&x.cid&&c.set("cid",x.cid)}typeof i=="string"&&i.trim()&&c.set("uid",i.trim());let S=d||{};typeof S.campaign_id=="string"&&S.campaign_id.trim()&&c.set("ci",S.campaign_id.trim()),typeof S.campaign_source=="string"&&S.campaign_source.trim()&&c.set("cs",S.campaign_source.trim()),typeof S.campaign_medium=="string"&&S.campaign_medium.trim()&&c.set("cm",S.campaign_medium.trim()),typeof S.campaign_name=="string"&&S.campaign_name.trim()&&c.set("cn",S.campaign_name.trim()),typeof S.campaign_term=="string"&&S.campaign_term.trim()&&c.set("ct",S.campaign_term.trim()),typeof S.campaign_content=="string"&&S.campaign_content.trim()&&c.set("cc",S.campaign_content.trim()),typeof y=="string"&&y.trim()&&ye(c,"content_group",y.trim());let w=ue(e,a),u=le(k.get(w));(u==null?void 0:u.sid)!=null?c.set("sid",String(u.sid)):c.set("sid",String(Math.floor(Date.now()/1e3))),(u==null?void 0:u.sct)!=null?c.set("sct",String(u.sct)):c.set("sct","1"),(u==null?void 0:u.seg)!=null&&c.set("seg",String(u.seg));let v=m;if(v.dl&&c.set("dl",String(v.dl)),v.dt&&c.set("dt",String(v.dt)),s===!0&&c.set("ir","1"),c.set("dr",String(v.dr)),v.ul&&c.set("ul",String(v.ul)),v.sr&&c.set("sr",String(v.sr)),f)for(let[x,U]of Object.entries(f))U==null||U===""||c.set(x,String(U));g&&(g.gcs&&c.set("gcs",String(g.gcs)),g.gcd&&c.set("gcd",String(g.gcd)));let P=t||{};p===!0&&!Object.prototype.hasOwnProperty.call(P,"debug_mode")&&ye(c,"debug_mode","1");let N=P.currency;typeof N=="string"&&c.set("cu",N),P.transaction_id!=null&&ye(c,"transaction_id",Se(P.transaction_id)),P.coupon!=null&&ye(c,"coupon",Se(P.coupon)),P.customer_type!=null&&ye(c,"customer_type",Se(P.customer_type));for(let x of En)P[x]!=null&&Un(c,x,Tt(P[x]));let W=P.items;if(Array.isArray(W)){let x=W.slice(0,200);for(let U=0;U<x.length;U+=1){let I=Mt(x[U]);I&&c.set(`pr${U+1}`,I)}}for(let x of Object.keys(P)){if(x==="items"||x==="currency"||x==="transaction_id"||x==="coupon"||x==="customer_type"||En.has(x)||x==="user_id"||x==="client_id"||x==="campaign_id"||x==="campaign_source"||x==="campaign_medium"||x==="campaign_name"||x==="campaign_term"||x==="campaign_content"||x==="page_location"||x==="page_title"||x==="page_referrer"||x==="content_group"||x==="ignore_referrer"||x==="language"||x==="screen_resolution"||x==="cookie_domain"||x==="cookie_expires"||x==="cookie_flags"||x==="cookie_path"||x==="cookie_prefix"||x==="cookie_update"||x==="send_page_view"||x==="send_to")continue;let U=P[x];typeof U=="number"?Un(c,x,U):ye(c,x,Se(U))}return c}function Wt(e){return/^https?:\/\//i.test(String(e||""))}function Qe(e){if(typeof e=="string"&&Wt(e))return Qe({server_container_url:e});let t=((e&&typeof e=="object"?e:{}).server_container_url||"").trim();if(!t)throw new Error("server_container_url is required");return Pn(t)}function Mn(e){let n=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.href)||"")}catch(m){return""}})(),t=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.title)||"")}catch(m){return""}})(),o=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.referrer)||"")}catch(m){return""}})(),r=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.hostname)||"")}catch(m){return""}})(),i=(()=>{var s;try{return String(((s=e==null?void 0:e.navigator)==null?void 0:s.language)||"").toLowerCase()}catch(m){return""}})(),a=(()=>{var s,m;try{let l=(s=e==null?void 0:e.screen)==null?void 0:s.width,b=(m=e==null?void 0:e.screen)==null?void 0:m.height;if(typeof l=="number"&&typeof b=="number")return`${l}x${b}`}catch(l){}return""})();return{dl:n,dt:t,dr:o,dh:r,ul:i,sr:a}}function $t(e){return new Promise(n=>setTimeout(n,e))}function Ot(e){return e===429||e>=500}async function Wn({url:e,windowRef:n,useBeacon:t,maxRetries:o=1,initialBackoffMs:r=200}){var h;let i=n,a=(h=i==null?void 0:i.navigator)==null?void 0:h.sendBeacon;if(t&&typeof a=="function")try{return a.call(i.navigator,e),{ok:!0,via:"beacon"}}catch(f){}let s=i==null?void 0:i.fetch;if(typeof s!="function")throw new Error("fetch is not available");let m={method:"POST",keepalive:!0,credentials:"include",cache:"no-store",redirect:"follow",mode:"no-cors"},l=0,b=r;for(;;){l+=1;try{let f=await s.call(i,e,m),d=typeof(f==null?void 0:f.status)=="number"?f.status:0;if(!Ot(d))return{ok:!0,via:"fetch",status:d}}catch(f){}if(l>o)return{ok:!1,via:"fetch",status:null};await $t(b),b*=2}}function Re(e){return String((e||{}).analytics_storage||"").toLowerCase()!=="denied"}var Je=2*365*24*60*60;function Ye({jar:e,consent:n,nowMs:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=ce(r),f=e==null?void 0:e.get(h),d=te(f);if(d!=null&&d.cid)return Re(n||{})?l===!1&&!b?{cid:d.cid,wrote:!1}:(e==null||e.set(h,String(f||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:d.cid,wrote:!0}):{cid:d.cid,wrote:!1};let y=Ln({nowMs:t}),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(n||{})?l===!1&&f?{cid:p,wrote:!1}:(e==null||e.set(h,y,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p,wrote:!0}):{cid:p,wrote:!1}}function $n({jar:e,cid:n,consent:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=typeof n=="string"?n.trim():String(n||"").trim(),f=vn(h);if(!f)return{cid:null,wrote:!1};let d=ce(r),y=e==null?void 0:e.get(d),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(t||{})?y&&l===!1?b?(e==null||e.set(d,String(y||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p||h,wrote:!0}):{cid:p||h,wrote:!1}:(e==null||e.set(d,f,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:h,wrote:!0}):{cid:h,wrote:!1}}function On({jar:e,propertyId:n,value:t,consent:o,cookieDomain:r="auto",cookiePrefix:i="",cookiePath:a="/",cookieSameSite:s="Lax",cookieSecure:m=void 0,cookieMaxAgeSeconds:l=Je,cookieUpdate:b=!0,forceCookieAttrsWrite:h=!1}={}){var p;let f=String(n||"");if(!f)return{wrote:!1};let d=String(t||"");if(!((p=le(d))!=null&&p.tokens))return{wrote:!1};let y=ue(f,i),g=e==null?void 0:e.get(y);return Re(o||{})?g&&b===!1?h?(e==null||e.set(y,String(g||""),{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}:(e==null||e.set(y,d,{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}}var Bt=["platform","platformVersion","architecture","model","bitness","fullVersionList","wow64","mobile"];function Fn(e){e.d8a_tag_data=e.d8a_tag_data||{};let n=e.d8a_tag_data,t=n.uach_store;return R(t)||(n.uach_store={}),n.uach_store}function Ft(e){let n=e.navigator;if(!R(n))return!1;let t=n.userAgentData;return R(t)?typeof t.getHighEntropyValues=="function":!1}function Gn(e){return Fn(e).uach||null}function Vn(e){if(!Ft(e))return null;let n=Fn(e);return n.uach_promise||(n.uach_promise=e.navigator.userAgentData.getHighEntropyValues(Bt).then(t=>(n.uach=n.uach||t,n.uach))),n.uach_promise}function Bn(e){return encodeURIComponent(String(e||""))}function qn(e){if(!e)return null;let n={};return e.architecture&&(n.uaa=String(e.architecture)),e.bitness&&(n.uab=String(e.bitness)),Array.isArray(e.fullVersionList)&&(n.uafvl=e.fullVersionList.map(t=>`${Bn(t.brand||"")};${Bn(t.version||"")}`).join("|")),n.uamb=e.mobile?"1":"0",e.model&&(n.uam=String(e.model)),e.platform&&(n.uap=String(e.platform)),e.platformVersion&&(n.uapv=String(e.platformVersion)),n.uaw=e.wow64?"1":"0",n}function Hn(e){switch(e){case 1:return"1";case 2:case 4:return"0";default:return"-"}}function zn(e){return String(e||"").toLowerCase()==="denied"?2:1}function jn({consent:e}){let n=e||{},t=zn(n.ad_storage),o=zn(n.analytics_storage);return`G1${Hn(t)}${Hn(o)}`}function Kn({consentDefault:e,consentUpdate:n}){let t=e||{},o=n||{};function r(m){let l=String(m||"").toLowerCase();return l==="granted"?"granted":l==="denied"?"denied":null}function i(m,l){let b=r(m),h=r(l);return!b&&!h?"l":b==="denied"&&!h?"p":b==="granted"&&!h?"t":!b&&h==="denied"?"m":!b&&h==="granted"?"n":b==="denied"&&h==="denied"?"q":b==="granted"&&h==="granted"?"v":b==="denied"&&h==="granted"?"r":b==="granted"&&h==="denied"?"u":"l"}let a=[["ad_storage","3"],["analytics_storage","3"],["ad_user_data","2"],["ad_personalization","5"]],s="13";for(let[m,l]of a)s+=`${i(t[m],o[m])}${l}`;return s+="l1",s}function Qn(){let e=ze({nowMs:Date.now()});return xn(e)}function Jn({windowRef:e,state:n}){return n?(typeof n.anonCid=="string"&&n.anonCid||(n.anonCid=Qn()),n.anonCid):Qn()}function Yn({windowRef:e,nowMs:n=()=>Date.now()}={}){if(!e)throw new Error("createEngagementTimer: windowRef is required");let t=e,o=!1,r=!0,i=!0,a=!0,s=null,m=0;function l(){var u;try{if(typeof t.hasFocus=="function")return!!t.hasFocus();if(typeof((u=t.document)==null?void 0:u.hasFocus)=="function")return!!t.document.hasFocus()}catch(v){}return!0}function b(){var u,v;try{if(typeof((u=t.document)==null?void 0:u.hidden)=="boolean")return!t.document.hidden;if(typeof((v=t.document)==null?void 0:v.visibilityState)=="string")return t.document.visibilityState!=="hidden"}catch(P){}return!0}function h(){return r&&i&&a}function f(){let u=n();if(s!=null){let v=Math.max(0,u-s);m+=v,s=u}h()?s==null&&(s=u):s=null}function d(){f(),r=!0,f()}function y(){f(),r=!1,f()}function g(){f(),i=b(),f()}function p(){f(),a=!0,f()}function c(){f(),a=!1,f()}function k(){var u;o||(o=!0,r=l(),i=b(),a=!0,f(),typeof t.addEventListener=="function"&&(t.addEventListener("focus",d),t.addEventListener("blur",y),t.addEventListener("pageshow",p),t.addEventListener("pagehide",c)),typeof((u=t.document)==null?void 0:u.addEventListener)=="function"&&t.document.addEventListener("visibilitychange",g))}function S(){return f(),m|0}function w(){f();let u=m|0;return m=0,s=h()?n():null,u}return{start:k,peek:S,getAndReset:w,__internal:{sync:f}}}function oe(e){let n=typeof e=="function"?e():null;return Array.isArray(n==null?void 0:n.propertyIds)&&n.propertyIds.length>0?n.propertyIds.slice():[]}function ne(e,n){var r;let t=typeof e=="function"?e():null,o=(r=t==null?void 0:t.propertyConfigs)==null?void 0:r[n];return o&&typeof o=="object"?o:{}}function he(e){let n=typeof e=="function"?e():null;return n!=null&&n.set&&typeof n.set=="object"?n.set:{}}function Xn({enabled:e}){return{enabled:e===!0,log:(...n)=>{if(e===!0)try{console.log(...n)}catch(t){}}}}function Zn({key:e,eventParams:n,config:t,setParams:o}){let r=n||{},i=t||{},a=o||{};return Object.prototype.hasOwnProperty.call(r,e)&&r[e]!=null?r[e]:Object.prototype.hasOwnProperty.call(i,e)&&i[e]!=null?i[e]:Object.prototype.hasOwnProperty.call(a,e)&&a[e]!=null?a[e]:null}function Q({key:e,eventParams:n,config:t,setParams:o}){let r=Zn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="string"&&r.trim()?r.trim():null}function Xe({key:e,eventParams:n,config:t,setParams:o}){let r=Zn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="boolean"?r:null}function Gt(e){let n=typeof e=="string"?e:"";if(!n.trim())return{};let t=n.split(";").map(r=>r.trim()).filter(Boolean),o={};for(let r of t){let i=r.toLowerCase();if(i==="secure"&&(o.secure=!0),i.startsWith("samesite=")){let s=r.split("=").slice(1).join("=").trim().toLowerCase();s==="lax"&&(o.sameSite="Lax"),s==="strict"&&(o.sameSite="Strict"),s==="none"&&(o.sameSite="None")}}return o}function _e({propertyCfg:e,setParams:n,https:t,state:o,isDebugEnabled:r}){var U,I,H,z,J,T,re;let i=R(e)?e:{},a=R(n)?n:{},s=(U=i.cookie_domain)!=null?U:a.cookie_domain,m=typeof s=="string"&&s.trim()?s:s==null?"auto":String(s),l=(I=i.cookie_prefix)!=null?I:a.cookie_prefix,b=typeof l=="string"?l:"",h=(H=i.cookie_path)!=null?H:a.cookie_path,f=typeof h=="string"&&h.trim()?h:"/",d=(z=i.cookie_update)!=null?z:a.cookie_update,y=typeof d=="boolean"?d:!0,g=(J=i.cookie_expires)!=null?J:a.cookie_expires,p=Number.isFinite(Number(g))?Number(g):null,c=p!=null?p:2*365*24*60*60,k=(re=(T=i.cookie_flags)!=null?T:a.cookie_flags)!=null?re:"",S=Gt(k),w=S.sameSite||"Lax",u=t===!0&&S.secure===!0?!0:t===!0,v=typeof r=="function"?r({config:i,setParams:a}):!1,P=JSON.stringify({domain:m,prefix:b,path:f,sameSite:w,secure:u,maxAgeSeconds:c}),N=`${b}|${m}|${f}`;o&&!o.cookieAttrsSig&&(o.cookieAttrsSig={});let x=(o!=null&&o.cookieAttrsSig?o.cookieAttrsSig[N]:void 0)!==P;return o!=null&&o.cookieAttrsSig&&(o.cookieAttrsSig[N]=P),{cookieDomain:m,cookiePrefix:b,cookiePath:f,cookieSameSite:w,cookieSecure:u,cookieUpdate:y,cookieMaxAgeSeconds:c,forceCookieAttrsWrite:x,debug:v}}function Ze(e){return R(e)?{ok:e.ok,domain:e.domain,cookieStr:e.cookieStr,attempts:e.attempts}:{}}function et({state:e,destinations:n,jar:t,getPropertyConfig:o,resolveCookieSettings:r,sessionTimeoutMs:i,engagementTimeMs:a,engagedThresholdMs:s,nowMs:m,log:l}){var p,c,k;if(!e||!Array.isArray(n)||n.length===0||!t||typeof o!="function"||typeof r!="function")return;let b=Number.isFinite(Number(m))?Number(m):Date.now(),h=Array.isArray(e.sharedSessionTokens)?e.sharedSessionTokens:null;if(!h)for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v),N=le(P);if(N!=null&&N.tokens){h=N.tokens;break}}let f=je(h||null,{nowMs:b,sessionTimeoutMs:i});f.isNewSession&&(e.sessionEngagementMs=0,e.sessionEngaged=!1);let d=Me.getToken(f.tokens,"g");e.sessionEngagementMs=(Number(e.sessionEngagementMs)||0)+(Number(a)||0),!e.sessionEngaged&&Number(s)>0&&e.sessionEngagementMs>=Number(s)&&(Me.setToken(f.tokens,"g",1),e.sessionEngaged=!0);let y=Me.getToken(f.tokens,"g"),g=f.isNewSession||d!==y;e.sharedSessionTokens=f.tokens,e.sharedSessionValue=Ke(f.tokens);for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v);if(!P){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(p=u.cookieMaxAgeSeconds)!=null?p:void 0});u.debug&&(l==null||l("[d8a] set session cookie (create)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.cookieUpdate===!0||g){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(c=u.cookieMaxAgeSeconds)!=null?c:void 0});u.debug&&(l==null||l("[d8a] set session cookie (value+attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.forceCookieAttrsWrite){let N=t.set(v,P,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(k=u.cookieMaxAgeSeconds)!=null?k:void 0});u.debug&&(l==null||l("[d8a] set session cookie (attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}u.debug&&(l==null||l("[d8a] set session cookie (no write)",{pid:S,cookieName:v,reason:"cookie_update=false and session value unchanged and force_cookie_attrs_write=false",cookieUpdate:u.cookieUpdate,shouldWriteSessionValue:g,forceCookieAttrsWrite:u.forceCookieAttrsWrite,cookieReadBack:t.get(v)}))}}var en="v1.2.0";var Vt="wt";function nt(e){e.set("_dtv",en),e.set("_dtn",Vt)}function qt(e){return typeof e=="string"&&e.trim()?[e.trim()]:Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()).map(n=>String(n).trim()):null}var Ht=new Set(["send_to","user_id","client_id","campaign_id","campaign_source","campaign_medium","campaign_name","campaign_term","campaign_content","page_location","page_title","page_referrer","content_group","ignore_referrer","language","screen_resolution","cookie_domain","cookie_expires","cookie_flags","cookie_path","cookie_prefix","cookie_update","send_page_view","session_engagement_time_sec","site_search_enabled","site_search_query_params","outbound_clicks_enabled","outbound_exclude_domains","file_downloads_enabled","file_download_extensions","linker"]);function zt(e){let n={};for(let[t,o]of Object.entries(e||{}))Ht.has(t)||(n[t]=o);return n}function tt({windowRef:e,getState:n}){let t=e;if(!t)throw new Error("createDispatcher: windowRef is required");let o=[],r=null,i=!1,a=We({windowRef:t});Vn(t);let s=Yn({windowRef:t});s.start();let m=1e4;function l(){let S=oe(n)[0]||"";return S?ne(n,S):{}}function b({config:k,setParams:S}){let w=R(k)?k:{},u=R(S)?S:{};return w.debug_mode===!0||u.debug_mode===!0}function h(){var k;try{return String(((k=t==null?void 0:t.location)==null?void 0:k.protocol)||"").toLowerCase()==="https:"}catch(S){return!1}}function f(){let k=n();return k?k.pageLoadMs!=null?k.pageLoadMs:k.jsDate instanceof Date&&!Number.isNaN(k.jsDate.getTime())?(k.pageLoadMs=k.jsDate.getTime(),k.pageLoadMs):(k.pageLoadMs=Date.now(),k.pageLoadMs):null}function d(k,S){var v;o.push({name:k,params:S||{}});let w=l(),u=Number((v=w==null?void 0:w.max_batch_size)!=null?v:25);if(o.length>=u){g({useBeacon:!1});return}y()}function y(){var w;if(r!=null)return;let k=l(),S=Number((w=k==null?void 0:k.flush_interval_ms)!=null?w:1e3);r=t.setTimeout(()=>{r=null,g({useBeacon:!1})},S)}async function g({useBeacon:k}){var M,$,D,j,ie,q,Le,Z,X,Ae;if(r!=null&&(t.clearTimeout(r),r=null),o.length===0)return{sent:0};let S=oe(n),w=S[0]||"",u=w?ne(n,w):{},v=Number((M=u==null?void 0:u.max_batch_size)!=null?M:25),P=o.splice(0,v),N=pe(n),W=hn(n),x=u.session_timeout_ms,U=typeof x=="number"?x:1800*1e3,I=n(),H=f(),z=String((N==null?void 0:N.analytics_storage)||"").toLowerCase(),J=z==="denied",T=I!=null&&I.set&&typeof I.set=="object"?I.set:{},re=zt(T),fe=h(),_=b({config:u,setParams:T}),C=(D=($=u==null?void 0:u.session_engagement_time_sec)!=null?$:T==null?void 0:T.session_engagement_time_sec)!=null?D:10,L=Number.isFinite(Number(C))?Number(C):10,A=Math.max(0,Math.floor(L*1e3)),E=Xn({enabled:_});E.log("[d8a] flush",{href:String(((j=t==null?void 0:t.location)==null?void 0:j.href)||""),propertyIds:S,analyticsStorage:z||"(unset)",analyticsDenied:J,cookieHeader:String(((ie=t==null?void 0:t.document)==null?void 0:ie.cookie)||"")});function O(ee){return _e({propertyCfg:ee,setParams:T,https:fe,state:I,isDebugEnabled:b})}let V=0;for(let ee of P){let De=R(ee.params)?ee.params:{},ln=qt(De.send_to),Pe=ln||S;if(!Pe||Pe.length===0)continue;let F={...re,...De};delete F.send_to;let Be=s.getAndReset();!J&&I&&et({state:I,destinations:Pe,jar:a,getPropertyConfig:ve=>ne(n,ve),resolveCookieSettings:O,sessionTimeoutMs:U,engagementTimeMs:Be,engagedThresholdMs:A,nowMs:Date.now(),log:E.enabled?E.log:null}),I&&(I.hitCounter=(I.hitCounter||0)+1);let Ne=[];for(let ve of Pe){let G=ne(n,ve),_t=Qe(G),B=O(G),wt=Q({key:"user_id",eventParams:F,config:G,setParams:T}),bt=Q({key:"client_id",eventParams:F,config:G,setParams:T}),Ct=Xe({key:"debug_mode",eventParams:F,config:G,setParams:T})===!0,xt={campaign_id:Q({key:"campaign_id",eventParams:F,config:G,setParams:T}),campaign_source:Q({key:"campaign_source",eventParams:F,config:G,setParams:T}),campaign_medium:Q({key:"campaign_medium",eventParams:F,config:G,setParams:T}),campaign_name:Q({key:"campaign_name",eventParams:F,config:G,setParams:T}),campaign_term:Q({key:"campaign_term",eventParams:F,config:G,setParams:T}),campaign_content:Q({key:"campaign_content",eventParams:F,config:G,setParams:T})},Lt=Q({key:"content_group",eventParams:F,config:G,setParams:T}),vt=Xe({key:"ignore_referrer",eventParams:F,config:G,setParams:T})===!0,me={...Mn(t)},fn=Q({key:"page_location",eventParams:F,config:G,setParams:T}),dn=Q({key:"page_title",eventParams:F,config:G,setParams:T}),gn=Q({key:"page_referrer",eventParams:F,config:G,setParams:T}),mn=Q({key:"language",eventParams:F,config:G,setParams:T}),pn=Q({key:"screen_resolution",eventParams:F,config:G,setParams:T});if(fn&&(me.dl=fn),dn&&(me.dt=dn),gn!=null&&(me.dr=gn),mn&&(me.ul=mn),pn&&(me.sr=pn),!J)if(B.debug){let Fe=ce(B.cookiePrefix),yn=a.get(Fe),Ee=Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(q=B.cookieMaxAgeSeconds)!=null?q:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite}),At=Ee!=null&&Ee.wrote?yn?"attrs update":"create":"no write";E.log(`[d8a] set client cookie (${At})`,{pid:ve,cookiePrefix:B.cookiePrefix,result:Ee,cookieName:Fe,cookieBefore:yn,cookieReadBack:a.get(Fe),documentCookie:String(((Le=t==null?void 0:t.document)==null?void 0:Le.cookie)||"")})}else Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(Z=B.cookieMaxAgeSeconds)!=null?Z:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite});let kn=Tn({propertyId:ve,eventName:ee.name,eventParams:F,cookieHeader:J?"":String(((X=t.document)==null?void 0:X.cookie)||""),clientId:bt||(J?Jn({windowRef:t,state:I}):null),userId:wt,cookiePrefix:B.cookiePrefix,browser:me,ignoreReferrer:vt,pageLoadMs:H!=null?Number(H):null,hitCounter:(Ae=I==null?void 0:I.hitCounter)!=null?Ae:null,engagementTimeMs:Be!=null?Number(Be):null,uachParams:qn(Gn(t)),campaign:xt,contentGroup:Lt||null,consentParams:{gcs:jn({consent:W.consent}),gcd:Kn({consentDefault:W.consentDefault,consentUpdate:W.consentUpdate})},debugMode:Ct});nt(kn);let Rt=`${_t}?${kn.toString()}`;Ne.push(Wn({url:Rt,windowRef:t,useBeacon:k}))}Ne.length>0&&(await Promise.all(Ne),V+=Ne.length)}return o.length>0&&y(),{sent:V}}function p({useBeacon:k=!1}={}){return g({useBeacon:k===!0})}function c(){var k;t!=null&&t.addEventListener&&(i||(i=!0,t.addEventListener("pagehide",()=>{try{oe(n).length>0&&s.peek()>0&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}),(k=t.document)!=null&&k.addEventListener&&t.document.addEventListener("visibilitychange",()=>{if(t.document.hidden){try{oe(n).length>0&&s.peek()>=m&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}})))}return{enqueueEvent:d,flush:g,flushNow:p,attachLifecycleFlush:c}}function we(e){return typeof e=="string"?e:""}function nn(e,n){var t;try{let o=R(e)?e:null,r=o&&R(o.currentScript)?o.currentScript:null,i=we(r==null?void 0:r.src);if(!i)return"";let a=o&&R(o.location)?we((t=o.location)==null?void 0:t.href):"",s=new URL(i,a||void 0);return we(s.searchParams.get(n))}catch(o){return""}}function ot({windowRef:e,dataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aDataLayerName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"l");return o.trim()?o.trim():"d8aLayer"}function rt({windowRef:e,globalName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGlobalName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"g");return o.trim()?o.trim():"d8a"}function it({windowRef:e,gtagDataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGtagDataLayerName);if(t.trim())return t.trim();let o=nn(e==null?void 0:e.document,"gl");return o.trim()?o.trim():"dataLayer"}var $e="__d8aConsentBridgeHubs";function jt(e){return R(e)}function tn(e,n){if(!e)return null;let t=String(n||"dataLayer"),o=Y(e,$e),r=jt(o)?o:{};(!o||o!==r)&&se(e,$e,r);let i=r[t];if(i&&typeof i=="object")return i;let a={subscribers:new Set,originalPush:null,patched:!1,dataLayerName:t};return r[t]=a,a}function st({windowRef:e,getState:n,dataLayerName:t="dataLayer"}){if(!e)throw new Error("createGtagConsentBridge: windowRef is required");let o=e;if(!o)throw new Error("createGtagConsentBridge: windowRef is required");if(typeof n!="function")throw new Error("createGtagConsentBridge: getState is required");let r=!1,i=null;function a(d){let y=R(d)?d.length:null;if(d&&typeof y=="number"&&typeof d!="string")try{return Array.from(d)}catch(g){return null}return Array.isArray(d)?d:null}function s({action:d,patch:y}){let g=n();if(g){if(d==="default")g.consentDefaultGtag={...g.consentDefaultGtag||{},...y||{}};else if(d==="update")g.consentUpdateGtag={...g.consentUpdateGtag||{},...y||{}};else return;g.consentGtag={...g.consentDefaultGtag||{},...g.consentUpdateGtag||{}},Ie(n)}}function m(d){let[y,g,p]=d;if(y!=="consent")return null;let c=String(g||"");return c!=="default"&&c!=="update"||!R(p)?null:["consent",c,p]}function l(d){let y=m(d);if(!y)return;let[,g,p]=y;s({action:g,patch:p})}function b(){let y=Y(o,t);if(Array.isArray(y))for(let g of y){let p=a(g);p&&l(p)}}function h(){let d=t,y=ae(o,d),g=tn(o,d);g&&(g.patched||(g.originalPush=y.push.bind(y),y.push=function(...c){let k=c[0],S=a(k);if(S)for(let w of g.subscribers)try{w(S)}catch(u){}return g.originalPush(...c)},g.patched=!0,y.__d8aConsentBridgePatched=!0))}function f(){if(r)return;r=!0;let d=tn(o,t);d&&(d.subscribers.add(l),i=()=>{d.subscribers.delete(l)},b(),h())}return{start:f,stop:()=>{if(!r)return;let d=t,y=tn(o,d);if(!y)return;typeof i=="function"&&i(),i=null;let g=Y(o,d);if(y.subscribers.size===0&&y.originalPush&&Array.isArray(g)){let p=g;p.push=y.originalPush,y.originalPush=null,y.patched=!1;try{delete p.__d8aConsentBridgePatched;let c=Y(o,$e),k=R(c)?c:null;k&&(delete k[d],Object.keys(k).length===0&&se(o,$e,void 0))}catch(c){}}r=!1}}}function at(e,n=[]){return Array.isArray(e)?e.map(t=>String(t).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):n}function Kt(e,n){try{return new URL(String(e||""),n?String(n):void 0)}catch(t){return null}}function Qt(e){let n=e;for(let t=0;t<100&&n;t+=1){let o=R(n)?n:null,r=String((o==null?void 0:o.tagName)||"").toLowerCase();if(r==="a"||r==="area")return n;n=(o==null?void 0:o.parentNode)||null}return null}function ge(e,n){if(!e)return null;let t=R(e)?e:null;try{if(typeof(t==null?void 0:t.getAttribute)=="function"){let r=t.getAttribute(n);if(r!=null)return r}}catch(r){}let o=t?t[n]:null;return o!=null?String(o):null}function Jt(e){let n=String((e==null?void 0:e.protocol)||"").toLowerCase();return n==="http:"||n==="https:"}function Yt(e,n){let t=String(e||"").toLowerCase(),o=String(n||"").toLowerCase().replace(/^\./,"");return!t||!o?!1:t===o||t.endsWith(`.${o}`)}function Xt(e){return String((e==null?void 0:e.pathname)||"").split("/").filter(Boolean).slice(-1)[0]||""}function Zt(e){let n=String(e||""),t=n.lastIndexOf(".");return t<0?"":n.slice(t+1).toLowerCase()}function on(e){return String(e||"").replace(/\s+/g," ").trim()}function eo(e){let n=ge(e,"id");return on(n)||null}function no(e){let n=ge(e,"className")||ge(e,"class");return on(n)||null}function to(e){let n=ge(e,"textContent")||ge(e,"innerText");return on(n)||null}function ct({windowRef:e,getState:n,dispatcher:t}){let o=e;if(!o)throw new Error("createEnhancedMeasurement: windowRef is required");if(typeof n!="function")throw new Error("createEnhancedMeasurement: getState is required");if(!t)throw new Error("createEnhancedMeasurement: dispatcher is required");function r(p,c){let k=p[c];return typeof k=="boolean"?k:void 0}function i(p,c){return p[c]}function a({propertyId:p,key:c,defaultValue:k}){let S=he(n),w=ne(n,p),u=r(w,c);if(u!=null)return u;let v=r(S,c);return v!=null?v:k}function s({propertyId:p,key:c,defaultList:k}){let S=he(n),w=ne(n,p),u=i(w,c),v=i(S,c);return u!=null?at(u,k):v!=null?at(v,k):k}function m(){let p=n();return!p||p.emInstalled?!1:(p.emInstalled=!0,!0)}function l(){let p=n();return!p||p.emSiteSearchFired?!1:(p.emSiteSearchFired=!0,!0)}function b(){var u;let p=oe(n);if(p.length===0||!l())return;let c=String(((u=o==null?void 0:o.location)==null?void 0:u.search)||"");if(!c||c==="?")return;let k=new URLSearchParams(c.startsWith("?")?c.slice(1):c),S=["q","s","search","query","keyword"],w=new Map;for(let v of p){if(!a({propertyId:v,key:"site_search_enabled",defaultValue:!0}))continue;let N=s({propertyId:v,key:"site_search_query_params",defaultList:S}),W="";for(let U of N){let I=k.get(U);if(I&&String(I).trim()){W=String(I).trim();break}}if(!W)continue;let x=w.get(W)||[];x.push(v),w.set(W,x)}for(let[v,P]of w.entries())t.enqueueEvent("view_search_results",{search_term:v,send_to:P})}function h({propertyId:p,linkHostname:c}){var w;if(!a({propertyId:p,key:"outbound_clicks_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"outbound_exclude_domains",defaultList:[String(((w=o==null?void 0:o.location)==null?void 0:w.hostname)||"")]});for(let u of S)if(Yt(c,u))return!1;return!0}function f({propertyId:p,ext:c}){if(!a({propertyId:p,key:"file_downloads_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"file_download_extensions",defaultList:["pdf","doc","docx","xls","xlsx","ppt","pptx","csv","txt","rtf","zip","rar","7z","dmg","exe","apk"]}),w=new Set(S.map(u=>String(u).toLowerCase().replace(/^\./,"")));return!!c&&w.has(String(c).toLowerCase().replace(/^\./,""))}function d(p){var J,T,re;let c=oe(n);if(c.length===0)return;let k=R(p)?p.target:null,S=Qt(k);if(!S)return;let w=ge(S,"href");if(!w)return;let u=Kt(w,String(((J=o==null?void 0:o.location)==null?void 0:J.href)||""));if(!u||!Jt(u))return;let v=String(u.href||""),P=String(u.hostname||""),N=eo(S),W=no(S),x=to(S),U=Xt(u)||ge(S,"download")||"",I=Zt(U),H=[],z=[];for(let fe of c)f({propertyId:fe,ext:I})&&H.push(fe),h({propertyId:fe,linkHostname:P})&&z.push(fe);if(H.length>0){t.enqueueEvent("file_download",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},...x?{link_text:x}:{},file_name:U,file_extension:I,send_to:H}),(T=t.flushNow)==null||T.call(t,{useBeacon:!1});return}z.length>0&&(t.enqueueEvent("click",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},link_domain:P,outbound:"1",send_to:z}),(re=t.flushNow)==null||re.call(t,{useBeacon:!1}))}function y(){var c;if(!m())return;try{b(),!((c=n())!=null&&c.emSiteSearchFired)&&typeof(o==null?void 0:o.setTimeout)=="function"&&o.setTimeout(()=>{try{b()}catch(k){}},0)}catch(k){}let p=o==null?void 0:o.document;p&&typeof p.addEventListener=="function"&&(p.addEventListener("click",d,!0),p.addEventListener("auxclick",d,!0))}function g(){try{b()}catch(p){}}return{start:y,onConfig:g}}var be="_dl",kt="1",Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",cn="=",rn=null;function oo(){if(rn)return rn;let e={};for(let n=0;n<Ce.length;n+=1)e[Ce[n]]=n;return e[cn]=64,e["."]=64,rn=e,e}function ro(e){try{if(typeof TextEncoder!="undefined")return new TextEncoder().encode(e)}catch(t){}let n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=e.charCodeAt(t)&255;return n}function io(e){try{if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e)}catch(t){}let n="";for(let t=0;t<e.length;t+=1)n+=String.fromCharCode(e[t]);return n}function so(e){let n=ro(e),t=[];for(let o=0;o<n.length;o+=3){let r=o+1<n.length,i=o+2<n.length,a=n[o],s=r?n[o+1]:0,m=i?n[o+2]:0,l=a>>2,b=(a&3)<<4|s>>4,h=(s&15)<<2|m>>6,f=m&63;i||(f=64,r||(h=64)),t.push(Ce[l],Ce[b],h===64?cn:Ce[h],f===64?cn:Ce[f])}return t.join("").replace(/=+$/,"")}function ao(e){let n=String(e||""),t=oo(),o=[],r=0;function i(a){for(;r<n.length;){let s=n.charAt(r++),m=t[s];if(m!=null)return m;if(!/^[\s\xa0]*$/.test(s))throw new Error(`Invalid base64 char: ${s}`)}return a}for(;;){let a=i(-1),s=i(0),m=i(64),l=i(64);if(l===64&&a===-1)break;o.push((a<<2|s>>4)&255),m!==64&&(o.push((s<<4&240|m>>2)&255),l!==64&&o.push((m<<6&192|l)&255))}return io(new Uint8Array(o))}function yt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function co(e){let n=Array.isArray(e==null?void 0:e.domains)?e.domains.filter(o=>typeof o=="string"):[],t=n.length>0;return{domains:n,accept_incoming:typeof(e==null?void 0:e.accept_incoming)=="boolean"?e.accept_incoming:t,decorate_forms:typeof(e==null?void 0:e.decorate_forms)=="boolean"?e.decorate_forms:!1,url_position:(e==null?void 0:e.url_position)==="fragment"?"fragment":"query"}}function un(e){let n=String(e||"").match(/([^?#]+)(\?[^#]*)?(#.*)?/);return n?{base:n[1]||"",query:n[2]||"",fragment:n[3]||""}:{base:String(e||""),query:"",fragment:""}}function xe(e,n){let t=String(e||""),o=t.startsWith(n)?t.slice(1):t,r=[];if(!o)return r;for(let i of o.split("&")){let a=i.trim();if(!a)continue;let s=a.indexOf("=");if(s<0){r.push([decodeURIComponent(a),""]);continue}let m=decodeURIComponent(a.slice(0,s)),l=decodeURIComponent(a.slice(s+1));r.push([m,l])}return r}function Oe(e,n){if(!e||e.length===0)return"";let t=e.map(([o,r])=>`${encodeURIComponent(o)}=${encodeURIComponent(r)}`).join("&");return n+t}function uo(e,n){let{query:t,fragment:o}=un(e);for(let[r,i]of xe(t,"?"))if(r===n)return{value:i,where:"query"};for(let[r,i]of xe(o,"#"))if(r===n)return{value:i,where:"fragment"};return{value:null,where:null}}function ut(e,n){let{base:t,query:o,fragment:r}=un(e),i=xe(o,"?").filter(([s])=>s!==n),a=xe(r,"#").filter(([s])=>s!==n);return`${t}${Oe(i,"?")}${Oe(a,"#")}`}function sn(e,n,t,o){let{base:r,query:i,fragment:a}=un(e);if(o==="fragment"){let m=xe(a,"#").filter(([l])=>l!==n);return m.push([n,t]),`${r}${i}${Oe(m,"#")}`}let s=xe(i,"?").filter(([m])=>m!==n);return s.push([n,t]),`${r}${Oe(s,"?")}${a}`}function lt(e,n){try{let t=new URL(e,n||"https://example.invalid/");return String(t.hostname||"")}catch(t){let o=String(e||"").match(/^https?:\/\/([^/]+)/i);return o?String(o[1]||""):""}}function ft(e,n){let t=String(e||"");if(!t)return!1;for(let o of n){let r=String(o||"").trim();if(r&&t.indexOf(r)>=0)return!0}return!1}var an=null;function lo(){if(an)return an;let e=new Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?t>>>1^3988292384:t>>>1;e[n]=t>>>0}return an=e,e}function fo(e){let n=lo(),t=4294967295;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);t=t>>>8^n[(t^i)&255]}return((t^4294967295)>>>0).toString(36)}function St({payload:e,offset:n,windowRef:t}){var s,m,l,b;let o=String(((s=t.navigator)==null?void 0:s.userAgent)||"")||String(((m=t==null?void 0:t.navigator)==null?void 0:m.userAgent)||""),r=new Date().getTimezoneOffset(),i=String(((l=t.navigator)==null?void 0:l.language)||"")||String(((b=t.navigator)==null?void 0:b.userLanguage)||""),a=Math.floor(Date.now()/6e4)-(Number(n)||0);return fo([o,r,i,a,e].join("*"))}function dt({cookies:e,ts:n,windowRef:t}){let o=[];o.push(["ts",String(n)]);for(let[m,l]of Object.entries(e||{}))m&&l!=null&&o.push([m,String(l)]);let r=o.slice(1).sort((m,l)=>m[0].localeCompare(l[0])),a=[o[0],...r].map(([m,l])=>`${m}*${so(l)}`).join("*"),s=St({payload:a,offset:0,windowRef:t});return`${kt}*${s}*${a}`}function gt({value:e,windowRef:n,ttlMs:t=120*1e3}){let o=String(e||"");if(!o)return null;let r=o.split("*").filter(g=>g!=="");if(r.length<5)return null;let i=r[0],a=r[1];if(i!==kt)return null;let s=r.slice(2),m=s.join("*"),l=!1;for(let g=0;g<3;g+=1)if(St({payload:m,offset:g,windowRef:n})===a){l=!0;break}if(!l)return null;let b=s,h={};for(let g=0;g+1<b.length;g+=2){let p=b[g],c=b[g+1];if(p)try{h[p]=ao(c||"")}catch(k){h[p]=decodeURIComponent(c||"")}}let f=Number(h.ts);if(!Number.isFinite(f))return null;let d=Date.now()-f;if(!(d>=0&&d<=t))return null;let y={};for(let[g,p]of Object.entries(h))g!=="ts"&&g&&p!=null&&(y[g]=String(p));return{ts:f,cookies:y}}var mt="__d8a_linker_coordinator";function pt({getStates:e,windowRef:n}){let t=yt(n),o={},r=new Map;for(let i of e){let a=i(),s=he(i),m=oe(i);if(m&&m.length>0){for(let b of m){let h=ne(i,b),f=_e({propertyCfg:h,setParams:s,https:t,state:a}),d=ue(b,f.cookiePrefix);o[d]||(o[d]={kind:"session",name:d,propertyId:b,settings:f,getState:i}),r.has(f.cookiePrefix)||r.set(f.cookiePrefix,{settings:f,getState:i})}continue}let l=_e({propertyCfg:{},setParams:s,https:t,state:a});r.has(l.cookiePrefix)||r.set(l.cookiePrefix,{settings:l,getState:i})}for(let[i,a]of r.entries()){let s=ce(i);o[s]||(o[s]={kind:"client",name:s,settings:a.settings,getState:a.getState})}return o}function go({windowRef:e}){let n=e;if(!n)throw new Error("createSharedLinkerCoordinator: windowRef is required");let t=We({windowRef:n}),o=new Set;function r(){for(let _ of o.values())try{let C=_();if(C!=null&&C.set&&C.set.debug_mode===!0)return!0;let L=C==null?void 0:C.propertyConfigs;if(L&&typeof L=="object"){for(let A of Object.values(L))if(R(A)&&A.debug_mode===!0)return!0}}catch(C){}return!1}function i(..._){if(r())try{console.log("[d8a][linker]",..._)}catch(C){}}let a=0,s=new Set,m=null,l=null,b=null,h=null,f=!1,d=!1,y=null;function g(){return Array.from(o.values())}function p(){let _=Array.from(s.values()).sort(),C=_.length>0;return{domains:_,accept_incoming:m?m.value:C,decorate_forms:l?l.value:!1,url_position:b?b.value:"query"}}function c(_){if(!R(_))return;a+=1;let C=_.domains;if(Array.isArray(C))for(let V of C){if(typeof V!="string")continue;let M=V.trim();M&&s.add(M)}let L=_.accept_incoming;typeof L=="boolean"&&(m={value:L,rev:a});let A=_.decorate_forms;typeof A=="boolean"&&(l={value:A,rev:a});let E=_.url_position,O=typeof E=="string"?E:"";(O==="query"||O==="fragment")&&(b={value:O,rev:a})}function k(_){c(_)}function S(_){o.add(_);try{k(_().linker)}catch(C){}return()=>{o.delete(_)}}function w(_){var A,E;if(!_)return;let C=String(((A=n.location)==null?void 0:A.href)||"");if(!C)return;let L=ut(C,be);if(L!==C&&typeof((E=n.history)==null?void 0:E.replaceState)=="function"){try{n.history.replaceState({},"",L)}catch(O){}n.location&&(n.location.href=L)}}function u(){var E;let _=String(((E=n.location)==null?void 0:E.href)||"");if(!_)return;let{value:C,where:L}=uo(_,be);if(!C)return;let A=gt({value:C,windowRef:n});A&&(h=A,i("parsed incoming _dl",{cookieNames:Object.keys(A.cookies||{}),ts:A.ts,where:L})),w(L)}function v(){var E,O,V;let _=pt({getStates:g(),windowRef:n}),C=String(((E=n.document)==null?void 0:E.cookie)||""),L=ke(C),A={};for(let M of Object.values(_)){let $=L.get(M.name);$&&(M.kind==="client"&&!((O=te($))!=null&&O.cid)||M.kind==="session"&&!((V=le($))!=null&&V.tokens)||(A[M.name]=$))}return A}function P(){let _=p();if(!_.domains||_.domains.length===0)return null;let C=v();if(!C||Object.keys(C).length===0)return null;let L=Date.now();return dt({cookies:C,ts:L,windowRef:n})}function N(_){var E;let C=p();if(!C.domains||C.domains.length===0)return _;let L=P();if(!L)return _;let A=lt(_,String(((E=n.location)==null?void 0:E.href)||""));return ft(A,C.domains)?sn(_,be,L,C.url_position):_}function W(_){if(!R(_))return;let C=typeof _.href=="string"?_.href:null;if(!C)return;let L=N(C);if(L!==C)try{_.href=L}catch(A){}}function x(_){var M,$,D;if(!R(_))return;let C=p();if(!C.decorate_forms)return;let L=typeof _.action=="string"?_.action:"";if(!L)return;let A=P();if(!A)return;let E=lt(L,String(((M=n.location)==null?void 0:M.href)||""));if(!ft(E,C.domains))return;let O=typeof _.method=="string"?_.method.toLowerCase():"";if(C.url_position==="query"&&O==="get"){let j=Array.isArray(_.childNodes)?_.childNodes:[],ie=!1;for(let q of j)if(R(q)&&String(q.name||"")===be){try{q.value=A}catch(Le){}ie=!0;break}if(!ie&&typeof(($=n.document)==null?void 0:$.createElement)=="function")try{let q=n.document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name",be),q.setAttribute("value",A),(D=_.appendChild)==null||D.call(_,q)}catch(q){}return}let V=sn(L,be,A,C.url_position);if(V!==L)try{_.action=V}catch(j){}}function U(_,C){let L=_;for(let A=0;A<8;A+=1){if(!L||typeof L!="object")return null;let E=String(L.tagName||"").toUpperCase();if(C.includes(E))return L;L=L.parentElement||L.parentNode||null}return null}function I(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function H(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function z(_){let C=R(_)?_.target:null,L=U(C,["FORM"]);L&&x(L)}function J(){if(!p().accept_incoming||!h)return;let C=g(),L=C[0]||null,A=L?pe(L):{};if(String((A==null?void 0:A.analytics_storage)||"").toLowerCase()==="denied"){let M=null;for(let $ of Object.values(h.cookies)){let D=te($);if(D!=null&&D.cid){M=D.cid;break}}if(M)for(let $ of C)try{$().anonCid=M,$().incomingDl=null}catch(D){}h=null;return}let O=pt({getStates:C,windowRef:n}),V=!1;for(let M of Object.keys(h.cookies||{}))if(O[M]){V=!0;break}if(V){for(let[M,$]of Object.entries(h.cookies||{})){let D=O[M];if(D){if(D.kind==="client"){let j=te($);if(!(j!=null&&j.cid))continue;let ie=t.get(D.name);$n({jar:t,cid:j.cid,consent:A,cookieDomain:D.settings.cookieDomain,cookiePrefix:D.settings.cookiePrefix,cookiePath:D.settings.cookiePath,cookieSameSite:D.settings.cookieSameSite,cookieSecure:D.settings.cookieSecure,cookieMaxAgeSeconds:D.settings.cookieMaxAgeSeconds,cookieUpdate:D.settings.cookieUpdate,forceCookieAttrsWrite:D.settings.forceCookieAttrsWrite});let q=t.get(D.name);i("applied client cookie",{name:D.name,cid:j.cid,cookieUpdate:D.settings.cookieUpdate,before:ie,after:q}),delete h.cookies[M];continue}if(D.kind==="session"){let j=D.getState(),ie=he(D.getState),q=yt(n),Le=ne(D.getState,D.propertyId),Z=_e({propertyCfg:Le,setParams:ie,https:q,state:j}),X=le($),Ae=t.get(D.name),ee=On({jar:t,propertyId:D.propertyId,value:$,consent:A,cookieDomain:Z.cookieDomain,cookiePrefix:Z.cookiePrefix,cookiePath:Z.cookiePath,cookieSameSite:Z.cookieSameSite,cookieSecure:Z.cookieSecure,cookieMaxAgeSeconds:Z.cookieMaxAgeSeconds,cookieUpdate:Z.cookieUpdate,forceCookieAttrsWrite:Z.forceCookieAttrsWrite}),De=t.get(D.name);i("applied session cookie",{name:D.name,propertyId:D.propertyId,cookieUpdate:Z.cookieUpdate,wrote:(ee==null?void 0:ee.wrote)===!0,sid:X==null?void 0:X.sid,sct:X==null?void 0:X.sct,before:Ae,after:De}),ee!=null&&ee.wrote&&(X!=null&&X.tokens)&&(j.sharedSessionTokens=X.tokens,j.sharedSessionValue=String($||""),i("seeded shared session state",{propertyId:D.propertyId})),delete h.cookies[M]}}}if(!h.cookies||Object.keys(h.cookies).length===0){for(let M of C)try{M().incomingDl=null}catch($){}h=null}}}function T(){var L;if(d)return;let _=(L=n.HTMLFormElement)==null?void 0:L.prototype,C=_==null?void 0:_.submit;typeof C=="function"&&(y=C,_.submit=function(){try{x(this)}catch(E){}return C.call(this)},d=!0)}function re(){var _,C,L,A,E,O;f||(f=!0,u(),J(),(C=(_=n.document)==null?void 0:_.addEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.addEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.addEventListener)==null||O.call(E,"submit",z),T())}function fe(){var _,C,L,A,E,O,V;if(f&&(f=!1,(C=(_=n.document)==null?void 0:_.removeEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.removeEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.removeEventListener)==null||O.call(E,"submit",z),d)){let M=(V=n.HTMLFormElement)==null?void 0:V.prototype;if(M&&y)try{M.submit=y}catch($){}d=!1,y=null}}return{start:re,stop:fe,applyIncomingIfReady:J,registerRuntime:S,updateConfigPatch:c,__internal:{encodeDl:dt,decodeDl:gt,decorateUrlIfNeeded:N,stripParamFromUrl:ut,setParamInUrl:sn,resolveLinkerConfig:co}}}function mo({windowRef:e}){let n=e,t=Y(n,mt);if(t)return t;let o=go({windowRef:n});return se(n,mt,o),o}function ht({windowRef:e,getState:n}){let t=mo({windowRef:e}),o=t.registerRuntime(n);return{start:()=>t.start(),stop:()=>o(),applyIncomingIfReady:()=>t.applyIncomingIfReady(),updateConfigPatch:r=>t.updateConfigPatch(r),__internal:t.__internal}}function po({windowRef:e=window,dataLayerName:n,globalName:t,gtagDataLayerName:o}={}){let r=e;if(!r)throw new Error("installD8a: window is required");r.d8a_tag_data=r.d8a_tag_data||{};let i=r.d8a_tag_data,a=ot({windowRef:r,dataLayerName:n}),s=rt({windowRef:r,globalName:t}),m=it({windowRef:r,gtagDataLayerName:o});i.__d8aInstallResults||(i.__d8aInstallResults={}),i.__d8aInstallResultsByDataLayer||(i.__d8aInstallResultsByDataLayer={});let l=i.__d8aInstallResults,b=i.__d8aInstallResultsByDataLayer,h=`${a}|${s}`;if(l[h])return l[h];ae(r,a);let f=b[a]||null;if(f){typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let w={consumer:f.consumer,dispatcher:f.dispatcher,dataLayerName:a,globalName:s};return l[h]=w,w}typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let d=bn({windowRef:r,dataLayerName:a}),y=[];d.setOnConfig((w,u)=>{for(let v of y)v(w,u)});let g=[];d.setOnSet(w=>{for(let u of g)u(w)});let p=tt({windowRef:r,getState:d.getState});p.attachLifecycleFlush(),d.setOnEvent((w,u)=>{p.enqueueEvent(w,u)});let c=ht({windowRef:r,getState:d.getState});c.start(),g.push(w=>{var u;w&&typeof w=="object"&&w.type==="field"&&w.field==="linker"&&c.updateConfigPatch(w.value),w&&typeof w=="object"&&w.type==="object"&&c.updateConfigPatch((u=w==null?void 0:w.obj)==null?void 0:u.linker),c.applyIncomingIfReady()}),y.push(()=>c.applyIncomingIfReady());let k=st({windowRef:r,getState:d.getState,dataLayerName:m});d.start(),k.start();try{let w=ct({windowRef:r,getState:d.getState,dispatcher:p});y.push(()=>w.onConfig()),w.start()}catch(w){}let S={consumer:d,dispatcher:p,dataLayerName:a,globalName:s};return l[h]=S,b[a]=S,S}export{po as installD8a,en as version};
|
|
3
3
|
//# sourceMappingURL=index.min.mjs.map
|
package/dist/wt.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* web-tracker - built 2026-05-
|
|
2
|
-
"use strict";(()=>{function Y(e,n){return e[n]}function se(e,n,t){e[n]=t}function ae(e,n){let t=Y(e,n);if(Array.isArray(t))return t;let o=[];return se(e,n,o),o}function Ge({windowRef:e,dataLayerName:n="d8aLayer"}){let t=e;if(!t)throw new Error("createD8aGlobal: windowRef is required");function o(...r){ae(t,n).push(arguments)}return o.js=r=>o("js",r),o.config=(r,i)=>o("config",r,i),o.event=(r,i)=>o("event",r,i),o.set=(r,i)=>i===void 0?o("set",r):o("set",r,i),o.consent=(r,i)=>o("consent",r,i),o}function yn(){return{jsDate:null,pageLoadMs:null,propertyIds:[],propertyConfigs:{},primaryPropertyId:"",consent:{},consentDefault:{},consentUpdate:{},consentGtag:{},consentDefaultGtag:{},consentUpdateGtag:{},userId:null,set:{},linker:{domains:[]},incomingDl:null,events:[],__onEvent:null,__onConfig:null,__onSet:null,hitCounter:0,sessionEngagementMs:0,sessionEngaged:!1,anonCid:null,cookieAttrsSig:null,sharedSessionTokens:null,sharedSessionValue:null,emInstalled:!1,emSiteSearchFired:!1,__lastEffectiveAnalyticsStorage:void 0}}function pe(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{};return t&&Object.keys(t).length>0?t:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{}}function Sn(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{},o=n!=null&&n.consentDefaultGtag&&typeof n.consentDefaultGtag=="object"?n.consentDefaultGtag:{},r=n!=null&&n.consentUpdateGtag&&typeof n.consentUpdateGtag=="object"?n.consentUpdateGtag:{};return t&&Object.keys(t).length>0||o&&Object.keys(o).length>0||r&&Object.keys(r).length>0?{consent:t,consentDefault:o,consentUpdate:r}:{consent:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{},consentDefault:n!=null&&n.consentDefault&&typeof n.consentDefault=="object"?n.consentDefault:{},consentUpdate:n!=null&&n.consentUpdate&&typeof n.consentUpdate=="object"?n.consentUpdate:{}}}function Pt(e){if(typeof queueMicrotask=="function"){queueMicrotask(e);return}Promise.resolve().then(e)}function Ie(e){let n=typeof e=="function"?e():null;if(!n)return;let t=pe(e),o=t&&typeof t.analytics_storage=="string"?t.analytics_storage:void 0,r=n.__lastEffectiveAnalyticsStorage;if(r===void 0){n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitScheduled||(n.__consentPingInitScheduled=!0,Pt(()=>{n.__consentPingInitDone=!0}));return}o!==r&&(n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitDone&&(!Array.isArray(n.propertyIds)||n.propertyIds.length===0||typeof n.__onEvent=="function"&&n.__onEvent("user_engagement",{consent_update:1})))}function R(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function hn(e){if(!R(e))return null;let n=e.user_id;if(typeof n!="string")return null;let t=n.trim();return t||null}function Nt(e){if(!R(e))return;let n=e.send_page_view;return typeof n=="boolean"?n:void 0}function Et(e){return R(e)?e:{}}function _n(e,n){if(!e||!R(n))return;let t={...e.linker||{domains:[]}},o=n.domains;if(Array.isArray(o)){let m=o.filter(l=>typeof l=="string"&&l.trim()).map(l=>l.trim());t.domains=m}let r=n.accept_incoming;typeof r=="boolean"&&(t.accept_incoming=r);let i=n.decorate_forms;typeof i=="boolean"&&(t.decorate_forms=i);let a=n.url_position,s=typeof a=="string"?a:"";(s==="query"||s==="fragment")&&(t.url_position=s),Array.isArray(t.domains)||(t.domains=[]),e.linker=t}function wn({windowRef:e,dataLayerName:n="d8aLayer"}){if(!e)throw new Error("createQueueConsumer: windowRef is required");let t=e,o=yn(),r=!1,i=null,a=!1;function s(f){let d=R(f)?f.length:null;return f&&typeof d=="number"&&typeof f!="string"?Array.from(f):Array.isArray(f)?f:null}function m(f){var p,c;let d=f[0],y=f[1],g=f[2];switch(String(d||"")){case"js":{o.jsDate=y instanceof Date?y:new Date(y),o.pageLoadMs==null&&o.jsDate instanceof Date&&!Number.isNaN(o.jsDate.getTime())&&(o.pageLoadMs=o.jsDate.getTime());return}case"config":{let k=String(y||"");if(!k)return;o.propertyIds.includes(k)||o.propertyIds.push(k),o.primaryPropertyId||(o.primaryPropertyId=k);let S=o.propertyConfigs[k]||{},w=R(g)?g:{};o.propertyConfigs[k]={...S,...w};let u=hn(w);u&&(o.userId=u),typeof o.__onConfig=="function"&&o.__onConfig(k,w),Nt(w)!==!1&&typeof o.__onEvent=="function"&&o.__onEvent("page_view",{send_to:k});return}case"consent":{let k=String(y||"");if(k==="default"||k==="update"){let S=Et(g);k==="default"?o.consentDefault={...o.consentDefault||{},...S||{}}:o.consentUpdate={...o.consentUpdate||{},...S||{}},o.consent={...o.consentDefault||{},...o.consentUpdate||{}},Ie(()=>o)}return}case"set":{if(typeof y=="string"&&y.trim()){let k=y.trim();k==="linker"?_n(o,g):o.set={...o.set||{},[k]:g},k==="user_id"&&typeof g=="string"&&g.trim()&&(o.userId=g.trim());let S={type:"field",field:k,value:g};(p=o.__onSet)==null||p.call(o,S);return}if(R(y)){o.set={...o.set||{},...y};let k=hn(y);k&&(o.userId=k),"linker"in y&&_n(o,y.linker);let S={type:"object",obj:y};(c=o.__onSet)==null||c.call(o,S)}return}case"event":{let k=R(g)?g:{};o.events.push({name:String(y||""),params:k}),typeof o.__onEvent=="function"&&o.__onEvent(String(y||""),k);return}default:return}}function l(){let f=n,d=Y(t,f),y=Array.isArray(d)?d:ae(t,f);for(let g of y){let p=s(g);p&&m(p)}}function b(){let d=ae(t,n);if(d.__d8aQueueConsumerPatched){i=d.__d8aQueueConsumerOriginalPush||null,a=!1;return}i=d.push.bind(d),d.__d8aQueueConsumerOriginalPush=i,d.push=function(...g){let p=g[0],c=s(p);return c&&m(c),i(...g)},d.__d8aQueueConsumerPatched=!0,a=!0}function h(){r||(r=!0,l(),b())}return{start:h,getState:()=>o,setOnEvent:f=>{o.__onEvent=f},setOnConfig:f=>{o.__onConfig=f},setOnSet:f=>{o.__onSet=f},stop:()=>{if(!r)return;let d=Y(t,n);if(a&&i&&Array.isArray(d)){let y=d;y.push=i;try{delete y.__d8aQueueConsumerPatched,delete y.__d8aQueueConsumerOriginalPush}catch(g){}}r=!1}}}function qe(e){return Math.floor((Number(e!=null?e:Date.now())||Date.now())/1e3)}function Ue(){return Math.floor(Math.random()*2147483647)}function He(e,n){let t=typeof e=="string"?e:"",o=String(n||"");return t?t.endsWith("_")&&o.startsWith("_")?`${t.slice(0,-1)}${o}`:`${t}${o}`:o}function ce(e){return He(e,"_d8a")}function ue(e,n){return He(n,`_d8a_${e}`)}function te(e){let t=String(e||"").match(/^C1\.1\.([0-9]+)\.([0-9]+)$/);return t?{cid:`${t[1]}.${t[2]}`}:null}function ze({nowMs:e}={}){return{random:Ue(),timestampSec:qe(e)}}function Cn({random:e,timestampSec:n}){return`${e}.${n}`}function xn({nowMs:e}={}){let{random:n,timestampSec:t}=ze({nowMs:e});return`C1.1.${n}.${t}`}function Ln(e){let t=String(e||"").trim().match(/^([0-9]+)\.([0-9]+)$/);return t?`C1.1.${t[1]}.${t[2]}`:null}var Te="S1.1.",Ve=new Set(["s","o","g","t","j","d"]);function vn(e){let n=String(e||"");return n.startsWith(Te)?n.slice(Te.length).split("$").map(i=>i.trim()).filter(Boolean).map(i=>{let a=i[0],s=i.slice(1);return{key:a,val:s,raw:i,known:Ve.has(a)}}):null}function Rn(e){let n=e.map(t=>`${t.key}${t.val}`);return`${Te}${n.join("$")}`}function de(e,n){let t=e.find(o=>o.key===n);return t?t.val:null}function K(e,n,t){let o=e.findIndex(r=>r.key===n);o>=0?e[o]={...e[o],val:String(t),known:Ve.has(n)}:e.push({key:n,val:String(t),known:Ve.has(n)})}function bn(){let e=Ue().toString(36),n=Ue().toString(36),t=Ue().toString(36);return`${e}${n}${t}`}function le(e){let n=vn(e);if(!n)return null;let t=de(n,"s"),o=de(n,"o"),r=de(n,"t"),i=de(n,"g"),a=t!=null?Number(t):NaN,s=o!=null?Number(o):NaN,m=r!=null?Number(r):NaN,l=i!=null?Number(i):NaN;return{tokens:n,sid:Number.isFinite(a)?a:null,sct:Number.isFinite(s)?s:null,lastEventTs:Number.isFinite(m)?m:null,seg:Number.isFinite(l)?l:null}}function je(e,{nowMs:n,sessionTimeoutMs:t}={}){var h,f,d;let o=qe(n),r=Math.floor((Number(t!=null?t:1800*1e3)||0)/1e3),i=Array.isArray(e)&&e.length>0,a=i?e.map(y=>({...y})):[];if(!i)return K(a,"s",o),K(a,"o",1),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",bn()),{tokens:a,isNewSession:!0};let s=Number((h=de(a,"t"))!=null?h:NaN);if(!Number.isFinite(s)||o-s>r){let y=Number((f=de(a,"o"))!=null?f:NaN),g=Number.isFinite(y)?y+1:1;return K(a,"s",o),K(a,"o",g),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",bn()),{tokens:a,isNewSession:!0}}let b=Number((d=de(a,"j"))!=null?d:0);return K(a,"j",Number.isFinite(b)?b+1:1),K(a,"t",o),{tokens:a,isNewSession:!1}}function Ke(e){return Rn(e)}var Me={SESSION_PREFIX:Te,tokenizeSessionCookie:vn,detokenizeSessionCookie:Rn,getToken:de,setToken:K,nowSeconds:qe,applyCookiePrefix:He};function An(e){let n=String(e||"").trim();if(!n)return["none"];let t=n.split(".");if(t.length===4){let r=t[t.length-1];if(String(Number(r))===r)return["none"]}let o=[];for(let r=t.length-2;r>=0;r-=1)o.push(t.slice(r).join("."));return o.push("none"),o}function Dn(e){return String(e).replace(/\/+$/,"")}function ke(e){let n=new Map,t=String(e||"");if(!t)return n;for(let o of t.split(";")){let r=o.trim();if(!r)continue;let i=r.indexOf("=");if(i<0)continue;let a=r.slice(0,i).trim(),s=r.slice(i+1).trim();a&&n.set(a,s)}return n}function It(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function Pn(e,n,t){let o=[];return o.push(`${e}=${n}`),t.path&&o.push(`Path=${String(t.path)}`),t.expires&&o.push(`Expires=${t.expires.toUTCString()}`),t.maxAgeSeconds!=null&&o.push(`Max-Age=${String(t.maxAgeSeconds)}`),t.sameSite&&o.push(`SameSite=${String(t.sameSite)}`),t.domain&&o.push(`Domain=${String(t.domain)}`),t.secure&&o.push("Secure"),o.join("; ")}function Ut(e){return e&&(e==="none"?null:e.startsWith(".")?e:`.${e}`)}function We({windowRef:e}){let n=e;if(!(n!=null&&n.document))throw new Error("createCookieJar: windowRef.document is required");let t=n.document;function o(){var s;return ke((s=n.document)==null?void 0:s.cookie)}function r(s){return o().get(s)}function i(s,m,l={}){var v,P,N;let b=l.path||"/",h=It(n),f=l.sameSite||"Lax",d=!h&&String(f).toLowerCase()==="none"?"Lax":f,y=l.secure!=null?!!l.secure&&h:h,g=(v=l.maxAgeSeconds)!=null?v:null,p=(P=l.expires)!=null?P:null,c={path:b,sameSite:d,secure:y,maxAgeSeconds:g,expires:p},k=l.domain||"auto",S=String(((N=n.location)==null?void 0:N.hostname)||""),w=k==="auto"?An(S):[k],u=[];for(let W of w){let x=Ut(W),U=Pn(s,m,{...c,domain:x}),I=String(t.cookie||"");t.cookie=U;let H=String(t.cookie||""),z=I!==H||r(s)===m;if(u.push({candidate:W,domain:W==="none"?null:x,cookieStr:U,before:I,after:H,readBack:r(s),stuck:z}),z)return{ok:!0,domain:W==="none"?null:x,cookieStr:U,attempts:u}}return{ok:!1,domain:null,cookieStr:null,attempts:u}}function a(s,m={}){return i(s,"deleted",{...m,expires:new Date(0)})}return{get:r,set:i,del:a,__internal:{parseCookieHeader:ke,buildSetCookieString:Pn}}}var Nn=new Set(["value","tax","shipping"]),En={item_id:"id",item_name:"nm",affiliation:"af",coupon:"cp",discount:"ds",index:"lp",item_brand:"br",item_category:"ca",item_category2:"c2",item_category3:"c3",item_category4:"c4",item_category5:"c5",item_list_id:"li",item_list_name:"ln",item_variant:"va",location_id:"lo",price:"pr",quantity:"qt",promotion_id:"pi",promotion_name:"pn"};function Tt(e){return!!e&&typeof e=="object"}function Se(e){return e==null?null:typeof e=="string"?e:typeof e=="boolean"?e?"1":"0":typeof e=="number"?String(e):Array.isArray(e)?e.join(","):String(e)}function Mt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return e?1:0;if(typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:null}return null}function ye(e,n,t){t!=null&&e.set(`ep.${n}`,String(t))}function In(e,n,t){t!=null&&e.set(`epn.${n}`,String(t))}function Wt(e){let n=Tt(e)?e:{},t=[],o=[];for(let[i,a]of Object.entries(En)){if(!(i in n))continue;let s=n[i],m=Se(s);m!=null&&t.push(`${a}${m}`)}let r=0;for(let i of Object.keys(n)){if(i in En)continue;let a=n[i],s=Se(a);s!=null&&(o.push(`k${r}${i}`),o.push(`v${r}${s}`),r+=1)}return[...t,...o].join("~")}function Un({propertyId:e,eventName:n,eventParams:t,cookieHeader:o,clientId:r,userId:i,cookiePrefix:a,ignoreReferrer:s,browser:m,pageLoadMs:l,hitCounter:b,engagementTimeMs:h,uachParams:f,campaign:d,contentGroup:y,consentParams:g,debugMode:p}){let c=new URLSearchParams;c.set("v","2"),c.set("tid",String(e||"")),c.set("en",String(n||"")),p===!0&&c.set("_dbg","1"),l!=null&&c.set("_p",String(l)),b!=null&&c.set("_s",String(b)),h!=null&&c.set("_et",String(h));let k=ke(o);if(r!=null&&String(r))c.set("cid",String(r));else{let x=te(k.get(ce(a)));x!=null&&x.cid&&c.set("cid",x.cid)}typeof i=="string"&&i.trim()&&c.set("uid",i.trim());let S=d||{};typeof S.campaign_id=="string"&&S.campaign_id.trim()&&c.set("ci",S.campaign_id.trim()),typeof S.campaign_source=="string"&&S.campaign_source.trim()&&c.set("cs",S.campaign_source.trim()),typeof S.campaign_medium=="string"&&S.campaign_medium.trim()&&c.set("cm",S.campaign_medium.trim()),typeof S.campaign_name=="string"&&S.campaign_name.trim()&&c.set("cn",S.campaign_name.trim()),typeof S.campaign_term=="string"&&S.campaign_term.trim()&&c.set("ct",S.campaign_term.trim()),typeof S.campaign_content=="string"&&S.campaign_content.trim()&&c.set("cc",S.campaign_content.trim()),typeof y=="string"&&y.trim()&&ye(c,"content_group",y.trim());let w=ue(e,a),u=le(k.get(w));(u==null?void 0:u.sid)!=null?c.set("sid",String(u.sid)):c.set("sid",String(Math.floor(Date.now()/1e3))),(u==null?void 0:u.sct)!=null?c.set("sct",String(u.sct)):c.set("sct","1"),(u==null?void 0:u.seg)!=null&&c.set("seg",String(u.seg));let v=m;if(v.dl&&c.set("dl",String(v.dl)),v.dt&&c.set("dt",String(v.dt)),s===!0&&c.set("ir","1"),c.set("dr",String(v.dr)),v.ul&&c.set("ul",String(v.ul)),v.sr&&c.set("sr",String(v.sr)),f)for(let[x,U]of Object.entries(f))U==null||U===""||c.set(x,String(U));g&&(g.gcs&&c.set("gcs",String(g.gcs)),g.gcd&&c.set("gcd",String(g.gcd)));let P=t||{};p===!0&&!Object.prototype.hasOwnProperty.call(P,"debug_mode")&&ye(c,"debug_mode","1");let N=P.currency;typeof N=="string"&&c.set("cu",N),P.transaction_id!=null&&ye(c,"transaction_id",Se(P.transaction_id)),P.coupon!=null&&ye(c,"coupon",Se(P.coupon)),P.customer_type!=null&&ye(c,"customer_type",Se(P.customer_type));for(let x of Nn)P[x]!=null&&In(c,x,Mt(P[x]));let W=P.items;if(Array.isArray(W)){let x=W.slice(0,200);for(let U=0;U<x.length;U+=1){let I=Wt(x[U]);I&&c.set(`pr${U+1}`,I)}}for(let x of Object.keys(P)){if(x==="items"||x==="currency"||x==="transaction_id"||x==="coupon"||x==="customer_type"||Nn.has(x)||x==="user_id"||x==="client_id"||x==="campaign_id"||x==="campaign_source"||x==="campaign_medium"||x==="campaign_name"||x==="campaign_term"||x==="campaign_content"||x==="page_location"||x==="page_title"||x==="page_referrer"||x==="content_group"||x==="ignore_referrer"||x==="language"||x==="screen_resolution"||x==="cookie_domain"||x==="cookie_expires"||x==="cookie_flags"||x==="cookie_path"||x==="cookie_prefix"||x==="cookie_update"||x==="send_page_view"||x==="send_to")continue;let U=P[x];typeof U=="number"?In(c,x,U):ye(c,x,Se(U))}return c}function $t(e){return/^https?:\/\//i.test(String(e||""))}function Qe(e){if(typeof e=="string"&&$t(e))return Qe({server_container_url:e});let t=((e&&typeof e=="object"?e:{}).server_container_url||"").trim();if(!t)throw new Error("server_container_url is required");return Dn(t)}function Tn(e){let n=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.href)||"")}catch(m){return""}})(),t=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.title)||"")}catch(m){return""}})(),o=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.referrer)||"")}catch(m){return""}})(),r=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.hostname)||"")}catch(m){return""}})(),i=(()=>{var s;try{return String(((s=e==null?void 0:e.navigator)==null?void 0:s.language)||"").toLowerCase()}catch(m){return""}})(),a=(()=>{var s,m;try{let l=(s=e==null?void 0:e.screen)==null?void 0:s.width,b=(m=e==null?void 0:e.screen)==null?void 0:m.height;if(typeof l=="number"&&typeof b=="number")return`${l}x${b}`}catch(l){}return""})();return{dl:n,dt:t,dr:o,dh:r,ul:i,sr:a}}function Ot(e){return new Promise(n=>setTimeout(n,e))}function Bt(e){return e===429||e>=500}async function Mn({url:e,windowRef:n,useBeacon:t,maxRetries:o=1,initialBackoffMs:r=200}){var h;let i=n,a=(h=i==null?void 0:i.navigator)==null?void 0:h.sendBeacon;if(t&&typeof a=="function")try{return a.call(i.navigator,e),{ok:!0,via:"beacon"}}catch(f){}let s=i==null?void 0:i.fetch;if(typeof s!="function")throw new Error("fetch is not available");let m={method:"POST",keepalive:!0,credentials:"include",cache:"no-store",redirect:"follow",mode:"no-cors"},l=0,b=r;for(;;){l+=1;try{let f=await s.call(i,e,m),d=typeof(f==null?void 0:f.status)=="number"?f.status:0;if(!Bt(d))return{ok:!0,via:"fetch",status:d}}catch(f){}if(l>o)return{ok:!1,via:"fetch",status:null};await Ot(b),b*=2}}function Re(e){return String((e||{}).analytics_storage||"").toLowerCase()!=="denied"}var Je=2*365*24*60*60;function Ye({jar:e,consent:n,nowMs:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=ce(r),f=e==null?void 0:e.get(h),d=te(f);if(d!=null&&d.cid)return Re(n||{})?l===!1&&!b?{cid:d.cid,wrote:!1}:(e==null||e.set(h,String(f||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:d.cid,wrote:!0}):{cid:d.cid,wrote:!1};let y=xn({nowMs:t}),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(n||{})?l===!1&&f?{cid:p,wrote:!1}:(e==null||e.set(h,y,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p,wrote:!0}):{cid:p,wrote:!1}}function Wn({jar:e,cid:n,consent:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=typeof n=="string"?n.trim():String(n||"").trim(),f=Ln(h);if(!f)return{cid:null,wrote:!1};let d=ce(r),y=e==null?void 0:e.get(d),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(t||{})?y&&l===!1?b?(e==null||e.set(d,String(y||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p||h,wrote:!0}):{cid:p||h,wrote:!1}:(e==null||e.set(d,f,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:h,wrote:!0}):{cid:h,wrote:!1}}function $n({jar:e,propertyId:n,value:t,consent:o,cookieDomain:r="auto",cookiePrefix:i="",cookiePath:a="/",cookieSameSite:s="Lax",cookieSecure:m=void 0,cookieMaxAgeSeconds:l=Je,cookieUpdate:b=!0,forceCookieAttrsWrite:h=!1}={}){var p;let f=String(n||"");if(!f)return{wrote:!1};let d=String(t||"");if(!((p=le(d))!=null&&p.tokens))return{wrote:!1};let y=ue(f,i),g=e==null?void 0:e.get(y);return Re(o||{})?g&&b===!1?h?(e==null||e.set(y,String(g||""),{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}:(e==null||e.set(y,d,{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}}var Ft=["platform","platformVersion","architecture","model","bitness","fullVersionList","wow64","mobile"];function Bn(e){e.d8a_tag_data=e.d8a_tag_data||{};let n=e.d8a_tag_data,t=n.uach_store;return R(t)||(n.uach_store={}),n.uach_store}function Gt(e){let n=e.navigator;if(!R(n))return!1;let t=n.userAgentData;return R(t)?typeof t.getHighEntropyValues=="function":!1}function Fn(e){return Bn(e).uach||null}function Gn(e){if(!Gt(e))return null;let n=Bn(e);return n.uach_promise||(n.uach_promise=e.navigator.userAgentData.getHighEntropyValues(Ft).then(t=>(n.uach=n.uach||t,n.uach))),n.uach_promise}function On(e){return encodeURIComponent(String(e||""))}function Vn(e){if(!e)return null;let n={};return e.architecture&&(n.uaa=String(e.architecture)),e.bitness&&(n.uab=String(e.bitness)),Array.isArray(e.fullVersionList)&&(n.uafvl=e.fullVersionList.map(t=>`${On(t.brand||"")};${On(t.version||"")}`).join("|")),n.uamb=e.mobile?"1":"0",e.model&&(n.uam=String(e.model)),e.platform&&(n.uap=String(e.platform)),e.platformVersion&&(n.uapv=String(e.platformVersion)),n.uaw=e.wow64?"1":"0",n}function qn(e){switch(e){case 1:return"1";case 2:case 4:return"0";default:return"-"}}function Hn(e){return String(e||"").toLowerCase()==="denied"?2:1}function zn({consent:e}){let n=e||{},t=Hn(n.ad_storage),o=Hn(n.analytics_storage);return`G1${qn(t)}${qn(o)}`}function jn({consentDefault:e,consentUpdate:n}){let t=e||{},o=n||{};function r(m){let l=String(m||"").toLowerCase();return l==="granted"?"granted":l==="denied"?"denied":null}function i(m,l){let b=r(m),h=r(l);return!b&&!h?"l":b==="denied"&&!h?"p":b==="granted"&&!h?"t":!b&&h==="denied"?"m":!b&&h==="granted"?"n":b==="denied"&&h==="denied"?"q":b==="granted"&&h==="granted"?"v":b==="denied"&&h==="granted"?"r":b==="granted"&&h==="denied"?"u":"l"}let a=[["ad_storage","3"],["analytics_storage","3"],["ad_user_data","2"],["ad_personalization","5"]],s="13";for(let[m,l]of a)s+=`${i(t[m],o[m])}${l}`;return s+="l1",s}function Kn(){let e=ze({nowMs:Date.now()});return Cn(e)}function Qn({windowRef:e,state:n}){return n?(typeof n.anonCid=="string"&&n.anonCid||(n.anonCid=Kn()),n.anonCid):Kn()}function Jn({windowRef:e,nowMs:n=()=>Date.now()}={}){if(!e)throw new Error("createEngagementTimer: windowRef is required");let t=e,o=!1,r=!0,i=!0,a=!0,s=null,m=0;function l(){var u;try{if(typeof t.hasFocus=="function")return!!t.hasFocus();if(typeof((u=t.document)==null?void 0:u.hasFocus)=="function")return!!t.document.hasFocus()}catch(v){}return!0}function b(){var u,v;try{if(typeof((u=t.document)==null?void 0:u.hidden)=="boolean")return!t.document.hidden;if(typeof((v=t.document)==null?void 0:v.visibilityState)=="string")return t.document.visibilityState!=="hidden"}catch(P){}return!0}function h(){return r&&i&&a}function f(){let u=n();if(s!=null){let v=Math.max(0,u-s);m+=v,s=u}h()?s==null&&(s=u):s=null}function d(){f(),r=!0,f()}function y(){f(),r=!1,f()}function g(){f(),i=b(),f()}function p(){f(),a=!0,f()}function c(){f(),a=!1,f()}function k(){var u;o||(o=!0,r=l(),i=b(),a=!0,f(),typeof t.addEventListener=="function"&&(t.addEventListener("focus",d),t.addEventListener("blur",y),t.addEventListener("pageshow",p),t.addEventListener("pagehide",c)),typeof((u=t.document)==null?void 0:u.addEventListener)=="function"&&t.document.addEventListener("visibilitychange",g))}function S(){return f(),m|0}function w(){f();let u=m|0;return m=0,s=h()?n():null,u}return{start:k,peek:S,getAndReset:w,__internal:{sync:f}}}function oe(e){let n=typeof e=="function"?e():null;return Array.isArray(n==null?void 0:n.propertyIds)&&n.propertyIds.length>0?n.propertyIds.slice():[]}function ne(e,n){var r;let t=typeof e=="function"?e():null,o=(r=t==null?void 0:t.propertyConfigs)==null?void 0:r[n];return o&&typeof o=="object"?o:{}}function he(e){let n=typeof e=="function"?e():null;return n!=null&&n.set&&typeof n.set=="object"?n.set:{}}function Yn({enabled:e}){return{enabled:e===!0,log:(...n)=>{if(e===!0)try{console.log(...n)}catch(t){}}}}function Xn({key:e,eventParams:n,config:t,setParams:o}){let r=n||{},i=t||{},a=o||{};return Object.prototype.hasOwnProperty.call(r,e)&&r[e]!=null?r[e]:Object.prototype.hasOwnProperty.call(i,e)&&i[e]!=null?i[e]:Object.prototype.hasOwnProperty.call(a,e)&&a[e]!=null?a[e]:null}function Q({key:e,eventParams:n,config:t,setParams:o}){let r=Xn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="string"&&r.trim()?r.trim():null}function Xe({key:e,eventParams:n,config:t,setParams:o}){let r=Xn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="boolean"?r:null}function Vt(e){let n=typeof e=="string"?e:"";if(!n.trim())return{};let t=n.split(";").map(r=>r.trim()).filter(Boolean),o={};for(let r of t){let i=r.toLowerCase();if(i==="secure"&&(o.secure=!0),i.startsWith("samesite=")){let s=r.split("=").slice(1).join("=").trim().toLowerCase();s==="lax"&&(o.sameSite="Lax"),s==="strict"&&(o.sameSite="Strict"),s==="none"&&(o.sameSite="None")}}return o}function _e({propertyCfg:e,setParams:n,https:t,state:o,isDebugEnabled:r}){var U,I,H,z,J,T,re;let i=R(e)?e:{},a=R(n)?n:{},s=(U=i.cookie_domain)!=null?U:a.cookie_domain,m=typeof s=="string"&&s.trim()?s:s==null?"auto":String(s),l=(I=i.cookie_prefix)!=null?I:a.cookie_prefix,b=typeof l=="string"?l:"",h=(H=i.cookie_path)!=null?H:a.cookie_path,f=typeof h=="string"&&h.trim()?h:"/",d=(z=i.cookie_update)!=null?z:a.cookie_update,y=typeof d=="boolean"?d:!0,g=(J=i.cookie_expires)!=null?J:a.cookie_expires,p=Number.isFinite(Number(g))?Number(g):null,c=p!=null?p:2*365*24*60*60,k=(re=(T=i.cookie_flags)!=null?T:a.cookie_flags)!=null?re:"",S=Vt(k),w=S.sameSite||"Lax",u=t===!0&&S.secure===!0?!0:t===!0,v=typeof r=="function"?r({config:i,setParams:a}):!1,P=JSON.stringify({domain:m,prefix:b,path:f,sameSite:w,secure:u,maxAgeSeconds:c}),N=`${b}|${m}|${f}`;o&&!o.cookieAttrsSig&&(o.cookieAttrsSig={});let x=(o!=null&&o.cookieAttrsSig?o.cookieAttrsSig[N]:void 0)!==P;return o!=null&&o.cookieAttrsSig&&(o.cookieAttrsSig[N]=P),{cookieDomain:m,cookiePrefix:b,cookiePath:f,cookieSameSite:w,cookieSecure:u,cookieUpdate:y,cookieMaxAgeSeconds:c,forceCookieAttrsWrite:x,debug:v}}function Ze(e){return R(e)?{ok:e.ok,domain:e.domain,cookieStr:e.cookieStr,attempts:e.attempts}:{}}function Zn({state:e,destinations:n,jar:t,getPropertyConfig:o,resolveCookieSettings:r,sessionTimeoutMs:i,engagementTimeMs:a,engagedThresholdMs:s,nowMs:m,log:l}){var p,c,k;if(!e||!Array.isArray(n)||n.length===0||!t||typeof o!="function"||typeof r!="function")return;let b=Number.isFinite(Number(m))?Number(m):Date.now(),h=Array.isArray(e.sharedSessionTokens)?e.sharedSessionTokens:null;if(!h)for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v),N=le(P);if(N!=null&&N.tokens){h=N.tokens;break}}let f=je(h||null,{nowMs:b,sessionTimeoutMs:i});f.isNewSession&&(e.sessionEngagementMs=0,e.sessionEngaged=!1);let d=Me.getToken(f.tokens,"g");e.sessionEngagementMs=(Number(e.sessionEngagementMs)||0)+(Number(a)||0),!e.sessionEngaged&&Number(s)>0&&e.sessionEngagementMs>=Number(s)&&(Me.setToken(f.tokens,"g",1),e.sessionEngaged=!0);let y=Me.getToken(f.tokens,"g"),g=f.isNewSession||d!==y;e.sharedSessionTokens=f.tokens,e.sharedSessionValue=Ke(f.tokens);for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v);if(!P){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(p=u.cookieMaxAgeSeconds)!=null?p:void 0});u.debug&&(l==null||l("[d8a] set session cookie (create)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.cookieUpdate===!0||g){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(c=u.cookieMaxAgeSeconds)!=null?c:void 0});u.debug&&(l==null||l("[d8a] set session cookie (value+attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.forceCookieAttrsWrite){let N=t.set(v,P,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(k=u.cookieMaxAgeSeconds)!=null?k:void 0});u.debug&&(l==null||l("[d8a] set session cookie (attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}u.debug&&(l==null||l("[d8a] set session cookie (no write)",{pid:S,cookieName:v,reason:"cookie_update=false and session value unchanged and force_cookie_attrs_write=false",cookieUpdate:u.cookieUpdate,shouldWriteSessionValue:g,forceCookieAttrsWrite:u.forceCookieAttrsWrite,cookieReadBack:t.get(v)}))}}var et="v1.1.0";var qt="wt";function nt(e){e.set("_dtv",et),e.set("_dtn",qt)}function Ht(e){return typeof e=="string"&&e.trim()?[e.trim()]:Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()).map(n=>String(n).trim()):null}var zt=new Set(["send_to","user_id","client_id","campaign_id","campaign_source","campaign_medium","campaign_name","campaign_term","campaign_content","page_location","page_title","page_referrer","content_group","ignore_referrer","language","screen_resolution","cookie_domain","cookie_expires","cookie_flags","cookie_path","cookie_prefix","cookie_update","send_page_view","session_engagement_time_sec","site_search_enabled","site_search_query_params","outbound_clicks_enabled","outbound_exclude_domains","file_downloads_enabled","file_download_extensions","linker"]);function jt(e){let n={};for(let[t,o]of Object.entries(e||{}))zt.has(t)||(n[t]=o);return n}function tt({windowRef:e,getState:n}){let t=e;if(!t)throw new Error("createDispatcher: windowRef is required");let o=[],r=null,i=!1,a=We({windowRef:t});Gn(t);let s=Jn({windowRef:t});s.start();let m=1e4;function l(){let S=oe(n)[0]||"";return S?ne(n,S):{}}function b({config:k,setParams:S}){let w=R(k)?k:{},u=R(S)?S:{};return w.debug_mode===!0||u.debug_mode===!0}function h(){var k;try{return String(((k=t==null?void 0:t.location)==null?void 0:k.protocol)||"").toLowerCase()==="https:"}catch(S){return!1}}function f(){let k=n();return k?k.pageLoadMs!=null?k.pageLoadMs:k.jsDate instanceof Date&&!Number.isNaN(k.jsDate.getTime())?(k.pageLoadMs=k.jsDate.getTime(),k.pageLoadMs):(k.pageLoadMs=Date.now(),k.pageLoadMs):null}function d(k,S){var v;o.push({name:k,params:S||{}});let w=l(),u=Number((v=w==null?void 0:w.max_batch_size)!=null?v:25);if(o.length>=u){g({useBeacon:!1});return}y()}function y(){var w;if(r!=null)return;let k=l(),S=Number((w=k==null?void 0:k.flush_interval_ms)!=null?w:1e3);r=t.setTimeout(()=>{r=null,g({useBeacon:!1})},S)}async function g({useBeacon:k}){var M,$,D,j,ie,q,Le,Z,X,Ae;if(r!=null&&(t.clearTimeout(r),r=null),o.length===0)return{sent:0};let S=oe(n),w=S[0]||"",u=w?ne(n,w):{},v=Number((M=u==null?void 0:u.max_batch_size)!=null?M:25),P=o.splice(0,v),N=pe(n),W=Sn(n),x=u.session_timeout_ms,U=typeof x=="number"?x:1800*1e3,I=n(),H=f(),z=String((N==null?void 0:N.analytics_storage)||"").toLowerCase(),J=z==="denied",T=I!=null&&I.set&&typeof I.set=="object"?I.set:{},re=jt(T),fe=h(),_=b({config:u,setParams:T}),C=(D=($=u==null?void 0:u.session_engagement_time_sec)!=null?$:T==null?void 0:T.session_engagement_time_sec)!=null?D:10,L=Number.isFinite(Number(C))?Number(C):10,A=Math.max(0,Math.floor(L*1e3)),E=Yn({enabled:_});E.log("[d8a] flush",{href:String(((j=t==null?void 0:t.location)==null?void 0:j.href)||""),propertyIds:S,analyticsStorage:z||"(unset)",analyticsDenied:J,cookieHeader:String(((ie=t==null?void 0:t.document)==null?void 0:ie.cookie)||"")});function O(ee){return _e({propertyCfg:ee,setParams:T,https:fe,state:I,isDebugEnabled:b})}let V=0;for(let ee of P){let De=R(ee.params)?ee.params:{},un=Ht(De.send_to),Pe=un||S;if(!Pe||Pe.length===0)continue;let F={...re,...De};delete F.send_to;let Be=s.getAndReset();!J&&I&&Zn({state:I,destinations:Pe,jar:a,getPropertyConfig:ve=>ne(n,ve),resolveCookieSettings:O,sessionTimeoutMs:U,engagementTimeMs:Be,engagedThresholdMs:A,nowMs:Date.now(),log:E.enabled?E.log:null}),I&&(I.hitCounter=(I.hitCounter||0)+1);let Ne=[];for(let ve of Pe){let G=ne(n,ve),wt=Qe(G),B=O(G),bt=Q({key:"user_id",eventParams:F,config:G,setParams:T}),Ct=Q({key:"client_id",eventParams:F,config:G,setParams:T}),xt=Xe({key:"debug_mode",eventParams:F,config:G,setParams:T})===!0,Lt={campaign_id:Q({key:"campaign_id",eventParams:F,config:G,setParams:T}),campaign_source:Q({key:"campaign_source",eventParams:F,config:G,setParams:T}),campaign_medium:Q({key:"campaign_medium",eventParams:F,config:G,setParams:T}),campaign_name:Q({key:"campaign_name",eventParams:F,config:G,setParams:T}),campaign_term:Q({key:"campaign_term",eventParams:F,config:G,setParams:T}),campaign_content:Q({key:"campaign_content",eventParams:F,config:G,setParams:T})},vt=Q({key:"content_group",eventParams:F,config:G,setParams:T}),Rt=Xe({key:"ignore_referrer",eventParams:F,config:G,setParams:T})===!0,me={...Tn(t)},ln=Q({key:"page_location",eventParams:F,config:G,setParams:T}),fn=Q({key:"page_title",eventParams:F,config:G,setParams:T}),dn=Q({key:"page_referrer",eventParams:F,config:G,setParams:T}),gn=Q({key:"language",eventParams:F,config:G,setParams:T}),mn=Q({key:"screen_resolution",eventParams:F,config:G,setParams:T});if(ln&&(me.dl=ln),fn&&(me.dt=fn),dn!=null&&(me.dr=dn),gn&&(me.ul=gn),mn&&(me.sr=mn),!J)if(B.debug){let Fe=ce(B.cookiePrefix),kn=a.get(Fe),Ee=Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(q=B.cookieMaxAgeSeconds)!=null?q:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite}),Dt=Ee!=null&&Ee.wrote?kn?"attrs update":"create":"no write";E.log(`[d8a] set client cookie (${Dt})`,{pid:ve,cookiePrefix:B.cookiePrefix,result:Ee,cookieName:Fe,cookieBefore:kn,cookieReadBack:a.get(Fe),documentCookie:String(((Le=t==null?void 0:t.document)==null?void 0:Le.cookie)||"")})}else Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(Z=B.cookieMaxAgeSeconds)!=null?Z:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite});let pn=Un({propertyId:ve,eventName:ee.name,eventParams:F,cookieHeader:J?"":String(((X=t.document)==null?void 0:X.cookie)||""),clientId:Ct||(J?Qn({windowRef:t,state:I}):null),userId:bt,cookiePrefix:B.cookiePrefix,browser:me,ignoreReferrer:Rt,pageLoadMs:H!=null?Number(H):null,hitCounter:(Ae=I==null?void 0:I.hitCounter)!=null?Ae:null,engagementTimeMs:Be!=null?Number(Be):null,uachParams:Vn(Fn(t)),campaign:Lt,contentGroup:vt||null,consentParams:{gcs:zn({consent:W.consent}),gcd:jn({consentDefault:W.consentDefault,consentUpdate:W.consentUpdate})},debugMode:xt});nt(pn);let At=`${wt}?${pn.toString()}`;Ne.push(Mn({url:At,windowRef:t,useBeacon:k}))}Ne.length>0&&(await Promise.all(Ne),V+=Ne.length)}return o.length>0&&y(),{sent:V}}function p({useBeacon:k=!1}={}){return g({useBeacon:k===!0})}function c(){var k;t!=null&&t.addEventListener&&(i||(i=!0,t.addEventListener("pagehide",()=>{try{oe(n).length>0&&s.peek()>0&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}),(k=t.document)!=null&&k.addEventListener&&t.document.addEventListener("visibilitychange",()=>{if(t.document.hidden){try{oe(n).length>0&&s.peek()>=m&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}})))}return{enqueueEvent:d,flush:g,flushNow:p,attachLifecycleFlush:c}}function we(e){return typeof e=="string"?e:""}function en(e,n){var t;try{let o=R(e)?e:null,r=o&&R(o.currentScript)?o.currentScript:null,i=we(r==null?void 0:r.src);if(!i)return"";let a=o&&R(o.location)?we((t=o.location)==null?void 0:t.href):"",s=new URL(i,a||void 0);return we(s.searchParams.get(n))}catch(o){return""}}function ot({windowRef:e,dataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"l");return o.trim()?o.trim():"d8aLayer"}function rt({windowRef:e,globalName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGlobalName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"g");return o.trim()?o.trim():"d8a"}function it({windowRef:e,gtagDataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGtagDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"gl");return o.trim()?o.trim():"dataLayer"}var $e="__d8aConsentBridgeHubs";function Kt(e){return R(e)}function nn(e,n){if(!e)return null;let t=String(n||"dataLayer"),o=Y(e,$e),r=Kt(o)?o:{};(!o||o!==r)&&se(e,$e,r);let i=r[t];if(i&&typeof i=="object")return i;let a={subscribers:new Set,originalPush:null,patched:!1,dataLayerName:t};return r[t]=a,a}function st({windowRef:e,getState:n,dataLayerName:t="dataLayer"}){if(!e)throw new Error("createGtagConsentBridge: windowRef is required");let o=e;if(!o)throw new Error("createGtagConsentBridge: windowRef is required");if(typeof n!="function")throw new Error("createGtagConsentBridge: getState is required");let r=!1,i=null;function a(d){let y=R(d)?d.length:null;if(d&&typeof y=="number"&&typeof d!="string")try{return Array.from(d)}catch(g){return null}return Array.isArray(d)?d:null}function s({action:d,patch:y}){let g=n();if(g){if(d==="default")g.consentDefaultGtag={...g.consentDefaultGtag||{},...y||{}};else if(d==="update")g.consentUpdateGtag={...g.consentUpdateGtag||{},...y||{}};else return;g.consentGtag={...g.consentDefaultGtag||{},...g.consentUpdateGtag||{}},Ie(n)}}function m(d){let[y,g,p]=d;if(y!=="consent")return null;let c=String(g||"");return c!=="default"&&c!=="update"||!R(p)?null:["consent",c,p]}function l(d){let y=m(d);if(!y)return;let[,g,p]=y;s({action:g,patch:p})}function b(){let y=Y(o,t);if(Array.isArray(y))for(let g of y){let p=a(g);p&&l(p)}}function h(){let d=t,y=ae(o,d),g=nn(o,d);g&&(g.patched||(g.originalPush=y.push.bind(y),y.push=function(...c){let k=c[0],S=a(k);if(S)for(let w of g.subscribers)try{w(S)}catch(u){}return g.originalPush(...c)},g.patched=!0,y.__d8aConsentBridgePatched=!0))}function f(){if(r)return;r=!0;let d=nn(o,t);d&&(d.subscribers.add(l),i=()=>{d.subscribers.delete(l)},b(),h())}return{start:f,stop:()=>{if(!r)return;let d=t,y=nn(o,d);if(!y)return;typeof i=="function"&&i(),i=null;let g=Y(o,d);if(y.subscribers.size===0&&y.originalPush&&Array.isArray(g)){let p=g;p.push=y.originalPush,y.originalPush=null,y.patched=!1;try{delete p.__d8aConsentBridgePatched;let c=Y(o,$e),k=R(c)?c:null;k&&(delete k[d],Object.keys(k).length===0&&se(o,$e,void 0))}catch(c){}}r=!1}}}function at(e,n=[]){return Array.isArray(e)?e.map(t=>String(t).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):n}function Qt(e,n){try{return new URL(String(e||""),n?String(n):void 0)}catch(t){return null}}function Jt(e){let n=e;for(let t=0;t<100&&n;t+=1){let o=R(n)?n:null,r=String((o==null?void 0:o.tagName)||"").toLowerCase();if(r==="a"||r==="area")return n;n=(o==null?void 0:o.parentNode)||null}return null}function ge(e,n){if(!e)return null;let t=R(e)?e:null;try{if(typeof(t==null?void 0:t.getAttribute)=="function"){let r=t.getAttribute(n);if(r!=null)return r}}catch(r){}let o=t?t[n]:null;return o!=null?String(o):null}function Yt(e){let n=String((e==null?void 0:e.protocol)||"").toLowerCase();return n==="http:"||n==="https:"}function Xt(e,n){let t=String(e||"").toLowerCase(),o=String(n||"").toLowerCase().replace(/^\./,"");return!t||!o?!1:t===o||t.endsWith(`.${o}`)}function Zt(e){return String((e==null?void 0:e.pathname)||"").split("/").filter(Boolean).slice(-1)[0]||""}function eo(e){let n=String(e||""),t=n.lastIndexOf(".");return t<0?"":n.slice(t+1).toLowerCase()}function tn(e){return String(e||"").replace(/\s+/g," ").trim()}function no(e){let n=ge(e,"id");return tn(n)||null}function to(e){let n=ge(e,"className")||ge(e,"class");return tn(n)||null}function oo(e){let n=ge(e,"textContent")||ge(e,"innerText");return tn(n)||null}function ct({windowRef:e,getState:n,dispatcher:t}){let o=e;if(!o)throw new Error("createEnhancedMeasurement: windowRef is required");if(typeof n!="function")throw new Error("createEnhancedMeasurement: getState is required");if(!t)throw new Error("createEnhancedMeasurement: dispatcher is required");function r(p,c){let k=p[c];return typeof k=="boolean"?k:void 0}function i(p,c){return p[c]}function a({propertyId:p,key:c,defaultValue:k}){let S=he(n),w=ne(n,p),u=r(w,c);if(u!=null)return u;let v=r(S,c);return v!=null?v:k}function s({propertyId:p,key:c,defaultList:k}){let S=he(n),w=ne(n,p),u=i(w,c),v=i(S,c);return u!=null?at(u,k):v!=null?at(v,k):k}function m(){let p=n();return!p||p.emInstalled?!1:(p.emInstalled=!0,!0)}function l(){let p=n();return!p||p.emSiteSearchFired?!1:(p.emSiteSearchFired=!0,!0)}function b(){var u;let p=oe(n);if(p.length===0||!l())return;let c=String(((u=o==null?void 0:o.location)==null?void 0:u.search)||"");if(!c||c==="?")return;let k=new URLSearchParams(c.startsWith("?")?c.slice(1):c),S=["q","s","search","query","keyword"],w=new Map;for(let v of p){if(!a({propertyId:v,key:"site_search_enabled",defaultValue:!0}))continue;let N=s({propertyId:v,key:"site_search_query_params",defaultList:S}),W="";for(let U of N){let I=k.get(U);if(I&&String(I).trim()){W=String(I).trim();break}}if(!W)continue;let x=w.get(W)||[];x.push(v),w.set(W,x)}for(let[v,P]of w.entries())t.enqueueEvent("view_search_results",{search_term:v,send_to:P})}function h({propertyId:p,linkHostname:c}){var w;if(!a({propertyId:p,key:"outbound_clicks_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"outbound_exclude_domains",defaultList:[String(((w=o==null?void 0:o.location)==null?void 0:w.hostname)||"")]});for(let u of S)if(Xt(c,u))return!1;return!0}function f({propertyId:p,ext:c}){if(!a({propertyId:p,key:"file_downloads_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"file_download_extensions",defaultList:["pdf","doc","docx","xls","xlsx","ppt","pptx","csv","txt","rtf","zip","rar","7z","dmg","exe","apk"]}),w=new Set(S.map(u=>String(u).toLowerCase().replace(/^\./,"")));return!!c&&w.has(String(c).toLowerCase().replace(/^\./,""))}function d(p){var J,T,re;let c=oe(n);if(c.length===0)return;let k=R(p)?p.target:null,S=Jt(k);if(!S)return;let w=ge(S,"href");if(!w)return;let u=Qt(w,String(((J=o==null?void 0:o.location)==null?void 0:J.href)||""));if(!u||!Yt(u))return;let v=String(u.href||""),P=String(u.hostname||""),N=no(S),W=to(S),x=oo(S),U=Zt(u)||ge(S,"download")||"",I=eo(U),H=[],z=[];for(let fe of c)f({propertyId:fe,ext:I})&&H.push(fe),h({propertyId:fe,linkHostname:P})&&z.push(fe);if(H.length>0){t.enqueueEvent("file_download",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},...x?{link_text:x}:{},file_name:U,file_extension:I,send_to:H}),(T=t.flushNow)==null||T.call(t,{useBeacon:!1});return}z.length>0&&(t.enqueueEvent("click",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},link_domain:P,outbound:"1",send_to:z}),(re=t.flushNow)==null||re.call(t,{useBeacon:!1}))}function y(){var c;if(!m())return;try{b(),!((c=n())!=null&&c.emSiteSearchFired)&&typeof(o==null?void 0:o.setTimeout)=="function"&&o.setTimeout(()=>{try{b()}catch(k){}},0)}catch(k){}let p=o==null?void 0:o.document;p&&typeof p.addEventListener=="function"&&(p.addEventListener("click",d,!0),p.addEventListener("auxclick",d,!0))}function g(){try{b()}catch(p){}}return{start:y,onConfig:g}}var be="_dl",kt="1",Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",an="=",on=null;function ro(){if(on)return on;let e={};for(let n=0;n<Ce.length;n+=1)e[Ce[n]]=n;return e[an]=64,e["."]=64,on=e,e}function io(e){try{if(typeof TextEncoder!="undefined")return new TextEncoder().encode(e)}catch(t){}let n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=e.charCodeAt(t)&255;return n}function so(e){try{if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e)}catch(t){}let n="";for(let t=0;t<e.length;t+=1)n+=String.fromCharCode(e[t]);return n}function ao(e){let n=io(e),t=[];for(let o=0;o<n.length;o+=3){let r=o+1<n.length,i=o+2<n.length,a=n[o],s=r?n[o+1]:0,m=i?n[o+2]:0,l=a>>2,b=(a&3)<<4|s>>4,h=(s&15)<<2|m>>6,f=m&63;i||(f=64,r||(h=64)),t.push(Ce[l],Ce[b],h===64?an:Ce[h],f===64?an:Ce[f])}return t.join("").replace(/=+$/,"")}function co(e){let n=String(e||""),t=ro(),o=[],r=0;function i(a){for(;r<n.length;){let s=n.charAt(r++),m=t[s];if(m!=null)return m;if(!/^[\s\xa0]*$/.test(s))throw new Error(`Invalid base64 char: ${s}`)}return a}for(;;){let a=i(-1),s=i(0),m=i(64),l=i(64);if(l===64&&a===-1)break;o.push((a<<2|s>>4)&255),m!==64&&(o.push((s<<4&240|m>>2)&255),l!==64&&o.push((m<<6&192|l)&255))}return so(new Uint8Array(o))}function yt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function uo(e){let n=Array.isArray(e==null?void 0:e.domains)?e.domains.filter(o=>typeof o=="string"):[],t=n.length>0;return{domains:n,accept_incoming:typeof(e==null?void 0:e.accept_incoming)=="boolean"?e.accept_incoming:t,decorate_forms:typeof(e==null?void 0:e.decorate_forms)=="boolean"?e.decorate_forms:!1,url_position:(e==null?void 0:e.url_position)==="fragment"?"fragment":"query"}}function cn(e){let n=String(e||"").match(/([^?#]+)(\?[^#]*)?(#.*)?/);return n?{base:n[1]||"",query:n[2]||"",fragment:n[3]||""}:{base:String(e||""),query:"",fragment:""}}function xe(e,n){let t=String(e||""),o=t.startsWith(n)?t.slice(1):t,r=[];if(!o)return r;for(let i of o.split("&")){let a=i.trim();if(!a)continue;let s=a.indexOf("=");if(s<0){r.push([decodeURIComponent(a),""]);continue}let m=decodeURIComponent(a.slice(0,s)),l=decodeURIComponent(a.slice(s+1));r.push([m,l])}return r}function Oe(e,n){if(!e||e.length===0)return"";let t=e.map(([o,r])=>`${encodeURIComponent(o)}=${encodeURIComponent(r)}`).join("&");return n+t}function lo(e,n){let{query:t,fragment:o}=cn(e);for(let[r,i]of xe(t,"?"))if(r===n)return{value:i,where:"query"};for(let[r,i]of xe(o,"#"))if(r===n)return{value:i,where:"fragment"};return{value:null,where:null}}function ut(e,n){let{base:t,query:o,fragment:r}=cn(e),i=xe(o,"?").filter(([s])=>s!==n),a=xe(r,"#").filter(([s])=>s!==n);return`${t}${Oe(i,"?")}${Oe(a,"#")}`}function rn(e,n,t,o){let{base:r,query:i,fragment:a}=cn(e);if(o==="fragment"){let m=xe(a,"#").filter(([l])=>l!==n);return m.push([n,t]),`${r}${i}${Oe(m,"#")}`}let s=xe(i,"?").filter(([m])=>m!==n);return s.push([n,t]),`${r}${Oe(s,"?")}${a}`}function lt(e,n){try{let t=new URL(e,n||"https://example.invalid/");return String(t.hostname||"")}catch(t){let o=String(e||"").match(/^https?:\/\/([^/]+)/i);return o?String(o[1]||""):""}}function ft(e,n){let t=String(e||"");if(!t)return!1;for(let o of n){let r=String(o||"").trim();if(r&&t.indexOf(r)>=0)return!0}return!1}var sn=null;function fo(){if(sn)return sn;let e=new Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?t>>>1^3988292384:t>>>1;e[n]=t>>>0}return sn=e,e}function go(e){let n=fo(),t=4294967295;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);t=t>>>8^n[(t^i)&255]}return((t^4294967295)>>>0).toString(36)}function St({payload:e,offset:n,windowRef:t}){var s,m,l,b;let o=String(((s=t.navigator)==null?void 0:s.userAgent)||"")||String(((m=t==null?void 0:t.navigator)==null?void 0:m.userAgent)||""),r=new Date().getTimezoneOffset(),i=String(((l=t.navigator)==null?void 0:l.language)||"")||String(((b=t.navigator)==null?void 0:b.userLanguage)||""),a=Math.floor(Date.now()/6e4)-(Number(n)||0);return go([o,r,i,a,e].join("*"))}function dt({cookies:e,ts:n,windowRef:t}){let o=[];o.push(["ts",String(n)]);for(let[m,l]of Object.entries(e||{}))m&&l!=null&&o.push([m,String(l)]);let r=o.slice(1).sort((m,l)=>m[0].localeCompare(l[0])),a=[o[0],...r].map(([m,l])=>`${m}*${ao(l)}`).join("*"),s=St({payload:a,offset:0,windowRef:t});return`${kt}*${s}*${a}`}function gt({value:e,windowRef:n,ttlMs:t=120*1e3}){let o=String(e||"");if(!o)return null;let r=o.split("*").filter(g=>g!=="");if(r.length<5)return null;let i=r[0],a=r[1];if(i!==kt)return null;let s=r.slice(2),m=s.join("*"),l=!1;for(let g=0;g<3;g+=1)if(St({payload:m,offset:g,windowRef:n})===a){l=!0;break}if(!l)return null;let b=s,h={};for(let g=0;g+1<b.length;g+=2){let p=b[g],c=b[g+1];if(p)try{h[p]=co(c||"")}catch(k){h[p]=decodeURIComponent(c||"")}}let f=Number(h.ts);if(!Number.isFinite(f))return null;let d=Date.now()-f;if(!(d>=0&&d<=t))return null;let y={};for(let[g,p]of Object.entries(h))g!=="ts"&&g&&p!=null&&(y[g]=String(p));return{ts:f,cookies:y}}var mt="__d8a_linker_coordinator";function pt({getStates:e,windowRef:n}){let t=yt(n),o={},r=new Map;for(let i of e){let a=i(),s=he(i),m=oe(i);if(m&&m.length>0){for(let b of m){let h=ne(i,b),f=_e({propertyCfg:h,setParams:s,https:t,state:a}),d=ue(b,f.cookiePrefix);o[d]||(o[d]={kind:"session",name:d,propertyId:b,settings:f,getState:i}),r.has(f.cookiePrefix)||r.set(f.cookiePrefix,{settings:f,getState:i})}continue}let l=_e({propertyCfg:{},setParams:s,https:t,state:a});r.has(l.cookiePrefix)||r.set(l.cookiePrefix,{settings:l,getState:i})}for(let[i,a]of r.entries()){let s=ce(i);o[s]||(o[s]={kind:"client",name:s,settings:a.settings,getState:a.getState})}return o}function mo({windowRef:e}){let n=e;if(!n)throw new Error("createSharedLinkerCoordinator: windowRef is required");let t=We({windowRef:n}),o=new Set;function r(){for(let _ of o.values())try{let C=_();if(C!=null&&C.set&&C.set.debug_mode===!0)return!0;let L=C==null?void 0:C.propertyConfigs;if(L&&typeof L=="object"){for(let A of Object.values(L))if(R(A)&&A.debug_mode===!0)return!0}}catch(C){}return!1}function i(..._){if(r())try{console.log("[d8a][linker]",..._)}catch(C){}}let a=0,s=new Set,m=null,l=null,b=null,h=null,f=!1,d=!1,y=null;function g(){return Array.from(o.values())}function p(){let _=Array.from(s.values()).sort(),C=_.length>0;return{domains:_,accept_incoming:m?m.value:C,decorate_forms:l?l.value:!1,url_position:b?b.value:"query"}}function c(_){if(!R(_))return;a+=1;let C=_.domains;if(Array.isArray(C))for(let V of C){if(typeof V!="string")continue;let M=V.trim();M&&s.add(M)}let L=_.accept_incoming;typeof L=="boolean"&&(m={value:L,rev:a});let A=_.decorate_forms;typeof A=="boolean"&&(l={value:A,rev:a});let E=_.url_position,O=typeof E=="string"?E:"";(O==="query"||O==="fragment")&&(b={value:O,rev:a})}function k(_){c(_)}function S(_){o.add(_);try{k(_().linker)}catch(C){}return()=>{o.delete(_)}}function w(_){var A,E;if(!_)return;let C=String(((A=n.location)==null?void 0:A.href)||"");if(!C)return;let L=ut(C,be);if(L!==C&&typeof((E=n.history)==null?void 0:E.replaceState)=="function"){try{n.history.replaceState({},"",L)}catch(O){}n.location&&(n.location.href=L)}}function u(){var E;let _=String(((E=n.location)==null?void 0:E.href)||"");if(!_)return;let{value:C,where:L}=lo(_,be);if(!C)return;let A=gt({value:C,windowRef:n});A&&(h=A,i("parsed incoming _dl",{cookieNames:Object.keys(A.cookies||{}),ts:A.ts,where:L})),w(L)}function v(){var E,O,V;let _=pt({getStates:g(),windowRef:n}),C=String(((E=n.document)==null?void 0:E.cookie)||""),L=ke(C),A={};for(let M of Object.values(_)){let $=L.get(M.name);$&&(M.kind==="client"&&!((O=te($))!=null&&O.cid)||M.kind==="session"&&!((V=le($))!=null&&V.tokens)||(A[M.name]=$))}return A}function P(){let _=p();if(!_.domains||_.domains.length===0)return null;let C=v();if(!C||Object.keys(C).length===0)return null;let L=Date.now();return dt({cookies:C,ts:L,windowRef:n})}function N(_){var E;let C=p();if(!C.domains||C.domains.length===0)return _;let L=P();if(!L)return _;let A=lt(_,String(((E=n.location)==null?void 0:E.href)||""));return ft(A,C.domains)?rn(_,be,L,C.url_position):_}function W(_){if(!R(_))return;let C=typeof _.href=="string"?_.href:null;if(!C)return;let L=N(C);if(L!==C)try{_.href=L}catch(A){}}function x(_){var M,$,D;if(!R(_))return;let C=p();if(!C.decorate_forms)return;let L=typeof _.action=="string"?_.action:"";if(!L)return;let A=P();if(!A)return;let E=lt(L,String(((M=n.location)==null?void 0:M.href)||""));if(!ft(E,C.domains))return;let O=typeof _.method=="string"?_.method.toLowerCase():"";if(C.url_position==="query"&&O==="get"){let j=Array.isArray(_.childNodes)?_.childNodes:[],ie=!1;for(let q of j)if(R(q)&&String(q.name||"")===be){try{q.value=A}catch(Le){}ie=!0;break}if(!ie&&typeof(($=n.document)==null?void 0:$.createElement)=="function")try{let q=n.document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name",be),q.setAttribute("value",A),(D=_.appendChild)==null||D.call(_,q)}catch(q){}return}let V=rn(L,be,A,C.url_position);if(V!==L)try{_.action=V}catch(j){}}function U(_,C){let L=_;for(let A=0;A<8;A+=1){if(!L||typeof L!="object")return null;let E=String(L.tagName||"").toUpperCase();if(C.includes(E))return L;L=L.parentElement||L.parentNode||null}return null}function I(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function H(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function z(_){let C=R(_)?_.target:null,L=U(C,["FORM"]);L&&x(L)}function J(){if(!p().accept_incoming||!h)return;let C=g(),L=C[0]||null,A=L?pe(L):{};if(String((A==null?void 0:A.analytics_storage)||"").toLowerCase()==="denied"){let M=null;for(let $ of Object.values(h.cookies)){let D=te($);if(D!=null&&D.cid){M=D.cid;break}}if(M)for(let $ of C)try{$().anonCid=M,$().incomingDl=null}catch(D){}h=null;return}let O=pt({getStates:C,windowRef:n}),V=!1;for(let M of Object.keys(h.cookies||{}))if(O[M]){V=!0;break}if(V){for(let[M,$]of Object.entries(h.cookies||{})){let D=O[M];if(D){if(D.kind==="client"){let j=te($);if(!(j!=null&&j.cid))continue;let ie=t.get(D.name);Wn({jar:t,cid:j.cid,consent:A,cookieDomain:D.settings.cookieDomain,cookiePrefix:D.settings.cookiePrefix,cookiePath:D.settings.cookiePath,cookieSameSite:D.settings.cookieSameSite,cookieSecure:D.settings.cookieSecure,cookieMaxAgeSeconds:D.settings.cookieMaxAgeSeconds,cookieUpdate:D.settings.cookieUpdate,forceCookieAttrsWrite:D.settings.forceCookieAttrsWrite});let q=t.get(D.name);i("applied client cookie",{name:D.name,cid:j.cid,cookieUpdate:D.settings.cookieUpdate,before:ie,after:q}),delete h.cookies[M];continue}if(D.kind==="session"){let j=D.getState(),ie=he(D.getState),q=yt(n),Le=ne(D.getState,D.propertyId),Z=_e({propertyCfg:Le,setParams:ie,https:q,state:j}),X=le($),Ae=t.get(D.name),ee=$n({jar:t,propertyId:D.propertyId,value:$,consent:A,cookieDomain:Z.cookieDomain,cookiePrefix:Z.cookiePrefix,cookiePath:Z.cookiePath,cookieSameSite:Z.cookieSameSite,cookieSecure:Z.cookieSecure,cookieMaxAgeSeconds:Z.cookieMaxAgeSeconds,cookieUpdate:Z.cookieUpdate,forceCookieAttrsWrite:Z.forceCookieAttrsWrite}),De=t.get(D.name);i("applied session cookie",{name:D.name,propertyId:D.propertyId,cookieUpdate:Z.cookieUpdate,wrote:(ee==null?void 0:ee.wrote)===!0,sid:X==null?void 0:X.sid,sct:X==null?void 0:X.sct,before:Ae,after:De}),ee!=null&&ee.wrote&&(X!=null&&X.tokens)&&(j.sharedSessionTokens=X.tokens,j.sharedSessionValue=String($||""),i("seeded shared session state",{propertyId:D.propertyId})),delete h.cookies[M]}}}if(!h.cookies||Object.keys(h.cookies).length===0){for(let M of C)try{M().incomingDl=null}catch($){}h=null}}}function T(){var L;if(d)return;let _=(L=n.HTMLFormElement)==null?void 0:L.prototype,C=_==null?void 0:_.submit;typeof C=="function"&&(y=C,_.submit=function(){try{x(this)}catch(E){}return C.call(this)},d=!0)}function re(){var _,C,L,A,E,O;f||(f=!0,u(),J(),(C=(_=n.document)==null?void 0:_.addEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.addEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.addEventListener)==null||O.call(E,"submit",z),T())}function fe(){var _,C,L,A,E,O,V;if(f&&(f=!1,(C=(_=n.document)==null?void 0:_.removeEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.removeEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.removeEventListener)==null||O.call(E,"submit",z),d)){let M=(V=n.HTMLFormElement)==null?void 0:V.prototype;if(M&&y)try{M.submit=y}catch($){}d=!1,y=null}}return{start:re,stop:fe,applyIncomingIfReady:J,registerRuntime:S,updateConfigPatch:c,__internal:{encodeDl:dt,decodeDl:gt,decorateUrlIfNeeded:N,stripParamFromUrl:ut,setParamInUrl:rn,resolveLinkerConfig:uo}}}function po({windowRef:e}){let n=e,t=Y(n,mt);if(t)return t;let o=mo({windowRef:n});return se(n,mt,o),o}function ht({windowRef:e,getState:n}){let t=po({windowRef:e}),o=t.registerRuntime(n);return{start:()=>t.start(),stop:()=>o(),applyIncomingIfReady:()=>t.applyIncomingIfReady(),updateConfigPatch:r=>t.updateConfigPatch(r),__internal:t.__internal}}function _t({windowRef:e=window,dataLayerName:n,globalName:t,gtagDataLayerName:o}={}){let r=e;if(!r)throw new Error("installD8a: window is required");r.d8a_tag_data=r.d8a_tag_data||{};let i=r.d8a_tag_data,a=ot({windowRef:r,dataLayerName:n}),s=rt({windowRef:r,globalName:t}),m=it({windowRef:r,gtagDataLayerName:o});i.__d8aInstallResults||(i.__d8aInstallResults={}),i.__d8aInstallResultsByDataLayer||(i.__d8aInstallResultsByDataLayer={});let l=i.__d8aInstallResults,b=i.__d8aInstallResultsByDataLayer,h=`${a}|${s}`;if(l[h])return l[h];ae(r,a);let f=b[a]||null;if(f){typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let w={consumer:f.consumer,dispatcher:f.dispatcher,dataLayerName:a,globalName:s};return l[h]=w,w}typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let d=wn({windowRef:r,dataLayerName:a}),y=[];d.setOnConfig((w,u)=>{for(let v of y)v(w,u)});let g=[];d.setOnSet(w=>{for(let u of g)u(w)});let p=tt({windowRef:r,getState:d.getState});p.attachLifecycleFlush(),d.setOnEvent((w,u)=>{p.enqueueEvent(w,u)});let c=ht({windowRef:r,getState:d.getState});c.start(),g.push(w=>{var u;w&&typeof w=="object"&&w.type==="field"&&w.field==="linker"&&c.updateConfigPatch(w.value),w&&typeof w=="object"&&w.type==="object"&&c.updateConfigPatch((u=w==null?void 0:w.obj)==null?void 0:u.linker),c.applyIncomingIfReady()}),y.push(()=>c.applyIncomingIfReady());let k=st({windowRef:r,getState:d.getState,dataLayerName:m});d.start(),k.start();try{let w=ct({windowRef:r,getState:d.getState,dispatcher:p});y.push(()=>w.onConfig()),w.start()}catch(w){}let S={consumer:d,dispatcher:p,dataLayerName:a,globalName:s};return l[h]=S,b[a]=S,S}_t();})();
|
|
1
|
+
/* web-tracker - built 2026-05-14T12:55:39.054Z */
|
|
2
|
+
"use strict";(()=>{function Y(e,n){return e[n]}function se(e,n,t){e[n]=t}function ae(e,n){let t=Y(e,n);if(Array.isArray(t))return t;let o=[];return se(e,n,o),o}function Ge({windowRef:e,dataLayerName:n="d8aLayer"}){let t=e;if(!t)throw new Error("createD8aGlobal: windowRef is required");function o(...r){ae(t,n).push(arguments)}return o.js=r=>o("js",r),o.config=(r,i)=>o("config",r,i),o.event=(r,i)=>o("event",r,i),o.set=(r,i)=>i===void 0?o("set",r):o("set",r,i),o.consent=(r,i)=>o("consent",r,i),o}function yn(){return{jsDate:null,pageLoadMs:null,propertyIds:[],propertyConfigs:{},primaryPropertyId:"",consent:{},consentDefault:{},consentUpdate:{},consentGtag:{},consentDefaultGtag:{},consentUpdateGtag:{},userId:null,set:{},linker:{domains:[]},incomingDl:null,events:[],__onEvent:null,__onConfig:null,__onSet:null,hitCounter:0,sessionEngagementMs:0,sessionEngaged:!1,anonCid:null,cookieAttrsSig:null,sharedSessionTokens:null,sharedSessionValue:null,emInstalled:!1,emSiteSearchFired:!1,__lastEffectiveAnalyticsStorage:void 0}}function pe(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{};return t&&Object.keys(t).length>0?t:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{}}function Sn(e){let n=typeof e=="function"?e():null,t=n!=null&&n.consentGtag&&typeof n.consentGtag=="object"?n.consentGtag:{},o=n!=null&&n.consentDefaultGtag&&typeof n.consentDefaultGtag=="object"?n.consentDefaultGtag:{},r=n!=null&&n.consentUpdateGtag&&typeof n.consentUpdateGtag=="object"?n.consentUpdateGtag:{};return t&&Object.keys(t).length>0||o&&Object.keys(o).length>0||r&&Object.keys(r).length>0?{consent:t,consentDefault:o,consentUpdate:r}:{consent:n!=null&&n.consent&&typeof n.consent=="object"?n.consent:{},consentDefault:n!=null&&n.consentDefault&&typeof n.consentDefault=="object"?n.consentDefault:{},consentUpdate:n!=null&&n.consentUpdate&&typeof n.consentUpdate=="object"?n.consentUpdate:{}}}function Pt(e){if(typeof queueMicrotask=="function"){queueMicrotask(e);return}Promise.resolve().then(e)}function Ie(e){let n=typeof e=="function"?e():null;if(!n)return;let t=pe(e),o=t&&typeof t.analytics_storage=="string"?t.analytics_storage:void 0,r=n.__lastEffectiveAnalyticsStorage;if(r===void 0){n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitScheduled||(n.__consentPingInitScheduled=!0,Pt(()=>{n.__consentPingInitDone=!0}));return}o!==r&&(n.__lastEffectiveAnalyticsStorage=o,n.__consentPingInitDone&&(!Array.isArray(n.propertyIds)||n.propertyIds.length===0||typeof n.__onEvent=="function"&&n.__onEvent("user_engagement",{consent_update:1})))}function R(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function hn(e){if(!R(e))return null;let n=e.user_id;if(typeof n!="string")return null;let t=n.trim();return t||null}function Nt(e){if(!R(e))return;let n=e.send_page_view;return typeof n=="boolean"?n:void 0}function Et(e){return R(e)?e:{}}function _n(e,n){if(!e||!R(n))return;let t={...e.linker||{domains:[]}},o=n.domains;if(Array.isArray(o)){let m=o.filter(l=>typeof l=="string"&&l.trim()).map(l=>l.trim());t.domains=m}let r=n.accept_incoming;typeof r=="boolean"&&(t.accept_incoming=r);let i=n.decorate_forms;typeof i=="boolean"&&(t.decorate_forms=i);let a=n.url_position,s=typeof a=="string"?a:"";(s==="query"||s==="fragment")&&(t.url_position=s),Array.isArray(t.domains)||(t.domains=[]),e.linker=t}function wn({windowRef:e,dataLayerName:n="d8aLayer"}){if(!e)throw new Error("createQueueConsumer: windowRef is required");let t=e,o=yn(),r=!1,i=null,a=!1;function s(f){let d=R(f)?f.length:null;return f&&typeof d=="number"&&typeof f!="string"?Array.from(f):Array.isArray(f)?f:null}function m(f){var p,c;let d=f[0],y=f[1],g=f[2];switch(String(d||"")){case"js":{o.jsDate=y instanceof Date?y:new Date(y),o.pageLoadMs==null&&o.jsDate instanceof Date&&!Number.isNaN(o.jsDate.getTime())&&(o.pageLoadMs=o.jsDate.getTime());return}case"config":{let k=String(y||"");if(!k)return;o.propertyIds.includes(k)||o.propertyIds.push(k),o.primaryPropertyId||(o.primaryPropertyId=k);let S=o.propertyConfigs[k]||{},w=R(g)?g:{};o.propertyConfigs[k]={...S,...w};let u=hn(w);u&&(o.userId=u),typeof o.__onConfig=="function"&&o.__onConfig(k,w),Nt(w)!==!1&&typeof o.__onEvent=="function"&&o.__onEvent("page_view",{send_to:k});return}case"consent":{let k=String(y||"");if(k==="default"||k==="update"){let S=Et(g);k==="default"?o.consentDefault={...o.consentDefault||{},...S||{}}:o.consentUpdate={...o.consentUpdate||{},...S||{}},o.consent={...o.consentDefault||{},...o.consentUpdate||{}},Ie(()=>o)}return}case"set":{if(typeof y=="string"&&y.trim()){let k=y.trim();k==="linker"?_n(o,g):o.set={...o.set||{},[k]:g},k==="user_id"&&typeof g=="string"&&g.trim()&&(o.userId=g.trim());let S={type:"field",field:k,value:g};(p=o.__onSet)==null||p.call(o,S);return}if(R(y)){o.set={...o.set||{},...y};let k=hn(y);k&&(o.userId=k),"linker"in y&&_n(o,y.linker);let S={type:"object",obj:y};(c=o.__onSet)==null||c.call(o,S)}return}case"event":{let k=R(g)?g:{};o.events.push({name:String(y||""),params:k}),typeof o.__onEvent=="function"&&o.__onEvent(String(y||""),k);return}default:return}}function l(){let f=n,d=Y(t,f),y=Array.isArray(d)?d:ae(t,f);for(let g of y){let p=s(g);p&&m(p)}}function b(){let d=ae(t,n);if(d.__d8aQueueConsumerPatched){i=d.__d8aQueueConsumerOriginalPush||null,a=!1;return}i=d.push.bind(d),d.__d8aQueueConsumerOriginalPush=i,d.push=function(...g){let p=g[0],c=s(p);return c&&m(c),i(...g)},d.__d8aQueueConsumerPatched=!0,a=!0}function h(){r||(r=!0,l(),b())}return{start:h,getState:()=>o,setOnEvent:f=>{o.__onEvent=f},setOnConfig:f=>{o.__onConfig=f},setOnSet:f=>{o.__onSet=f},stop:()=>{if(!r)return;let d=Y(t,n);if(a&&i&&Array.isArray(d)){let y=d;y.push=i;try{delete y.__d8aQueueConsumerPatched,delete y.__d8aQueueConsumerOriginalPush}catch(g){}}r=!1}}}function qe(e){return Math.floor((Number(e!=null?e:Date.now())||Date.now())/1e3)}function Ue(){return Math.floor(Math.random()*2147483647)}function He(e,n){let t=typeof e=="string"?e:"",o=String(n||"");return t?t.endsWith("_")&&o.startsWith("_")?`${t.slice(0,-1)}${o}`:`${t}${o}`:o}function ce(e){return He(e,"_d8a")}function ue(e,n){return He(n,`_d8a_${e}`)}function te(e){let t=String(e||"").match(/^C1\.1\.([0-9]+)\.([0-9]+)$/);return t?{cid:`${t[1]}.${t[2]}`}:null}function ze({nowMs:e}={}){return{random:Ue(),timestampSec:qe(e)}}function Cn({random:e,timestampSec:n}){return`${e}.${n}`}function xn({nowMs:e}={}){let{random:n,timestampSec:t}=ze({nowMs:e});return`C1.1.${n}.${t}`}function Ln(e){let t=String(e||"").trim().match(/^([0-9]+)\.([0-9]+)$/);return t?`C1.1.${t[1]}.${t[2]}`:null}var Te="S1.1.",Ve=new Set(["s","o","g","t","j","d"]);function vn(e){let n=String(e||"");return n.startsWith(Te)?n.slice(Te.length).split("$").map(i=>i.trim()).filter(Boolean).map(i=>{let a=i[0],s=i.slice(1);return{key:a,val:s,raw:i,known:Ve.has(a)}}):null}function Rn(e){let n=e.map(t=>`${t.key}${t.val}`);return`${Te}${n.join("$")}`}function de(e,n){let t=e.find(o=>o.key===n);return t?t.val:null}function K(e,n,t){let o=e.findIndex(r=>r.key===n);o>=0?e[o]={...e[o],val:String(t),known:Ve.has(n)}:e.push({key:n,val:String(t),known:Ve.has(n)})}function bn(){let e=Ue().toString(36),n=Ue().toString(36),t=Ue().toString(36);return`${e}${n}${t}`}function le(e){let n=vn(e);if(!n)return null;let t=de(n,"s"),o=de(n,"o"),r=de(n,"t"),i=de(n,"g"),a=t!=null?Number(t):NaN,s=o!=null?Number(o):NaN,m=r!=null?Number(r):NaN,l=i!=null?Number(i):NaN;return{tokens:n,sid:Number.isFinite(a)?a:null,sct:Number.isFinite(s)?s:null,lastEventTs:Number.isFinite(m)?m:null,seg:Number.isFinite(l)?l:null}}function je(e,{nowMs:n,sessionTimeoutMs:t}={}){var h,f,d;let o=qe(n),r=Math.floor((Number(t!=null?t:1800*1e3)||0)/1e3),i=Array.isArray(e)&&e.length>0,a=i?e.map(y=>({...y})):[];if(!i)return K(a,"s",o),K(a,"o",1),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",bn()),{tokens:a,isNewSession:!0};let s=Number((h=de(a,"t"))!=null?h:NaN);if(!Number.isFinite(s)||o-s>r){let y=Number((f=de(a,"o"))!=null?f:NaN),g=Number.isFinite(y)?y+1:1;return K(a,"s",o),K(a,"o",g),K(a,"g",0),K(a,"t",o),K(a,"j",0),K(a,"d",bn()),{tokens:a,isNewSession:!0}}let b=Number((d=de(a,"j"))!=null?d:0);return K(a,"j",Number.isFinite(b)?b+1:1),K(a,"t",o),{tokens:a,isNewSession:!1}}function Ke(e){return Rn(e)}var Me={SESSION_PREFIX:Te,tokenizeSessionCookie:vn,detokenizeSessionCookie:Rn,getToken:de,setToken:K,nowSeconds:qe,applyCookiePrefix:He};function An(e){let n=String(e||"").trim();if(!n)return["none"];let t=n.split(".");if(t.length===4){let r=t[t.length-1];if(String(Number(r))===r)return["none"]}let o=[];for(let r=t.length-2;r>=0;r-=1)o.push(t.slice(r).join("."));return o.push("none"),o}function Dn(e){return String(e).replace(/\/+$/,"")}function ke(e){let n=new Map,t=String(e||"");if(!t)return n;for(let o of t.split(";")){let r=o.trim();if(!r)continue;let i=r.indexOf("=");if(i<0)continue;let a=r.slice(0,i).trim(),s=r.slice(i+1).trim();a&&n.set(a,s)}return n}function It(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function Pn(e,n,t){let o=[];return o.push(`${e}=${n}`),t.path&&o.push(`Path=${String(t.path)}`),t.expires&&o.push(`Expires=${t.expires.toUTCString()}`),t.maxAgeSeconds!=null&&o.push(`Max-Age=${String(t.maxAgeSeconds)}`),t.sameSite&&o.push(`SameSite=${String(t.sameSite)}`),t.domain&&o.push(`Domain=${String(t.domain)}`),t.secure&&o.push("Secure"),o.join("; ")}function Ut(e){return e&&(e==="none"?null:e.startsWith(".")?e:`.${e}`)}function We({windowRef:e}){let n=e;if(!(n!=null&&n.document))throw new Error("createCookieJar: windowRef.document is required");let t=n.document;function o(){var s;return ke((s=n.document)==null?void 0:s.cookie)}function r(s){return o().get(s)}function i(s,m,l={}){var v,P,N;let b=l.path||"/",h=It(n),f=l.sameSite||"Lax",d=!h&&String(f).toLowerCase()==="none"?"Lax":f,y=l.secure!=null?!!l.secure&&h:h,g=(v=l.maxAgeSeconds)!=null?v:null,p=(P=l.expires)!=null?P:null,c={path:b,sameSite:d,secure:y,maxAgeSeconds:g,expires:p},k=l.domain||"auto",S=String(((N=n.location)==null?void 0:N.hostname)||""),w=k==="auto"?An(S):[k],u=[];for(let W of w){let x=Ut(W),U=Pn(s,m,{...c,domain:x}),I=String(t.cookie||"");t.cookie=U;let H=String(t.cookie||""),z=I!==H||r(s)===m;if(u.push({candidate:W,domain:W==="none"?null:x,cookieStr:U,before:I,after:H,readBack:r(s),stuck:z}),z)return{ok:!0,domain:W==="none"?null:x,cookieStr:U,attempts:u}}return{ok:!1,domain:null,cookieStr:null,attempts:u}}function a(s,m={}){return i(s,"deleted",{...m,expires:new Date(0)})}return{get:r,set:i,del:a,__internal:{parseCookieHeader:ke,buildSetCookieString:Pn}}}var Nn=new Set(["value","tax","shipping"]),En={item_id:"id",item_name:"nm",affiliation:"af",coupon:"cp",discount:"ds",index:"lp",item_brand:"br",item_category:"ca",item_category2:"c2",item_category3:"c3",item_category4:"c4",item_category5:"c5",item_list_id:"li",item_list_name:"ln",item_variant:"va",location_id:"lo",price:"pr",quantity:"qt",promotion_id:"pi",promotion_name:"pn"};function Tt(e){return!!e&&typeof e=="object"}function Se(e){return e==null?null:typeof e=="string"?e:typeof e=="boolean"?e?"1":"0":typeof e=="number"?String(e):Array.isArray(e)?e.join(","):String(e)}function Mt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return e?1:0;if(typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:null}return null}function ye(e,n,t){t!=null&&e.set(`ep.${n}`,String(t))}function In(e,n,t){t!=null&&e.set(`epn.${n}`,String(t))}function Wt(e){let n=Tt(e)?e:{},t=[],o=[];for(let[i,a]of Object.entries(En)){if(!(i in n))continue;let s=n[i],m=Se(s);m!=null&&t.push(`${a}${m}`)}let r=0;for(let i of Object.keys(n)){if(i in En)continue;let a=n[i],s=Se(a);s!=null&&(o.push(`k${r}${i}`),o.push(`v${r}${s}`),r+=1)}return[...t,...o].join("~")}function Un({propertyId:e,eventName:n,eventParams:t,cookieHeader:o,clientId:r,userId:i,cookiePrefix:a,ignoreReferrer:s,browser:m,pageLoadMs:l,hitCounter:b,engagementTimeMs:h,uachParams:f,campaign:d,contentGroup:y,consentParams:g,debugMode:p}){let c=new URLSearchParams;c.set("v","2"),c.set("tid",String(e||"")),c.set("en",String(n||"")),p===!0&&c.set("_dbg","1"),l!=null&&c.set("_p",String(l)),b!=null&&c.set("_s",String(b)),h!=null&&c.set("_et",String(h));let k=ke(o);if(r!=null&&String(r))c.set("cid",String(r));else{let x=te(k.get(ce(a)));x!=null&&x.cid&&c.set("cid",x.cid)}typeof i=="string"&&i.trim()&&c.set("uid",i.trim());let S=d||{};typeof S.campaign_id=="string"&&S.campaign_id.trim()&&c.set("ci",S.campaign_id.trim()),typeof S.campaign_source=="string"&&S.campaign_source.trim()&&c.set("cs",S.campaign_source.trim()),typeof S.campaign_medium=="string"&&S.campaign_medium.trim()&&c.set("cm",S.campaign_medium.trim()),typeof S.campaign_name=="string"&&S.campaign_name.trim()&&c.set("cn",S.campaign_name.trim()),typeof S.campaign_term=="string"&&S.campaign_term.trim()&&c.set("ct",S.campaign_term.trim()),typeof S.campaign_content=="string"&&S.campaign_content.trim()&&c.set("cc",S.campaign_content.trim()),typeof y=="string"&&y.trim()&&ye(c,"content_group",y.trim());let w=ue(e,a),u=le(k.get(w));(u==null?void 0:u.sid)!=null?c.set("sid",String(u.sid)):c.set("sid",String(Math.floor(Date.now()/1e3))),(u==null?void 0:u.sct)!=null?c.set("sct",String(u.sct)):c.set("sct","1"),(u==null?void 0:u.seg)!=null&&c.set("seg",String(u.seg));let v=m;if(v.dl&&c.set("dl",String(v.dl)),v.dt&&c.set("dt",String(v.dt)),s===!0&&c.set("ir","1"),c.set("dr",String(v.dr)),v.ul&&c.set("ul",String(v.ul)),v.sr&&c.set("sr",String(v.sr)),f)for(let[x,U]of Object.entries(f))U==null||U===""||c.set(x,String(U));g&&(g.gcs&&c.set("gcs",String(g.gcs)),g.gcd&&c.set("gcd",String(g.gcd)));let P=t||{};p===!0&&!Object.prototype.hasOwnProperty.call(P,"debug_mode")&&ye(c,"debug_mode","1");let N=P.currency;typeof N=="string"&&c.set("cu",N),P.transaction_id!=null&&ye(c,"transaction_id",Se(P.transaction_id)),P.coupon!=null&&ye(c,"coupon",Se(P.coupon)),P.customer_type!=null&&ye(c,"customer_type",Se(P.customer_type));for(let x of Nn)P[x]!=null&&In(c,x,Mt(P[x]));let W=P.items;if(Array.isArray(W)){let x=W.slice(0,200);for(let U=0;U<x.length;U+=1){let I=Wt(x[U]);I&&c.set(`pr${U+1}`,I)}}for(let x of Object.keys(P)){if(x==="items"||x==="currency"||x==="transaction_id"||x==="coupon"||x==="customer_type"||Nn.has(x)||x==="user_id"||x==="client_id"||x==="campaign_id"||x==="campaign_source"||x==="campaign_medium"||x==="campaign_name"||x==="campaign_term"||x==="campaign_content"||x==="page_location"||x==="page_title"||x==="page_referrer"||x==="content_group"||x==="ignore_referrer"||x==="language"||x==="screen_resolution"||x==="cookie_domain"||x==="cookie_expires"||x==="cookie_flags"||x==="cookie_path"||x==="cookie_prefix"||x==="cookie_update"||x==="send_page_view"||x==="send_to")continue;let U=P[x];typeof U=="number"?In(c,x,U):ye(c,x,Se(U))}return c}function $t(e){return/^https?:\/\//i.test(String(e||""))}function Qe(e){if(typeof e=="string"&&$t(e))return Qe({server_container_url:e});let t=((e&&typeof e=="object"?e:{}).server_container_url||"").trim();if(!t)throw new Error("server_container_url is required");return Dn(t)}function Tn(e){let n=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.href)||"")}catch(m){return""}})(),t=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.title)||"")}catch(m){return""}})(),o=(()=>{var s;try{return String(((s=e==null?void 0:e.document)==null?void 0:s.referrer)||"")}catch(m){return""}})(),r=(()=>{var s;try{return String(((s=e==null?void 0:e.location)==null?void 0:s.hostname)||"")}catch(m){return""}})(),i=(()=>{var s;try{return String(((s=e==null?void 0:e.navigator)==null?void 0:s.language)||"").toLowerCase()}catch(m){return""}})(),a=(()=>{var s,m;try{let l=(s=e==null?void 0:e.screen)==null?void 0:s.width,b=(m=e==null?void 0:e.screen)==null?void 0:m.height;if(typeof l=="number"&&typeof b=="number")return`${l}x${b}`}catch(l){}return""})();return{dl:n,dt:t,dr:o,dh:r,ul:i,sr:a}}function Ot(e){return new Promise(n=>setTimeout(n,e))}function Bt(e){return e===429||e>=500}async function Mn({url:e,windowRef:n,useBeacon:t,maxRetries:o=1,initialBackoffMs:r=200}){var h;let i=n,a=(h=i==null?void 0:i.navigator)==null?void 0:h.sendBeacon;if(t&&typeof a=="function")try{return a.call(i.navigator,e),{ok:!0,via:"beacon"}}catch(f){}let s=i==null?void 0:i.fetch;if(typeof s!="function")throw new Error("fetch is not available");let m={method:"POST",keepalive:!0,credentials:"include",cache:"no-store",redirect:"follow",mode:"no-cors"},l=0,b=r;for(;;){l+=1;try{let f=await s.call(i,e,m),d=typeof(f==null?void 0:f.status)=="number"?f.status:0;if(!Bt(d))return{ok:!0,via:"fetch",status:d}}catch(f){}if(l>o)return{ok:!1,via:"fetch",status:null};await Ot(b),b*=2}}function Re(e){return String((e||{}).analytics_storage||"").toLowerCase()!=="denied"}var Je=2*365*24*60*60;function Ye({jar:e,consent:n,nowMs:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=ce(r),f=e==null?void 0:e.get(h),d=te(f);if(d!=null&&d.cid)return Re(n||{})?l===!1&&!b?{cid:d.cid,wrote:!1}:(e==null||e.set(h,String(f||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:d.cid,wrote:!0}):{cid:d.cid,wrote:!1};let y=xn({nowMs:t}),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(n||{})?l===!1&&f?{cid:p,wrote:!1}:(e==null||e.set(h,y,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p,wrote:!0}):{cid:p,wrote:!1}}function Wn({jar:e,cid:n,consent:t,cookieDomain:o="auto",cookiePrefix:r="",cookiePath:i="/",cookieSameSite:a="Lax",cookieSecure:s=void 0,cookieMaxAgeSeconds:m=Je,cookieUpdate:l=!0,forceCookieAttrsWrite:b=!1}={}){let h=typeof n=="string"?n.trim():String(n||"").trim(),f=Ln(h);if(!f)return{cid:null,wrote:!1};let d=ce(r),y=e==null?void 0:e.get(d),g=te(y),p=(g==null?void 0:g.cid)||null;return Re(t||{})?y&&l===!1?b?(e==null||e.set(d,String(y||""),{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:p||h,wrote:!0}):{cid:p||h,wrote:!1}:(e==null||e.set(d,f,{domain:o,path:i,sameSite:a,secure:s,maxAgeSeconds:m}),{cid:h,wrote:!0}):{cid:h,wrote:!1}}function $n({jar:e,propertyId:n,value:t,consent:o,cookieDomain:r="auto",cookiePrefix:i="",cookiePath:a="/",cookieSameSite:s="Lax",cookieSecure:m=void 0,cookieMaxAgeSeconds:l=Je,cookieUpdate:b=!0,forceCookieAttrsWrite:h=!1}={}){var p;let f=String(n||"");if(!f)return{wrote:!1};let d=String(t||"");if(!((p=le(d))!=null&&p.tokens))return{wrote:!1};let y=ue(f,i),g=e==null?void 0:e.get(y);return Re(o||{})?g&&b===!1?h?(e==null||e.set(y,String(g||""),{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}:(e==null||e.set(y,d,{domain:r,path:a,sameSite:s,secure:m,maxAgeSeconds:l}),{wrote:!0}):{wrote:!1}}var Ft=["platform","platformVersion","architecture","model","bitness","fullVersionList","wow64","mobile"];function Bn(e){e.d8a_tag_data=e.d8a_tag_data||{};let n=e.d8a_tag_data,t=n.uach_store;return R(t)||(n.uach_store={}),n.uach_store}function Gt(e){let n=e.navigator;if(!R(n))return!1;let t=n.userAgentData;return R(t)?typeof t.getHighEntropyValues=="function":!1}function Fn(e){return Bn(e).uach||null}function Gn(e){if(!Gt(e))return null;let n=Bn(e);return n.uach_promise||(n.uach_promise=e.navigator.userAgentData.getHighEntropyValues(Ft).then(t=>(n.uach=n.uach||t,n.uach))),n.uach_promise}function On(e){return encodeURIComponent(String(e||""))}function Vn(e){if(!e)return null;let n={};return e.architecture&&(n.uaa=String(e.architecture)),e.bitness&&(n.uab=String(e.bitness)),Array.isArray(e.fullVersionList)&&(n.uafvl=e.fullVersionList.map(t=>`${On(t.brand||"")};${On(t.version||"")}`).join("|")),n.uamb=e.mobile?"1":"0",e.model&&(n.uam=String(e.model)),e.platform&&(n.uap=String(e.platform)),e.platformVersion&&(n.uapv=String(e.platformVersion)),n.uaw=e.wow64?"1":"0",n}function qn(e){switch(e){case 1:return"1";case 2:case 4:return"0";default:return"-"}}function Hn(e){return String(e||"").toLowerCase()==="denied"?2:1}function zn({consent:e}){let n=e||{},t=Hn(n.ad_storage),o=Hn(n.analytics_storage);return`G1${qn(t)}${qn(o)}`}function jn({consentDefault:e,consentUpdate:n}){let t=e||{},o=n||{};function r(m){let l=String(m||"").toLowerCase();return l==="granted"?"granted":l==="denied"?"denied":null}function i(m,l){let b=r(m),h=r(l);return!b&&!h?"l":b==="denied"&&!h?"p":b==="granted"&&!h?"t":!b&&h==="denied"?"m":!b&&h==="granted"?"n":b==="denied"&&h==="denied"?"q":b==="granted"&&h==="granted"?"v":b==="denied"&&h==="granted"?"r":b==="granted"&&h==="denied"?"u":"l"}let a=[["ad_storage","3"],["analytics_storage","3"],["ad_user_data","2"],["ad_personalization","5"]],s="13";for(let[m,l]of a)s+=`${i(t[m],o[m])}${l}`;return s+="l1",s}function Kn(){let e=ze({nowMs:Date.now()});return Cn(e)}function Qn({windowRef:e,state:n}){return n?(typeof n.anonCid=="string"&&n.anonCid||(n.anonCid=Kn()),n.anonCid):Kn()}function Jn({windowRef:e,nowMs:n=()=>Date.now()}={}){if(!e)throw new Error("createEngagementTimer: windowRef is required");let t=e,o=!1,r=!0,i=!0,a=!0,s=null,m=0;function l(){var u;try{if(typeof t.hasFocus=="function")return!!t.hasFocus();if(typeof((u=t.document)==null?void 0:u.hasFocus)=="function")return!!t.document.hasFocus()}catch(v){}return!0}function b(){var u,v;try{if(typeof((u=t.document)==null?void 0:u.hidden)=="boolean")return!t.document.hidden;if(typeof((v=t.document)==null?void 0:v.visibilityState)=="string")return t.document.visibilityState!=="hidden"}catch(P){}return!0}function h(){return r&&i&&a}function f(){let u=n();if(s!=null){let v=Math.max(0,u-s);m+=v,s=u}h()?s==null&&(s=u):s=null}function d(){f(),r=!0,f()}function y(){f(),r=!1,f()}function g(){f(),i=b(),f()}function p(){f(),a=!0,f()}function c(){f(),a=!1,f()}function k(){var u;o||(o=!0,r=l(),i=b(),a=!0,f(),typeof t.addEventListener=="function"&&(t.addEventListener("focus",d),t.addEventListener("blur",y),t.addEventListener("pageshow",p),t.addEventListener("pagehide",c)),typeof((u=t.document)==null?void 0:u.addEventListener)=="function"&&t.document.addEventListener("visibilitychange",g))}function S(){return f(),m|0}function w(){f();let u=m|0;return m=0,s=h()?n():null,u}return{start:k,peek:S,getAndReset:w,__internal:{sync:f}}}function oe(e){let n=typeof e=="function"?e():null;return Array.isArray(n==null?void 0:n.propertyIds)&&n.propertyIds.length>0?n.propertyIds.slice():[]}function ne(e,n){var r;let t=typeof e=="function"?e():null,o=(r=t==null?void 0:t.propertyConfigs)==null?void 0:r[n];return o&&typeof o=="object"?o:{}}function he(e){let n=typeof e=="function"?e():null;return n!=null&&n.set&&typeof n.set=="object"?n.set:{}}function Yn({enabled:e}){return{enabled:e===!0,log:(...n)=>{if(e===!0)try{console.log(...n)}catch(t){}}}}function Xn({key:e,eventParams:n,config:t,setParams:o}){let r=n||{},i=t||{},a=o||{};return Object.prototype.hasOwnProperty.call(r,e)&&r[e]!=null?r[e]:Object.prototype.hasOwnProperty.call(i,e)&&i[e]!=null?i[e]:Object.prototype.hasOwnProperty.call(a,e)&&a[e]!=null?a[e]:null}function Q({key:e,eventParams:n,config:t,setParams:o}){let r=Xn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="string"&&r.trim()?r.trim():null}function Xe({key:e,eventParams:n,config:t,setParams:o}){let r=Xn({key:e,eventParams:n,config:t,setParams:o});return typeof r=="boolean"?r:null}function Vt(e){let n=typeof e=="string"?e:"";if(!n.trim())return{};let t=n.split(";").map(r=>r.trim()).filter(Boolean),o={};for(let r of t){let i=r.toLowerCase();if(i==="secure"&&(o.secure=!0),i.startsWith("samesite=")){let s=r.split("=").slice(1).join("=").trim().toLowerCase();s==="lax"&&(o.sameSite="Lax"),s==="strict"&&(o.sameSite="Strict"),s==="none"&&(o.sameSite="None")}}return o}function _e({propertyCfg:e,setParams:n,https:t,state:o,isDebugEnabled:r}){var U,I,H,z,J,T,re;let i=R(e)?e:{},a=R(n)?n:{},s=(U=i.cookie_domain)!=null?U:a.cookie_domain,m=typeof s=="string"&&s.trim()?s:s==null?"auto":String(s),l=(I=i.cookie_prefix)!=null?I:a.cookie_prefix,b=typeof l=="string"?l:"",h=(H=i.cookie_path)!=null?H:a.cookie_path,f=typeof h=="string"&&h.trim()?h:"/",d=(z=i.cookie_update)!=null?z:a.cookie_update,y=typeof d=="boolean"?d:!0,g=(J=i.cookie_expires)!=null?J:a.cookie_expires,p=Number.isFinite(Number(g))?Number(g):null,c=p!=null?p:2*365*24*60*60,k=(re=(T=i.cookie_flags)!=null?T:a.cookie_flags)!=null?re:"",S=Vt(k),w=S.sameSite||"Lax",u=t===!0&&S.secure===!0?!0:t===!0,v=typeof r=="function"?r({config:i,setParams:a}):!1,P=JSON.stringify({domain:m,prefix:b,path:f,sameSite:w,secure:u,maxAgeSeconds:c}),N=`${b}|${m}|${f}`;o&&!o.cookieAttrsSig&&(o.cookieAttrsSig={});let x=(o!=null&&o.cookieAttrsSig?o.cookieAttrsSig[N]:void 0)!==P;return o!=null&&o.cookieAttrsSig&&(o.cookieAttrsSig[N]=P),{cookieDomain:m,cookiePrefix:b,cookiePath:f,cookieSameSite:w,cookieSecure:u,cookieUpdate:y,cookieMaxAgeSeconds:c,forceCookieAttrsWrite:x,debug:v}}function Ze(e){return R(e)?{ok:e.ok,domain:e.domain,cookieStr:e.cookieStr,attempts:e.attempts}:{}}function Zn({state:e,destinations:n,jar:t,getPropertyConfig:o,resolveCookieSettings:r,sessionTimeoutMs:i,engagementTimeMs:a,engagedThresholdMs:s,nowMs:m,log:l}){var p,c,k;if(!e||!Array.isArray(n)||n.length===0||!t||typeof o!="function"||typeof r!="function")return;let b=Number.isFinite(Number(m))?Number(m):Date.now(),h=Array.isArray(e.sharedSessionTokens)?e.sharedSessionTokens:null;if(!h)for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v),N=le(P);if(N!=null&&N.tokens){h=N.tokens;break}}let f=je(h||null,{nowMs:b,sessionTimeoutMs:i});f.isNewSession&&(e.sessionEngagementMs=0,e.sessionEngaged=!1);let d=Me.getToken(f.tokens,"g");e.sessionEngagementMs=(Number(e.sessionEngagementMs)||0)+(Number(a)||0),!e.sessionEngaged&&Number(s)>0&&e.sessionEngagementMs>=Number(s)&&(Me.setToken(f.tokens,"g",1),e.sessionEngaged=!0);let y=Me.getToken(f.tokens,"g"),g=f.isNewSession||d!==y;e.sharedSessionTokens=f.tokens,e.sharedSessionValue=Ke(f.tokens);for(let S of n){let w=o(S),u=r(w),v=ue(S,u.cookiePrefix),P=t.get(v);if(!P){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(p=u.cookieMaxAgeSeconds)!=null?p:void 0});u.debug&&(l==null||l("[d8a] set session cookie (create)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.cookieUpdate===!0||g){let N=t.set(v,e.sharedSessionValue,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(c=u.cookieMaxAgeSeconds)!=null?c:void 0});u.debug&&(l==null||l("[d8a] set session cookie (value+attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}if(u.forceCookieAttrsWrite){let N=t.set(v,P,{domain:u.cookieDomain,path:u.cookiePath,sameSite:u.cookieSameSite,secure:u.cookieSecure,maxAgeSeconds:(k=u.cookieMaxAgeSeconds)!=null?k:void 0});u.debug&&(l==null||l("[d8a] set session cookie (attrs update)",{pid:S,cookieName:v,...Ze(N),cookieReadBack:t.get(v)}));continue}u.debug&&(l==null||l("[d8a] set session cookie (no write)",{pid:S,cookieName:v,reason:"cookie_update=false and session value unchanged and force_cookie_attrs_write=false",cookieUpdate:u.cookieUpdate,shouldWriteSessionValue:g,forceCookieAttrsWrite:u.forceCookieAttrsWrite,cookieReadBack:t.get(v)}))}}var et="v1.2.0";var qt="wt";function nt(e){e.set("_dtv",et),e.set("_dtn",qt)}function Ht(e){return typeof e=="string"&&e.trim()?[e.trim()]:Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()).map(n=>String(n).trim()):null}var zt=new Set(["send_to","user_id","client_id","campaign_id","campaign_source","campaign_medium","campaign_name","campaign_term","campaign_content","page_location","page_title","page_referrer","content_group","ignore_referrer","language","screen_resolution","cookie_domain","cookie_expires","cookie_flags","cookie_path","cookie_prefix","cookie_update","send_page_view","session_engagement_time_sec","site_search_enabled","site_search_query_params","outbound_clicks_enabled","outbound_exclude_domains","file_downloads_enabled","file_download_extensions","linker"]);function jt(e){let n={};for(let[t,o]of Object.entries(e||{}))zt.has(t)||(n[t]=o);return n}function tt({windowRef:e,getState:n}){let t=e;if(!t)throw new Error("createDispatcher: windowRef is required");let o=[],r=null,i=!1,a=We({windowRef:t});Gn(t);let s=Jn({windowRef:t});s.start();let m=1e4;function l(){let S=oe(n)[0]||"";return S?ne(n,S):{}}function b({config:k,setParams:S}){let w=R(k)?k:{},u=R(S)?S:{};return w.debug_mode===!0||u.debug_mode===!0}function h(){var k;try{return String(((k=t==null?void 0:t.location)==null?void 0:k.protocol)||"").toLowerCase()==="https:"}catch(S){return!1}}function f(){let k=n();return k?k.pageLoadMs!=null?k.pageLoadMs:k.jsDate instanceof Date&&!Number.isNaN(k.jsDate.getTime())?(k.pageLoadMs=k.jsDate.getTime(),k.pageLoadMs):(k.pageLoadMs=Date.now(),k.pageLoadMs):null}function d(k,S){var v;o.push({name:k,params:S||{}});let w=l(),u=Number((v=w==null?void 0:w.max_batch_size)!=null?v:25);if(o.length>=u){g({useBeacon:!1});return}y()}function y(){var w;if(r!=null)return;let k=l(),S=Number((w=k==null?void 0:k.flush_interval_ms)!=null?w:1e3);r=t.setTimeout(()=>{r=null,g({useBeacon:!1})},S)}async function g({useBeacon:k}){var M,$,D,j,ie,q,Le,Z,X,Ae;if(r!=null&&(t.clearTimeout(r),r=null),o.length===0)return{sent:0};let S=oe(n),w=S[0]||"",u=w?ne(n,w):{},v=Number((M=u==null?void 0:u.max_batch_size)!=null?M:25),P=o.splice(0,v),N=pe(n),W=Sn(n),x=u.session_timeout_ms,U=typeof x=="number"?x:1800*1e3,I=n(),H=f(),z=String((N==null?void 0:N.analytics_storage)||"").toLowerCase(),J=z==="denied",T=I!=null&&I.set&&typeof I.set=="object"?I.set:{},re=jt(T),fe=h(),_=b({config:u,setParams:T}),C=(D=($=u==null?void 0:u.session_engagement_time_sec)!=null?$:T==null?void 0:T.session_engagement_time_sec)!=null?D:10,L=Number.isFinite(Number(C))?Number(C):10,A=Math.max(0,Math.floor(L*1e3)),E=Yn({enabled:_});E.log("[d8a] flush",{href:String(((j=t==null?void 0:t.location)==null?void 0:j.href)||""),propertyIds:S,analyticsStorage:z||"(unset)",analyticsDenied:J,cookieHeader:String(((ie=t==null?void 0:t.document)==null?void 0:ie.cookie)||"")});function O(ee){return _e({propertyCfg:ee,setParams:T,https:fe,state:I,isDebugEnabled:b})}let V=0;for(let ee of P){let De=R(ee.params)?ee.params:{},un=Ht(De.send_to),Pe=un||S;if(!Pe||Pe.length===0)continue;let F={...re,...De};delete F.send_to;let Be=s.getAndReset();!J&&I&&Zn({state:I,destinations:Pe,jar:a,getPropertyConfig:ve=>ne(n,ve),resolveCookieSettings:O,sessionTimeoutMs:U,engagementTimeMs:Be,engagedThresholdMs:A,nowMs:Date.now(),log:E.enabled?E.log:null}),I&&(I.hitCounter=(I.hitCounter||0)+1);let Ne=[];for(let ve of Pe){let G=ne(n,ve),wt=Qe(G),B=O(G),bt=Q({key:"user_id",eventParams:F,config:G,setParams:T}),Ct=Q({key:"client_id",eventParams:F,config:G,setParams:T}),xt=Xe({key:"debug_mode",eventParams:F,config:G,setParams:T})===!0,Lt={campaign_id:Q({key:"campaign_id",eventParams:F,config:G,setParams:T}),campaign_source:Q({key:"campaign_source",eventParams:F,config:G,setParams:T}),campaign_medium:Q({key:"campaign_medium",eventParams:F,config:G,setParams:T}),campaign_name:Q({key:"campaign_name",eventParams:F,config:G,setParams:T}),campaign_term:Q({key:"campaign_term",eventParams:F,config:G,setParams:T}),campaign_content:Q({key:"campaign_content",eventParams:F,config:G,setParams:T})},vt=Q({key:"content_group",eventParams:F,config:G,setParams:T}),Rt=Xe({key:"ignore_referrer",eventParams:F,config:G,setParams:T})===!0,me={...Tn(t)},ln=Q({key:"page_location",eventParams:F,config:G,setParams:T}),fn=Q({key:"page_title",eventParams:F,config:G,setParams:T}),dn=Q({key:"page_referrer",eventParams:F,config:G,setParams:T}),gn=Q({key:"language",eventParams:F,config:G,setParams:T}),mn=Q({key:"screen_resolution",eventParams:F,config:G,setParams:T});if(ln&&(me.dl=ln),fn&&(me.dt=fn),dn!=null&&(me.dr=dn),gn&&(me.ul=gn),mn&&(me.sr=mn),!J)if(B.debug){let Fe=ce(B.cookiePrefix),kn=a.get(Fe),Ee=Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(q=B.cookieMaxAgeSeconds)!=null?q:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite}),Dt=Ee!=null&&Ee.wrote?kn?"attrs update":"create":"no write";E.log(`[d8a] set client cookie (${Dt})`,{pid:ve,cookiePrefix:B.cookiePrefix,result:Ee,cookieName:Fe,cookieBefore:kn,cookieReadBack:a.get(Fe),documentCookie:String(((Le=t==null?void 0:t.document)==null?void 0:Le.cookie)||"")})}else Ye({jar:a,consent:N,cookieDomain:B.cookieDomain,cookiePrefix:B.cookiePrefix,cookiePath:B.cookiePath,cookieSameSite:B.cookieSameSite,cookieSecure:B.cookieSecure,cookieMaxAgeSeconds:(Z=B.cookieMaxAgeSeconds)!=null?Z:void 0,cookieUpdate:B.cookieUpdate,forceCookieAttrsWrite:B.forceCookieAttrsWrite});let pn=Un({propertyId:ve,eventName:ee.name,eventParams:F,cookieHeader:J?"":String(((X=t.document)==null?void 0:X.cookie)||""),clientId:Ct||(J?Qn({windowRef:t,state:I}):null),userId:bt,cookiePrefix:B.cookiePrefix,browser:me,ignoreReferrer:Rt,pageLoadMs:H!=null?Number(H):null,hitCounter:(Ae=I==null?void 0:I.hitCounter)!=null?Ae:null,engagementTimeMs:Be!=null?Number(Be):null,uachParams:Vn(Fn(t)),campaign:Lt,contentGroup:vt||null,consentParams:{gcs:zn({consent:W.consent}),gcd:jn({consentDefault:W.consentDefault,consentUpdate:W.consentUpdate})},debugMode:xt});nt(pn);let At=`${wt}?${pn.toString()}`;Ne.push(Mn({url:At,windowRef:t,useBeacon:k}))}Ne.length>0&&(await Promise.all(Ne),V+=Ne.length)}return o.length>0&&y(),{sent:V}}function p({useBeacon:k=!1}={}){return g({useBeacon:k===!0})}function c(){var k;t!=null&&t.addEventListener&&(i||(i=!0,t.addEventListener("pagehide",()=>{try{oe(n).length>0&&s.peek()>0&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}),(k=t.document)!=null&&k.addEventListener&&t.document.addEventListener("visibilitychange",()=>{if(t.document.hidden){try{oe(n).length>0&&s.peek()>=m&&o.unshift({name:"user_engagement",params:{}})}catch(S){}g({useBeacon:!1})}})))}return{enqueueEvent:d,flush:g,flushNow:p,attachLifecycleFlush:c}}function we(e){return typeof e=="string"?e:""}function en(e,n){var t;try{let o=R(e)?e:null,r=o&&R(o.currentScript)?o.currentScript:null,i=we(r==null?void 0:r.src);if(!i)return"";let a=o&&R(o.location)?we((t=o.location)==null?void 0:t.href):"",s=new URL(i,a||void 0);return we(s.searchParams.get(n))}catch(o){return""}}function ot({windowRef:e,dataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"l");return o.trim()?o.trim():"d8aLayer"}function rt({windowRef:e,globalName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGlobalName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"g");return o.trim()?o.trim():"d8a"}function it({windowRef:e,gtagDataLayerName:n}){if(typeof n=="string"&&n.trim())return n.trim();let t=we(e==null?void 0:e.d8aGtagDataLayerName);if(t.trim())return t.trim();let o=en(e==null?void 0:e.document,"gl");return o.trim()?o.trim():"dataLayer"}var $e="__d8aConsentBridgeHubs";function Kt(e){return R(e)}function nn(e,n){if(!e)return null;let t=String(n||"dataLayer"),o=Y(e,$e),r=Kt(o)?o:{};(!o||o!==r)&&se(e,$e,r);let i=r[t];if(i&&typeof i=="object")return i;let a={subscribers:new Set,originalPush:null,patched:!1,dataLayerName:t};return r[t]=a,a}function st({windowRef:e,getState:n,dataLayerName:t="dataLayer"}){if(!e)throw new Error("createGtagConsentBridge: windowRef is required");let o=e;if(!o)throw new Error("createGtagConsentBridge: windowRef is required");if(typeof n!="function")throw new Error("createGtagConsentBridge: getState is required");let r=!1,i=null;function a(d){let y=R(d)?d.length:null;if(d&&typeof y=="number"&&typeof d!="string")try{return Array.from(d)}catch(g){return null}return Array.isArray(d)?d:null}function s({action:d,patch:y}){let g=n();if(g){if(d==="default")g.consentDefaultGtag={...g.consentDefaultGtag||{},...y||{}};else if(d==="update")g.consentUpdateGtag={...g.consentUpdateGtag||{},...y||{}};else return;g.consentGtag={...g.consentDefaultGtag||{},...g.consentUpdateGtag||{}},Ie(n)}}function m(d){let[y,g,p]=d;if(y!=="consent")return null;let c=String(g||"");return c!=="default"&&c!=="update"||!R(p)?null:["consent",c,p]}function l(d){let y=m(d);if(!y)return;let[,g,p]=y;s({action:g,patch:p})}function b(){let y=Y(o,t);if(Array.isArray(y))for(let g of y){let p=a(g);p&&l(p)}}function h(){let d=t,y=ae(o,d),g=nn(o,d);g&&(g.patched||(g.originalPush=y.push.bind(y),y.push=function(...c){let k=c[0],S=a(k);if(S)for(let w of g.subscribers)try{w(S)}catch(u){}return g.originalPush(...c)},g.patched=!0,y.__d8aConsentBridgePatched=!0))}function f(){if(r)return;r=!0;let d=nn(o,t);d&&(d.subscribers.add(l),i=()=>{d.subscribers.delete(l)},b(),h())}return{start:f,stop:()=>{if(!r)return;let d=t,y=nn(o,d);if(!y)return;typeof i=="function"&&i(),i=null;let g=Y(o,d);if(y.subscribers.size===0&&y.originalPush&&Array.isArray(g)){let p=g;p.push=y.originalPush,y.originalPush=null,y.patched=!1;try{delete p.__d8aConsentBridgePatched;let c=Y(o,$e),k=R(c)?c:null;k&&(delete k[d],Object.keys(k).length===0&&se(o,$e,void 0))}catch(c){}}r=!1}}}function at(e,n=[]){return Array.isArray(e)?e.map(t=>String(t).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):n}function Qt(e,n){try{return new URL(String(e||""),n?String(n):void 0)}catch(t){return null}}function Jt(e){let n=e;for(let t=0;t<100&&n;t+=1){let o=R(n)?n:null,r=String((o==null?void 0:o.tagName)||"").toLowerCase();if(r==="a"||r==="area")return n;n=(o==null?void 0:o.parentNode)||null}return null}function ge(e,n){if(!e)return null;let t=R(e)?e:null;try{if(typeof(t==null?void 0:t.getAttribute)=="function"){let r=t.getAttribute(n);if(r!=null)return r}}catch(r){}let o=t?t[n]:null;return o!=null?String(o):null}function Yt(e){let n=String((e==null?void 0:e.protocol)||"").toLowerCase();return n==="http:"||n==="https:"}function Xt(e,n){let t=String(e||"").toLowerCase(),o=String(n||"").toLowerCase().replace(/^\./,"");return!t||!o?!1:t===o||t.endsWith(`.${o}`)}function Zt(e){return String((e==null?void 0:e.pathname)||"").split("/").filter(Boolean).slice(-1)[0]||""}function eo(e){let n=String(e||""),t=n.lastIndexOf(".");return t<0?"":n.slice(t+1).toLowerCase()}function tn(e){return String(e||"").replace(/\s+/g," ").trim()}function no(e){let n=ge(e,"id");return tn(n)||null}function to(e){let n=ge(e,"className")||ge(e,"class");return tn(n)||null}function oo(e){let n=ge(e,"textContent")||ge(e,"innerText");return tn(n)||null}function ct({windowRef:e,getState:n,dispatcher:t}){let o=e;if(!o)throw new Error("createEnhancedMeasurement: windowRef is required");if(typeof n!="function")throw new Error("createEnhancedMeasurement: getState is required");if(!t)throw new Error("createEnhancedMeasurement: dispatcher is required");function r(p,c){let k=p[c];return typeof k=="boolean"?k:void 0}function i(p,c){return p[c]}function a({propertyId:p,key:c,defaultValue:k}){let S=he(n),w=ne(n,p),u=r(w,c);if(u!=null)return u;let v=r(S,c);return v!=null?v:k}function s({propertyId:p,key:c,defaultList:k}){let S=he(n),w=ne(n,p),u=i(w,c),v=i(S,c);return u!=null?at(u,k):v!=null?at(v,k):k}function m(){let p=n();return!p||p.emInstalled?!1:(p.emInstalled=!0,!0)}function l(){let p=n();return!p||p.emSiteSearchFired?!1:(p.emSiteSearchFired=!0,!0)}function b(){var u;let p=oe(n);if(p.length===0||!l())return;let c=String(((u=o==null?void 0:o.location)==null?void 0:u.search)||"");if(!c||c==="?")return;let k=new URLSearchParams(c.startsWith("?")?c.slice(1):c),S=["q","s","search","query","keyword"],w=new Map;for(let v of p){if(!a({propertyId:v,key:"site_search_enabled",defaultValue:!0}))continue;let N=s({propertyId:v,key:"site_search_query_params",defaultList:S}),W="";for(let U of N){let I=k.get(U);if(I&&String(I).trim()){W=String(I).trim();break}}if(!W)continue;let x=w.get(W)||[];x.push(v),w.set(W,x)}for(let[v,P]of w.entries())t.enqueueEvent("view_search_results",{search_term:v,send_to:P})}function h({propertyId:p,linkHostname:c}){var w;if(!a({propertyId:p,key:"outbound_clicks_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"outbound_exclude_domains",defaultList:[String(((w=o==null?void 0:o.location)==null?void 0:w.hostname)||"")]});for(let u of S)if(Xt(c,u))return!1;return!0}function f({propertyId:p,ext:c}){if(!a({propertyId:p,key:"file_downloads_enabled",defaultValue:!0}))return!1;let S=s({propertyId:p,key:"file_download_extensions",defaultList:["pdf","doc","docx","xls","xlsx","ppt","pptx","csv","txt","rtf","zip","rar","7z","dmg","exe","apk"]}),w=new Set(S.map(u=>String(u).toLowerCase().replace(/^\./,"")));return!!c&&w.has(String(c).toLowerCase().replace(/^\./,""))}function d(p){var J,T,re;let c=oe(n);if(c.length===0)return;let k=R(p)?p.target:null,S=Jt(k);if(!S)return;let w=ge(S,"href");if(!w)return;let u=Qt(w,String(((J=o==null?void 0:o.location)==null?void 0:J.href)||""));if(!u||!Yt(u))return;let v=String(u.href||""),P=String(u.hostname||""),N=no(S),W=to(S),x=oo(S),U=Zt(u)||ge(S,"download")||"",I=eo(U),H=[],z=[];for(let fe of c)f({propertyId:fe,ext:I})&&H.push(fe),h({propertyId:fe,linkHostname:P})&&z.push(fe);if(H.length>0){t.enqueueEvent("file_download",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},...x?{link_text:x}:{},file_name:U,file_extension:I,send_to:H}),(T=t.flushNow)==null||T.call(t,{useBeacon:!1});return}z.length>0&&(t.enqueueEvent("click",{link_url:v,...N?{link_id:N}:{},...W?{link_classes:W}:{},link_domain:P,outbound:"1",send_to:z}),(re=t.flushNow)==null||re.call(t,{useBeacon:!1}))}function y(){var c;if(!m())return;try{b(),!((c=n())!=null&&c.emSiteSearchFired)&&typeof(o==null?void 0:o.setTimeout)=="function"&&o.setTimeout(()=>{try{b()}catch(k){}},0)}catch(k){}let p=o==null?void 0:o.document;p&&typeof p.addEventListener=="function"&&(p.addEventListener("click",d,!0),p.addEventListener("auxclick",d,!0))}function g(){try{b()}catch(p){}}return{start:y,onConfig:g}}var be="_dl",kt="1",Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",an="=",on=null;function ro(){if(on)return on;let e={};for(let n=0;n<Ce.length;n+=1)e[Ce[n]]=n;return e[an]=64,e["."]=64,on=e,e}function io(e){try{if(typeof TextEncoder!="undefined")return new TextEncoder().encode(e)}catch(t){}let n=new Uint8Array(e.length);for(let t=0;t<e.length;t+=1)n[t]=e.charCodeAt(t)&255;return n}function so(e){try{if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e)}catch(t){}let n="";for(let t=0;t<e.length;t+=1)n+=String.fromCharCode(e[t]);return n}function ao(e){let n=io(e),t=[];for(let o=0;o<n.length;o+=3){let r=o+1<n.length,i=o+2<n.length,a=n[o],s=r?n[o+1]:0,m=i?n[o+2]:0,l=a>>2,b=(a&3)<<4|s>>4,h=(s&15)<<2|m>>6,f=m&63;i||(f=64,r||(h=64)),t.push(Ce[l],Ce[b],h===64?an:Ce[h],f===64?an:Ce[f])}return t.join("").replace(/=+$/,"")}function co(e){let n=String(e||""),t=ro(),o=[],r=0;function i(a){for(;r<n.length;){let s=n.charAt(r++),m=t[s];if(m!=null)return m;if(!/^[\s\xa0]*$/.test(s))throw new Error(`Invalid base64 char: ${s}`)}return a}for(;;){let a=i(-1),s=i(0),m=i(64),l=i(64);if(l===64&&a===-1)break;o.push((a<<2|s>>4)&255),m!==64&&(o.push((s<<4&240|m>>2)&255),l!==64&&o.push((m<<6&192|l)&255))}return so(new Uint8Array(o))}function yt(e){var n;try{return String(((n=e==null?void 0:e.location)==null?void 0:n.protocol)||"").toLowerCase()==="https:"}catch(t){return!1}}function uo(e){let n=Array.isArray(e==null?void 0:e.domains)?e.domains.filter(o=>typeof o=="string"):[],t=n.length>0;return{domains:n,accept_incoming:typeof(e==null?void 0:e.accept_incoming)=="boolean"?e.accept_incoming:t,decorate_forms:typeof(e==null?void 0:e.decorate_forms)=="boolean"?e.decorate_forms:!1,url_position:(e==null?void 0:e.url_position)==="fragment"?"fragment":"query"}}function cn(e){let n=String(e||"").match(/([^?#]+)(\?[^#]*)?(#.*)?/);return n?{base:n[1]||"",query:n[2]||"",fragment:n[3]||""}:{base:String(e||""),query:"",fragment:""}}function xe(e,n){let t=String(e||""),o=t.startsWith(n)?t.slice(1):t,r=[];if(!o)return r;for(let i of o.split("&")){let a=i.trim();if(!a)continue;let s=a.indexOf("=");if(s<0){r.push([decodeURIComponent(a),""]);continue}let m=decodeURIComponent(a.slice(0,s)),l=decodeURIComponent(a.slice(s+1));r.push([m,l])}return r}function Oe(e,n){if(!e||e.length===0)return"";let t=e.map(([o,r])=>`${encodeURIComponent(o)}=${encodeURIComponent(r)}`).join("&");return n+t}function lo(e,n){let{query:t,fragment:o}=cn(e);for(let[r,i]of xe(t,"?"))if(r===n)return{value:i,where:"query"};for(let[r,i]of xe(o,"#"))if(r===n)return{value:i,where:"fragment"};return{value:null,where:null}}function ut(e,n){let{base:t,query:o,fragment:r}=cn(e),i=xe(o,"?").filter(([s])=>s!==n),a=xe(r,"#").filter(([s])=>s!==n);return`${t}${Oe(i,"?")}${Oe(a,"#")}`}function rn(e,n,t,o){let{base:r,query:i,fragment:a}=cn(e);if(o==="fragment"){let m=xe(a,"#").filter(([l])=>l!==n);return m.push([n,t]),`${r}${i}${Oe(m,"#")}`}let s=xe(i,"?").filter(([m])=>m!==n);return s.push([n,t]),`${r}${Oe(s,"?")}${a}`}function lt(e,n){try{let t=new URL(e,n||"https://example.invalid/");return String(t.hostname||"")}catch(t){let o=String(e||"").match(/^https?:\/\/([^/]+)/i);return o?String(o[1]||""):""}}function ft(e,n){let t=String(e||"");if(!t)return!1;for(let o of n){let r=String(o||"").trim();if(r&&t.indexOf(r)>=0)return!0}return!1}var sn=null;function fo(){if(sn)return sn;let e=new Array(256);for(let n=0;n<256;n+=1){let t=n;for(let o=0;o<8;o+=1)t=t&1?t>>>1^3988292384:t>>>1;e[n]=t>>>0}return sn=e,e}function go(e){let n=fo(),t=4294967295;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r);t=t>>>8^n[(t^i)&255]}return((t^4294967295)>>>0).toString(36)}function St({payload:e,offset:n,windowRef:t}){var s,m,l,b;let o=String(((s=t.navigator)==null?void 0:s.userAgent)||"")||String(((m=t==null?void 0:t.navigator)==null?void 0:m.userAgent)||""),r=new Date().getTimezoneOffset(),i=String(((l=t.navigator)==null?void 0:l.language)||"")||String(((b=t.navigator)==null?void 0:b.userLanguage)||""),a=Math.floor(Date.now()/6e4)-(Number(n)||0);return go([o,r,i,a,e].join("*"))}function dt({cookies:e,ts:n,windowRef:t}){let o=[];o.push(["ts",String(n)]);for(let[m,l]of Object.entries(e||{}))m&&l!=null&&o.push([m,String(l)]);let r=o.slice(1).sort((m,l)=>m[0].localeCompare(l[0])),a=[o[0],...r].map(([m,l])=>`${m}*${ao(l)}`).join("*"),s=St({payload:a,offset:0,windowRef:t});return`${kt}*${s}*${a}`}function gt({value:e,windowRef:n,ttlMs:t=120*1e3}){let o=String(e||"");if(!o)return null;let r=o.split("*").filter(g=>g!=="");if(r.length<5)return null;let i=r[0],a=r[1];if(i!==kt)return null;let s=r.slice(2),m=s.join("*"),l=!1;for(let g=0;g<3;g+=1)if(St({payload:m,offset:g,windowRef:n})===a){l=!0;break}if(!l)return null;let b=s,h={};for(let g=0;g+1<b.length;g+=2){let p=b[g],c=b[g+1];if(p)try{h[p]=co(c||"")}catch(k){h[p]=decodeURIComponent(c||"")}}let f=Number(h.ts);if(!Number.isFinite(f))return null;let d=Date.now()-f;if(!(d>=0&&d<=t))return null;let y={};for(let[g,p]of Object.entries(h))g!=="ts"&&g&&p!=null&&(y[g]=String(p));return{ts:f,cookies:y}}var mt="__d8a_linker_coordinator";function pt({getStates:e,windowRef:n}){let t=yt(n),o={},r=new Map;for(let i of e){let a=i(),s=he(i),m=oe(i);if(m&&m.length>0){for(let b of m){let h=ne(i,b),f=_e({propertyCfg:h,setParams:s,https:t,state:a}),d=ue(b,f.cookiePrefix);o[d]||(o[d]={kind:"session",name:d,propertyId:b,settings:f,getState:i}),r.has(f.cookiePrefix)||r.set(f.cookiePrefix,{settings:f,getState:i})}continue}let l=_e({propertyCfg:{},setParams:s,https:t,state:a});r.has(l.cookiePrefix)||r.set(l.cookiePrefix,{settings:l,getState:i})}for(let[i,a]of r.entries()){let s=ce(i);o[s]||(o[s]={kind:"client",name:s,settings:a.settings,getState:a.getState})}return o}function mo({windowRef:e}){let n=e;if(!n)throw new Error("createSharedLinkerCoordinator: windowRef is required");let t=We({windowRef:n}),o=new Set;function r(){for(let _ of o.values())try{let C=_();if(C!=null&&C.set&&C.set.debug_mode===!0)return!0;let L=C==null?void 0:C.propertyConfigs;if(L&&typeof L=="object"){for(let A of Object.values(L))if(R(A)&&A.debug_mode===!0)return!0}}catch(C){}return!1}function i(..._){if(r())try{console.log("[d8a][linker]",..._)}catch(C){}}let a=0,s=new Set,m=null,l=null,b=null,h=null,f=!1,d=!1,y=null;function g(){return Array.from(o.values())}function p(){let _=Array.from(s.values()).sort(),C=_.length>0;return{domains:_,accept_incoming:m?m.value:C,decorate_forms:l?l.value:!1,url_position:b?b.value:"query"}}function c(_){if(!R(_))return;a+=1;let C=_.domains;if(Array.isArray(C))for(let V of C){if(typeof V!="string")continue;let M=V.trim();M&&s.add(M)}let L=_.accept_incoming;typeof L=="boolean"&&(m={value:L,rev:a});let A=_.decorate_forms;typeof A=="boolean"&&(l={value:A,rev:a});let E=_.url_position,O=typeof E=="string"?E:"";(O==="query"||O==="fragment")&&(b={value:O,rev:a})}function k(_){c(_)}function S(_){o.add(_);try{k(_().linker)}catch(C){}return()=>{o.delete(_)}}function w(_){var A,E;if(!_)return;let C=String(((A=n.location)==null?void 0:A.href)||"");if(!C)return;let L=ut(C,be);if(L!==C&&typeof((E=n.history)==null?void 0:E.replaceState)=="function"){try{n.history.replaceState({},"",L)}catch(O){}n.location&&(n.location.href=L)}}function u(){var E;let _=String(((E=n.location)==null?void 0:E.href)||"");if(!_)return;let{value:C,where:L}=lo(_,be);if(!C)return;let A=gt({value:C,windowRef:n});A&&(h=A,i("parsed incoming _dl",{cookieNames:Object.keys(A.cookies||{}),ts:A.ts,where:L})),w(L)}function v(){var E,O,V;let _=pt({getStates:g(),windowRef:n}),C=String(((E=n.document)==null?void 0:E.cookie)||""),L=ke(C),A={};for(let M of Object.values(_)){let $=L.get(M.name);$&&(M.kind==="client"&&!((O=te($))!=null&&O.cid)||M.kind==="session"&&!((V=le($))!=null&&V.tokens)||(A[M.name]=$))}return A}function P(){let _=p();if(!_.domains||_.domains.length===0)return null;let C=v();if(!C||Object.keys(C).length===0)return null;let L=Date.now();return dt({cookies:C,ts:L,windowRef:n})}function N(_){var E;let C=p();if(!C.domains||C.domains.length===0)return _;let L=P();if(!L)return _;let A=lt(_,String(((E=n.location)==null?void 0:E.href)||""));return ft(A,C.domains)?rn(_,be,L,C.url_position):_}function W(_){if(!R(_))return;let C=typeof _.href=="string"?_.href:null;if(!C)return;let L=N(C);if(L!==C)try{_.href=L}catch(A){}}function x(_){var M,$,D;if(!R(_))return;let C=p();if(!C.decorate_forms)return;let L=typeof _.action=="string"?_.action:"";if(!L)return;let A=P();if(!A)return;let E=lt(L,String(((M=n.location)==null?void 0:M.href)||""));if(!ft(E,C.domains))return;let O=typeof _.method=="string"?_.method.toLowerCase():"";if(C.url_position==="query"&&O==="get"){let j=Array.isArray(_.childNodes)?_.childNodes:[],ie=!1;for(let q of j)if(R(q)&&String(q.name||"")===be){try{q.value=A}catch(Le){}ie=!0;break}if(!ie&&typeof(($=n.document)==null?void 0:$.createElement)=="function")try{let q=n.document.createElement("input");q.setAttribute("type","hidden"),q.setAttribute("name",be),q.setAttribute("value",A),(D=_.appendChild)==null||D.call(_,q)}catch(q){}return}let V=rn(L,be,A,C.url_position);if(V!==L)try{_.action=V}catch(j){}}function U(_,C){let L=_;for(let A=0;A<8;A+=1){if(!L||typeof L!="object")return null;let E=String(L.tagName||"").toUpperCase();if(C.includes(E))return L;L=L.parentElement||L.parentNode||null}return null}function I(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function H(_){let C=R(_)?_.target:null,L=U(C,["A"]);L&&W(L)}function z(_){let C=R(_)?_.target:null,L=U(C,["FORM"]);L&&x(L)}function J(){if(!p().accept_incoming||!h)return;let C=g(),L=C[0]||null,A=L?pe(L):{};if(String((A==null?void 0:A.analytics_storage)||"").toLowerCase()==="denied"){let M=null;for(let $ of Object.values(h.cookies)){let D=te($);if(D!=null&&D.cid){M=D.cid;break}}if(M)for(let $ of C)try{$().anonCid=M,$().incomingDl=null}catch(D){}h=null;return}let O=pt({getStates:C,windowRef:n}),V=!1;for(let M of Object.keys(h.cookies||{}))if(O[M]){V=!0;break}if(V){for(let[M,$]of Object.entries(h.cookies||{})){let D=O[M];if(D){if(D.kind==="client"){let j=te($);if(!(j!=null&&j.cid))continue;let ie=t.get(D.name);Wn({jar:t,cid:j.cid,consent:A,cookieDomain:D.settings.cookieDomain,cookiePrefix:D.settings.cookiePrefix,cookiePath:D.settings.cookiePath,cookieSameSite:D.settings.cookieSameSite,cookieSecure:D.settings.cookieSecure,cookieMaxAgeSeconds:D.settings.cookieMaxAgeSeconds,cookieUpdate:D.settings.cookieUpdate,forceCookieAttrsWrite:D.settings.forceCookieAttrsWrite});let q=t.get(D.name);i("applied client cookie",{name:D.name,cid:j.cid,cookieUpdate:D.settings.cookieUpdate,before:ie,after:q}),delete h.cookies[M];continue}if(D.kind==="session"){let j=D.getState(),ie=he(D.getState),q=yt(n),Le=ne(D.getState,D.propertyId),Z=_e({propertyCfg:Le,setParams:ie,https:q,state:j}),X=le($),Ae=t.get(D.name),ee=$n({jar:t,propertyId:D.propertyId,value:$,consent:A,cookieDomain:Z.cookieDomain,cookiePrefix:Z.cookiePrefix,cookiePath:Z.cookiePath,cookieSameSite:Z.cookieSameSite,cookieSecure:Z.cookieSecure,cookieMaxAgeSeconds:Z.cookieMaxAgeSeconds,cookieUpdate:Z.cookieUpdate,forceCookieAttrsWrite:Z.forceCookieAttrsWrite}),De=t.get(D.name);i("applied session cookie",{name:D.name,propertyId:D.propertyId,cookieUpdate:Z.cookieUpdate,wrote:(ee==null?void 0:ee.wrote)===!0,sid:X==null?void 0:X.sid,sct:X==null?void 0:X.sct,before:Ae,after:De}),ee!=null&&ee.wrote&&(X!=null&&X.tokens)&&(j.sharedSessionTokens=X.tokens,j.sharedSessionValue=String($||""),i("seeded shared session state",{propertyId:D.propertyId})),delete h.cookies[M]}}}if(!h.cookies||Object.keys(h.cookies).length===0){for(let M of C)try{M().incomingDl=null}catch($){}h=null}}}function T(){var L;if(d)return;let _=(L=n.HTMLFormElement)==null?void 0:L.prototype,C=_==null?void 0:_.submit;typeof C=="function"&&(y=C,_.submit=function(){try{x(this)}catch(E){}return C.call(this)},d=!0)}function re(){var _,C,L,A,E,O;f||(f=!0,u(),J(),(C=(_=n.document)==null?void 0:_.addEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.addEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.addEventListener)==null||O.call(E,"submit",z),T())}function fe(){var _,C,L,A,E,O,V;if(f&&(f=!1,(C=(_=n.document)==null?void 0:_.removeEventListener)==null||C.call(_,"mousedown",I),(A=(L=n.document)==null?void 0:L.removeEventListener)==null||A.call(L,"keyup",H),(O=(E=n.document)==null?void 0:E.removeEventListener)==null||O.call(E,"submit",z),d)){let M=(V=n.HTMLFormElement)==null?void 0:V.prototype;if(M&&y)try{M.submit=y}catch($){}d=!1,y=null}}return{start:re,stop:fe,applyIncomingIfReady:J,registerRuntime:S,updateConfigPatch:c,__internal:{encodeDl:dt,decodeDl:gt,decorateUrlIfNeeded:N,stripParamFromUrl:ut,setParamInUrl:rn,resolveLinkerConfig:uo}}}function po({windowRef:e}){let n=e,t=Y(n,mt);if(t)return t;let o=mo({windowRef:n});return se(n,mt,o),o}function ht({windowRef:e,getState:n}){let t=po({windowRef:e}),o=t.registerRuntime(n);return{start:()=>t.start(),stop:()=>o(),applyIncomingIfReady:()=>t.applyIncomingIfReady(),updateConfigPatch:r=>t.updateConfigPatch(r),__internal:t.__internal}}function _t({windowRef:e=window,dataLayerName:n,globalName:t,gtagDataLayerName:o}={}){let r=e;if(!r)throw new Error("installD8a: window is required");r.d8a_tag_data=r.d8a_tag_data||{};let i=r.d8a_tag_data,a=ot({windowRef:r,dataLayerName:n}),s=rt({windowRef:r,globalName:t}),m=it({windowRef:r,gtagDataLayerName:o});i.__d8aInstallResults||(i.__d8aInstallResults={}),i.__d8aInstallResultsByDataLayer||(i.__d8aInstallResultsByDataLayer={});let l=i.__d8aInstallResults,b=i.__d8aInstallResultsByDataLayer,h=`${a}|${s}`;if(l[h])return l[h];ae(r,a);let f=b[a]||null;if(f){typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let w={consumer:f.consumer,dispatcher:f.dispatcher,dataLayerName:a,globalName:s};return l[h]=w,w}typeof Y(r,s)!="function"&&se(r,s,Ge({windowRef:r,dataLayerName:a}));let d=wn({windowRef:r,dataLayerName:a}),y=[];d.setOnConfig((w,u)=>{for(let v of y)v(w,u)});let g=[];d.setOnSet(w=>{for(let u of g)u(w)});let p=tt({windowRef:r,getState:d.getState});p.attachLifecycleFlush(),d.setOnEvent((w,u)=>{p.enqueueEvent(w,u)});let c=ht({windowRef:r,getState:d.getState});c.start(),g.push(w=>{var u;w&&typeof w=="object"&&w.type==="field"&&w.field==="linker"&&c.updateConfigPatch(w.value),w&&typeof w=="object"&&w.type==="object"&&c.updateConfigPatch((u=w==null?void 0:w.obj)==null?void 0:u.linker),c.applyIncomingIfReady()}),y.push(()=>c.applyIncomingIfReady());let k=st({windowRef:r,getState:d.getState,dataLayerName:m});d.start(),k.start();try{let w=ct({windowRef:r,getState:d.getState,dispatcher:p});y.push(()=>w.onConfig()),w.start()}catch(w){}let S={consumer:d,dispatcher:p,dataLayerName:a,globalName:s};return l[h]=S,b[a]=S,S}_t();})();
|
|
3
3
|
//# sourceMappingURL=wt.min.js.map
|
package/package.json
CHANGED