PageSourceSearch

https://gymbeam.gr/api/v1/fe-assets/_astro/currency-component.C6D8Ldm2.js

js gymbeam.gr collected 2026-10-07 07:17:38 UTC 2,864 bytes, 1 lines download raw bytes

1import{j as a}from"./jsx-runtime.D_zvdyIk.js";import{c as x}from"./lib.Cr47mRvb.js";import{u as N}from"./useTranslations.BDze_o2Q.js";import{s as h}from"./selectors-constants.CPemlMnc.js";import{Q as b,R,a as E,U as v,V as G}from"./get-store-code.DRixfapQ.js";import"./index.Cj9yZCyu.js";import"./cart-context.DvgW1JLQ.js";import{a as _}from"./link.ERP6xR9B.js";function w({mainValue:c,mainCurrency:e,mainCurrencyFormat:r,secondaryValue:s,secondaryCurrency:t,secondaryCurrencyFormat:n,storeCode:i}){const p=v({price:c,storeCode:i,currency:e,currencyFormat:r,dualCurrency:!!r}),f=s!==void 0?v({price:s,storeCode:i,currency:t,currencyFormat:n,dualCurrency:!!n}):void 0;return{mainPrice:p,secondaryPrice:f}}function C({storeCode:c,amount:e,dualCurrency:r}){if(!e?.website_value&&!e?.value)return{mainValue:0};const s=b(c);return R(c)===E.bg&&e.value&&r?.format&&r?.rate?{mainValue:e.value,secondaryCurrencyFormat:r.format,secondaryValue:e.value*r.rate}:s&&e.value&&r?.format&&r?.rate?{mainValue:e.value,secondaryValue:e.value*r.rate,secondaryCurrencyFormat:r.format}:{mainValue:e.website_value??0}}function U({amount:c,storeCode:e,currency:r,dualCurrency:s}){const t=C({amount:c,storeCode:e,dualCurrency:s});return w({mainValue:t.mainValue,mainCurrency:r,mainCurrencyFormat:t.mainCurrencyFormat,secondaryValue:t.secondaryValue,secondaryCurrency:r,secondaryCurrencyFormat:t.secondaryCurrencyFormat,storeCode:e}).mainPrice}const q=({component:c,className:e,role:r,price:s,isPriceRange:t,giftCardAmount:n,breakDualCurrency:i})=>{const p=c||"span",f=N("ProductBox"),{storeConfig:{currency:d,dualCurrency:y},storeCode:u}=_();let l,m;if(n){const{mainValue:o,mainCurrencyFormat:j,secondaryValue:k,secondaryCurrencyFormat:F}=C({amount:n,storeCode:u,dualCurrency:y}),{mainPrice:g,secondaryPrice:S}=w({mainValue:o,mainCurrency:d,mainCurrencyFormat:j,secondaryValue:k,secondaryCurrency:d,secondaryCurrencyFormat:F,storeCode:u});l=g,m=S}else{const o=G({price:{value:s??0,currency:d},storeCode:u,dualCurrency:y});l=o.mainPrice,m=o.localPrice}const V=n?!!l:s!==void 0,P=b(u)&&m;return a.jsx(p,{role:r,className:e,children:V?t?f.rich("price",{price:()=>a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"break-keep whitespace-nowrap",children:l}),P&&a.jsxs("span",{className:x("text-sm font-normal break-keep whitespace-nowrap text-[color:var(--color-subtitle)]",i&&"block"),children:["≈(",m,")"]})]}),from:o=>a.jsx("span",{className:"pr-1 text-xs font-normal break-keep whitespace-nowrap","data-test":h.HP.bestsellersPrice,children:o})}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"break-keep whitespace-nowrap","data-test":h.HP.bestsellersPrice,children:l}),P&&a.jsxs("span",{className:x("text-sm font-normal break-keep whitespace-nowrap text-[color:var(--color-subtitle)]",i&&"block"),children:["≈(",m,")"]})]}):a.jsx("span",{})})};export{q as C,C as c,U as f};

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.