1var TTDConversionEvents;(()=>{"use strict";var e={d:(n,t)=>{for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{argsToSdkFunction:()=>we,clearAllConfigs:()=>Ee,event:()=>Ie});var t={tcfV2ConsentVersion:2,consentRequestHasTimedOut:!1,waitForConsentTimeout:null,consentCheckExists:!1,isGdprApplicable:!1,gdprConsentString:null};function i(){return new URL(window.location.href).searchParams.has("upjs_debug")}function r(){return i()||null!=localStorage.getItem("enable-ttd-pixel-debugging")}function o(e){if(!e)return"";var n=void 0!==e.advertiserId&&null!==e.advertiserId?"adv_".concat(e.advertiserId):"merchant_".concat(e.merchantId),t=e.pixelIds&&e.pixelIds.length>0?"|".concat(e.pixelIds.join(",")):"";return"".concat(n).concat(t," ")}function a(e,n){var t=r(),i=(null==n?void 0:n.enableDebug)||!1;if(t||i){var a=o(n);console.info("TTD Pixel v3: ".concat(a).concat(e))}}function c(e,n){var t=r(),i=(null==n?void 0:n.enableDebug)||!1;if(t||i){var a=o(n);console.error("TTD Pixel v3: ".concat(a).concat(e))}}function d(e,n){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];var a=r(),c=(null==n?void 0:n.enableDebug)||!1;if(a||c){var d=o(n);console.warn("TTD Pixel v3: ".concat(d).concat(e),t)}}var s=function(){return s=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},s.apply(this,arguments)},l={merchantId:null,advertiserId:null,enableDebug:!1,enableCookieSyncing:!0,rootUrl:"https://insight.adsrvr.org",dataProcessingOption:null,pixelVersion:"3.0.0"};function u(e){return!(null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&(isNaN(e)||!isFinite(e)))}function v(e,n,t){var i=null!=e?"adv_".concat(e):"merchant_".concat(n);return t?"".concat(i,"|").concat(t):i}function f(e,n,t,i,r){for(var o=u(n),s=u(t),l=i&&i.length>0,f=o||s,p=Array.from(new Set(e.values())),g=0,h=l?i.map((function(e){return v(n,t,e)})):[v(n,t)];g<h.length;g++){var m=h[g],y=e.get(m);if(y)return a("Exact config match found",y),y}if(f&&!l||l&&!f){var b=p.filter((function(e){return!!(o&&e.advertiserId===n||s&&e.merchantId===t)||!(!l||!i.some((function(n){var t;return null===(t=e.pixelIds)||void 0===t?void 0:t.includes(n)})))}));if(b.length>0)return a("Partial config match found",b[0]),b.length>1&&d("Multiple partial config matches found, using first one",b[0],b.slice(1)),b[0];if(f)return void c("No matching config found for adv/merchant, event will not fire")}if(!f||!l)return 1===p.length?(a("Single config found, using it for event",p[0]),p[0]):(d("Event ids not sent, will use mostRecentInitConfig",r),r);c("Event sent ids but no exact config match found, event will not fire")}var p=function(){return p=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},p.apply(this,arguments)},g=p({},t),h=p({},l);function m(e){if(g=p({},t),h=e,"function"==typeof window.__tcfapi){g.consentCheckExists=!0,g.waitForConsentTimeout=setTimeout(b,1e3),window.__tcfapi("addEventListener",g.tcfV2ConsentVersion,y),w("parse tcf response");var n="&gdpr=".concat(g.isGdprApplicable?1:0),i=null===g.gdprConsentString||void 0===g.gdprConsentString?"":"&gdpr_consent=".concat(g.gdprConsentString);return"".concat(n).concat(i)}w("tcfapi not a function")}function y(e,n){if(g.consentRequestHasTimedOut)return w("tcfapi consent request timed out"),void(g.isGdprApplicable=!0);n&&(clearTimeout(g.waitForConsentTimeout),g.isGdprApplicable=e.gdprApplies,g.gdprConsentString=e.tcString)}function b(){g.consentRequestHasTimedOut=!0}function w(e){(r()||h.enableDebug)&&console.info("TTD Pixel v3: "+e)}var _,I=function(){return I=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},I.apply(this,arguments)},k=null,x={gppString:""},E=I({},l);function D(){_=!0}function T(e){var n;return _?(O("gpp request timed out"),void window.__gpp("removeEventListener",null,e.listenerId)):"signalStatus"===e.eventName&&"ready"===e.data?(x.gppString=null===(n=null==e?void 0:e.pingData)||void 0===n?void 0:n.gppString,clearTimeout(k),window.__gpp("removeEventListener",null,e.listenerId),S(x)):void O("gpp event invalid")}function S(e){var n="&gpp_consent="+e.gppString;return"".concat(n)}function O(e){(r()||E.enableDebug)&&console.info("TTD Pixel v3: "+e)}function C(e,n,t){!function(e){var n=document.getElementById(e);do{n&&n.parentElement.removeChild(n),n=document.getElementById(e)}while(n)}(n);var i=document.createElement("iframe");function r(){document.body.appendChild(i)}return i.setAttribute("id",n),i.setAttribute("height","0"),i.setAttribute("width","0"),i.setAttribute("style","display:none;"),i.setAttribute("src",e),i.setAttribute("title",t),"complete"===document.readyState?setTimeout(r,0):window.addEventListener?window.addEventListener("load",r):window.attachEvent?window.attachEvent("onload",r):r(),i}function L(){var e=window,n="",t=!1;try{top.location.href&&(n=top.location.href)}catch(e){t=!0}if(t)for(;;)try{if(n=e.document.referrer,window.parent==e)break;e=window.parent}catch(e){break}
1return-1<n.indexOf("cloudfront.net")&&(n=function(e,n){n=n.replace(/\[/,"\\[").replace(/]/,"\\]");var t=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}(n,"url")||n),n}var j=function(){var e,n,t={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i={isReady:!1,readyWait:1,holdReady:function(e){e?i.readyWait++:i.ready(!0)},ready:function(n){if(!0===n&&0==--i.readyWait||!0!==n&&!i.isReady){if(!document.body)return setTimeout((function(){return i.ready()}),1);if(i.isReady=!0,!0!==n&&--i.readyWait>0)return;null==e||e.resolveWith(document,[i])}},bindReady:function(){if(!e){if(e=i._Deferred(),"complete"===document.readyState)return setTimeout((function(){return i.ready()}),1);if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",(function(){return i.ready()}),!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n),window.attachEvent("onload",i.ready);var t=!1;try{t=null==window.frameElement}catch(e){console.log(e)}document.documentElement.doScroll&&t&&r()}}},_Deferred:function(){var e,n=[],t=!1,r=!1,o={done:function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];if(!r){var c=void 0;e&&(c=e,e=void 0);for(var d=0,s=t;d<s.length;d++){var l=s[d],u=i.type(l);"array"===u?o.done.apply(o,l):"function"===u&&n.push(l)}c&&o.resolveWith(c[0],c[1])}return o},resolveWith:function(i,a){if(void 0===a&&(a=[]),!r&&!e&&!t){t=!0;try{for(;n.length;){var c=n.shift();null==c||c.apply(i,a)}}finally{e=[i,a],t=!1}}return o},resolve:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.resolveWith(this,e)},isResolved:function(){return!(!t&&!e)},cancel:function(){return r=!0,n=[],o}};return o},type:function(e){return null==e?String(e):t[Object.prototype.toString.call(e)]||"object"}};function r(){if(!i.isReady){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(r,1)}i.ready()}}return document.addEventListener?n=function(){document.removeEventListener("DOMContentLoaded",n,!1),i.ready()}:document.attachEvent&&(n=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",n),i.ready())}),function(n){i.bindReady(),null==e||e.done(n)}}(),U=function(){return U=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},U.apply(this,arguments)},P=U({},l);function A(e,n){if(P=e,J("Detection started! Library is configured to detect: ",n.detectionSubject),J("Detection event type is ",n.detectionEventType),J("Full config: ",n),"onclick"===n.detectionEventType&&(n.detectionEventType="click"),"onsubmit"===n.detectionEventType||"click"===n.detectionEventType){var t=document.querySelector("body");t&&(R(t,"document",n),n.detectDynamicNodes&&G(t,"document",n))}else J("Detection type not supported! We will not start auto detection.")}function R(e,n,t){var i,r,o;t.scopedTriggers=null!==(i=t.scopedTriggers)&&void 0!==i?i:{},t.scopedValidInputs=null!==(r=t.scopedValidInputs)&&void 0!==r?r:{},t.scopedEventListeners=null!==(o=t.scopedEventListeners)&&void 0!==o?o:{},F(n,t),N(e,n,t)}function N(e,n,t){var i,r,o,a=H(e,n,t),c=H(e,n,t);t.scopedTriggers[n]=null!==(i=t.scopedTriggers[n])&&void 0!==i?i:[],t.scopedValidInputs[n]=null!==(r=t.scopedValidInputs[n])&&void 0!==r?r:[],t.scopedEventListeners[n]=null!==(o=t.scopedEventListeners[n])&&void 0!==o?o:[];for(var d=0,s=c;d<s.length;d++){var l=s[d];l&&l.tagName&&"INPUT"===l.tagName&&t.scopedValidInputs[n].push(l)}J('triggers ["'.concat(n,'"] '),a),J('validInputs ["'.concat(n,'"] '),c),a.forEach((function(e){t.scopedTriggers[n].push(e)}));for(var u=function(e){var i=function(){try{J("Detect event: ",t.detectionEventType,"on element, ",e);for(var n=Object.entries(t.scopedValidInputs).map((function(e){return e[1]})).flatMap((function(e){return e})),i=0,r=n;i<r.length;i++){var o=r[i].value.trim();if(B(o,t)){J("We detected: ",o),M(t);break}}}catch(e){J(e)}};t.scopedEventListeners[n].push(i),e.addEventListener(t.detectionEventType,i,{once:!0,capture:!0})},v=0,f=a;v<f.length;v++)u(f[v]);for(var p,g=(p=e,Array.from(p.querySelectorAll("*")).filter((function(e){return!!e.shadowRoot})).map((function(e){return e.shadowRoot}))),h=0;h<g.length;h++){var m=g[h],y=n+"/shadow_root_"+h;N(m,y,t),G(m,y,t)}}function M(e){J("Detection stopped."),function(e){if(e.detectDynamicNodes){J("Checking for dynamically added elements is turned off.");for(var n=0,t=Object.entries(e.scopedDynamicObservers);n<t.length;n++){var i=t[n][1];i&&i.disconnect(),e.scopedDynamicObservers={}}}}(e),F("all",e)}function F(e,n){if(J("clearing detection hooks (".concat(e,")")),"all"===e){for(var t=0,i=Object.entries(n.scopedTriggers);t<i.length;t++){var r=i[t],o=r[0];if(u=r[1])for(var a=0;a<u.length;a++)u[a].removeEventListener(n.detectionEventType,n.scopedEventListeners[o][a],{
1capture:!0})}n.scopedTriggers={},n.scopedEventListeners={}}else if(n.scopedTriggers){for(var c=[],d=0,s=Object.entries(n.scopedTriggers);d<s.length;d++){var l=s[d],u=(o=l[0],l[1]);if(o.startsWith(e)){if(u)for(a=0;a<u.length;a++)u[a].removeEventListener(n.detectionEventType,n.scopedEventListeners[o][a],{capture:!0});c.push(o)}}for(var v=0;v<c.length;v++)o=c[v],n.scopedTriggers[o]=[],n.scopedEventListeners[o]=[]}}function G(e,n,t){var i;t.detectDynamicNodes&&(t.scopedDynamicObservers=null!==(i=t.scopedDynamicObservers)&&void 0!==i?i:{},t.scopedDynamicObservers[n]=q((function(){J("Detected dynamically added nodes."),R(e,n,t)}),500),t.scopedDynamicObservers[n].observe(e,{childList:!0,subtree:!0,attributes:!0}))}function H(e,n,t){J('collectElements("'.concat(n,'", ').concat(t.cssSelectors,")"));for(var i=[],r=0,o=t.cssSelectors;r<o.length;r++)if((p=o[r]).length>0){var a=e.querySelectorAll(p);a&&a.forEach((function(e){i.includes(e)||i.push(e)}))}for(var c=window.location.hostname,d=document.getElementsByTagName("iframe"),s=0,l=Array.from(d);s<l.length;s++){var u=l[s];if(V(c,u)&&(u.__upixel_detection={root:e,scopeName:n+"/iframe",config:t},u.removeEventListener("load",W),u.addEventListener("load",W),u.contentDocument))for(var v=0,f=t.cssSelectors;v<f.length;v++){var p;(p=f[v]).length>0&&u.contentDocument.querySelectorAll(p).forEach((function(e){i.includes(e)||i.push(e)}))}}return i}function q(e,n){var t=0,i=null;return new MutationObserver((function(r,o){var a=Date.now(),c=a-t;c>=n?(t=a,e(r,o)):(i&&clearTimeout(i),i=setTimeout((function(){t=Date.now(),e(r,o)}),n-c))}))}function V(e,n){if(!n.src)return!1;try{var t=e===new URL(n.src).hostname;return t&&J("Iframe "+n.src+" can be accessed"),t}catch(e){return J("error: ",e),!1}}function W(e){var n=e.currentTarget;if(n&&n.__upixel_detection)try{R(n.__upixel_detection.root,n.__upixel_detection.scopeName,n.__upixel_detection.config)}catch(e){J(e)}}function B(e,n){return function(e,n){var t=/((([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,}))/i;if(n.detectionSubject.includes("email")&&t.test(e)){var i=function(e){return e.toLowerCase().trim()}(e.match(t)[0]);return J("We detected email: "+i),function(e,n){if(e&&n){var t=new CustomEvent("detected-identifier",{detail:{identifier:e,type:n}});J("Dispatched event with identifier: ",e," and type: ",n),window.dispatchEvent(t)}}(i,"email"),!0}return!1}(e,n)}function J(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(r()||P.enableDebug)&&console.info("TTD Pixel v3 - Detection: "+e,n)}q.prototype.observe=function(e,n){this.mutationObserver.observe(e,n)},q.prototype.disconnect=function(){null!=this.nextTimeoutHandle&&clearTimeout(this.nextTimeoutHandle),this.mutationObserver.disconnect()},q.prototype.takeRecords=function(){return this.mutationObserver.takeRecords()},q.prototype.throttledCallback=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=Date.now();null!=this.args?this.args=e:this.lastInvocationTime+this.minDelayMs<t?(this.lastInvocationTime=t,this.callback(this.args)):(this.args=e,this.nextTimeoutHandle=setTimeout(function(){this.lastInvocationTime=Date.now(),this.nextTimeoutHandle=null,this.callback.apply(null,this.args),this.args=null}.bind(this),this.minDelayMs))};var K=function(){return K=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},K.apply(this,arguments)},z=function(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{d(i.next(e))}catch(e){o(e)}}function c(e){try{d(i.throw(e))}catch(e){o(e)}}function d(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}d((i=i.apply(e,n||[])).next())}))},X=function(e,n){var t,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(e){o=[6,e],i=0}finally{t=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},$=K({},l),Q={},Y=null;function Z(e,n){var t=this;$=e,re(n,Q),ie(n)?Q.sdkObj=window.__uid2:te(n)&&(Q.sdkObj=window.__euid);try{Q.sdkObj.callbacks.push((function(i,r){return z(t,void 0,void 0,(function(){var t,o,a;return X(this,(function(c){switch(c.label){case 0:switch(i){case"SdkLoaded":return[3,1];case"InitCompleted":return[3,2];case"IdentityUpdated":return[3,4]}return[3,5];case 1:try{window.__ttd_m_invoke_once=null!==(t=window.__ttd_m_invoke_once)&&void 0!==t?t:{},window.__ttd_m_invoke_once._uid_init||(window.__ttd_m_invoke_once._uid_init=1,null!==(o=n.baseUrl)&&void 0!==o||(n.baseUrl=Q.uidBaseUrl),Q.sdkObj.init({baseUrl:n.baseUrl}))}catch(e){oe("Non-TTD actor initialized UID SDK, mind the consistency of UID baseUrl.",e)}return[3,5];case 2:return[4,ne((function(){return r.identity}),e,n)];case 3:return c.sent(),[3,5];case 4:return(null===(a=r.identity)||void 0===a?void 0:a.advertising_token)&&(n.uid_token=r.identity.advertising_token,oe("U
1ID token updated for advertiser ".concat(null==Y?void 0:Y.advertiserId,", pixel ").concat(null==Y?void 0:Y.pixelId))),[3,5];case 5:return[2]}}))}))}))}catch(n){ae("Did not setup uid hooks: ",e,n)}}function ee(e,n,t,i,r){var o,a;null===Y?void 0===window._uidSdkListenerLock[e]&&(window._uidSdkListenerLock[e]=1,1===(null!==(a=null===(o=r.pixelIds)||void 0===o?void 0:o.length)&&void 0!==a?a:0)?(Y={advertiserId:r.advertiserId,pixelId:r.pixelIds[0]},oe("UID config claimed by advertiser ".concat(Y.advertiserId,", pixel ").concat(Y.pixelId)),re(n,Q),void 0===Q.sdkObj&&void 0===window.uidSdkLoaderPromise?window.uidSdkLoaderPromise=new Promise((function(e,n){var r=document.createElement("script");r.setAttribute("defer","true"),r.setAttribute("src",Q.uidSdkUrl),r.addEventListener("load",(function(){e(),t()})),r.addEventListener("error",(function(e){n(e),i(e)})),document.body.appendChild(r)})):z(this,void 0,void 0,(function(){return X(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,window.uidSdkLoaderPromise];case 1:return e.sent(),t(),[3,3];case 2:return ae("Failed to load uid sdk: ",e.sent()),[3,3];case 3:return[2]}}
1))}))):c("UID configuration currently only supports a single pixel ID, but zero or multiple pixel ids were provided.",r)):ae("UID already configured by advertiser ".concat(Y.advertiserId,", pixel ").concat(Y.pixelId,". Only one UID configuration per page is currently allowed."))}function ne(e,n,t){return z(this,void 0,void 0,(function(){var i,r,o;return X(this,(function(a){switch(a.label){case 0:return a.trys.push([0,8,,9]),(i=e())?[3,3]:t.email?[4,Q.sdkObj.setIdentityFromEmail(t.email,t)]:[3,2];case 1:return a.sent(),[3,3];case 2:t.emailHash?Q.sdkObj.setIdentityFromEmailHash(t.emailHash,t):t.phone?Q.sdkObj.setIdentityFromPhone(t.phone,t):t.phoneHash&&Q.sdkObj.setIdentityFromPhoneHash(t.phoneHash,t),a.label=3;case 3:return i?(t.uid_token=i.advertising_token,oe("UID token set from existing identity for advertiser ".concat(n.advertiserId),n),[3,7]):[3,4];case 4:return window.ttdConversionEvents.activeDetection?[3,7]:(oe("in fire or detect no identity"),r=new Promise((function(e){window.addEventListener("detected-identifier",(function(n){e(n.detail.identifier),window.ttdConversionEvents.activeDetection=null})),window.ttdConversionEvents.startDetection=A,window.ttdConversionEvents.startDetection(n,t)})),window.ttdConversionEvents.activeDetection=r,[4,r]);case 5:return o=a.sent(),[4,Q.sdkObj.setIdentityFromEmail(o,t)];case 6:return a.sent(),[3,7];case 7:return[3,9];case 8:return ae("error setting up cstgOrDetect: ",a.sent()),[3,9];case 9:return[2]}}
1))}))}function te(e){return"EUID"===(null==e?void 0:e.type)||e.serverPublicKey.includes("EUID")}function ie(e){return"UID2"===(null==e?void 0:e.type)||e.serverPublicKey.includes("UID2")}function re(e,n){ie(e)?(n.uidSdkUrl="https://js.adsrvr.org/uid2-sdk-4.0.1.js",n.uidBaseUrl="https://global.prod.uidapi.com",n.rtUidTokenName="uid2_token"):te(e)&&(n.uidSdkUrl="https://js.adsrvr.org/euid-sdk-4.0.1.js",n.uidBaseUrl="https://prod.euid.eu",n.rtUidTokenName="euid_token")}function oe(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(r()||$.enableDebug)&&console.info("TTD Pixel v3 - UnifiedId: "+e,n)}function ae(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(r()||$.enableDebug)&&console.warn("TTD Pixel v3 - UnifiedId: "+e,n)}function ce(){var e={};return document.cookie.split(";").forEach((function(n){if(n){var t=n.split("="),i=t[0].trim(),r=t[1].trim();e[i]=r}})),e}function de(e,n){(r()||e)&&console.warn("TTD Pixel v3 - GA4: "+n)}var se=function(){return se=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},se.apply(this,arguments)},le=function(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))};function ue(e){var n=window.ttdConversionEventsLayer.indexOf(e);-1!==n&&window.ttdConversionEventsLayer.splice(n,1)}function ve(e){var n=e.config;if(!n)throw"Cannot execute event without config";switch(e.method){case"event":a("event fire triggered",n),Ie(e.params,n,!0),e.hasFired=!0;break;case"optout":a("optout triggered",n),e.params.isoptout="1",Ie(e.params,n,!1),e.hasFired=!0;break;default:throw a("unexpected event triggered: "+e.method,n),"method not implemented"}}var fe,pe,ge=function(){return ge=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},ge.apply(this,arguments)},he=function(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{d(i.next(e))}catch(e){o(e)}}function c(e){try{d(i.throw(e))}catch(e){o(e)}}function d(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}d((i=i.apply(e,n||[])).next())}))},me=function(e,n){var t,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(e){o=[6,e],i=0}finally{t=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},ye=new Map,be=[];function we(e){var n,t,r,o=e[0],d=e[1];if("init"===o){a("init triggered");try{!function(e){var n,t,r,o,a,d,p,g,h,m=e.merchantId,y=e.advertiserId,b=e.enableCookieSyncing,w=e.enableDebug,_=e.rootUrl,I=e.dataProcessingOption,k=e.uidConfig,x=e.pixelIds,E=e.referrerUrl,D=e.ga4MeasurementId;he(this,void 0,void 0,(function(){var e,T;return me(this,(function(S){switch(S.label){case 0:if(e=function(e,n,t,i){for(var r,o=(null==i?void 0:i.length)>0?i.map((function(e){return v(n,t,e)})):[v(n,t)],a=0,c=o;a<c.length;a++){var d=c[a];if(r=e.get(d))break}r||(r=s({},l));for(var u=0,f=o;u<f.length;u++)d=f[u],e.set(d,r);return r}(ye,y,m,x),e.merchantId=null!=m?m:e.merchantId,e.advertiserId=null!=y?y:e.advertiserId,!function(e,n){return u(e)||u(n)}(e.advertiserId,e.merchantId))return c("Init failed: At least one valid identifier (advertiserId or merchantId) is required."),[2];e.enableCookieSyncing=null!==(n=null!=b?b:e.enableCookieSyncing)&&void 0!==n?n:l.enableCookieSyncing,e.enableDebug=null!==(r=null!==(t=null!=w?w:e.enableDebug||void 0)&&void 0!==t?t:i())&&void 0!==r?r:null!=localStorage.getItem("enable-ttd-pixel-debugging")||l.enableDebug,e.rootUrl=null!==(o=null!=_?_:e.rootUrl)&&void 0!==o?o:l.rootUrl,e.dataProcessingOption=null!==(a=null!=I?I:e.dataProcessingOption)&&void 0!==a?a:l.dataProcessingOption,e.uidConfig=null!==(d=null!=k?k:e.uidConfig)&&void 0!==d?d:void 0,e.pixelIds=null!==(p=null!=x?x:e.pixelIds)&&void 0!==p?p:void 0,e.ga4MeasurementId=null!==(g=null!=D?D:e.ga4MeasurementId)&&void 0!==g?g:void 0,e.referrerUrl=null!==(h=null!=E?E:e.referrerUrl)&&void 0!==h?h:void 0,fe=e,T=new Promise((function(e){return setTimeout(e,2e3)})),S.label=1;case 1:return S.trys.push([1,3,4,5]),[4,Promise.race([_e(e),T])];case 2:return S.sent(),[3,5];case 3:return c(S.sent(),e),[3,5];case 4:return e.initComplete=!0,function(e,n,t){for(var i,r,o,a,c,d=[],s=0,l=e;s<l.length;s++){var u=l[s];null!==(i=u.config)&&void 0!==i||(u.config=f(n,null!==(r=u.params.advertiserId)&&void 0!==r?r:u.params.adv,null!==(o=u.params.merchantId)&&void 0!==o?o:u.params.merchant_id,null!==(a=u.params.pixelIds)&&void 0!==a?a:u.params.pixel_ids,t)),(null===(c=u.config)||void 0===c?void 0:c.initComplete)?(ve(u),ue(u.args)):d.push(u)}e.splice.apply(e,le([0,e.length],d,!1))}(be,ye,fe),[7];case 5:return[2]}}
1))}))}(d)}catch(e){c("Init failed: ".concat(e instanceof Error?e.message:String(e)))}}else{var p=f(ye,null!==(n=d.advertiserId)&&void 0!==n?n:d.adv,null!==(t=d.merchantId)&&void 0!==t?t:d.merchant_id,null!==(r=d.pixelIds)&&void 0!==r?r:d.pixel_ids,fe),g={method:o,params:d,args:e,config:p};(null==p?void 0:p.initComplete)?(ve(g),ue(e)):function(e,n){var t=n.params;n.config||a("No matching config found for event, queuing until init completes"),e.push(n),setTimeout((function(){var i;if(e.includes(n)&&!n.hasFired&&!n.config){var r=t.adv?"adv: ".concat(t.adv):t.merchant_id?"merchant_id: ".concat(t.merchant_id):"unknown",o=(null===(i=t.pixel_ids)||void 0===i?void 0:i.join(","))||"none";c("No matching config for ".concat(r,", pixel_ids: [").concat(o,"]. ")+"Ensure init is called with matching advertiserId/merchantId and pixelIds. Auto-firing event with default config."),n.hasFired=!0,Ie(t,se({},l),!0),function(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}(e,n),ue(n.args)}}),5e3)}(be,g)}}function _e(e){return new Promise((function(n){var t,i,r,o,s="".concat(e.rootUrl,"/track/cei"),l=void 0!==e.merchantId&&null!==e.merchantId?"merchant_id=".concat(e.merchantId):"advertiser_id=".concat(e.advertiserId),u="&cookie_sync=".concat(e.enableCookieSyncing?1:0),v="".concat(s,"?").concat(l).concat(u,"&upv=").concat(e.pixelVersion);null!=e.dataProcessingOption&&(v+="&dpop=".concat(e.dataProcessingOption.policies,"&dpor=").concat(e.dataProcessingOption.region)),e.pixelIds&&(v+="&upid=".concat(e.pixelIds.join(",")));var f=(null!==(t=e.advertiserId)&&void 0!==t?t:e.merchantId)+":"+(null!==(r=null===(i=e.pixelIds)||void 0===i?void 0:i.join(","))&&void 0!==r?r:"");e.uidConfig&&(v+="&uidc_present=1",window._uidSdkListenerLock=null!==(o=window._uidSdkListenerLock)&&void 0!==o?o:{},a("setting up uid config",e),ee(f,e.uidConfig,(function(){return Z(e,e.uidConfig)}),(function(n){return d("UID enabled but failed to register hooks: ",e,n)}),e));var p=m(e);if(null!=p)v+="".concat(p);else{var g=function(e){if(E=e,"function"==typeof window.__gpp)return void 0!==(x=function(){var e=window.__gpp("ping");if("1.0"==e.gppVersion){var n=window.__gpp("getGPPData");x.gppString=null==n?void 0:n.gppString}else x.gppString=null==e?void 0:e.gppString;return x}()).gppString?(O("gpp response already loaded, parse response"),S(x)):(k=setTimeout(D,1e3),_=!1,window.__gpp("addEventListener",T),void 0!==x.gppString?(O("gpp response received, parse response"),S(x)):void 0);O("gpp not a function")}(e);v+="".concat(null!=g?g:"")}e.enableDebug&&(v+="&debug=1"),window.addEventListener&&window.addEventListener("message",(function(n){!function(e,n){try{if(null===e.origin||"null"===e.origin)return;if(!new URL(e.origin).hostname.endsWith(".adsrvr.org"))return;if("string"!=typeof e.data)return;var t=JSON.parse(e.data);"UID2"!==t.type&&"EUID"!==t.type||function(e,n){var t;null===Y?e.advertiserId&&"string"==typeof e.advertiserId&&e.advertiserId===n.advertiserId&&(window._uidSdkListenerLock=null!==(t=window._uidSdkListenerLock)&&void 0!==t?t:{},n.uidConfig=e,ee(e.advertiserId+":"+e.pixelId,n.uidConfig,(function(){return Z(n,n.uidConfig)}
1),(function(e){ae("UID enabled but failed to register hooks: ",e)}),n)):ae("UID already configured by advertiser ".concat(Y.advertiserId,", pixel ").concat(Y.pixelId,". Only one UID configuration per page is currently allowed."))}(t,n)}catch(e){c("Error handling postMessage: ",e)}}(n,e)}));var h=e.referrerUrl||L();v+="&ref=".concat(h);var y="universal_pixel";e.pixelIds&&(y+="_"+e.pixelIds.join("_")),a("trigger GET conversion init call",e),C(v,y,"TTD Universal Pixel").onload=function(){return n()}}))}function Ie(e,n,t){var i,r,o,d,s,l,u,v,f,p,h=null!==(i=e.privacy_settings)&&void 0!==i?i:[],m=function(){var e;if(g.consentCheckExists)return{privacy_type:"GDPR",is_applicable:g.isGdprApplicable,consent_string:null!==(e=g.gdprConsentString)&&void 0!==e?e:""};w("tcfapi consent status check failed")}(),y=function(){if(""!=x.gppString&&null!=x.gppString)return{privacy_type:"GPP",is_applicable:!0,consent_string:x.gppString}}();if(t&&(m?(h=h.filter((function(e){return e.privacy_type!==m.privacy_type})),e.gdpr=m.is_applicable,e.gdpr_consent=m.consent_string):y&&(h=h.filter((function(e){return e.privacy_type!==y.privacy_type})),e.gpp_consent=y.consent_string)),null!==(r=e.adv)&&void 0!==r||(e.adv=e.advertiserId),e.advertiserId=void 0,null!==(o=e.merchant_id)&&void 0!==o||(e.merchant_id=e.merchantId),e.merchantId=void 0,void 0===n.merchantId||null===n.merchantId||e.merchant_id?void 0===n.advertiserId||null===n.advertiserId||e.adv||(e.adv=n.advertiserId):e.merchant_id=n.merchantId,void 0!==n.ga4MeasurementId){var b=function(e){var n=ce()._ga;if(!n||!n.startsWith("GA"))return de(e,"_ga cookie not found or malformed"),null;var t=n.split(".");return 4===t.length?t[2]+"."+t[3]:(de(e,"Unexpected _ga cookie format:"+n),null)}(n.enableDebug),_=function(e,n){var t=ce()["_ga_"+(n=n.startsWith("G-")?n.split("-")[1]:n)];if(!t||!t.startsWith("GS"))return de(e,"_ga_"+n+" cookie not found or malformed"),null;var i=t.split("."),r=i[0].includes("2"),o=i[2];return r?o.split("$")[0].slice(1):o}(n.enableDebug,n.ga4MeasurementId);b&&_&&(e.ga_client_id=b,e.ga_session_id=_)}n.enableDebug&&(e.debug="1"),null!==(d=e.data_processing_option)&&void 0!==d||(e.data_processing_option=n.dataProcessingOption),null!==(s=e.pixel_ids)&&void 0!==s||(e.pixel_ids=null!==(l=e.pixelIds)&&void 0!==l?l:n.pixelIds),e.pixelIds=void 0,null!==(u=e.referrer_url)&&void 0!==u||(e.referrer_url=L()),!(null===(v=n.uidConfig)||void 0===v?void 0:v.uid_token)||(f=e.adv,p=e.pixel_ids,!Y||f!==Y.advertiserId||p&&p.length>0&&!p.includes(Y.pixelId))||(ie(n.uidConfig)?e.uid2_token=n.uidConfig.uid_token:te(n.uidConfig)&&(e.euid_token=n.uidConfig.uid_token));var I={data:[ge(ge({},e),{privacy_settings:h})]};(n.enableDebug||e.debug)&&(I.debug="1"),function(e,n,t){var i=this,r="".concat(e.rootUrl,"/track/realtimeconversion");return a("trigger POST realtime conversion event",e),new Promise((function(o,c){var d=new XMLHttpRequest;d.withCredentials=!0,d.open("POST",r),d.setRequestHeader("Content-type","application/json"),d.setRequestHeader("eventDataSource","JsSdk"),d.setRequestHeader("eventDataSourceVersion",e.pixelVersion),d.onload=function(){d.status>=200&&d.status<300?o(d.response):c(d.response)},d.onerror=function(){return he(i,void 0,void 0,(function(){var i;return me(this,(function(r){return i=function(e){var n,t=null!==(n=e.responseText)&&void 0!==n?n:JSON.parse(e.responseText);return(null==t?void 0:t.Message)?t.Message:0!==e.status||e.responseText?"Status Code ".concat(e.status):"Request never hit server. Possible CSP violation."}(d),c(d.statusText),function(e,n,t,i){var r,o,c,d;he(this,void 0,void 0,(function(){var s,l,u,v;return me(this,(function(f){var p,g;return s="universal_pixel_realtime_fallback_"+(null!==(d=null!==(o=null===(r=t.pixel_ids)||void 0===r?void 0:r.join("_"))&&void 0!==o?o:null===(c=e.pixelIds)||void 0===c?void 0:c.join("_"))&&void 0!==d?d:""),a("trigger GET realtime conversion event fallback",e),p=n.data[0],g=Object.entries(p).filter((function(e){var n=e[0],t=e[1];return("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"pixel_ids"===n)&&null!=t&&""!==t})),l=g.map((function(e){var n=e[0],t=e[1];return"".concat(n,"=").concat(t)})).join("&"),u=e.pixelVersion,v="".concat(e.rootUrl,"/track/rt"),""!==l&&(v+="?"+l+"&eds=".concat("JsSdkGet")+"&edsv=".concat(u)+"&rt_fallback=1"),""!==i&&(v+="&rt_fbErr=".concat(i)),C(v,s,"TTD Universal Pixel Realtime Fallback"),[2]}))}
1))}(e,n,t,i),[2]}))}))},d.send(JSON.stringify(n))}))}(n,I,e).catch((function(e){return c(e,n)}))}function ke(e,n,t,i,r,o){return he(this,void 0,void 0,(function(){var c,d,s,l,u;return me(this,(function(v){if(!e||""==e||!n||n.length<=0)return a("no advertiser id or pixel id given"),[2];if(c="https://"+new URL(t).hostname,d={advertiserId:e,pixelIds:n,rootUrl:c,uidConfig:r,referrerUrl:o},s={adv:e,pixel_ids:n,referrer_url:o},i)for(l in i)u=i[l],"cookie_sync"===l?d.enableCookieSyncing="1"===u:void 0!==u&&(s[l]="fmt"===l&&"number"==typeof u?u.toString():u),"fmt"!==l||"4"!==u&&4!==u||(d.enableCookieSyncing=!1);return window.ttdConversionEventsLayer.push(["init",d]),setTimeout((function(){var t,i=f(ye,e,null,n);!window._uidSdkListenerLock||(null===(t=null==i?void 0:i.uidConfig)||void 0===t?void 0:t.uid_token)?window.ttdConversionEventsLayer.push(["event",s]):document.addEventListener("visibilitychange",(function(){return xe(s,e,n)}))}),1e3),[2]}))}))}function xe(e,n,t){return he(this,void 0,void 0,(function(){var i;return me(this,(function(r){return"hidden"===document.visibilityState&&((i=f(ye,n,null,t))&&Ie(e,i,!0),document.removeEventListener("visibilitychange",xe)),[2]}))}
1))}function Ee(){ye.clear(),be.length=0,fe=void 0,Q={},Y=null}window.ttdConversionEventsLayer=window.ttdConversionEventsLayer||[],window.ttdConversionEvents=null!==(pe=window.ttdConversionEvents)&&void 0!==pe?pe:{activeDetection:null,startDetection:null},function(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))}([],window.ttdConversionEventsLayer,!0).forEach(we),window.ttdConversionEventsLayer.push=function(e){return Array.prototype.push.call(window.ttdConversionEventsLayer,e),we(e),this.length},window.ttd_dom_ready=j,window.TTDUniversalPixelApi=function(e){this.init=function(n,t,i,r,o){ke(null!=n?n:void 0,null!=t?t:void 0,null!=i?i:void 0,null!=r?r:void 0,null!=o?o:void 0,null!=e?e:void 0)}},window.ttd_up_api={topLevelUrl:"",set_top_level_url:function(e){this.topLevelUrl=e},init:function(e,n,t,i,r){ke(e,n,t,i,r,this.topLevelUrl)}},TTDConversionEvents=n})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.