PageSourceSearch

https://www.osklen.com/_frsh/js/c33a80b927ce0f73d6590843ba6c3d00ee6e0e25/chunk-NNJEKOVD.js

js osklen.com collected 2026-09-26 00:37:02 UTC 3,214 bytes, 1 lines download raw bytes

1import{b as I}from"./chunk-QXVP732J.js";import{d as O}from"./chunk-VYZNAVQ6.js";import{b as h,d as b}from"./chunk-ZDLMJVT4.js";var E=()=>{if(typeof window>"u")return;let t=new URLSearchParams(window.location.search),r=t.has("prmn"),a=t.has("iln");return r?"prmn":a?"iln":void 0};function N(t){let{elementRef:r,item:a,targetId:i,threshold:c,creativeName:S,creativeSlot:v}=t,p=b({}),o=(n,e)=>{typeof window>"u"||(globalThis.window.dataLayer=globalThis?.window.dataLayer||[],globalThis?.window.dataLayer.push({event:"view_promotion",promotion_id:`promo_${String(e).toLowerCase().replace(/\s+/g,"_")}`,promotion_name:I(n.label??"")??void 0,creative_name:S??void 0,creative_slot:v??void 0}))};h(()=>{if(!a||!r.current)return;let n=r.current,e=new IntersectionObserver(s=>{s.forEach(m=>{m.isIntersecting&&!p.current[i]&&(o(a,i),p.current[i]=!0)})},{threshold:c});return e.observe(n),()=>e.disconnect()},[a,i,r.current])}var P="productPromos",d="lastPromo",l=t=>!!(t&&t!=="undefined"&&t!=="null"&&t.trim()!=="");function g(){if(typeof sessionStorage>"u")return{};try{let t=sessionStorage.getItem(P);if(!l(t))return{};let r=JSON.parse(t),a={};return Object.entries(r).forEach(([i,c])=>{l(i)&&l(c)&&(a[i]=c)}),a}catch(t){return console.warn("Error retrieving promotions from sessionStorage:",t),{}}}function _(){if(typeof sessionStorage>"u")return null;let t=sessionStorage.getItem(d);return l(t)?t:null}function C(t){let r=O(null);h(()=>{if(typeof sessionStorage>"u")return;if(!t){r.value=_();return}let o=g();r.value=o[t]||sessionStorage.getItem(d)},[t]);function a(o,n,e="collection"){if(!(typeof sessionStorage>"u"||!l(o))){if(sessionStorage.setItem(d,o),n&&l(n)){let s=g();s[n]=`${o}|${e}`,sessionStorage.setItem(P,JSON.stringify(s))}r.value=o}}function i(o){if(!l(o))return null;let e=g()[o];if(l(e))return e.includes("|")?e.split("|")[0]:e;let s=_();return s||null}function c(o){if(!l(o))return null;let n=g(),e=n[o];if(l(e))return e.includes("|")&&e.split("|")[1]==="promotion"?"promotion":"collection";let s=Object.values(n);if(s.length>0){let m=s.filter(u=>u.includes("|collection")).length,y=s.filter(u=>u.includes("|promotion")).length;return m>y?"collection":"promotion"}return null}function S(o){if(typeof sessionStorage>"u"||!l(o))return;let n=g();n[o]&&(delete n[o],sessionStorage.setItem(P,JSON.stringify(n)));let e=_();e&&i(o)===e&&(sessionStorage.removeItem(d),r.value=null)}function v(){typeof sessionStorage>"u"||(sessionStorage.removeItem(P),sessionStorage.removeItem(d),r.value=null)}function p(o,n){let e=i(o)||n;if(!e)return{};let s=i(o),m=c(o);if(s&&m)return m==="promotion"?{promotion_name:e}:{item_list_name:e};if(s&&!m){let f=c(o);if(f)return f==="promotion"?{promotion_name:e}:{item_list_name:e}}if(typeof sessionStorage<"u"){let f=sessionStorage.getItem("promotions");if(f)try{let u=JSON.parse(f);if(Object.values(u).some(w=>typeof w=="string"&&w.includes("|collection")))return{item_list_name:e}}catch(u){console.warn("Error parsing promotions context:",u)}}return E()?.includes("prmn")?{promotion_name:e}:{item_list_name:e}}return{promotion:r,savePromo:a,getPromoForProduct:i,getPromoTypeForProduct:c,getPromotionParams:p,removePromo:S,clearAllPromos:v,urlParam:E()}}export{N as a,C as b};

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.