var LEAF_CONFIG={META_PIXEL_ID:"968080163881962",GA4_ID:"G-ZGTWQSTRHZ",GADS_ACCOUNT_ID:"AW-10884993403",GADS_CONVERSION:{PAGE_VIEW:"AW-10884993403/z5fSCLr83M0ZEPuir8Yo",VIEW_ITEM:"AW-10884993403/QzJvCL383M0ZEPuir8Yo",ADD_TO_CART:"AW-10884993403/8l1fCMD83M0ZEPuir8Yo",BEGIN_CHECKOUT:"AW-10884993403/qzu2CMP83M0ZEPuir8Yo",PURCHASE:"AW-10884993403/8NidCLf83M0ZEPuir8Yo"},TIKTOK_PIXEL_ID:"CG89SP3C77UFMURDSI50",CONNECT_ENDPOINT:"https://connect.simonsinek.com/shopify/webhook/custom"};function getCookie(e){var o=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let t=0;t<n.length;t++){let e=n[t];for(;" "===e.charAt(0);)e=e.substring(1);if(0===e.indexOf(o))return e.substring(o.length,e.length)}return""}function getFacebookCookies(){for(var e=document.cookie.split(";"),t={},o=0,n=e.length;o<n;o+=1){var a=e[o].split("=");" _fbp"===a[0]?t.fbp=a[1]:" _fbc"===a[0]&&(t.fbc=a[1])}return t}function setCookie(e,t){var o=new Date,o=(o.setTime(o.getTime()+31536e6),"expires="+o.toUTCString());document.cookie=t+"="+e+";"+o+";path=/"}let rand=()=>Math.random().toString(36).substring(2),generateRandomToken=()=>rand()+rand();function sendCustomEvent(e,t,o){fetch(LEAF_CONFIG.CONNECT_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-topic":t,"X-Shopify-shop-id":o},body:JSON.stringify(e)}).then(e=>e.json()).catch(e=>{console.error("Error sending custom event to app: ",JSON.stringify(e))})}function getCustomerData(e){var t,o={},n=window.dataLayer.find(e=>"logState"===e.event);return n&&(t=n.customerInfo,"purchase"===e?(t=n.billingInfo,o={email:n.checkoutEmail,first_name:n.billingInfo.firstName,last_name:n.billingInfo.lastName,default_address:t}):n.customerInfo&&n.customerEmail&&(o={email:n.customerEmail,first_name:n.customerInfo.firstName,last_name:n.customerInfo.lastName,default_address:t})),o}function getCurrentTime(){return Math.floor(Date.now()/1e3)}function getLatestETMSec(){var e=getCookie("latestETMSec"),t=getCurrentTime();return e&&""!==e?0==(e=t-e)?1:e:(setCookie(t,"latestETMSec"),1)}function extractSessionId(e){var t,o;return e?e.startsWith("GS1")?2<(t=e.split(".")).length?t[2]:"":!e.startsWith("GS2")||-1===(t=e.indexOf(".s"))?"":(o=e.indexOf("$",t=t+".s".length),e.substring(t,-1<o?o:e.length)):""}var previousPageUrl=document.referrer;function getConnectData(e,t){var o=getCookie("_ga"),n="",a="",t=(t&&(a=extractSessionId(getCookie("_ga_"+t.split("-")[1]))),n=""===o?window.leaf_signal_ga4_cid||localStorage.getItem("leaf_signal_ga4_cid")||"":o.split(".").splice(2,3).join("."),""===a&&(a=window.leaf_signal_ga4_sid||localStorage.getItem("leaf_signal_ga4_sid")||""),getCookie("connect_cid")),o=generateRandomToken(),r=previousPageUrl,c=getLatestETMSec(),i=getFacebookCookies(),o={id:o,platform_source:"cms",user_data:{cid:n,ga_session_id:a,external_id:t,fbp:i.fbp||null,fbc:i.fbc||null,page_referrer:r,engagement_time_msec:c,page_location:document.location.href,page_title:document.title||"/"},event_source_url:window.location.href};return 0<Object.keys(e).length&&(o.customer=e),o}function sendFbBrowserEvent(e,t,o,n){n&&fbq("trackSingle",n,e,t,{eventID:o})}function sendGA4BrowserEvent(e,t){gtag("event",e,t)}function sendGADBrowserEvent(e,t,o,n){gtag("set","user_data",e),gtag("event","purchase"===n?n:"conversion",t),gtag("event",n,o)}function sendTikTokBrowserEvent(e,t){"undefined"!=typeof ttq&&ttq.track(e,t)}function mapItemsForTikTok(e){return e.map(function(e){return{content_id:e.item_id,content_name:e.item_name||"",content_type:"product",price:parseEventsValueToFloat(e.price),quantity:e.quantity||1}})}function mapItemsForRemarketing(e){return e.map(e=>({id:e.item_id,google_business_vertical:"retail"}))}function mapItemsForAds(e){return{items:e.map(e=>({item_id:e.item_id,price:e.price,quantity:e.quantity||1}))}}function parseEventsValueToFloat(e){var t;return"string"==typeof e?(t=(e=e.trim()).replace(/[^0-9]/g,""),/[,.]d{2}$/.test(e)&&(t=t.replace(/(d{2})$/,".$1")),parseFloat(t)):e}function getFBViewItemData(e){e=e.items[0];return{contents:[{id:e.item_id,quantity:1}],content_ids:[e.item_id],content_type:"product",value:parseEventsValueToFloat(e.price),currency:e.currency}}function getProductData(e){var t=[],o=[];return e.items.forEach(function(e){t.push({id:e.item_id,quantity:e.quantity,item_price:e.price}),o.push(e.item_id)}),{content_type:"product",value:e.value,currency:e.currency,contents:t,content_ids:o}}function getFBPurchaseData(e){var t={content_name:"Thank You",content_type:"product",currency:e.currency},o=[],n=[];return t.value=parseEventsValueToFloat(e.value),e.items.forEach(function(e){o.push(e.item_id),n.push({id:e.item_id,quantity:e.quantity})}),t.content_ids=o,t.contents=n,t}function getFBInitCheckoutData(e){var t={currency:e.currency,content_type:"product",value:parseFloat(e.value)},o=[],n=[];return e.items.forEach(function(e){o.push({id:e.item_id,quantity:e.quantity}),n.push(e.item_id)}),t.contents=o,t.content_ids=n,t}function formatPurchaseItems(e){var o=[];return e.forEach(function(e){var t={};t.sku=e.item_id,t.title=e.item_name,t.vendor=e.item_brand,t.variant_title=e.item_variant||"default_title",t.price=parseEventsValueToFloat(e.price),t.quantity=e.quantity,t.product_id=e.item_id,t.variant_id=e.item_variant_id||e.item_id,o.push(t)}),o}function formatServerPurchaseData(e,t){return e.id=t.transaction_id,e.product_data&&e.product_data.content_name&&delete e.product_data.content_name,e.line_items=formatPurchaseItems(t.items),e.source_name="web",e.total_price=parseEventsValueToFloat(t.value),e.total_tax=parseEventsValueToFloat(t.tax),e.subtotal_price=parseEventsValueToFloat(t.transaction_subtotal),e.shipping_price=parseEventsValueToFloat(t.shipping),e.currency=t.currency,e.name=String(t.transaction_id),e.gateway=t.gateway,t.coupon&&(e.discount_code=t.coupon,e.discount_amount=parseEventsValueToFloat(t.discount)||0),e}function formatGA4Data(e){var o=[],t=JSON.parse(JSON.stringify(e));return t.shop_id&&delete t.shop_id,t.token&&delete t.token,t.value=parseEventsValueToFloat(e.value),e.items.forEach(function(e){var t=parseEventsValueToFloat(e.price);e.price=t,o.push(e)}),t.items=o,t}function formatCheckoutStepItemsData(e){var o=[],t=JSON.parse(JSON.stringify(e));return t.shop_id&&delete t.shop_id,t.items&&delete t.items,e.discount&&(t.discount=parseEventsValueToFloat(e.discount)),t.total_price=parseEventsValueToFloat(e.value),t.tax=parseEventsValueToFloat(e.tax),t.shipping=parseEventsValueToFloat(e.shipping),t.subtotal=parseEventsValueToFloat(e.subtotal),e.items.forEach(function(e){var t={sku:e.item_id,product_id:e.item_id,title:e.item_name,variant_title:e.item_variant||"default_title",vendor:e.item_brand,...e};e.item_variant_id&&(t.variant_id=e.item_variant_id),t.price=parseEventsValueToFloat(e.price),o.push(t)}),t.line_items=o,t}function formatGA4BrowserEventData(e){var t={send_to:LEAF_CONFIG.GA4_ID};return e.currency&&(t.currency=e.currency),e.value&&(t.value=e.value),e.items&&(t.items=e.items),e.transaction_id&&(t.transaction_id=String(e.transaction_id)),e.trigger_item_id&&(t.trigger_item_id=e.trigger_item_id),e.trigger_item_name&&(t.trigger_item_name=e.trigger_item_name),t}function eventHandler(e,t,o){var n=getCustomerData(e.event),a=getConnectData(n,o),r=getCurrentTime();switch(e.event){case"view_item":var c=getFBViewItemData(e.ecommerce);a.product_data=c,a.ga4_data=formatGA4Data(e.ecommerce),e.ecommerce.shop_id&&!e.tracked&&(sendFbBrowserEvent("ViewContent",c,a.id,t),(i=formatGA4BrowserEventData(e.ecommerce)).page_referrer=previousPageUrl,sendGA4BrowserEvent("view_item",i),sendCustomEvent(a,"custom/content_view",e.ecommerce.shop_id),sendGADBrowserEvent({},s={send_to:LEAF_CONFIG.GADS_CONVERSION.VIEW_ITEM,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,...mapItemsForAds(e.ecommerce.items)},d={send_to:LEAF_CONFIG.GADS_ACCOUNT_ID,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,items:mapItemsForRemarketing(e.ecommerce.items)},"view_item"),sendTikTokBrowserEvent("ViewContent",{value:parseEventsValueToFloat(e.ecommerce.value),currency:e.ecommerce.currency,contents:mapItemsForTikTok(e.ecommerce.items)}),setCookie(r,"latestETMSec"),e.tracked=!0);break;case"page_view":e.shop_id&&!e.tracked&&(sendCustomEvent(a,"custom/page_view",e.shop_id),sendFbBrowserEvent("PageView",{},a.id,t),sendGADBrowserEvent({},s={send_to:LEAF_CONFIG.GADS_CONVERSION.PAGE_VIEW,transaction_id:a.id},d={send_to:LEAF_CONFIG.GADS_ACCOUNT_ID,transaction_id:a.id},"page_view"),sendGA4BrowserEvent("page_view",i={send_to:o,page_referrer:previousPageUrl}),setCookie(r,"latestETMSec"),e.tracked=!0,previousPageUrl=document.location.href);break;case"add_to_cart":var i,s,d,c=getProductData(e.ecommerce);a.product_data=c,a.items=e.ecommerce.items,e.ecommerce.shop_id&&!e.tracked&&(sendFbBrowserEvent("AddToCart",c,a.id,t),sendGA4BrowserEvent("add_to_cart",i=formatGA4BrowserEventData(e.ecommerce)),sendCustomEvent(a,"custom/add_to_cart",e.ecommerce.shop_id),sendGADBrowserEvent({},s={send_to:LEAF_CONFIG.GADS_CONVERSION.ADD_TO_CART,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,...mapItemsForAds(e.ecommerce.items)},d={send_to:LEAF_CONFIG.GADS_ACCOUNT_ID,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,items:mapItemsForRemarketing(e.ecommerce.items)},"add_to_cart"),sendTikTokBrowserEvent("AddToCart",{value:parseEventsValueToFloat(e.ecommerce.value),currency:e.ecommerce.currency,contents:mapItemsForTikTok(e.ecommerce.items)}),setCookie(r,"latestETMSec"),e.tracked=!0);break;case"purchase":e.ecommerce.shop_id&&!e.tracked&&(sendFbBrowserEvent("Purchase",c=getFBPurchaseData(e.ecommerce),e.ecommerce.transaction_id,t),sendGA4BrowserEvent("purchase",i=formatGA4BrowserEventData(e.ecommerce)),s={send_to:LEAF_CONFIG.GADS_CONVERSION.PURCHASE,transaction_id:e.ecommerce.transaction_id,value:e.ecommerce.value,currency:e.ecommerce.currency,...mapItemsForAds(e.ecommerce.items)},d={send_to:LEAF_CONFIG.GADS_ACCOUNT_ID,transaction_id:e.ecommerce.transaction_id,value:e.ecommerce.value,currency:e.ecommerce.currency,items:mapItemsForRemarketing(e.ecommerce.items)},sendGADBrowserEvent({email:n?.email,address:{first_name:n?.first_name,last_name:n?.last_name}},s,d,"purchase"),sendTikTokBrowserEvent("CompletePayment",{value:parseEventsValueToFloat(e.ecommerce.value),currency:e.ecommerce.currency,contents:mapItemsForTikTok(e.ecommerce.items)}),a.product_data=JSON.parse(JSON.stringify(c)),sendCustomEvent(formatServerPurchaseData(a,e.ecommerce),"custom/purchase",e.ecommerce.shop_id),setCookie(r,"latestETMSec"),e.tracked=!0);break;case"begin_checkout":e.ecommerce.shop_id&&!e.tracked&&(sendFbBrowserEvent("InitiateCheckout",getFBInitCheckoutData(e.ecommerce),a.id,t),(i=formatGA4BrowserEventData(e.ecommerce)).page_referrer=previousPageUrl,sendGA4BrowserEvent("begin_checkout",i),a.ga4_data=formatGA4Data(e.ecommerce),a.product_data=getProductData(e.ecommerce),sendCustomEvent(a,"custom/begin_checkout",e.ecommerce.shop_id),sendGADBrowserEvent({},s={send_to:LEAF_CONFIG.GADS_CONVERSION.BEGIN_CHECKOUT,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,...mapItemsForAds(e.ecommerce.items)},d={send_to:LEAF_CONFIG.GADS_ACCOUNT_ID,transaction_id:a.id,value:e.ecommerce.value,currency:e.ecommerce.currency,items:mapItemsForRemarketing(e.ecommerce.items)},"begin_checkout"),sendTikTokBrowserEvent("InitiateCheckout",{value:parseEventsValueToFloat(e.ecommerce.value),currency:e.ecommerce.currency,contents:mapItemsForTikTok(e.ecommerce.items)}),setCookie(r,"latestETMSec"),e.tracked=!0);break;case"add_contact_info":case"add_shipping_info":case"add_payment_info":e.ecommerce.shop_id&&(a.event_data=formatCheckoutStepItemsData(e.ecommerce),a.step=e.event,sendCustomEvent(a,"custom/update_checkout",e.ecommerce.shop_id),setCookie(r,"latestETMSec"))}}function initFB(e,t){var o,n,a;e&&(n=window,a=document,n.fbq||(o=n.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},n._fbq||(n._fbq=o),(o.push=o).loaded=!0,o.version="2.0",o.queue=[],(n=a.createElement("script")).async=!0,n.src="https://connect.facebook.net/en_US/fbevents.js",(a=a.getElementsByTagName("script")[0]).parentNode.insertBefore(n,a)),fbq("set","autoConfig",!1,e),fbq.disablePushState=!0,fbq("init",e,t))}function initTikTok(e){if(e){var t=window,n=(document,"ttq"),a=(t.TiktokAnalyticsObject=n,t.ttq=t.ttq||[]);a.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],a.setAndDefer=function(e,t){e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}};for(var o=0;o<a.methods.length;o++)a.setAndDefer(a,a.methods[o]);a.instance=function(e){for(var t=a._i[e]||[],o=0;o<a.methods.length;o++)a.setAndDefer(t,a.methods[o]);return t},a.load=function(e,t){var o="https://analytics.tiktok.com/i18n/pixel/events.js",t=(a._i=a._i||{},a._i[e]=[],a._i[e]._u=o,a._t=a._t||{},a._t[e]=+new Date,a._o=a._o||{},a._o[e]=t||{},document.createElement("script")),o=(t.type="text/javascript",t.async=!0,t.src=o+"?sdkid="+e+"&lib="+n,document.getElementsByTagName("script")[0]);o.parentNode.insertBefore(t,o)},a.load(e),a.page()}}var ga4IdInit=LEAF_CONFIG.GA4_ID,scriptSrc="https://www.googletagmanager.com/gtag/js?id="+ga4IdInit;let leafScriptElem=document.createElement("script");function gtag(){window.dataLayer.push(arguments)}leafScriptElem.setAttribute("src",scriptSrc),leafScriptElem.setAttribute("async",""),document.head.appendChild(leafScriptElem),window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config",ga4IdInit,{send_page_view:!1});var adsAccountId=LEAF_CONFIG.GADS_ACCOUNT_ID;function getCountriesCodes(){return[{country:"Afghanistan",code:"93",iso:"AF"},{country:"Albania",code:"355",iso:"AL"},{country:"Algeria",code:"213",iso:"DZ"},{country:"American Samoa",code:"1-684",iso:"AS"},{country:"Andorra",code:"376",iso:"AD"},{country:"Angola",code:"244",iso:"AO"},{country:"Anguilla",code:"1-264",iso:"AI"},{country:"Antarctica",code:"672",iso:"AQ"},{country:"Antigua and Barbuda",code:"1-268",iso:"AG"},{country:"Argentina",code:"54",iso:"AR"},{country:"Armenia",code:"374",iso:"AM"},{country:"Aruba",code:"297",iso:"AW"},{country:"Australia",code:"61",iso:"AU"},{country:"Austria",code:"43",iso:"AT"},{country:"Azerbaijan",code:"994",iso:"AZ"},{country:"Bahamas",code:"1-242",iso:"BS"},{country:"Bahrain",code:"973",iso:"BH"},{country:"Bangladesh",code:"880",iso:"BD"},{country:"Barbados",code:"1-246",iso:"BB"},{country:"Belarus",code:"375",iso:"BY"},{country:"Belgium",code:"32",iso:"BE"},{country:"Belize",code:"501",iso:"BZ"},{country:"Benin",code:"229",iso:"BJ"},{country:"Bermuda",code:"1-441",iso:"BM"},{country:"Bhutan",code:"975",iso:"BT"},{country:"Bolivia",code:"591",iso:"BO"},{country:"Bosnia and Herzegovina",code:"387",iso:"BA"},{country:"Botswana",code:"267",iso:"BW"},{country:"Brazil",code:"55",iso:"BR"},{country:"British Indian Ocean Territory",code:"246",iso:"IO"},{country:"British Virgin Islands",code:"1-284",iso:"VG"},{country:"Brunei",code:"673",iso:"BN"},{country:"Bulgaria",code:"359",iso:"BG"},{country:"Burkina Faso",code:"226",iso:"BF"},{country:"Burundi",code:"257",iso:"BI"},{country:"Cambodia",code:"855",iso:"KH"},{country:"Cameroon",code:"237",iso:"CM"},{country:"Canada",code:"1",iso:"CA"},{country:"Cape Verde",code:"238",iso:"CV"},{country:"Cayman Islands",code:"1-345",iso:"KY"},{country:"Central African Republic",code:"236",iso:"CF"},{country:"Chad",code:"235",iso:"TD"},{country:"Chile",code:"56",iso:"CL"},{country:"China",code:"86",iso:"CN"},{country:"Colombia",code:"57",iso:"CO"},{country:"Croatia",code:"385",iso:"HR"},{country:"Cuba",code:"53",iso:"CU"},{country:"Cyprus",code:"357",iso:"CY"},{country:"Czech Republic",code:"420",iso:"CZ"},{country:"Denmark",code:"45",iso:"DK"},{country:"Ecuador",code:"593",iso:"EC"},{country:"Egypt",code:"20",iso:"EG"},{country:"Estonia",code:"372",iso:"EE"},{country:"Finland",code:"358",iso:"FI"},{country:"France",code:"33",iso:"FR"},{country:"Germany",code:"49",iso:"DE"},{country:"Greece",code:"30",iso:"GR"},{country:"Hong Kong",code:"852",iso:"HK"},{country:"Hungary",code:"36",iso:"HU"},{country:"Iceland",code:"354",iso:"IS"},{country:"India",code:"91",iso:"IN"},{country:"Indonesia",code:"62",iso:"ID"},{country:"Ireland",code:"353",iso:"IE"},{country:"Israel",code:"972",iso:"IL"},{country:"Italy",code:"39",iso:"IT"},{country:"Japan",code:"81",iso:"JP"},{country:"Mexico",code:"52",iso:"MX"},{country:"Netherlands",code:"31",iso:"NL"},{country:"New Zealand",code:"64",iso:"NZ"},{country:"Nigeria",code:"234",iso:"NG"},{country:"Norway",code:"47",iso:"NO"},{country:"Pakistan",code:"92",iso:"PK"},{country:"Philippines",code:"63",iso:"PH"},{country:"Poland",code:"48",iso:"PL"},{country:"Portugal",code:"351",iso:"PT"},{country:"Romania",code:"40",iso:"RO"},{country:"Russia",code:"7",iso:"RU"},{country:"Saudi Arabia",code:"966",iso:"SA"},{country:"Singapore",code:"65",iso:"SG"},{country:"South Africa",code:"27",iso:"ZA"},{country:"South Korea",code:"82",iso:"KR"},{country:"Spain",code:"34",iso:"ES"},{country:"Sweden",code:"46",iso:"SE"},{country:"Switzerland",code:"41",iso:"CH"},{country:"Taiwan",code:"886",iso:"TW"},{country:"Thailand",code:"66",iso:"TH"},{country:"Turkey",code:"90",iso:"TR"},{country:"Ukraine",code:"380",iso:"UA"},{country:"United Arab Emirates",code:"971",iso:"AE"},{country:"United Kingdom",code:"44",iso:"GB"},{country:"United States",code:"1",iso:"US"},{country:"Vietnam",code:"84",iso:"VN"},{country:"Zimbabwe",code:"263",iso:"ZW"}]}function handleConnectCid(){var e=getCookie("connect_cid");e&&""!==e||setCookie(generateRandomToken(),"connect_cid")}gtag("config",adsAccountId,{send_page_view:!1,allow_enhanced_conversions:!0}),gtag("consent","default",{ad_storage:"denied",analytics_storage:"denied",ad_user_data:"denied",ad_personalization:"denied"}),gtag("consent","update",{ad_storage:"granted",analytics_storage:"granted",ad_user_data:"granted",ad_personalization:"granted"}),((e,t,o,n,a)=>{e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},(n=t.createElement("script")).async=1,n.src="https://www.clarity.ms/tag/unflsj0s37",(a=t.getElementsByTagName("script")[0]).parentNode.insertBefore(n,a)})(window,document,"clarity");var load=0;function listenDLEvents(e){handleConnectCid();var t,o,n,a=LEAF_CONFIG.META_PIXEL_ID,r=LEAF_CONFIG.GA4_ID,c=LEAF_CONFIG.TIKTOK_PIXEL_ID,i={external_id:getCookie("connect_cid")},s=window.dataLayer.find(e=>"logState"===e.event);s&&s.customerInfo&&(o=s.customerEmail?s.customerEmail.toLowerCase():null,i.em=o,o=s.customerInfo.firstName?s.customerInfo.firstName.toLowerCase():null,i.fn=o,o=s.customerInfo.lastName?s.customerInfo.lastName.toLowerCase():null,i.ln=o,o=s.customerInfo.city||null,i.ct=o?o.replace(/ /g,"").toLowerCase():null,null!==s.customerInfo.state&&(o=s.customerInfo.state,i.st=o?o.replace(/ /g,"").toLowerCase():null),o=s.customerInfo.zip,i.zp=o?o.replace(/ /g,"").replace("-","").toLowerCase():null,i.country=s.customerInfo.country?s.customerInfo.country.toLowerCase():null,o=s.customerInfo.phone)&&(n=getCountriesCodes(),t=s.customerInfo.country_code?s.customerInfo.country_code.toUpperCase():null,s=n.find(e=>e.iso===t),n=o.replace(/D/g,""),o=parseInt(n,10),n=""+s.code+o,i.ph=n),0===load&&(load=1,initFB(a,i),initTikTok(c)),eventHandler(e,a,r)}var listenerDL=setInterval(function(){var t;window.dataLayer=window.dataLayer||[],window.dataLayer&&(clearInterval(listenerDL),void 0!==gtag?gtag("get",ga4IdInit,"client_id",function(e){window.leaf_signal_ga4_cid=e,localStorage.setItem("leaf_signal_ga4_cid",e),gtag("get",ga4IdInit,"session_id",function(e){var t;window.leaf_signal_ga4_sid=e,localStorage.setItem("leaf_signal_ga4_sid",e),t=window?.dataLayer?.push,window.dataLayer.push=function(){var e=[].slice.call(arguments,0);return listenDLEvents(e[0]),t.apply(window.dataLayer,e)},0<window.dataLayer.length&&window.dataLayer.forEach(function(e){listenDLEvents(e)})})}):(t=window?.dataLayer?.push,window.dataLayer.push=function(){var e=[].slice.call(arguments,0);return listenDLEvents(e[0]),t.apply(window.dataLayer,e)},0<window.dataLayer.length&&window.dataLayer.forEach(function(e){listenDLEvents(e)})))},200);