@fynd-design-engineering/fynd-one-v2 3.3.38 → 3.3.40

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";(()=>{function u(t){let e=new URLSearchParams(window.location.search).get(t);return e?e.trim():null}function l(){return u("tag_equal")}window.getTagEqualFromURL=l;document.addEventListener("DOMContentLoaded",()=>{console.log("%csrc/filters/konnect.ts:2 working","color: #007acc;");let t=document.querySelectorAll("[konnect-filter-element]");if(t.length===0)return;setTimeout(d,200);let e=l();setInterval(()=>{let n=l();n!==e&&(console.log("tag_equal changed:",n),e=n,a())},100);let o=document.getElementById("konnect-filter");o&&o.addEventListener("change",()=>{console.log("Select changed \u2192 URL tag_equal is:",l())}),t.forEach(n=>{n.addEventListener("click",()=>{console.log("konnect-filter-element clicked:",n),n.getAttribute("konnect-filter-element")==="primary"?(setTimeout(a,100),document.querySelectorAll('[konnect-filter-element="secondary"]').forEach((c,s)=>{s==0?(c.click(),c.setAttribute("konnect-filter-active","true")):c.setAttribute("konnect-filter-active","false")})):setTimeout(f,100)})})});function f(){let t=new URLSearchParams(window.location.search).get("nest-tag_equal"),e=document.querySelectorAll('[konnect-filter-element="secondary"]');if(!t){e.forEach((n,r)=>{n.setAttribute("konnect-filter-active",r==0?"true":"false")});return}let o=t.trim().toLowerCase();e.length!==0&&e.forEach(n=>{let r=n.querySelector("[fs-list-value]");if(!r)return;r.getAttribute("fs-list-value")?.trim().toLowerCase()===o?(n.setAttribute("konnect-filter-active","true"),e[0].setAttribute("konnect-filter-active","false")):n.setAttribute("konnect-filter-active","false")})}function a(){let t=l(),e=document.getElementById("konnect-filter");if(!e){console.warn("Select element with id 'konnect-filter' not found.");return}t?Array.from(e.options).find(n=>n.value===t)?(e.value=t,console.log(`Selected option: ${t}`),m(t)):console.warn(`No matching option found for value: ${t}`):console.log("No 'tag_equal' parameter in URL.")}function d(){let t=l(),e=document.getElementById("konnect-filter");if(!e){console.warn("Select element with id 'konnect-filter' not found.");return}t?Array.from(e.options).find(n=>n.value===t)?(e.value=t,console.log(`Selected from URL param: ${t}`)):(console.warn(`No matching option found for value: ${t}. Defaulting to Marketplaces.`),e.value="Marketplaces"):(e.value="Marketplaces",console.log("No tag_equal param found. Defaulted to Marketplaces."))}function m(t){let e=document.getElementById("secondary-filter");e&&(t!=="Marketplaces"?e.style.display="none":e.style.display="flex")}})();
1
+ "use strict";(()=>{function u(t){let e=new URLSearchParams(window.location.search).get(t);return e?e.trim():null}function l(){return u("tag_equal")}window.getTagEqualFromURL=l;document.addEventListener("DOMContentLoaded",()=>{console.log("%csrc/filters/konnect.ts:2 working","color: #007acc;");let t=document.querySelectorAll("[konnect-filter-element]");if(t.length===0)return;setTimeout(d,200);let e=l();setInterval(()=>{let n=l();n!==e&&(console.log("tag_equal changed:",n),e=n,a())},100);let o=document.getElementById("konnect-filter");o&&o.addEventListener("change",()=>{console.log("Select changed \u2192 URL tag_equal is:",l())}),t.forEach(n=>{n.addEventListener("click",()=>{console.log("konnect-filter-element clicked:",n),n.getAttribute("konnect-filter-element")==="primary"?(setTimeout(a,100),document.querySelectorAll('[konnect-filter-element="secondary"]').forEach((c,s)=>{s==0?(c.click(),c.setAttribute("konnect-filter-active","true")):c.setAttribute("konnect-filter-active","false")})):setTimeout(f,100)})})});function f(){let t=new URLSearchParams(window.location.search).get("nest-tag_equal"),e=document.querySelectorAll('[konnect-filter-element="secondary"]');if(!t){e.forEach((n,r)=>{n.setAttribute("konnect-filter-active",r==0?"true":"false")});return}let o=t.trim().toLowerCase();e.length!==0&&e.forEach(n=>{let r=n.querySelector("[fs-list-value]");if(!r)return;r.getAttribute("fs-list-value")?.trim().toLowerCase()===o?(n.setAttribute("konnect-filter-active","true"),e[0].setAttribute("konnect-filter-active","false")):n.setAttribute("konnect-filter-active","false")})}function a(){let t=l(),e=document.getElementById("konnect-filter");if(!e){console.warn("Select element with id 'konnect-filter' not found.");return}t?Array.from(e.options).find(n=>n.value===t)?(e.value=t,console.log(`Selected option: ${t}`),m(t)):console.warn(`No matching option found for value: ${t}`):console.log("No 'tag_equal' parameter in URL.")}function d(){let t=l(),e=document.getElementById("konnect-filter");if(!e){console.warn("Select element with id 'konnect-filter' not found.");return}t?Array.from(e.options).find(n=>n.value===t)?(e.value=t,console.log(`Selected from URL param: ${t}`)):(console.warn(`No matching option found for value: ${t}. Defaulting to Marketplaces.`),e.value="Marketplaces"):(e.value="Marketplaces",console.log("No tag_equal param found. Defaulted to Marketplaces."))}function m(t){let e=document.querySelectorAll("[hidden-filter]");e&&e.forEach(o=>{o.style.display=t==="Marketplaces"?"flex":"none"})}})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../bin/live-reload.js", "../../src/filters/konnect.ts"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n // console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// ---- global helpers ----\nfunction getQueryParam(name: string): string | null {\n const val = new URLSearchParams(window.location.search).get(name);\n return val ? val.trim() : null;\n}\n\nfunction getTagEqualFromURL(): string | null {\n return getQueryParam(\"tag_equal\");\n}\n\n// expose globally if you want to inspect it in the console\n// @ts-ignore\n(window as any).getTagEqualFromURL = getTagEqualFromURL;\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n console.log(\"%csrc/filters/konnect.ts:2 working\", \"color: #007acc;\");\n const elements = document.querySelectorAll<HTMLElement>(\n \"[konnect-filter-element]\"\n );\n if (elements.length === 0) return;\n setTimeout(updateMobileSelectOnLoad, 200);\n\n // watch tag_equal every 100 ms\n let lastTagEqual = getTagEqualFromURL();\n setInterval(() => {\n const current = getTagEqualFromURL();\n if (current !== lastTagEqual) {\n console.log(\"tag_equal changed:\", current);\n lastTagEqual = current;\n updateMobileSelect(); // re-sync the select whenever the URL changes\n }\n }, 100);\n\n // log the URL param whenever user changes select\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (select) {\n select.addEventListener(\"change\", () => {\n console.log(\"Select changed \u2192 URL tag_equal is:\", getTagEqualFromURL());\n });\n }\n\n elements.forEach((el) => {\n el.addEventListener(\"click\", () => {\n console.log(\"konnect-filter-element clicked:\", el);\n const type = el.getAttribute(\"konnect-filter-element\");\n if (type === \"primary\") {\n setTimeout(updateMobileSelect, 100);\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n items.forEach((el, index) => {\n if (index == 0) {\n el.click();\n el.setAttribute(\"konnect-filter-active\", \"true\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n } else {\n setTimeout(updateSecondaryFilterTabs, 100);\n }\n });\n });\n});\n\nfunction updateSecondaryFilterTabs(): void {\n const raw = new URLSearchParams(window.location.search).get(\"nest-tag_equal\");\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n if (!raw) {\n items.forEach((el, index) => {\n el.setAttribute(\"konnect-filter-active\", index == 0 ? \"true\" : \"false\");\n });\n return;\n }\n const target = raw.trim().toLowerCase();\n if (items.length === 0) return;\n\n items.forEach((el) => {\n const input = el.querySelector<HTMLInputElement>(\"[fs-list-value]\");\n if (!input) return;\n const valFromAttr = input\n .getAttribute(\"fs-list-value\")\n ?.trim()\n .toLowerCase();\n if (valFromAttr === target) {\n el.setAttribute(\"konnect-filter-active\", \"true\");\n items[0].setAttribute(\"konnect-filter-active\", \"false\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n}\n\nfunction updateMobileSelect(): void {\n const raw = getTagEqualFromURL();\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected option: ${raw}`);\n toggleSecondaryFilter(raw);\n } else {\n console.warn(`No matching option found for value: ${raw}`);\n }\n } else {\n console.log(\"No 'tag_equal' parameter in URL.\");\n }\n}\n\nfunction updateMobileSelectOnLoad(): void {\n const raw = getTagEqualFromURL();\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected from URL param: ${raw}`);\n } else {\n console.warn(\n `No matching option found for value: ${raw}. Defaulting to Marketplaces.`\n );\n select.value = \"Marketplaces\";\n }\n } else {\n select.value = \"Marketplaces\";\n console.log(\"No tag_equal param found. Defaulted to Marketplaces.\");\n }\n}\n\nfunction toggleSecondaryFilter(raw: string | null): void {\n const div = document.getElementById(\"secondary-filter\") as HTMLElement | null;\n if (!div) return;\n if (raw !== \"Marketplaces\") {\n div.style.display = \"none\";\n } else {\n div.style.display = \"flex\";\n }\n}\n"],
5
- "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AAAA,EAEP;;;ACTA,WAAS,cAAc,MAA6B;AAClD,UAAM,MAAM,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,IAAI;AAChE,WAAO,MAAM,IAAI,KAAK,IAAI;AAAA,EAC5B;AAEA,WAAS,qBAAoC;AAC3C,WAAO,cAAc,WAAW;AAAA,EAClC;AAIA,EAAC,OAAe,qBAAqB;AAErC,WAAS,iBAAiB,oBAAoB,MAAM;AAClD,YAAQ,IAAI,sCAAs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AK,OAAO,OAAO,EAAE;AAAA,QAC/C,CAAC,WAAW,OAAO,UAAU;AAAA,MAC/B;AACA,UAAI,eAAe;AACjB,eAAO,QAAQ;AACf,gBAAQ,IAAI,4BAA4B,GAAG,EAAE;AAAA,MAC/C,OAAO;AACL,gBAAQ;AAAA,UACN,uCAAuC,GAAG;AAAA,QAC5C;AACA,eAAO,QAAQ;AAAA,MACjB;AAAA,IACF,OAAO;AACL,aAAO,QAAQ;AACf,cAAQ,IAAI,sDAAsD;AAAA,IACpE;AAAA,EACF;AAEA,WAAS,sBAAsB,KAA0B;AACvD,UAAM,MAAM,SAAS,eAAe,kBAAkB;AACtD,QAAI,CAAC,IAAK;AACV,QAAI,QAAQ,gBAAgB;AAC1B,UAAI,MAAM,UAAU;AAAA,IACtB,OAAO;AACL,UAAI,MAAM,UAAU;AAAA,IACtB;AAAA,EACF;",
4
+ "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n // console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// ---- global helpers ----\nfunction getQueryParam(name: string): string | null {\n const val = new URLSearchParams(window.location.search).get(name);\n return val ? val.trim() : null;\n}\n\nfunction getTagEqualFromURL(): string | null {\n return getQueryParam(\"tag_equal\");\n}\n\n// expose globally if you want to inspect it in the console\n// @ts-ignore\n(window as any).getTagEqualFromURL = getTagEqualFromURL;\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n console.log(\"%csrc/filters/konnect.ts:2 working\", \"color: #007acc;\");\n const elements = document.querySelectorAll<HTMLElement>(\n \"[konnect-filter-element]\"\n );\n if (elements.length === 0) return;\n setTimeout(updateMobileSelectOnLoad, 200);\n\n // watch tag_equal every 100 ms\n let lastTagEqual = getTagEqualFromURL();\n setInterval(() => {\n const current = getTagEqualFromURL();\n if (current !== lastTagEqual) {\n console.log(\"tag_equal changed:\", current);\n lastTagEqual = current;\n updateMobileSelect(); // re-sync the select whenever the URL changes\n }\n }, 100);\n\n // log the URL param whenever user changes select\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (select) {\n select.addEventListener(\"change\", () => {\n console.log(\"Select changed \u2192 URL tag_equal is:\", getTagEqualFromURL());\n });\n }\n\n elements.forEach((el) => {\n el.addEventListener(\"click\", () => {\n console.log(\"konnect-filter-element clicked:\", el);\n const type = el.getAttribute(\"konnect-filter-element\");\n if (type === \"primary\") {\n setTimeout(updateMobileSelect, 100);\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n items.forEach((el, index) => {\n if (index == 0) {\n el.click();\n el.setAttribute(\"konnect-filter-active\", \"true\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n } else {\n setTimeout(updateSecondaryFilterTabs, 100);\n }\n });\n });\n});\n\nfunction updateSecondaryFilterTabs(): void {\n const raw = new URLSearchParams(window.location.search).get(\"nest-tag_equal\");\n const items = document.querySelectorAll<HTMLElement>(\n '[konnect-filter-element=\"secondary\"]'\n );\n if (!raw) {\n items.forEach((el, index) => {\n el.setAttribute(\"konnect-filter-active\", index == 0 ? \"true\" : \"false\");\n });\n return;\n }\n const target = raw.trim().toLowerCase();\n if (items.length === 0) return;\n\n items.forEach((el) => {\n const input = el.querySelector<HTMLInputElement>(\"[fs-list-value]\");\n if (!input) return;\n const valFromAttr = input\n .getAttribute(\"fs-list-value\")\n ?.trim()\n .toLowerCase();\n if (valFromAttr === target) {\n el.setAttribute(\"konnect-filter-active\", \"true\");\n items[0].setAttribute(\"konnect-filter-active\", \"false\");\n } else {\n el.setAttribute(\"konnect-filter-active\", \"false\");\n }\n });\n}\n\nfunction updateMobileSelect(): void {\n const raw = getTagEqualFromURL();\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected option: ${raw}`);\n toggleSecondaryFilter(raw);\n } else {\n console.warn(`No matching option found for value: ${raw}`);\n }\n } else {\n console.log(\"No 'tag_equal' parameter in URL.\");\n }\n}\n\nfunction updateMobileSelectOnLoad(): void {\n const raw = getTagEqualFromURL();\n const select = document.getElementById(\n \"konnect-filter\"\n ) as HTMLSelectElement | null;\n if (!select) {\n console.warn(\"Select element with id 'konnect-filter' not found.\");\n return;\n }\n\n if (raw) {\n const matchedOption = Array.from(select.options).find(\n (option) => option.value === raw\n );\n if (matchedOption) {\n select.value = raw;\n console.log(`Selected from URL param: ${raw}`);\n } else {\n console.warn(\n `No matching option found for value: ${raw}. Defaulting to Marketplaces.`\n );\n select.value = \"Marketplaces\";\n }\n } else {\n select.value = \"Marketplaces\";\n console.log(\"No tag_equal param found. Defaulted to Marketplaces.\");\n }\n}\nfunction toggleSecondaryFilter(raw: string | null): void {\n const hiddenFilters = document.querySelectorAll(\n \"[hidden-filter]\"\n ) as NodeListOf<HTMLElement>;\n if (!hiddenFilters) return;\n\n hiddenFilters.forEach((el) => {\n el.style.display = raw === \"Marketplaces\" ? \"flex\" : \"none\";\n });\n}\n"],
5
+ "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AAAA,EAEP;;;ACTA,WAAS,cAAc,MAA6B;AAClD,UAAM,MAAM,IAAI,gBAAgB,OAAO,SAAS,MAAM,EAAE,IAAI,IAAI;AAChE,WAAO,MAAM,IAAI,KAAK,IAAI;AAAA,EAC5B;AAEA,WAAS,qBAAoC;AAC3C,WAAO,cAAc,WAAW;AAAA,EAClC;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X,cAAQ,KAAK,oDAAoD;AACjE;AAAA,IACF;AAEA,QAAI,KAAK;AACP,YAAM,gBAAgB,MAAM,KAAK,OAAO,OAAO,EAAE;AAAA,QAC/C,CAAC,WAAW,OAAO,UAAU;AAAA,MAC/B;AACA,UAAI,eAAe;AACjB,eAAO,QAAQ;AACf,gBAAQ,IAAI,4BAA4B,GAAG,EAAE;AAAA,MAC/C,OAAO;AACL,gBAAQ;AAAA,UACN,uCAAuC,GAAG;AAAA,QAC5C;AACA,eAAO,QAAQ;AAAA,MACjB;AAAA,IACF,OAAO;AACL,aAAO,QAAQ;AACf,cAAQ,IAAI,sDAAsD;AAAA,IACpE;AAAA,EACF;AACA,WAAS,sBAAsB,KAA0B;AACvD,UAAM,gBAAgB,SAAS;AAAA,MAC7B;AAAA,IACF;AACA,QAAI,CAAC,cAAe;AAEpB,kBAAc,QAAQ,CAAC,OAAO;AAC5B,SAAG,MAAM,UAAU,QAAQ,iBAAiB,SAAS;AAAA,IACvD,CAAC;AAAA,EACH;",
6
6
  "names": ["el"]
