PageSourceSearch

https://yodeyma.bg/cdn/shop/t/32/assets/__vite-products.80a9323a.js

js yodeyma.bg collected 2026-10-05 17:43:41 UTC 2,726 bytes, 1 lines download raw bytes

1var _=Object.defineProperty;var g=(t,r,s)=>r in t?_(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;var v=(t,r,s)=>(g(t,typeof r!="symbol"?r+"":r,s),s);import{p as V,s as P,b as p,a as d}from"./__vite-utils.9fac69fd.js";const o=class{constructor(r,s,e=100){o.mutators[r]=this,this.mutator=s,this.index=e}static destroy(r){o.mutators[r]&&delete o.mutators[r]}static async _run(r){const s=Object.entries(o.mutators);s.sort(([c,i],[n,b])=>i.index-b.index);let e=JSON.parse(JSON.stringify(r));for(const c of s){const[i,n]=c;e=await n.mutator(e)}return Object.values(e).forEach(c=>c.mutated=!0),e}};let u=o;v(u,"mutators",{});const a=V({products:{},variants:{},preferedVariants:{}}),l=(t,r,s=!0)=>{const e=a.products[t];return s&&e&&e.mutated&&r(f(t)),p(a.products,t,()=>{a.products[t].mutated&&r(f(t))})};P(a.products,async()=>{const t=Object.entries(a.products).filter(([r,s])=>!s.mutated);if(t.length){const r=await u._run(Object.fromEntries(t));Object.entries(r).forEach(([s,e])=>O(s,e))}});const k=(t,r,s=!0)=>(s&&a.variants[t]&&r(m(t)),p(a.variants,t,()=>{a.variants[t]&&r(m(t))})),E=(t,r,s=!0)=>(s&&a.preferedVariants[t]&&r(a.preferedVariants[t]),p(a.variants,t,()=>y(t,a.variants[t])),p(a.preferedVariants,t,()=>r(a.preferedVariants[t]))),f=t=>a.products[t]?d(a.products[t]):{},j=(t,r)=>{var e,c;const s=f(t);return((e=s.variants)==null?void 0:e.find(({id:i})=>i===r))||((c=s.variants)==null?void 0:c[0])},m=t=>j(t,a.variants[t]),w=t=>d(a.variants)[t],D=t=>a.preferedVariants[t],y=(t,r)=>{a.preferedVariants[t]=r},J=(t,r)=>{var c;const s=f(t),e={price:s.price,compare_at_price:s.compare_at_price,available:s.available,price_varies:s.price_varies,mutated:s.mutated};if(s.variants&&(e.unit_price=s.variants[0].unit_price,e.unit_price_measurement=s.variants[0].unit_price_measurement),r){const i=(c=s.variants)==null?void 0:c.find(n=>n.id===r);i&&(e.price=i.price,e.compare_at_price=i.compare_at_price,e.available=i.available,e.price_varies=!1,e.unit_price=i.unit_price,e.unit_price_measurement=i.unit_price_measurement)}return e},O=(t,r)=>{var c;if(!t)return null;r.mutated||(r.mutated=!1);const s={...a.products[t],...r},e=a.variants[t];if(e&&((c=r.variants)!=null&&c.length)){const i=r.variants.find(n=>n.id===e);s.variant_barcode=i==null?void 0:i.barcode,s.variant_sku=i==null?void 0:i.sku,s.available=i==null?void 0:i.available}return r.url&&(s.url=r.url.replace(/\?.*$/,"")),a.products[t]=s,a.products[t]},N=(t,r)=>{var s,e;return r?a.variants[t]=r:!r&&!a.variants[t]&&((e=(s=a.products[t])==null?void 0:s.variants)==null?void 0:e.length)===1&&(a.variants[t]=a.products[t].variants[0].id),a.variants[t]};export{u as P,k as a,l as b,D as c,j as d,w as e,m as f,J as g,f as h,E as i,y as j,N as k,O as s};

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.