@lanaco/lnc-react-ui 4.0.193 → 4.0.195

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,10 +1,10 @@
1
- import { jsx as o, Fragment as T, jsxs as y } from "react/jsx-runtime";
2
- import { memo as F, forwardRef as I, useState as _, useMemo as q } from "react";
1
+ import { jsx as o, Fragment as $, jsxs as y } from "react/jsx-runtime";
2
+ import { memo as T, forwardRef as I, useState as _, useMemo as q } from "react";
3
3
  import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { M as D, S as E } from "./consts-BuFChS64.js";
5
5
  import { u as Q } from "./useDetectMobile-Bkvj0VMa.js";
6
6
  import j from "./Button.js";
7
- import { D as z, S as A } from "./index-DqBXIFsQ.js";
7
+ import { D as z, S as A } from "./index-Csxc_5p0.js";
8
8
  const G = B.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -78,7 +78,7 @@ const G = B.div`
78
78
  display: flex;
79
79
  flex-direction: column;
80
80
  }
81
- `, w = F(z), K = I((r, N) => {
81
+ `, w = T(z), K = I((r, N) => {
82
82
  const {
83
83
  items: a,
84
84
  limit: s = 5,
@@ -97,11 +97,11 @@ const G = B.div`
97
97
  },
98
98
  actionComponent: k,
99
99
  componentName: b,
100
- sponsoredText: C,
101
- LinkComponent: S
102
- } = r, l = Q(), [i, U] = _(!1), v = q(() => {
100
+ sponsoredText: S,
101
+ LinkComponent: C
102
+ } = r, l = Q(), [i, U] = _(!1), F = q(() => {
103
103
  var t;
104
- return /* @__PURE__ */ o(T, { children: l === !0 ? (t = a == null ? void 0 : a.slice(0, i === !0 ? a == null ? void 0 : a.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ o(
104
+ return /* @__PURE__ */ o($, { children: l === !0 ? (t = a == null ? void 0 : a.slice(0, i === !0 ? a == null ? void 0 : a.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ o(
105
105
  w,
106
106
  {
107
107
  sellerName: e == null ? void 0 : e.sellerName,
@@ -115,7 +115,7 @@ const G = B.div`
115
115
  sellerUuid: e == null ? void 0 : e.sellerUuid,
116
116
  uuid: e == null ? void 0 : e.uuid,
117
117
  sponsored: e == null ? void 0 : e.sponsored,
118
- onSelectCard: ($, d) => c({
118
+ onSelectCard: (v, d) => c({
119
119
  uuid: e == null ? void 0 : e.uuid,
120
120
  nameSlug: e == null ? void 0 : e.nameSlug,
121
121
  cardRef: d
@@ -138,8 +138,9 @@ const G = B.div`
138
138
  status: e == null ? void 0 : e.status,
139
139
  trade: e == null ? void 0 : e.trade,
140
140
  forCart: e == null ? void 0 : e.forCart,
141
- sponsoredText: C,
142
- LinkComponent: S
141
+ sponsoredText: S,
142
+ LinkComponent: C,
143
+ hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
143
144
  },
144
145
  m
145
146
  )) : a == null ? void 0 : a.slice(0, s).map((e, m) => /* @__PURE__ */ o(
@@ -156,7 +157,7 @@ const G = B.div`
156
157
  uuid: e == null ? void 0 : e.uuid,
157
158
  location: e == null ? void 0 : e.location,
158
159
  sponsored: e == null ? void 0 : e.sponsored,
159
- onSelectCard: ($, d) => c({
160
+ onSelectCard: (v, d) => c({
160
161
  uuid: e == null ? void 0 : e.uuid,
161
162
  nameSlug: e == null ? void 0 : e.nameSlug,
162
163
  cardRef: d
@@ -179,9 +180,10 @@ const G = B.div`
179
180
  status: e == null ? void 0 : e.status,
180
181
  trade: e == null ? void 0 : e.trade,
181
182
  forCart: e == null ? void 0 : e.forCart,
182
- sponsoredText: C,
183
+ sponsoredText: S,
183
184
  sellerName: e == null ? void 0 : e.sellerName,
184
- LinkComponent: S
185
+ LinkComponent: C,
186
+ hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
185
187
  },
186
188
  m
187
189
  )) });
@@ -197,7 +199,7 @@ const G = B.div`
197
199
  /* @__PURE__ */ o("span", { children: P })
198
200
  ] }),
199
201
  " ",
200
- v,
202
+ F,
201
203
  " ",
202
204
  l === !0 && n < (a == null ? void 0 : a.length) && !u && /* @__PURE__ */ o(
203
205
  j,
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),m=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),a=require("./utils-RnrgDDZP.cjs"),Pe=require("./index-uwl7BjRF.cjs"),L=require("./Badge.cjs"),ye=require("./Popover.cjs"),Re=require("./PopoverTrigger.cjs"),_e=require("./PopoverContent.cjs"),Ne=require("./useDetectMobile-zkbzoOGV.cjs"),Le=require("./Icon.cjs"),n=require("./style-BAcV7F53.cjs"),$e=k.styled.a`
1
+ "use strict";const e=require("react/jsx-runtime"),m=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),O=require("./consts-goSZX3xP.cjs"),s=require("./utils-RnrgDDZP.cjs"),Ne=require("./index-uwl7BjRF.cjs"),$=require("./Badge.cjs"),Le=require("./Popover.cjs"),Ee=require("./PopoverTrigger.cjs"),$e=require("./PopoverContent.cjs"),We=require("./useDetectMobile-zkbzoOGV.cjs"),Q=require("./Icon.cjs"),n=require("./style-BAcV7F53.cjs"),Fe=P.styled.a`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 0.5rem;
@@ -15,7 +15,7 @@
15
15
  }
16
16
  & .seller {
17
17
  text-transform: uppercase;
18
- ${a.truncateText()}
18
+ ${s.truncateText()}
19
19
  color: var(--gray-500);
20
20
  font-size: 0.625rem;
21
21
  font-weight: 400;
@@ -68,13 +68,13 @@
68
68
  & .card-title {
69
69
  font-size: 0.875rem;
70
70
  font-weight: 600;
71
- ${a.truncateTextInRows(2)}
71
+ ${s.truncateTextInRows(2)}
72
72
  }
73
73
 
74
74
  & .price-text {
75
75
  font-size: 1rem;
76
76
  font-weight: 600;
77
- ${a.truncateText()}
77
+ ${s.truncateText()}
78
78
  display: flex;
79
79
  align-items: end;
80
80
  gap: 0.5rem;
@@ -97,7 +97,7 @@
97
97
  font-size: 0.75rem;
98
98
  font-weight: 400;
99
99
  color: var(--gray-600, #676e79);
100
- ${a.truncateText()}
100
+ ${s.truncateText()}
101
101
  }
102
102
 
103
103
  & .tags-wrapper {
@@ -163,7 +163,7 @@
163
163
  padding-inline: 0.5rem;
164
164
  }
165
165
 
166
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
166
+ @media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
167
167
  overflow: visible;
168
168
 
169
169
  & .wrapper-card-3 {
@@ -226,7 +226,7 @@
226
226
  &:hover .product-image-wrapper img {
227
227
  transform: scale(1.1);
228
228
  }
229
- `,Ee=k.styled.div`
229
+ `,Ie=P.styled.div`
230
230
  position: relative;
231
231
  overflow: hidden;
232
232
  border-radius: 0.75rem;
@@ -247,7 +247,7 @@
247
247
 
248
248
  width: 2.25rem;
249
249
  height: 2.25rem;
250
- border-radius: ${i=>a.getBorderRadiusValueWithUnits(i.theme,"curved")};
250
+ border-radius: ${i=>s.getBorderRadiusValueWithUnits(i.theme,"curved")};
251
251
  border: 1px solid var(--gray-95008);
252
252
  background-color: white;
253
253
  color: var(--gray-950);
@@ -279,7 +279,7 @@
279
279
  transition: var(--transition, all 0.3s ease);
280
280
  }
281
281
 
282
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
282
+ @media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
283
283
  & img {
284
284
  width: 8.875rem;
285
285
  height: 8.875rem;
@@ -294,7 +294,7 @@
294
294
  top: unset;
295
295
  }
296
296
  }
297
- `,We=k.styled.div`
297
+ `,qe=P.styled.div`
298
298
  background: var(--white, #fff);
299
299
  z-index: 1;
300
300
 
@@ -344,7 +344,7 @@
344
344
  color: var(--gray-950, #14161a);
345
345
  }
346
346
  }
347
- `,qe=k.styled.div`
347
+ `,Oe=P.styled.div`
348
348
  display: flex;
349
349
  align-items: center;
350
350
  gap: 0.25rem;
@@ -356,12 +356,12 @@
356
356
  font-size: 1rem;
357
357
  color: var(--warning-500, #F59E0B);
358
358
  }
359
- `,Ie=m.forwardRef(({sponsoredText:i="Sponsored"},C)=>e.jsxs(qe,{ref:C,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),Oe="Vehicles_Cars",De="Vehicles_Motorcycles",Ve="Vehicles_Trucks",ze="Vehicles_AgriculturalMachines_Tractors",Be="Vehicles_ConstructionMachines",Fe="Vehicles_Bus",Ge="Vehicles_Campers",Ue="RealEstates_",l={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},O={ADDDISCOUNT:" mng-lnc-percentage",URGENT:" mng-lnc-flash",FREEQUANTITY:" mng-lnc-3d-software",INCLUDEGIFTS:" mng-lnc-gift",FREESHIPPING:" mng-lnc-delivery--parcel"},Me=m.forwardRef((i,C)=>{const{uuid:h,sellerUuid:$,name:K,price:P=0,sellingPrice:x,currency:j,isNegotiable:y,isFree:R,imageUrl:Q,location:J,sponsored:ee,imageComponent:V,freeText:re="Free",negotiableText:ne="Negotiable",tags:t=[],categoryCode:_,categoryName:oe,condition:z,quantity:E,trade:B,sponsoredText:te,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,hasQuantities:ce,status:de,onBookmark:W=()=>{},actionComponent:b,bookmarked:F,bookmarkLists:me,metadata:w,sellerName:G,nameSlug:N,onSelectCard:he=()=>{},activeSalesPackages:q,urgentText:ue="Urgent",LinkComponent:U}=i,ge=U||"a",I=Ne.useDetectMobile(),pe=()=>{var d;if(!a.isDefined(b))return e.jsx(e.Fragment,{});const r=b,o=(d=b==null?void 0:b.props)==null?void 0:d.children,s=m.cloneElement(o,{key:`bookmark_pr__${F}`,bookmarked:F,productUuid:h,onAddToBookmark:()=>W(!0,h),onRemoveFromBookmark:()=>W(!1,h),bookmarkedUuidList:me,sellerUuid:$,handleBookmarking:W,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,status:de,quantity:E,hasQuantities:ce,productBasicInfo:{uuid:h,price:P,sellingPrice:x,categoryCode:_,categoryName:oe,currency:j,isNegotiable:y,isFree:R}});return m.cloneElement(r,void 0,s)},M=[Oe,De,Ve,ze,Be,Fe,Ge,Ue].some(r=>_==null?void 0:_.includes(r)),[fe,T]=m.useState(!1),be=()=>{T(!0)},we=()=>{T(!1)},c=m.useRef(null),p=m.useRef([]),[ve,X]=m.useState(t==null?void 0:t.length),xe=()=>{var d,v,S;if(!(c!=null&&c.current)||((d=p==null?void 0:p.current)==null?void 0:d.length)===0)return;if(I){X(t==null?void 0:t.length);return}const r=(v=c==null?void 0:c.current)==null?void 0:v.offsetWidth;let o=0,s=0;for(let u=0;u<(t==null?void 0:t.length);u++){const f=((S=p==null?void 0:p.current[u])==null?void 0:S.offsetWidth)||0,g=o+f+4;if(g<=r)o+=g,s++;else break}X(s)};m.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const o=new ResizeObserver(()=>{xe()});return o.observe(r),()=>{o.disconnect()}},[t,I]);const je=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=t==null?void 0:t.slice(0,ve))==null?void 0:r.map((o,s)=>{var f,g,Y,Z,H;const d=((f=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:f.icon)??((g=l==null?void 0:l.default)==null?void 0:g.icon)??"",v=((Y=o==null?void 0:o.measurementUnit)==null?void 0:Y.symbol)??((Z=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:Z.measure)??"",u=[(o==null?void 0:o.value)??((H=o==null?void 0:o.multiOptions)==null?void 0:H[0])??"",v].filter(Boolean).join(" ");return e.jsxs(L,{ref:Ce=>p.current[s]=Ce,className:"tag",children:[e.jsx("i",{className:d}),u]},`detailed-products-section-tag__${s+1}`)})})},Se=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((r,o)=>{var u,f,g;const s=((u=r==null?void 0:r.measurementUnit)==null?void 0:u.symbol)??((f=l==null?void 0:l[r==null?void 0:r.code])==null?void 0:f.measure)??"",v=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",s].filter(Boolean).join(" "),S=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${S}: `}),e.jsx("span",{className:"tags-popover__value",children:v})]},`detailed-products-section-tag-dropdown__${o+1}`)})}),ke=()=>e.jsxs(e.Fragment,{children:[z&&e.jsx(L,{className:"tag",children:z},"detailed-products-section-tag__condition"),E&&e.jsx(L,{className:"tag",children:E},"detailed-products-section-tag__quantity"),B&&e.jsx(L,{className:"tag",children:B},"detailed-products-section-tag__trade")]}),A=P>0&&j&&y!==!0&&R!==!0&&P!==x;return e.jsxs($e,{ref:c,className:"product-card","data-accessor":w==null?void 0:w.accessor,name:w==null?void 0:w.name,onClick:r=>he(r,c),as:ge,...U?{to:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`}:{href:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`},children:[e.jsxs(Ee,{className:"product-image-wrapper",children:[a.isDefined(b)&&e.jsx("div",{className:"prevent-el",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:e.jsx(pe,{})}),a.isDefined(V)?V:e.jsx(Pe.ProductImageWrapper,{src:Q})]}),q&&q.length>0&&e.jsx("div",{className:"campaign-badges",children:q.map((r,o)=>{var s,d;return e.jsxs("div",{className:`campaign-badge campaign-badge-${(s=r==null?void 0:r.salesPackageCode)==null?void 0:s.toLowerCase()}`,children:[(r==null?void 0:r.salesPackageCode)!=="Urgent"&&e.jsx(Le,{icon:O==null?void 0:O[(d=r==null?void 0:r.salesPackageCode)==null?void 0:d.toUpperCase()],sizeInUnits:"1rem"}),(r==null?void 0:r.salesPackageCode)==="Urgent"&&e.jsxs(e.Fragment,{children:[" ",ue]})]},o)})}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:G,children:G}),e.jsx("div",{className:"card-title",children:K})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:[M&&e.jsx("div",{...I?{}:{onMouseEnter:be,onMouseLeave:we},children:e.jsxs(ye,{placement:"bottom",open:fe,children:[e.jsx(Re,{children:je()}),e.jsx(_e,{style:{all:"unset"},children:e.jsx(We,{children:Se()})})]})}),!M&&ke()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${A?"new-price":""}`,children:[x>0&&j&&y!==!0&&R!==!0&&e.jsx("div",{children:`${a.formatPrice(x)} ${a.GetCurrencySymbol(j)}`}),A&&e.jsx("div",{className:`${x>0?"full-price":""}`,children:`${a.formatPrice(P)} ${a.GetCurrencySymbol(j)}`}),y&&ne,R&&re]}),e.jsx("div",{className:"location-text",children:J})]}),ee===!0&&e.jsx(Ie,{sponsoredText:te})]})}),Te=k.styled(n.SkeletonRowWrapper)`
360
- @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
359
+ `,ze=m.forwardRef(({sponsoredText:i="Sponsored"},y)=>e.jsxs(Oe,{ref:y,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),De="Vehicles_Cars",Ve="Vehicles_Motorcycles",Be="Vehicles_Trucks",Ge="Vehicles_AgriculturalMachines_Tractors",Ue="Vehicles_ConstructionMachines",Me="Vehicles_Bus",Te="Vehicles_Campers",Xe="RealEstates_",l={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},j={ADDDISCOUNT:" mng-lnc-percentage",URGENT:" mng-lnc-flash",FREEQUANTITY:" mng-lnc-3d-software",INCLUDEGIFTS:" mng-lnc-gift",FREESHIPPING:" mng-lnc-delivery--parcel"},Ae=m.forwardRef((i,y)=>{const{uuid:h,sellerUuid:W,name:J,price:R=0,sellingPrice:S,currency:k,isNegotiable:_,isFree:N,imageUrl:ee,location:re,sponsored:ne,imageComponent:z,freeText:oe="Free",negotiableText:te="Negotiable",tags:t=[],categoryCode:L,categoryName:ie,condition:D,quantity:F,trade:V,sponsoredText:se,forCart:ae,forOrder:le,contactSeller:ce,hasVariants:de,hasQuantities:me,status:he,onBookmark:I=()=>{},actionComponent:w,bookmarked:B,bookmarkLists:ue,metadata:x,sellerName:G,nameSlug:E,onSelectCard:pe=()=>{},activeSalesPackages:u,urgentText:ge="Urgent",LinkComponent:U,hasFreeShipping:fe}=i,be=U||"a",q=We.useDetectMobile(),we=()=>{var d;if(!s.isDefined(w))return e.jsx(e.Fragment,{});const r=w,o=(d=w==null?void 0:w.props)==null?void 0:d.children,a=m.cloneElement(o,{key:`bookmark_pr__${B}`,bookmarked:B,productUuid:h,onAddToBookmark:()=>I(!0,h),onRemoveFromBookmark:()=>I(!1,h),bookmarkedUuidList:ue,sellerUuid:W,handleBookmarking:I,forCart:ae,forOrder:le,contactSeller:ce,hasVariants:de,status:he,quantity:F,hasQuantities:me,productBasicInfo:{uuid:h,price:R,sellingPrice:S,categoryCode:L,categoryName:ie,currency:k,isNegotiable:_,isFree:N}});return m.cloneElement(r,void 0,a)},M=[De,Ve,Be,Ge,Ue,Me,Te,Xe].some(r=>L==null?void 0:L.includes(r)),[xe,T]=m.useState(!1),ve=()=>{T(!0)},je=()=>{T(!1)},c=m.useRef(null),f=m.useRef([]),[Se,X]=m.useState(t==null?void 0:t.length),ke=()=>{var d,v,C;if(!(c!=null&&c.current)||((d=f==null?void 0:f.current)==null?void 0:d.length)===0)return;if(q){X(t==null?void 0:t.length);return}const r=(v=c==null?void 0:c.current)==null?void 0:v.offsetWidth;let o=0,a=0;for(let p=0;p<(t==null?void 0:t.length);p++){const b=((C=f==null?void 0:f.current[p])==null?void 0:C.offsetWidth)||0,g=o+b+4;if(g<=r)o+=g,a++;else break}X(a)};m.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const o=new ResizeObserver(()=>{ke()});return o.observe(r),()=>{o.disconnect()}},[t,q]);const Ce=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=t==null?void 0:t.slice(0,Se))==null?void 0:r.map((o,a)=>{var b,g,H,Z,K;const d=((b=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:b.icon)??((g=l==null?void 0:l.default)==null?void 0:g.icon)??"",v=((H=o==null?void 0:o.measurementUnit)==null?void 0:H.symbol)??((Z=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:Z.measure)??"",p=[(o==null?void 0:o.value)??((K=o==null?void 0:o.multiOptions)==null?void 0:K[0])??"",v].filter(Boolean).join(" ");return e.jsxs($,{ref:_e=>f.current[a]=_e,className:"tag",children:[e.jsx("i",{className:d}),p]},`detailed-products-section-tag__${a+1}`)})})},Pe=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((r,o)=>{var p,b,g;const a=((p=r==null?void 0:r.measurementUnit)==null?void 0:p.symbol)??((b=l==null?void 0:l[r==null?void 0:r.code])==null?void 0:b.measure)??"",v=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",a].filter(Boolean).join(" "),C=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${C}: `}),e.jsx("span",{className:"tags-popover__value",children:v})]},`detailed-products-section-tag-dropdown__${o+1}`)})}),ye=()=>e.jsxs(e.Fragment,{children:[D&&e.jsx($,{className:"tag",children:D},"detailed-products-section-tag__condition"),F&&e.jsx($,{className:"tag",children:F},"detailed-products-section-tag__quantity"),V&&e.jsx($,{className:"tag",children:V},"detailed-products-section-tag__trade")]}),A=R>0&&k&&_!==!0&&N!==!0&&R!==S,Re=u==null?void 0:u.some(r=>(r==null?void 0:r.salesPackageCode)==="FreeShipping"),Y=fe===!0&&!Re;return e.jsxs(Fe,{ref:c,className:"product-card","data-accessor":x==null?void 0:x.accessor,name:x==null?void 0:x.name,onClick:r=>pe(r,c),as:be,...U?{to:`/product/${s.isDefinedNotEmptyString(E)?`${E}-`:""}${h}`}:{href:`/product/${s.isDefinedNotEmptyString(E)?`${E}-`:""}${h}`},children:[e.jsxs(Ie,{className:"product-image-wrapper",children:[s.isDefined(w)&&e.jsx("div",{className:"prevent-el",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:e.jsx(we,{})}),s.isDefined(z)?z:e.jsx(Ne.ProductImageWrapper,{src:ee})]}),(Y||u&&u.length>0)&&e.jsxs("div",{className:"campaign-badges",children:[Y&&e.jsx("div",{className:"campaign-badge campaign-badge-freeshipping",children:e.jsx(Q,{icon:j==null?void 0:j.FREESHIPPING,sizeInUnits:"1rem"})}),u==null?void 0:u.map((r,o)=>{var a,d;return e.jsxs("div",{className:`campaign-badge campaign-badge-${(a=r==null?void 0:r.salesPackageCode)==null?void 0:a.toLowerCase()}`,children:[(r==null?void 0:r.salesPackageCode)!=="Urgent"&&e.jsx(Q,{icon:j==null?void 0:j[(d=r==null?void 0:r.salesPackageCode)==null?void 0:d.toUpperCase()],sizeInUnits:"1rem"}),(r==null?void 0:r.salesPackageCode)==="Urgent"&&e.jsx(e.Fragment,{children:ge})]},o)})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:G,children:G}),e.jsx("div",{className:"card-title",children:J})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:[M&&e.jsx("div",{...q?{}:{onMouseEnter:ve,onMouseLeave:je},children:e.jsxs(Le,{placement:"bottom",open:xe,children:[e.jsx(Ee,{children:Ce()}),e.jsx($e,{style:{all:"unset"},children:e.jsx(qe,{children:Pe()})})]})}),!M&&ye()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${A?"new-price":""}`,children:[S>0&&k&&_!==!0&&N!==!0&&e.jsx("div",{children:`${s.formatPrice(S)} ${s.GetCurrencySymbol(k)}`}),A&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${s.formatPrice(R)} ${s.GetCurrencySymbol(k)}`}),_&&te,N&&oe]}),e.jsx("div",{className:"location-text",children:re})]}),ne===!0&&e.jsx(ze,{sponsoredText:se})]})}),Ye=P.styled(n.SkeletonRowWrapper)`
360
+ @media (max-width: ${O.MOBILE_SIZE_PX+"px"}) {
361
361
  & > div {
362
362
  &:nth-of-type(even) {
363
363
  display: none;
364
364
  }
365
365
  }
366
366
  }
367
- `,Xe=({keyPrefix:i})=>e.jsxs(Te,{children:[e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${i}-1`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-2`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-3`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-4`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-5`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-6`)]}),Ae=({keyPrefix:i,isLoading:C=!1,fallbackComponent:h=e.jsx(e.Fragment,{}),children:$})=>e.jsx(m.Suspense,{fallbackComponent:h,children:C===!0?e.jsx(Xe,{keyPrefix:i}):$});exports.DetailedProductCard=Me;exports.SuspenseDetailedProductCard=Ae;
367
+ `,He=({keyPrefix:i})=>e.jsxs(Ye,{children:[e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${i}-1`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-2`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-3`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-4`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-5`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-6`)]}),Ze=({keyPrefix:i,isLoading:y=!1,fallbackComponent:h=e.jsx(e.Fragment,{}),children:W})=>e.jsx(m.Suspense,{fallbackComponent:h,children:y===!0?e.jsx(He,{keyPrefix:i}):W});exports.DetailedProductCard=Ae;exports.SuspenseDetailedProductCard=Ze;