@fynd-design-engineering/fynd-one-v2 3.3.18 → 3.3.20
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{async function b(){try{let e=await fetch("https://ipwho.is/");if(!e.ok)throw new Error("Failed to fetch geolocation");let n=await e.json();return n.success===!1?(console.error("Geolocation lookup failed:",n.message),null):{ip:n.ip,country:n.country,region:n.region,city:n.city,latitude:n.latitude,longitude:n.longitude,isp:n.connection?.isp||"",timezone:n.timezone?.id||""}}catch(e){return console.error("Error fetching geolocation:",e),null}}var w="geo:data:v1",f="geo_country",m=7*24*60*60*1e3;function C(e,n,t){document.cookie=`${encodeURIComponent(e)}=${encodeURIComponent(n)}; Max-Age=${t}; Path=/; SameSite=Lax; Secure`}function v(e){let n=`${encodeURIComponent(e)}=`,t=document.cookie.split("; ");for(let o of t)if(o.startsWith(n))return decodeURIComponent(o.slice(n.length));return null}function N(e){try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);return!t?.expiresAt||Date.now()>t.expiresAt?(localStorage.removeItem(e),null):t.data}catch{return localStorage.removeItem(e),null}}function $(e,n,t){let o={data:n,expiresAt:Date.now()+t};try{localStorage.setItem(e,JSON.stringify(o))}catch{}}async function p(e){if(typeof window>"u")return null;if(!(e?.forceRefresh??!1)){let o=N(w);if(o)return window.__GEO=o,v(f)||C(f,o.country??"",Math.floor(m/1e3)),o}let t=await b();return t?($(w,t,m),C(f,t.country??"",Math.floor(m/1e3)),window.__GEO=t,t):null}function x(){return v(f)}function S(e,n,t="auto"){let r=(window||{}).gsap;if(!r){console.warn("GSAP not found on window. Did you include it globally?");return}let i=document.querySelector(e),u=document.querySelector(n);if(!i||!u){console.warn("openBanner: Element(s) not found for selectors:",{mainSelector:e,innerSelector:n});return}r.set(i,{height:0,overflow:"hidden"}),r.set(u,{opacity:0});let s=r.timeline();return s.to(i,{height:t,duration:.5,ease:"power2.out"}),s.to(u,{opacity:1,duration:.3,ease:"power1.out"},.2),s}function E(e,n,t=0){let r=(window||{}).gsap;if(!r){console.warn("GSAP not found on window. Did you include it globally?");return}let i=document.querySelector(e),u=document.querySelector(n);if(!i||!u){console.warn("closeBanner: Element(s) not found for selectors:",{mainSelector:e,innerSelector:n});return}r.set(i,{overflow:"hidden"});let s=r.timeline();return s.to(u,{opacity:0,duration:.25,ease:"power1.out"}),s.to(i,{height:t,duration:.45,ease:"power2.inOut"},.2),s}function T(e,n,t){let o=new Date;o.setTime(o.getTime()+t*60*60*1e3),document.cookie=`${e}=${n}; expires=${o.toUTCString()}; path=/`}function k(e){let n=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return n?n[2]:null}function h(){let e=window.innerWidth;return e>=992?"desktop":e>=768?"tablet":e>=480?"mobileLandscape":"mobilePortrait"}var l=[{country:"united arab emirates",aliases:["uae","u.a.e","united arab emirates"],countryCode:"ae",url:"/ae",tagline:"You're in the UAE. Welcome!"},{country:"saudi arabia",aliases:["saudi","ksa","kingdom of saudi arabia"],countryCode:"sa",url:"/sa",tagline:"Hello Saudi Arabia!"},{country:"south africa",aliases:["rsa"],countryCode:"za",url:"/za",tagline:"Hi South Africa!"},{country:"malaysia",countryCode:"my",url:"/my",tagline:"Selamat datang, Malaysia!"},{country:"indonesia",aliases:["idn"],countryCode:"id",url:"/id",tagline:"Halo Indonesia!"},{country:"philippines",aliases:["phl","the philippines"],countryCode:"ph",url:"/ph",tagline:"Kumusta, Philippines!"},{country:"india",aliases:["bharat"],countryCode:"in",url:"/in",tagline:"This country is India. Hi some text"},{country:"global",aliases:["global","rest of world","others"],countryCode:"global",url:"/global",tagline:"This is rest of world. Hi some text"}];function c(e){return(e??"").trim().toLowerCase()}function L(e){let n=e.trim();return n?n.startsWith("/")?n:`/${n}`:"/"}async function R(){if(typeof window>"u")return null;let e=x();if(e)return c(e);let n=await p();return c(n?.country)}function I(e){let n=c(e);if(!n)return null;let t=l.find(i=>c(i.countryCode)===n);if(t)return t;let o=l.find(i=>c(i.country)===n);if(o)return o;let r=l.find(i=>(i.aliases??[]).some(u=>c(u)===n));return r||null}function y(){let e=l.find(n=>n.country==="global");if(!e)throw new Error("[geo-banner] Global config not found in COUNTRY_CONFIG");return e}function q(e){if(typeof window>"u")return;let n=c(e),t=l.find(r=>c(r.countryCode)===n)||y(),o=document.querySelector('[fynd-banner-field="link"]');if(o){let r=window.location.origin;o.href=`${r}${L(t.url)}`}}function U(e,n){let t=I(n)??l.find(s=>s.country==="global");if(!t)return console.warn("[geo-banner] No matching config for",n),!1;let o=t.countryCode,r=Array.from(e.options),i=r.find(s=>c(s.value)===c(o));if(!i)return console.warn("[geo-banner] No matching <option> for",o,"on",e),!1;let u=e.value;return e.value=i.value,e.value!==i.value&&(e.selectedIndex=r.indexOf(i)),r.forEach(s=>s.selected=s===i),u!==e.value&&(e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))),console.log("[geo-banner] Select updated \u2192",t.country,"(",t.countryCode,")"),!0}function F(e){if(typeof window>"u")return;let n=c(e),t=l.find(i=>c(i.countryCode)===n)||y(),o=document.querySelector("#geoswitch-select")||document.querySelector('[fynd-banner-field="geoswitch"]');o?(console.log(`country code is ${t.countryCode}`),U(o,t.countryCode),o.value=t.countryCode,o.dispatchEvent(new Event("change",{bubbles:!0}))):console.warn('[geo-banner] Select not found: #geoswitch-select / [fynd-banner-field="geoswitch"]');let r=document.querySelector('[fynd-banner-field="link"]');if(r){let i=window.location.origin;r.href=`${i}${L(t.url)}`}}async function _(){if(typeof window>"u")return y();document.readyState==="loading"&&await new Promise(r=>{document.addEventListener("DOMContentLoaded",()=>r(),{once:!0})});let e=await R(),t=I(e)??y();console.log("[geo-banner] rawCountry:",e,"\u2192 resolved:",t.countryCode),F(t.countryCode);let o=document.querySelector('[fynd-banner-field="geoswitch"]');return o&&!o.__geoHandlerAttached&&(o.addEventListener("change",r=>{let i=r.target.value;q(i)}),o.__geoHandlerAttached=!0),t}var G={"/global":{mode:"country",countries:["India"]},"/":{mode:"notCountry",countries:["India"]}},M='[fynd-navigation="ip-banner"]',H='[fynd-navigation="ip-banner-inner"]',Y='[fynd-navigation="ip-banner-close"]',d=document.querySelector('[fynd-navigation="announcement-bar"]'),P=document.querySelector('[fynd-navigation="announcement-list"]'),a={ipbanner:{visibility:!1,height:{desktop:"56px",tablet:"60px",mobileLandscape:"120px",mobilePortrait:"120px"}},announcementbar:{visibility:!0,height:{desktop:"40px",tablet:"40px",mobileLandscape:"40px",mobilePortrait:"46px"}},default:{visibility:!0,height:{desktop:"70px",tablet:"64px",mobileLandscape:"40px",mobilePortrait:"150px"}}};function g(e,n){let t=o=>{if(typeof o=="number")return o;let r=parseInt(o,10);return isNaN(r)?0:r};return`${t(e)+t(n)}px`}function D(e,n){let t=o=>{if(typeof o=="number")return o;let r=parseInt(o,10);return isNaN(r)?0:r};return`${t(e)-t(n)}px`}var O=e=>{try{let n=e.split("?")[0].split("#")[0];return n==="/"?"/":n.replace(/\/+$/,"")||"/"}catch{return"/"}};function z(e){let n=O(e),t="";for(let o of Object.keys(G)){let r=O(o);(n===r||n.startsWith(r+"/"))&&r.length>t.length&&(t=r)}return t?{key:t,rule:G[t]}:null}function K(e,n){let t=z(e);if(!t)return!1;let{rule:o}=t,r=(n?.country||"").toLowerCase();switch(o.mode){case"always":return!0;case"country":return o.countries.some(i=>i.toLowerCase()===r);case"notCountry":return!o.countries.some(i=>i.toLowerCase()===r);case"predicate":return!!o.test?.(n);default:return!1}}function W(){let e=document.querySelector('[fynd-navigation="announcement-swiper"]');if(e&&!e.__swiperInstance)try{let n=window.Swiper,t=new n(e,{slidesPerView:1,spaceBetween:0,effect:"fade",fadeEffect:{crossFade:!0},autoplay:{delay:3e3,disableOnInteraction:!1},loop:!0,speed:1e3,allowTouchMove:!1,on:{init:function(){this.slides.length<=1&&this.autoplay&&typeof this.autoplay.stop=="function"&&this.autoplay.stop()}}});e.__swiperInstance=t}catch(n){console.warn("Announcement Swiper init failed:",n)}d&&P&&P.children.length>0?a.announcementbar.visibility=!0:(a.announcementbar.visibility=!1,d&&d.parentNode&&(e&&e.__swiperInstance&&(e.__swiperInstance.destroy(!0,!0),e.__swiperInstance=void 0),d.parentNode.removeChild(d)))}function A(){let e='[fynd-navigation="dropdown-container"]',n=document.querySelector(e);if(!n){console.warn(`initDesktopDropdownMenu: element not found: ${e}`);return}let t=h?.()??"unknown";if(t!=="desktop"){n.style.transition=n.style.transition||"transform 0.3s ease",n.style.transform="translateY(0px)";return}let o=a.default.height?.[t];if(a.announcementbar?.visibility){let r=a.announcementbar.height?.[t];o=g(o,r),o=D(o,"46px")}a.ipbanner?.visibility&&(o=g(o,"0px"),o=D(o,"46px")),n.style.transform=`translateY(${o})`}function B(){let e=document.querySelector('[fynd-navigation="spacer"][data-wf--navigation-spacer--variant="dynamic"]');if(!e){console.warn("initNavigationSpacer: spacer element not found");return}let n=r=>{if(typeof r=="number")return r;if(typeof r=="string"){let i=parseFloat(r);return Number.isFinite(i)?i:0}return 0},t=h?.()??"desktop",o=a.default.height?.[t];if(a.announcementbar?.visibility){let r=a.announcementbar.height?.[t];o=g(o,r)}if(a.ipbanner?.visibility){let r=n(a.ipbanner.height?.[t]);o=g(o,r)}e.style.height=`${o}`}async function j(){if(k("ipBannerClosed")==="true"){a.ipbanner.visibility=!1;return}let n=await p(),t=window.location.pathname||"/",o=K(t,n??void 0),r=await _();if(o&&r){S(M,H,a.ipbanner.height.desktop),a.ipbanner.visibility=!0;let i=document.querySelector(Y);i&&i.addEventListener("click",()=>{E(M,H),T("ipBannerClosed","true",24),a.ipbanner.visibility=!1,A(),B()})}else a.ipbanner.visibility=!1}document.addEventListener("DOMContentLoaded",async()=>{await j(),W(),A(),B()});})();
|
|
1
|
+
"use strict";(()=>{async function b(){try{let e=await fetch("https://ipwho.is/");if(!e.ok)throw new Error("Failed to fetch geolocation");let n=await e.json();return n.success===!1?(console.error("Geolocation lookup failed:",n.message),null):{ip:n.ip,country:n.country,region:n.region,city:n.city,latitude:n.latitude,longitude:n.longitude,isp:n.connection?.isp||"",timezone:n.timezone?.id||""}}catch(e){return console.error("Error fetching geolocation:",e),null}}var w="geo:data:v1",f="geo_country",m=7*24*60*60*1e3;function C(e,n,t){document.cookie=`${encodeURIComponent(e)}=${encodeURIComponent(n)}; Max-Age=${t}; Path=/; SameSite=Lax; Secure`}function v(e){let n=`${encodeURIComponent(e)}=`,t=document.cookie.split("; ");for(let o of t)if(o.startsWith(n))return decodeURIComponent(o.slice(n.length));return null}function N(e){try{let n=localStorage.getItem(e);if(!n)return null;let t=JSON.parse(n);return!t?.expiresAt||Date.now()>t.expiresAt?(localStorage.removeItem(e),null):t.data}catch{return localStorage.removeItem(e),null}}function $(e,n,t){let o={data:n,expiresAt:Date.now()+t};try{localStorage.setItem(e,JSON.stringify(o))}catch{}}async function p(e){if(typeof window>"u")return null;if(!(e?.forceRefresh??!1)){let o=N(w);if(o)return window.__GEO=o,v(f)||C(f,o.country??"",Math.floor(m/1e3)),o}let t=await b();return t?($(w,t,m),C(f,t.country??"",Math.floor(m/1e3)),window.__GEO=t,t):null}function x(){return v(f)}function S(e,n,t="auto"){let r=(window||{}).gsap;if(!r){console.warn("GSAP not found on window. Did you include it globally?");return}let i=document.querySelector(e),u=document.querySelector(n);if(!i||!u){console.warn("openBanner: Element(s) not found for selectors:",{mainSelector:e,innerSelector:n});return}r.set(i,{height:0,overflow:"hidden"}),r.set(u,{opacity:0});let s=r.timeline();return s.to(i,{height:t,duration:.5,ease:"power2.out"}),s.to(u,{opacity:1,duration:.3,ease:"power1.out"},.2),s}function E(e,n,t=0){let r=(window||{}).gsap;if(!r){console.warn("GSAP not found on window. Did you include it globally?");return}let i=document.querySelector(e),u=document.querySelector(n);if(!i||!u){console.warn("closeBanner: Element(s) not found for selectors:",{mainSelector:e,innerSelector:n});return}r.set(i,{overflow:"hidden"});let s=r.timeline();return s.to(u,{opacity:0,duration:.25,ease:"power1.out"}),s.to(i,{height:t,duration:.45,ease:"power2.inOut"},.2),s}function T(e,n,t){let o=new Date;o.setTime(o.getTime()+t*60*60*1e3),document.cookie=`${e}=${n}; expires=${o.toUTCString()}; path=/`}function k(e){let n=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return n?n[2]:null}function h(){let e=window.innerWidth;return e>=992?"desktop":e>=768?"tablet":e>=480?"mobileLandscape":"mobilePortrait"}var l=[{country:"united arab emirates",aliases:["uae","u.a.e","united arab emirates"],countryCode:"ae",url:"/ae",tagline:"You're in the UAE. Welcome!"},{country:"saudi arabia",aliases:["saudi","ksa","kingdom of saudi arabia"],countryCode:"sa",url:"/sa",tagline:"Hello Saudi Arabia!"},{country:"south africa",aliases:["rsa"],countryCode:"za",url:"/za",tagline:"Hi South Africa!"},{country:"malaysia",countryCode:"my",url:"/my",tagline:"Selamat datang, Malaysia!"},{country:"indonesia",aliases:["idn"],countryCode:"id",url:"/id",tagline:"Halo Indonesia!"},{country:"philippines",aliases:["phl","the philippines"],countryCode:"ph",url:"/ph",tagline:"Kumusta, Philippines!"},{country:"india",aliases:["bharat"],countryCode:"in",url:"/in",tagline:"This country is India. Hi some text"},{country:"global",aliases:["global","rest of world","others"],countryCode:"global",url:"/global",tagline:"This is rest of world. Hi some text"}];function c(e){return(e??"").trim().toLowerCase()}function L(e){let n=e.trim();return n?n.startsWith("/")?n:`/${n}`:"/"}async function R(){if(typeof window>"u")return null;let e=x();if(e)return c(e);let n=await p();return c(n?.country)}function I(e){let n=c(e);if(!n)return null;let t=l.find(i=>c(i.countryCode)===n);if(t)return t;let o=l.find(i=>c(i.country)===n);if(o)return o;let r=l.find(i=>(i.aliases??[]).some(u=>c(u)===n));return r||null}function y(){let e=l.find(n=>n.country==="global");if(!e)throw new Error("[geo-banner] Global config not found in COUNTRY_CONFIG");return e}function q(e){if(typeof window>"u")return;let n=c(e),t=l.find(r=>c(r.countryCode)===n)||y(),o=document.querySelector('[fynd-banner-field="link"]');if(o){let r=window.location.origin;o.href=`${r}${L(t.url)}`}}function U(e,n){let t=I(n)??l.find(s=>s.country==="global");if(!t)return console.warn("[geo-banner] No matching config for",n),!1;let o=t.countryCode,r=Array.from(e.options),i=r.find(s=>c(s.value)===c(o));if(!i)return console.warn("[geo-banner] No matching <option> for",o,"on",e),!1;let u=e.value;return e.value=i.value,e.value!==i.value&&(e.selectedIndex=r.indexOf(i)),r.forEach(s=>s.selected=s===i),u!==e.value&&(e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))),console.log("[geo-banner] Select updated \u2192",t.country,"(",t.countryCode,")"),!0}function F(e){if(typeof window>"u")return;let n=c(e),t=l.find(i=>c(i.countryCode)===n)||y(),o=document.querySelector("#geoswitch-select")||document.querySelector('[fynd-banner-field="geoswitch"]');o?(console.log(`country code is ${t.countryCode}`),U(o,t.countryCode),o.value=t.countryCode,o.dispatchEvent(new Event("change",{bubbles:!0}))):console.warn('[geo-banner] Select not found: #geoswitch-select / [fynd-banner-field="geoswitch"]');let r=document.querySelector('[fynd-banner-field="link"]');if(r){let i=window.location.origin;r.href=`${i}${L(t.url)}`}}async function _(){if(typeof window>"u")return y();document.readyState==="loading"&&await new Promise(r=>{document.addEventListener("DOMContentLoaded",()=>r(),{once:!0})});let e=await R(),t=I(e)??y();console.log("[geo-banner] rawCountry:",e,"\u2192 resolved:",t.countryCode),F(t.countryCode);let o=document.querySelector('[fynd-banner-field="geoswitch"]');return o&&!o.__geoHandlerAttached&&(o.addEventListener("change",r=>{let i=r.target.value;q(i)}),o.__geoHandlerAttached=!0),t}var G={"/global":{mode:"country",countries:["India"]},"/":{mode:"notCountry",countries:["India"]}},M='[fynd-navigation="ip-banner"]',H='[fynd-navigation="ip-banner-inner"]',Y='[fynd-navigation="ip-banner-close"]',d=document.querySelector('[fynd-navigation="announcement-bar"]'),P=document.querySelector('[fynd-navigation="announcement-list"]'),a={ipbanner:{visibility:!1,height:{desktop:"56px",tablet:"60px",mobileLandscape:"120px",mobilePortrait:"120px"}},announcementbar:{visibility:!0,height:{desktop:"40px",tablet:"40px",mobileLandscape:"40px",mobilePortrait:"46px"}},default:{visibility:!0,height:{desktop:"70px",tablet:"64px",mobileLandscape:"40px",mobilePortrait:"150px"}}};window.navigationData=a;function g(e,n){let t=o=>{if(typeof o=="number")return o;let r=parseInt(o,10);return isNaN(r)?0:r};return`${t(e)+t(n)}px`}function D(e,n){let t=o=>{if(typeof o=="number")return o;let r=parseInt(o,10);return isNaN(r)?0:r};return`${t(e)-t(n)}px`}var O=e=>{try{let n=e.split("?")[0].split("#")[0];return n==="/"?"/":n.replace(/\/+$/,"")||"/"}catch{return"/"}};function z(e){let n=O(e),t="";for(let o of Object.keys(G)){let r=O(o);(n===r||n.startsWith(r+"/"))&&r.length>t.length&&(t=r)}return t?{key:t,rule:G[t]}:null}function K(e,n){let t=z(e);if(!t)return!1;let{rule:o}=t,r=(n?.country||"").toLowerCase();switch(o.mode){case"always":return!0;case"country":return o.countries.some(i=>i.toLowerCase()===r);case"notCountry":return!o.countries.some(i=>i.toLowerCase()===r);case"predicate":return!!o.test?.(n);default:return!1}}function W(){let e=document.querySelector('[fynd-navigation="announcement-swiper"]');if(e&&!e.__swiperInstance)try{let n=window.Swiper,t=new n(e,{slidesPerView:1,spaceBetween:0,effect:"fade",fadeEffect:{crossFade:!0},autoplay:{delay:3e3,disableOnInteraction:!1},loop:!0,speed:1e3,allowTouchMove:!1,on:{init:function(){this.slides.length<=1&&this.autoplay&&typeof this.autoplay.stop=="function"&&this.autoplay.stop()}}});e.__swiperInstance=t}catch(n){console.warn("Announcement Swiper init failed:",n)}d&&P&&P.children.length>0?a.announcementbar.visibility=!0:(a.announcementbar.visibility=!1,d&&d.parentNode&&(e&&e.__swiperInstance&&(e.__swiperInstance.destroy(!0,!0),e.__swiperInstance=void 0),d.parentNode.removeChild(d)))}function A(){let e='[fynd-navigation="dropdown-container"]',n=document.querySelector(e);if(!n){console.warn(`initDesktopDropdownMenu: element not found: ${e}`);return}let t=h?.()??"unknown";if(t!=="desktop"){n.style.transition=n.style.transition||"transform 0.3s ease",n.style.transform="translateY(0px)";return}let o=a.default.height?.[t];if(a.announcementbar?.visibility){let r=a.announcementbar.height?.[t];o=g(o,r),o=D(o,"46px")}a.ipbanner?.visibility&&(o=g(o,"0px"),o=D(o,"46px")),n.style.transform=`translateY(${o})`}function B(){let e=document.querySelector('[fynd-navigation="spacer"][data-wf--navigation-spacer--variant="dynamic"]');if(!e){console.warn("initNavigationSpacer: spacer element not found");return}let n=r=>{if(typeof r=="number")return r;if(typeof r=="string"){let i=parseFloat(r);return Number.isFinite(i)?i:0}return 0},t=h?.()??"desktop",o=a.default.height?.[t];if(a.announcementbar?.visibility){let r=a.announcementbar.height?.[t];o=g(o,r)}if(a.ipbanner?.visibility){let r=n(a.ipbanner.height?.[t]);o=g(o,r)}e.style.height=`${o}`}async function j(){if(k("ipBannerClosed")==="true"){a.ipbanner.visibility=!1;return}let n=await p(),t=window.location.pathname||"/",o=K(t,n??void 0),r=await _();if(o&&r){S(M,H,a.ipbanner.height.desktop),a.ipbanner.visibility=!0;let i=document.querySelector(Y);i&&i.addEventListener("click",()=>{E(M,H),T("ipBannerClosed","true",24),a.ipbanner.visibility=!1,A(),B()})}else a.ipbanner.visibility=!1}document.addEventListener("DOMContentLoaded",async()=>{await j(),W(),A(),B()});})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var g=n=>{let t=n.startsWith("/")?n:`/${n}`;return t!=="/"&&t.endsWith("/")?t.slice(0,-1):t},P=n=>{let t=g(window.location.pathname);for(let e of n){let i=g(e.adPageSlug);if(t===i||t.startsWith(i+"/"))return e}return null},T=(n,t)=>`fynd_website_ad_${n}.${t}`,w=n=>{let t=n.closest("form");return t&&(t.getAttribute("data-name")||t.getAttribute("name")||t.id)||null},p=n=>{if(window.__adsTrackingInitialized)return;let t=P(n);if(!t)return;window.__adsTrackingInitialized=!0;let e=(i,r)=>{let o=T(t.adEventExtension,i);window.trackEvent?.(o,r)};document.addEventListener("DOMContentLoaded",()=>{let i=document.querySelectorAll('[data-ph="sign-up"]'),r=document.querySelectorAll('[data-ph="sign-in"]'),o=document.querySelectorAll('[data-ph="book-a-demo"]');i.forEach(s=>s.addEventListener("click",()=>e("sign_up.clicked"))),r.forEach(s=>s.addEventListener("click",()=>e("sign_in.clicked"))),o.forEach(s=>s.addEventListener("click",()=>e("book_a_demo.clicked")));let d=document.querySelectorAll("[ph-form-field]"),f=new Set,a=function(){let s=w(this)||"unknown-form";f.has(s)||(f.add(s),e("form.started"))};d.forEach(s=>{let m=s.tagName.toLowerCase(),y=s.type?.toLowerCase();m==="button"||m==="input"&&y==="submit"||s.addEventListener("focus",a),m==="button"||m==="input"&&y==="submit"?s.addEventListener("click",a):m==="select"?s.addEventListener("change",a):s.addEventListener("input",a)}),document.querySelectorAll('[type="submit"]').forEach(s=>{s.addEventListener("click",function(){let m=w(this);setTimeout(()=>{window.validationPassed===!0&&e("form.submitted",m?{submitted_form:m}:{})},10)})})})};var b="2741377816069290";function L(){typeof window>"u"||window.fbq||function(n,t,e,i,r,o,d){n.fbq||(r=n.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],o=t.createElement(e),o.async=!0,o.src="https://connect.facebook.net/en_US/fbevents.js",d=t.getElementsByTagName(e)[0],d.parentNode.insertBefore(o,d))}(window,document,"script",void 0)}function v(){try{let n=null;if(typeof window.getUserJourney=="function"&&(n=window.getUserJourney()),!n){let i=sessionStorage.getItem("userJourney");i&&(n=JSON.parse(i))}let t={},e=n?.formDetails;return e?.email&&(t.email=e.email),e?.phone&&(t.phone=e.phone),e?.firstName&&(t.first_name=e.firstName),e?.lastName&&(t.last_name=e.lastName),e?.city&&(t.city=e.city),e?.state&&(t.state=e.state),e?.zip&&(t.zip=e.zip),n?.country&&(t.country=n.country),n?.userId&&(t.external_id=String(n.userId)),Object.keys(t).forEach(i=>{let r=i;t[r]||delete t[r]}),Object.keys(t).length?t:null}catch{return null}}function S(n){if(!n)return null;let t={};return n["fynd_website.form_email"]&&(t.email=n["fynd_website.form_email"]),n["fynd_website.form_phone"]&&(t.phone=n["fynd_website.form_phone"]),n["fynd_website.form_first_name"]&&(t.first_name=n["fynd_website.form_first_name"]),n["fynd_website.form_last_name"]&&(t.last_name=n["fynd_website.form_last_name"]),n.city&&(t.city=n.city),n.state&&(t.state=n.state),n.zip&&(t.zip=n.zip),n.country&&(t.country=n.country),n.external_id&&(t.external_id=n.external_id),Object.keys(t).forEach(e=>{let i=e;t[i]||delete t[i]}),Object.keys(t).length?t:null}function D(n="evt"){return`${n}_${Date.now()}_${Math.random().toString(36).slice(2)}`}function l(...n){window.fbq&&window.fbq(...n)}function M(n,t){let e=t||{},i=S(e)||v();switch(n){case"fynd_website.form.submitted":{let r=e.event_id||D("lead"),o=e.submitted_form||e["fynd_website.form_name"]||"unknown_form";return{type:"track",name:"Lead",params:{form_id:e["fynd_website.form_id"]||void 0,form_name:o,value:0,currency:"INR"},options:{eventID:r},userData:i}}case"fynd_website.sign_up.clicked":return{type:"trackCustom",name:"SignUpClick",params:{},userData:i};case"fynd_website.sign_in.clicked":return{type:"trackCustom",name:"SignInClick",params:{},userData:i};case"fynd_website.book_a_demo.clicked":return{type:"trackCustom",name:"BookDemoClick",params:{source_page:e?.["fynd_website.source_page"]},userData:i};case"fynd_website.form.started":return{type:"trackCustom",name:"FormStarted",params:{form_id:e?.["fynd_website.form_id"]||void 0,form_name:e?.["fynd_website.form_name"]||void 0},userData:i};case"fynd_website.page.loaded":return{type:"track",name:"PageView",params:{},userData:i};default:return null}}function k(n={}){let{enableAdvancedMatching:t=!0,enableSpaPageViews:e=!0,hasConsent:i}=n;L();let r=t?v():null;if(i&&!i()){let d=window.setInterval(()=>{i()&&(window.clearInterval(d),l("init",b,r||{}),h(e))},250)}else l("init",b,r||{}),h(e);let o=window.trackEvent;window.trackEvent=function(d,f){try{if(typeof o=="function"&&o.call(window,d,f),i&&!i())return;let a=M(d,f);if(!a)return;a.type==="track"?a.options?.eventID?l("track",a.name,a.params||{},{eventID:a.options.eventID}):l("track",a.name,a.params||{}):l("trackCustom",a.name,a.params||{})}catch(a){console.warn("Meta tracking error:",a)}}}function h(n){if(l("track","PageView"),n){let r=function(){setTimeout(()=>l("track","PageView"),0)};var t=r;let e=history.pushState,i=history.replaceState;history.pushState=function(...o){let d=e.apply(this,o);return r(),d},history.replaceState=function(...o){let d=i.apply(this,o);return r(),d},window.addEventListener("popstate",r)}}var A=()=>{let n={};try{let t=null;if(typeof window.getUserJourney=="function"&&(t=window.getUserJourney()),!t){let e=sessionStorage.getItem("userJourney");e&&(t=JSON.parse(e))}if(t?.formDetails){let e=t.formDetails;e.formId&&(n.form_id=e.formId),e.formName&&(n.form_name=e.formName),e.firstName&&(n.form_first_name=e.firstName),e.lastName&&(n.form_last_name=e.lastName),e.email&&(n.form_email=e.email),e.phone&&(n.form_phone=e.phone)}if(t?.aiData){let e=t.aiData;e.context&&(n.aidata_context=e.context),e.platform&&(n.aidata_platform=e.platform),e.type&&(n.aidata_type=e.type),e.detectionMethod&&(n.aidata_detection=e.detectionMethod)}}catch(t){console.warn("Error getting user journey data for GA tracking:",t)}return n},_=()=>{let t={"fynd_website.source_page":window.location.pathname,"fynd_website.product":"fynd.com website","fynd_website.device_type":"Unknown","fynd_website.utm_source":new URLSearchParams(window.location.search).get("utm_source")||"","fynd_website.utm_medium":new URLSearchParams(window.location.search).get("utm_medium")||"","fynd_website.utm_campaign":new URLSearchParams(window.location.search).get("utm_campaign")||"","fynd_website.referrer":document.referrer};try{let e=null;if(typeof window.getUserJourney=="function"&&(e=window.getUserJourney()),!e){let i=sessionStorage.getItem("userJourney");i&&(e=JSON.parse(i))}if(e){if(t["fynd_website.journey_touchpoints"]=e.userJourney||e,e.formDetails){let i=e.formDetails;i.formId&&(t["fynd_website.form_id"]=i.formId),i.formName&&(t["fynd_website.form_name"]=i.formName),i.firstName&&(t["fynd_website.form_first_name"]=i.firstName),i.lastName&&(t["fynd_website.form_last_name"]=i.lastName),i.email&&(t["fynd_website.form_email"]=i.email),i.phone&&(t["fynd_website.form_phone"]=i.phone)}if(e.userJourney?.length>0){t["fynd_website.journey_total_pages"]=e.userJourney.length,t["fynd_website.journey_touchpoints_count"]=e.userJourney.length,t["fynd_website.journey_first_page"]=e.userJourney[0].page,t["fynd_website.journey_current_page"]=e.userJourney[e.userJourney.length-1].page;let i=new Date(e.userJourney[0].time),r=new Date(e.userJourney[e.userJourney.length-1].time);t["fynd_website.journey_session_duration"]=Math.floor((r.getTime()-i.getTime())/1e3),t["fynd_website.journey_entry_time"]=e.userJourney[0].time,t["fynd_website.journey_exit_time"]=e.userJourney[e.userJourney.length-1].time}if(e.deviceCategory&&(t["fynd_website.device_type"]=e.deviceCategory),e.browser&&(t["fynd_website.journey_browser"]=e.browser),e.device&&(t["fynd_website.journey_device"]=e.device),e.origin&&(t["fynd_website.journey_origin"]=e.origin),e.utmPath&&(t["fynd_website.journey_utm_path"]=e.utmPath),e.scrollDepth&&(t["fynd_website.journey_scroll_depth"]=e.scrollDepth),e.aiData){let i=e.aiData;i.context&&(t["fynd_website.aidata_context"]=i.context),i.platform&&(t["fynd_website.aidata_platform"]=i.platform),i.type&&(t["fynd_website.aidata_type"]=i.type),i.detectionMethod&&(t["fynd_website.aidata_detection"]=i.detectionMethod)}}}catch(e){console.warn("Error getting user journey data for tracking:",e)}if(t["fynd_website.device_type"]==="Unknown"){let e=navigator.userAgent;/iPad/.test(e)||/Android/.test(e)&&!/Mobile/.test(e)||/Tablet/.test(e)?t["fynd_website.device_type"]="Tablet":/Mobile|iPhone|Android|BlackBerry|Opera Mini|IEMobile|WPDesktop/.test(e)?t["fynd_website.device_type"]="Mobile":t["fynd_website.device_type"]="Desktop"}return t},j=(n,t,e)=>{if(window.dataLayer){let i={event:n,event_category:"form_interaction",event_label:n,...t};e?.submitted_form&&(i.submitted_form=e.submitted_form),window.dataLayer.push(i)}else console.warn("dataLayer not available for GA tracking")},u=(n,t)=>{try{let e=_(),i=t?{...e,...t}:e;window.posthog&&window.posthog.capture(n,i);let r=A(),o=r.aidata_context||r.aidata_platform||r.aidata_type||r.aidata_detection;(n.includes("form")||Object.keys(r).length>0||t?.submitted_form||!!o)&&j(n,r,t)}catch(e){console.error("Error tracking event:",e)}},E=n=>{let t=n.closest("form");return t&&(t.getAttribute("data-name")||t.getAttribute("name")||t.id)||null};document.addEventListener("DOMContentLoaded",()=>{let n=_();window.posthog&&window.posthog.capture("$pageview",n)});window.addEventListener("load",()=>{u("fynd_website.page.loaded")});document.addEventListener("DOMContentLoaded",()=>{let n=document.querySelectorAll('[data-ph="sign-up"]'),t=document.querySelectorAll('[data-ph="sign-in"]'),e=document.querySelectorAll('[href="#footer-form"]'),i=document.querySelectorAll('[data-ph="book-a-demo"]');document.querySelectorAll('[type="submit"]').forEach(a=>{a.addEventListener("click",function(){let c=E(this);setTimeout(()=>{window.validationPassed===!0&&u("fynd_website.form.submitted",c?{submitted_form:c}:{})},10)})}),n.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.sign_up.clicked"))}),t.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.sign_in.clicked"))}),e.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.scroll_to_form.clicked"))}),i.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.book_a_demo.clicked"))});let o=document.querySelectorAll("[ph-form-field]"),d=new Set,f=function(){let c=E(this)||"unknown-form";d.has(c)||(d.add(c),u("fynd_website.form.started"))};o.forEach(a=>{let c=a.tagName.toLowerCase(),s=a.type?.toLowerCase();c==="button"||c==="input"&&s==="submit"||a.addEventListener("focus",f),c==="button"||c==="input"&&s==="submit"?a.addEventListener("click",f):c==="select"?a.addEventListener("change",f):a.addEventListener("input",f)})});window.getPosthogTrackingProperties=_;window.trackEvent=u;window.getGaTrackingProperties=A;var I=[{adPageSlug:"/solutions/transport-management-system",adEventExtension:"tms"}];p(I);k({enableAdvancedMatching:!0,enableSpaPageViews:!0,hasConsent:()=>window.__ad_consent==="granted"||!0});})();
|
|
1
|
+
"use strict";(()=>{var g=n=>{let t=n.startsWith("/")?n:`/${n}`;return t!=="/"&&t.endsWith("/")?t.slice(0,-1):t},A=n=>{let t=new URLSearchParams(window.location.search).get(n);return t?t.trim():null},P=n=>{let t=n.adUTMCampaign??n.adUTMCampagin;if(!t)return!0;let e=Array.isArray(t)?t.map(r=>r.toLowerCase()):[t.toLowerCase()],i=A("utm_campaign")?.toLowerCase()??null;return!!i&&e.includes(i)},L=n=>{let t=g(window.location.pathname);for(let e of n){let i=g(e.adPageSlug);if((t===i||t.startsWith(i+"/"))&&P(e))return e}return null},M=(n,t)=>`fynd_website_ad_${n}.${t}`,w=n=>{let t=n.closest("form");return t&&(t.getAttribute("data-name")||t.getAttribute("name")||t.id)||null},p=n=>{if(window.__adsTrackingInitialized)return;let t=L(n);if(!t)return;window.__adsTrackingInitialized=!0;let e=(i,r)=>{let o=M(t.adEventExtension,i);window.trackEvent?.(o,r)};document.addEventListener("DOMContentLoaded",()=>{let i=document.querySelectorAll('[data-ph="sign-up"]'),r=document.querySelectorAll('[data-ph="sign-in"]'),o=document.querySelectorAll('[data-ph="book-a-demo"]');i.forEach(s=>s.addEventListener("click",()=>e("sign_up.clicked"))),r.forEach(s=>s.addEventListener("click",()=>e("sign_in.clicked"))),o.forEach(s=>s.addEventListener("click",()=>e("book_a_demo.clicked")));let d=document.querySelectorAll("[ph-form-field]"),f=new Set,a=function(){let s=w(this)||"unknown-form";f.has(s)||(f.add(s),e("form.started"))};d.forEach(s=>{let m=s.tagName.toLowerCase(),y=s.type?.toLowerCase();m==="button"||m==="input"&&y==="submit"||s.addEventListener("focus",a),m==="button"||m==="input"&&y==="submit"?s.addEventListener("click",a):m==="select"?s.addEventListener("change",a):s.addEventListener("input",a)}),document.querySelectorAll('[type="submit"]').forEach(s=>{s.addEventListener("click",function(){let m=w(this);setTimeout(()=>{window.validationPassed===!0&&e("form.submitted",m?{submitted_form:m}:{})},10)})})})};var b="2741377816069290";function S(){typeof window>"u"||window.fbq||function(n,t,e,i,r,o,d){n.fbq||(r=n.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],o=t.createElement(e),o.async=!0,o.src="https://connect.facebook.net/en_US/fbevents.js",d=t.getElementsByTagName(e)[0],d.parentNode.insertBefore(o,d))}(window,document,"script",void 0)}function v(){try{let n=null;if(typeof window.getUserJourney=="function"&&(n=window.getUserJourney()),!n){let i=sessionStorage.getItem("userJourney");i&&(n=JSON.parse(i))}let t={},e=n?.formDetails;return e?.email&&(t.email=e.email),e?.phone&&(t.phone=e.phone),e?.firstName&&(t.first_name=e.firstName),e?.lastName&&(t.last_name=e.lastName),e?.city&&(t.city=e.city),e?.state&&(t.state=e.state),e?.zip&&(t.zip=e.zip),n?.country&&(t.country=n.country),n?.userId&&(t.external_id=String(n.userId)),Object.keys(t).forEach(i=>{let r=i;t[r]||delete t[r]}),Object.keys(t).length?t:null}catch{return null}}function D(n){if(!n)return null;let t={};return n["fynd_website.form_email"]&&(t.email=n["fynd_website.form_email"]),n["fynd_website.form_phone"]&&(t.phone=n["fynd_website.form_phone"]),n["fynd_website.form_first_name"]&&(t.first_name=n["fynd_website.form_first_name"]),n["fynd_website.form_last_name"]&&(t.last_name=n["fynd_website.form_last_name"]),n.city&&(t.city=n.city),n.state&&(t.state=n.state),n.zip&&(t.zip=n.zip),n.country&&(t.country=n.country),n.external_id&&(t.external_id=n.external_id),Object.keys(t).forEach(e=>{let i=e;t[i]||delete t[i]}),Object.keys(t).length?t:null}function C(n="evt"){return`${n}_${Date.now()}_${Math.random().toString(36).slice(2)}`}function l(...n){window.fbq&&window.fbq(...n)}function U(n,t){let e=t||{},i=D(e)||v();switch(n){case"fynd_website.form.submitted":{let r=e.event_id||C("lead"),o=e.submitted_form||e["fynd_website.form_name"]||"unknown_form";return{type:"track",name:"Lead",params:{form_id:e["fynd_website.form_id"]||void 0,form_name:o,value:0,currency:"INR"},options:{eventID:r},userData:i}}case"fynd_website.sign_up.clicked":return{type:"trackCustom",name:"SignUpClick",params:{},userData:i};case"fynd_website.sign_in.clicked":return{type:"trackCustom",name:"SignInClick",params:{},userData:i};case"fynd_website.book_a_demo.clicked":return{type:"trackCustom",name:"BookDemoClick",params:{source_page:e?.["fynd_website.source_page"]},userData:i};case"fynd_website.form.started":return{type:"trackCustom",name:"FormStarted",params:{form_id:e?.["fynd_website.form_id"]||void 0,form_name:e?.["fynd_website.form_name"]||void 0},userData:i};case"fynd_website.page.loaded":return{type:"track",name:"PageView",params:{},userData:i};default:return null}}function k(n={}){let{enableAdvancedMatching:t=!0,enableSpaPageViews:e=!0,hasConsent:i}=n;S();let r=t?v():null;if(i&&!i()){let d=window.setInterval(()=>{i()&&(window.clearInterval(d),l("init",b,r||{}),h(e))},250)}else l("init",b,r||{}),h(e);let o=window.trackEvent;window.trackEvent=function(d,f){try{if(typeof o=="function"&&o.call(window,d,f),i&&!i())return;let a=U(d,f);if(!a)return;a.type==="track"?a.options?.eventID?l("track",a.name,a.params||{},{eventID:a.options.eventID}):l("track",a.name,a.params||{}):l("trackCustom",a.name,a.params||{})}catch(a){console.warn("Meta tracking error:",a)}}}function h(n){if(l("track","PageView"),n){let r=function(){setTimeout(()=>l("track","PageView"),0)};var t=r;let e=history.pushState,i=history.replaceState;history.pushState=function(...o){let d=e.apply(this,o);return r(),d},history.replaceState=function(...o){let d=i.apply(this,o);return r(),d},window.addEventListener("popstate",r)}}var T=()=>{let n={};try{let t=null;if(typeof window.getUserJourney=="function"&&(t=window.getUserJourney()),!t){let e=sessionStorage.getItem("userJourney");e&&(t=JSON.parse(e))}if(t?.formDetails){let e=t.formDetails;e.formId&&(n.form_id=e.formId),e.formName&&(n.form_name=e.formName),e.firstName&&(n.form_first_name=e.firstName),e.lastName&&(n.form_last_name=e.lastName),e.email&&(n.form_email=e.email),e.phone&&(n.form_phone=e.phone)}if(t?.aiData){let e=t.aiData;e.context&&(n.aidata_context=e.context),e.platform&&(n.aidata_platform=e.platform),e.type&&(n.aidata_type=e.type),e.detectionMethod&&(n.aidata_detection=e.detectionMethod)}}catch(t){console.warn("Error getting user journey data for GA tracking:",t)}return n},_=()=>{let t={"fynd_website.source_page":window.location.pathname,"fynd_website.product":"fynd.com website","fynd_website.device_type":"Unknown","fynd_website.utm_source":new URLSearchParams(window.location.search).get("utm_source")||"","fynd_website.utm_medium":new URLSearchParams(window.location.search).get("utm_medium")||"","fynd_website.utm_campaign":new URLSearchParams(window.location.search).get("utm_campaign")||"","fynd_website.referrer":document.referrer};try{let e=null;if(typeof window.getUserJourney=="function"&&(e=window.getUserJourney()),!e){let i=sessionStorage.getItem("userJourney");i&&(e=JSON.parse(i))}if(e){if(t["fynd_website.journey_touchpoints"]=e.userJourney||e,e.formDetails){let i=e.formDetails;i.formId&&(t["fynd_website.form_id"]=i.formId),i.formName&&(t["fynd_website.form_name"]=i.formName),i.firstName&&(t["fynd_website.form_first_name"]=i.firstName),i.lastName&&(t["fynd_website.form_last_name"]=i.lastName),i.email&&(t["fynd_website.form_email"]=i.email),i.phone&&(t["fynd_website.form_phone"]=i.phone)}if(e.userJourney?.length>0){t["fynd_website.journey_total_pages"]=e.userJourney.length,t["fynd_website.journey_touchpoints_count"]=e.userJourney.length,t["fynd_website.journey_first_page"]=e.userJourney[0].page,t["fynd_website.journey_current_page"]=e.userJourney[e.userJourney.length-1].page;let i=new Date(e.userJourney[0].time),r=new Date(e.userJourney[e.userJourney.length-1].time);t["fynd_website.journey_session_duration"]=Math.floor((r.getTime()-i.getTime())/1e3),t["fynd_website.journey_entry_time"]=e.userJourney[0].time,t["fynd_website.journey_exit_time"]=e.userJourney[e.userJourney.length-1].time}if(e.deviceCategory&&(t["fynd_website.device_type"]=e.deviceCategory),e.browser&&(t["fynd_website.journey_browser"]=e.browser),e.device&&(t["fynd_website.journey_device"]=e.device),e.origin&&(t["fynd_website.journey_origin"]=e.origin),e.utmPath&&(t["fynd_website.journey_utm_path"]=e.utmPath),e.scrollDepth&&(t["fynd_website.journey_scroll_depth"]=e.scrollDepth),e.aiData){let i=e.aiData;i.context&&(t["fynd_website.aidata_context"]=i.context),i.platform&&(t["fynd_website.aidata_platform"]=i.platform),i.type&&(t["fynd_website.aidata_type"]=i.type),i.detectionMethod&&(t["fynd_website.aidata_detection"]=i.detectionMethod)}}}catch(e){console.warn("Error getting user journey data for tracking:",e)}if(t["fynd_website.device_type"]==="Unknown"){let e=navigator.userAgent;/iPad/.test(e)||/Android/.test(e)&&!/Mobile/.test(e)||/Tablet/.test(e)?t["fynd_website.device_type"]="Tablet":/Mobile|iPhone|Android|BlackBerry|Opera Mini|IEMobile|WPDesktop/.test(e)?t["fynd_website.device_type"]="Mobile":t["fynd_website.device_type"]="Desktop"}return t},j=(n,t,e)=>{if(window.dataLayer){let i={event:n,event_category:"form_interaction",event_label:n,...t};e?.submitted_form&&(i.submitted_form=e.submitted_form),window.dataLayer.push(i)}else console.warn("dataLayer not available for GA tracking")},u=(n,t)=>{try{let e=_(),i=t?{...e,...t}:e;window.posthog&&window.posthog.capture(n,i);let r=T(),o=r.aidata_context||r.aidata_platform||r.aidata_type||r.aidata_detection;(n.includes("form")||Object.keys(r).length>0||t?.submitted_form||!!o)&&j(n,r,t)}catch(e){console.error("Error tracking event:",e)}},E=n=>{let t=n.closest("form");return t&&(t.getAttribute("data-name")||t.getAttribute("name")||t.id)||null};document.addEventListener("DOMContentLoaded",()=>{let n=_();window.posthog&&window.posthog.capture("$pageview",n)});window.addEventListener("load",()=>{u("fynd_website.page.loaded")});document.addEventListener("DOMContentLoaded",()=>{let n=document.querySelectorAll('[data-ph="sign-up"]'),t=document.querySelectorAll('[data-ph="sign-in"]'),e=document.querySelectorAll('[href="#footer-form"]'),i=document.querySelectorAll('[data-ph="book-a-demo"]');document.querySelectorAll('[type="submit"]').forEach(a=>{a.addEventListener("click",function(){let c=E(this);setTimeout(()=>{window.validationPassed===!0&&u("fynd_website.form.submitted",c?{submitted_form:c}:{})},10)})}),n.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.sign_up.clicked"))}),t.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.sign_in.clicked"))}),e.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.scroll_to_form.clicked"))}),i.forEach(a=>{a.addEventListener("click",()=>u("fynd_website.book_a_demo.clicked"))});let o=document.querySelectorAll("[ph-form-field]"),d=new Set,f=function(){let c=E(this)||"unknown-form";d.has(c)||(d.add(c),u("fynd_website.form.started"))};o.forEach(a=>{let c=a.tagName.toLowerCase(),s=a.type?.toLowerCase();c==="button"||c==="input"&&s==="submit"||a.addEventListener("focus",f),c==="button"||c==="input"&&s==="submit"?a.addEventListener("click",f):c==="select"?a.addEventListener("change",f):a.addEventListener("input",f)})});window.getPosthogTrackingProperties=_;window.trackEvent=u;window.getGaTrackingProperties=T;var I=[{adPageSlug:"/solutions/transport-management-system",adEventExtension:"tms",adUTMCampaign:"tms"}];p(I);k({enableAdvancedMatching:!0,enableSpaPageViews:!0,hasConsent:()=>window.__ad_consent==="granted"||!0});})();
|
package/package.json
CHANGED