PageSourceSearch

https://floky.com/assets/ProductCard-CRvEJyYi.js

js floky.com collected 2026-10-07 16:56:00 UTC 4,366 bytes, 1 lines download raw bytes

1import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-6OGjdfot.js";import{t as r}from"./link-DdTIhjth.js";import{c as i}from"./shopify-CL_remKM.js";import{t as a}from"./JudgeMeStars-UPpTaSZ4.js";var o=e(n(),1),s=[`supporto`,`compressione`,`recupero`,`traspirante`,`antiscivolo`,`antibatterico`,`termico`,`ammortizzazione`,`leggero`,`stabilità`,`performance`,`comfort`,`postura`,`circolazione`,`drenaggio`],c=new Set([`padel`,`running`,`basket`,`calcio`,`pallavolo`,`pilates`,`piscina`,`recupero`,`ciclismo`,`trail`,`trekking`]);function l(e){let t=new Set;for(let n of e.node.collections?.edges??[]){let e=(n.node.handle||``).toLowerCase(),r=(n.node.title||``).trim();r&&(c.has(e)||c.has(r.toLowerCase()))&&t.add(r)}return Array.from(t).filter(Boolean)}function u(e){return e.node.options?.find(e=>/color|colore/i.test(e.name))?.values??[]}function d(e){let t=new Set;for(let n of e.node.tags||[]){let e=n.toLowerCase();e.startsWith(`benefit:`)||e.startsWith(`beneficio:`)?t.add(n.split(`:`)[1]?.trim()||``):s.some(t=>e.includes(t))&&t.add(n)}return Array.from(t).filter(Boolean)}function f(e,{sport:t,color:n,benefit:r}){return e.filter(e=>{if(t.length){let n=l(e).map(e=>e.toLowerCase());if(!t.some(e=>n.includes(e.toLowerCase())))return!1}if(n.length){let t=u(e).map(e=>e.toLowerCase());if(!n.some(e=>t.includes(e.toLowerCase())))return!1}if(r.length){let t=d(e).map(e=>e.toLowerCase());if(!r.some(e=>t.includes(e.toLowerCase())))return!1}return!0})}function p(e){let t=new Map,n=new Map,r=new Map;for(let i of e){for(let e of l(i))t.set(e,(t.get(e)??0)+1);for(let e of u(i))n.set(e,(n.get(e)??0)+1);for(let e of d(i))r.set(e,(r.get(e)??0)+1)}let i=e=>Array.from(e.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]));return{sports:i(t),colors:i(n),benefits:i(r)}}function m(e,t){if(!t.length)return{url:null,colorName:null};let n=new Set(t.map(e=>e.toLowerCase()));for(let t of e.node.variants?.edges??[]){let e=t.node,r=e.selectedOptions.find(e=>/color|colore/i.test(e.name));if(r&&n.has(r.value.toLowerCase()))return{url:e.image?.url??null,colorName:r.value}}return{url:null,colorName:null}}var h=t();function g({product:e,selectedColors:t,reviewStats:n}){let s=e.node,c=s.images?.edges?.[0]?.node,l=s.images?.edges?.[1]?.node,u=s.priceRange.minVariantPrice,d=s.compareAtPriceRange?.minVariantPrice,f=d&&parseFloat(d.amount)>parseFloat(u.amount),p=f&&d?Math.round((parseFloat(d.amount)-parseFloat(u.amount))/parseFloat(d.amount)*100):0,g=(0,o.useMemo)(()=>m(e,t??[]),[e,t]),_=g.url?{url:g.url,altText:s.title}:c,v=g.url?void 0:l,y=g.colorName?{color:g.colorName}:void 0;return(0,h.jsxs)(r,{to:`/products/$handle`,params:{handle:s.handle},search:y,className:`group block`,children:[(0,h.jsxs)(`div`,{className:`relative aspect-square overflow-hidden bg-secondary ring-1 ring-transparent transition-all duration-300 group-hover:ring-2 group-hover:ring-[#d4ff00]`,children:[_&&(0,h.jsx)(`img`,{src:_.url,alt:_.altText??s.title,className:`absolute inset-0 w-full h-full object-cover transition-all duration-500 group-hover:scale-[1.03] ${v?`group-hover:opacity-0`:``}`,loading:`lazy`}),v?(0,h.jsx)(`img`,{src:v.url,alt:v.altText??s.title,className:`absolute inset-0 w-full h-full object-cover opacity-0 transition-opacity duration-500 group-hover:opacity-100`,loading:`lazy`}):null,f&&(0,h.jsxs)(`span`,{className:`absolute top-3 left-3 bg-[#d4ff00] text-black text-[11px] font-bold uppercase px-2.5 py-1 tracking-wider shadow-sm`,children:[`-`,p,`%`]}),(0,h.jsx)(`span`,{className:`pointer-events-none absolute bottom-0 left-0 h-[3px] w-0 bg-[#d4ff00] transition-all duration-300 group-hover:w-full`})]}),(0,h.jsxs)(`div`,{className:`mt-3`,children:[(0,h.jsx)(`h3`,{className:`font-semibold uppercase tracking-wide text-[13px] leading-snug line-clamp-2 text-black`,children:s.title}),g.colorName&&(0,h.jsx)(`p`,{className:`text-[11px] uppercase tracking-wider text-muted-foreground mt-0.5`,children:g.colorName}),n&&n.count>0&&(0,h.jsx)(`div`,{className:`mt-1`,children:(0,h.jsx)(a,{stats:n,size:`sm`})}),(0,h.jsxs)(`div`,{className:`mt-1.5 flex items-baseline gap-2`,children:[(0,h.jsx)(`span`,{className:`font-bold text-[15px] text-black`,children:i(u.amount,u.currencyCode)}),f&&d&&(0,h.jsx)(`span`,{className:`text-sm text-muted-foreground line-through`,children:i(d.amount,d.currencyCode)})]})]})]})}export{p as n,f as r,g as t};

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.