7
7
  }
@@ -1 +1 @@
1
- "use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("[fynd-video-element]").forEach(o=>{let e=o.querySelector("video"),t=o.querySelector("img");!e||!t||(t.style.display="block",e.addEventListener("canplay",()=>{setTimeout(()=>{t.style.display="none",e.getAttribute("video-on-loop")==="true"&&(e.muted=!0,e.loop=!0,e.play())},500)}))})});})();
1
+ "use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("[fynd-video-element]").forEach(n=>{let e=n.querySelector("video"),t=n.querySelector("img");if(!e||!t)return;let i=e.getAttribute("video-on-loop")==="true";i&&(e.muted=!0,e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.loop=!0,e.setAttribute("autoplay","")),t.style.display="block",e.addEventListener("canplay",()=>{setTimeout(()=>{if(t.style.display="none",i){let o=e.play();o&&typeof o.catch=="function"&&o.catch(()=>{let l=()=>{e.play().finally(()=>{e.removeEventListener("click",l)})};e.addEventListener("click",l,{once:!0})})}},500)})})});})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../bin/live-reload.js", "../../src/global/video-card.ts"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n // console.log(\"Live reload disabled: not running on localhost\");\n}\n", "document.addEventListener(\"DOMContentLoaded\", () => {\n const videoCards = document.querySelectorAll(\"[fynd-video-element]\");\n\n videoCards.forEach((card) => {\n const video = card.querySelector(\"video\");\n const image = card.querySelector(\"img\");\n\n if (!video || !image) return;\n\n // Show image until video is loaded\n image.style.display = \"block\";\n\n video.addEventListener(\"canplay\", () => {\n setTimeout(() => {\n image.style.display = \"none\";\n\n // Check if video-on-loop=\"true\" is present\n if (video.getAttribute(\"video-on-loop\") === \"true\") {\n video.muted = true;\n video.loop = true;\n video.play();\n }\n }, 500);\n });\n });\n});\n"],
5
- "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AAAA,EAEP;;;ACVA,WAAS,iBAAiB,oBAAoB,MAAM;AAClD,UAAM,aAAa,SAAS,iBAAiB,sBAAsB;AAEnE,eAAW,QAAQ,CAAC,SAAS;AAC3B,YAAM,QAAQ,KAAK,cAAc,OAAO;AACxC,YAAM,QAAQ,KAAK,cAAc,KAAK;AAEtC,UAAI,CAAC,SAAS,CAAC,MAAO;AAGtB,YAAM,MAAM,UAAU;AAEtB,YAAM,iBAAiB,WAAW,MAAM;AACtC,mBAAW,MAAM;AACf,gBAAM,MAAM,UAAU;AAGtB,cAAI,MAAM,aAAa,eAAe,MAAM,QAAQ;AAClD,kBAAM,QAAQ;AACd,kBAAM,OAAO;AACb,kBAAM,KAAK;AAAA,UACb;AAAA,QACF,GAAG,GAAG;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;",
4
+ "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n // console.log(\"Live reload disabled: not running on localhost\");\n}\n", "document.addEventListener(\"DOMContentLoaded\", () => {\n const videoCards = document.querySelectorAll(\"[fynd-video-element]\");\n\n videoCards.forEach((card) => {\n const video = card.querySelector(\"video\");\n const image = card.querySelector(\"img\");\n if (!video || !image) return;\n\n // Set autoplay-friendly flags ASAP, before loading/playing\n const shouldLoop = video.getAttribute(\"video-on-loop\") === \"true\";\n if (shouldLoop) {\n video.muted = true; // property\n video.setAttribute(\"muted\", \"\"); // attribute for iOS\n video.setAttribute(\"playsinline\", \"\");\n video.setAttribute(\"webkit-playsinline\", \"\");\n video.loop = true;\n // Optional: hint the browser\n video.setAttribute(\"autoplay\", \"\");\n }\n\n image.style.display = \"block\";\n\n video.addEventListener(\"canplay\", () => {\n setTimeout(() => {\n image.style.display = \"none\";\n if (shouldLoop) {\n const p = video.play();\n if (p && typeof p.catch === \"function\") {\n p.catch(() => {\n // Fallback: start on first user tap if autoplay is blocked\n const startOnTap = () => {\n video.play().finally(() => {\n video.removeEventListener(\"click\", startOnTap);\n });\n };\n video.addEventListener(\"click\", startOnTap, { once: true });\n });\n }\n }\n }, 500);\n });\n });\n});\n"],
5
+ "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AAAA,EAEP;;;ACVA,WAAS,iBAAiB,oBAAoB,MAAM;AAClD,UAAM,aAAa,SAAS,iBAAiB,sBAAsB;AAEnE,eAAW,QAAQ,CAAC,SAAS;AAC3B,YAAM,QAAQ,KAAK,cAAc,OAAO;AACxC,YAAM,QAAQ,KAAK,cAAc,KAAK;AACtC,UAAI,CAAC,SAAS,CAAC,MAAO;AAGtB,YAAM,aAAa,MAAM,aAAa,eAAe,MAAM;AAC3D,UAAI,YAAY;AACd,cAAM,QAAQ;AACd,cAAM,aAAa,SAAS,EAAE;AAC9B,cAAM,aAAa,eAAe,EAAE;AACpC,cAAM,aAAa,sBAAsB,EAAE;AAC3C,cAAM,OAAO;AAEb,cAAM,aAAa,YAAY,EAAE;AAAA,MACnC;AAEA,YAAM,MAAM,UAAU;AAEtB,YAAM,iBAAiB,WAAW,MAAM;AACtC,mBAAW,MAAM;AACf,gBAAM,MAAM,UAAU;AACtB,cAAI,YAAY;AACd,kBAAM,IAAI,MAAM,KAAK;AACrB,gBAAI,KAAK,OAAO,EAAE,UAAU,YAAY;AACtC,gBAAE,MAAM,MAAM;AAEZ,sBAAM,aAAa,MAAM;AACvB,wBAAM,KAAK,EAAE,QAAQ,MAAM;AACzB,0BAAM,oBAAoB,SAAS,UAAU;AAAA,kBAC/C,CAAC;AAAA,gBACH;AACA,sBAAM,iBAAiB,SAAS,YAAY,EAAE,MAAM,KAAK,CAAC;AAAA,cAC5D,CAAC;AAAA,YACH;AAAA,UACF;AAAA,QACF,GAAG,GAAG;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fynd-design-engineering/fynd-one-v2",
3
- "version": "3.3.38",
3
+ "version": "3.3.40",
4
4
  "description": "Updated CDN for fynd.com",
5
5
  "homepage": "https://github.com/Fynd-Design-Engineering/Fynd-Utils/blob/main/README.md",
6
6
  "license": "ISC",