1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="359228c1-799e-4429-a510-f13b1f1ef075",e._sentryDebugIdIdentifier="sentry-dbid-359228c1-799e-4429-a510-f13b1f1ef075")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2603],{7408:(e,t,a)=>{a.d(t,{A:()=>d});var l=a(71347),n=a(8883),s=a(74772),i=a(78884),o=a(53553),r=a(45053),c=a(96685);function d(e){let{samples:t,shoppingListInteractor:a,overrideSamples:d,showOwnerProductStockInfo:u=!1}=e,p=["wallpaper-sample","photowallpaper-sample","paint-sample"],f=[],[m,x]=(0,n.useState)(!1),h=t.filter(e=>p.includes(e.product_type)),g=new Set(h.map(e=>e.sku)),j=d?d.filter(e=>!g.has(e.sku)):t.filter(e=>f.includes(e.product_type)&&!g.has(e.sku)),v=(0,l.jsx)(s.x6,{id:"samples.all-samples-self-adhesive.info"});return(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)(o.o,{config:{base:{variant:"fineprint",size:"small"}},className:"inline-flex items-center text-off-black mb-4",children:[(0,l.jsx)(s.x6,{id:"samples.all-samples-self-adhesive"}),(0,l.jsx)(c.A,{content:v,isOpen:m,setIsOpen:x,gap:15,children:(0,l.jsx)(i.A,{className:"h-[1.25em]"})})]}),h.length>0&&(0,l.jsx)(r.A,{products:h,shoppingListInteractor:a,showStockInfo:u,header:(0,l.jsx)(o.o,{config:{base:{variant:"title",size:"small"}},children:(0,l.jsx)(s.x6,{id:"common.product-sample"})})}),j.length>0&&(0,l.jsx)(r.A,{products:j,shoppingListInteractor:a,header:(0,l.jsx)(o.o,{config:{base:{variant:"fineprint",size:"medium"}},children:(0,l.jsx)(s.x6,{id:"common.colors-matching-extra-well"})})})]})})}},43719:(e,t,a)=>{a.d(t,{A:()=>p});var l=a(71347),n=a(78884),s=a(83700),i=a(53553),o=a(2716),r=a(8883),c=a(28522),d=a(15103),u=a(96685);function p(e){let{shoppingListInteractor:t,header:a,headerInfoText:p,product:f,wallMeasurementsForm:m,calculationInfoNode:x,hintMessage:h,hintInfoText:g,ctaElement:j,showQuantityInput:v=!0,allowAddWalls:y=!0,hasErrors:b=!1,maxQuantity:w=99,hideStockInfo:I=!1}=e,[N,_]=(0,r.useState)(!1),A=t.getQuantity({product:f}),C=(0,r.useCallback)(e=>t.updateQuantity({product:f,quantity:e,additionalInfo:{type:"default"}}),[t,f]),k=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{let e=void 0!==w&&A>w,t=k.current===w;e&&!t&&(k.current=w,C(w))},[w,A,C]),(0,l.jsxs)("div",{className:I?"flex flex-col gap-4 pb-2.5":"flex flex-col gap-4",children:[a&&(0,l.jsxs)("div",{className:"inline-flex w-full",children:[(0,l.jsx)(i.o,{config:{base:{variant:"fineprint",size:"small"}},children:a}),p&&(0,l.jsx)(u.A,{content:p,isOpen:N,setIsOpen:_,gap:15,children:(0,l.jsx)(n.A,{className:"h-[1em]"})})]}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.A,{inputWalls:m.inputWalls,setInputWalls:m.setInputWalls,setValidatedWalls:m.setValidatedWalls,ctaSpacingClassName:m.ctaSpacingClassName,allowAddWalls:y,hintMessage:h,hintInfoText:g,ctaElement:j,hasErrors:b,getFieldErrorMessage:m.getFieldErrorMessage,getFieldHasErrors:m.getFieldHasErrors,focusRequest:m.focusRequest}),v&&(0,l.jsx)(s.T,{min:1,max:w,state:"default",value:A,onChange:C}),x&&(0,l.jsx)(c.A,{className:"mb-3",contentNode:x,variant:b?"error":"default",handleClear:b?void 0:()=>{m.setInputWalls([(0,o._)("wall-0")]),m.setValidatedWalls([])}})]}),!m&&v&&(0,l.jsx)(s.T,{min:1,max:w,state:"default",value:A,onChange:C}),!I&&(0,l.jsx)(d.A,{product:f,quantity:A})]})}},45053:(e,t,a)=>{a.d(t,{A:()=>y});var l=a(71347),n=a(78889),s=a(73791),i=a(34551),o=a(53553),r=a(43133),c=a(86737),d=a(83700),u=a(45167),p=a(42149),f=a(67499),m=a(74772),x=a(96111),h=a(77392),g=a(93095);function j(e){var t,a;let{product:j,classname:v,quantity:y,setQuantity:b,minQuantity:w=1}=e,{image1:I,image2:N,localized_product_title:_}=j,A=(0,x.T)({productType:j.product_type,context:"card",productTitle:_}),{i18n:C,i18n:k,_:S}=(0,m.uB)(),{language:z,store:P}=(0,c.o)();return(0,l.jsxs)("div",{className:(0,n.A)("flex flex-row gap-2 flex-nowrap",v),children:[(0,l.jsx)("div",{className:"flex flex-col shrink-0",children:(0,l.jsx)("div",{className:"relative h-14 w-14 roun
1ded overflow-hidden",children:(0,l.jsx)(s.default,{src:null!=(a=null!=I?I:N)?a:i.t,alt:(0,h.ez)(_,S),className:"h-full w-full object-cover",fill:!0,sizes:u.d5.thumbnail})})}),(0,l.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,l.jsx)(o.o,{config:{base:{variant:"body-semibold",size:"small"}},className:"text-off-black line-clamp-2",children:A}),(0,l.jsx)(o.o,{config:{base:{variant:"body",size:"small"}},className:"text-grey line-clamp-2 mb-2",children:function(e){let{i18n:t,locale:a,currencyCode:n,product:s}=e,i=s.calculated_price?(0,p.yP)({currency_code:n,locale:a,amount:s.calculated_price.calculated_amount}):(0,l.jsx)(m.x6,{id:"common.no-price"}),{unit:o}=(0,f.a)(s.product_type),r=(0,f.F)({value:o});switch(s.product_type){case"paint-sample":return(0,l.jsx)(m.x6,{values:{formattedUnitPrice:i,localizedUnit:r},id:"product.samples.paint.description"});case"wallpaper-sample":return(0,l.jsx)(m.x6,{values:{formattedUnitPrice:i,localizedUnit:r},id:"product.samples.wallpaper.description"});case"photowallpaper-sample":return(0,l.jsx)(m.x6,{values:{formattedUnitPrice:i,localizedUnit:r},id:"product.samples.photowallpaper.description"});default:throw Error("Can not get localized product subtitle for product: ".concat(s.medusaVariantId))}}({currencyCode:P.currency,i18n:k,locale:z,product:j})}),(0,l.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,l.jsx)(d.T,{min:w,state:"default",value:y,onChange:b,size:"medium"}),(0,l.jsx)(r.A,{context:{language:z,storeId:g.A.getStoreIdentifier(P)},price:(null==(t=j.calculated_price)?void 0:t.calculated_amount)&&j.calculated_price.original_amount?{calculated_amount:j.calculated_price.calculated_amount,original_amount:j.calculated_price.original_amount}:null,typographyProps:{config:{base:{variant:"fineprint",size:"medium"}},className:"self-end"}})]})]})]})}a(8883);var v=a(15103);function y(e){let{header:t,products:a,shoppingListInteractor:n,minQuantity:s,showStockInfo:i=!1}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[t,(0,l.jsx)("div",{className:"flex flex-col",children:a.map(e=>{let t=n.getQuantity({product:e});return(0,l.jsxs)("div",{className:"border-b border-dashed px-2 pb-4 mb-4",children:[(0,l.jsx)(j,{product:e,quantity:t,setQuantity:t=>(e=>{let{product:t,quantity:a}=e;n.updateQuantity({product:t,quantity:a,additionalInfo:{type:"default"}})})({product:e,quantity:t}),minQuantity:s}),i&&(0,l.jsx)("div",{className:"mt-[17px]",children:(0,l.jsx)(v.A,{product:e,quantity:t})})]},e.medusaVariantId)})})]})}},92603:(e,t,a)=>{a.r(t),a.d(t,{default:()=>N});var l=a(71347),n=a(32069),s=a(44236),i=a(56405),o=a(53553),r=a(81456),c=a(60327),d=a(74772);function u(e){var t,a;let{context:s,currentlyInCombinationView:i,productBundle:u,regionId:p}=e,{product:f}=u,m=(0,n.j)(f),x=(0,c.I)({context:s,product:f,regionId:p,variant:m,group:null!=(a=u.group)?a:[]});return(null==(t=x.group_members)?void 0:t.length)?(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(o.o,{config:{base:{variant:"title",size:"small"}},className:"text-off-black",children:(0,l.jsx)(d.x6,{id:"common.variants"})}),(0,l.jsx)(r.A,{usageContext:i?"combination-view":"default",context:s,product:x,size:{base:"large"},variant:"grid",maxRows:1})]}):null}var p=a(43719),f=a(8883),m=a(74020),x=a(7408),h=a(6664),g=a(876),j=a(2716),v=a(41406),y=a(74163),b=a(96685),w=a(26702),I=a(29857);function N(e){var t,a,o;let{context:r,productBundle:N,regionId:_}=e,{product:A}=N,[C,k]=(0,f.useState)("rolls-counter"),S=(0,n.j)(A),z=(0,c.I)({context:r,product:A,regionId:_,variant:S}),{maxQuantity:P}=(0,w.fi)({product:z,variantId:S.id}),T=(0,h.y)({bundle:e.productBundle.members,type:"product-sample"}).map(e=>(0,c.I)({product:e.product,variant:(0,n.j)(e.product),regionId:_,context:r})),q=null==(a=e.currentlyInCombinationView)||null==(t=a.combination)?void 0:t.members_product_samples,W=q?q.map(e=>(0,c.I)({product:e.product,variant:(0,n.j)(e.product),regionId:_,context:r})):[],[E,M]=(0,f.useState)(null),V=(0,v.A)((0,y.si)({product:z,additionalInfo:{type:"default"},quantity:1})),F=(0,v.A)((0,y.si)({product:z,additionalInfo:{type:"default"},quantity:0})),Q=(0,v.A)(T.length>0?(0,y.si)({product:T[0],additionalInfo:{type:"default"},quantity:1}):void 0),[,L]=(0,f.useState)([]),[O,R]=(0,f.useState)([(0,j._)("wall-0")]),[U,D]=(0,f.useState)(!1),H="v2"===(0,I.g)(),B=H&&!!e.currentlyInCombinationView&&!e.onNavigateToProductPage,G=(0,f.useCallback)(e=>{let{quantity:t}=((e,t)=>{var a;if(!e.length)return{quantity:null};let l=function(e){let t,a=(0,g.e)({product:e,attribute:"width"}),l=(0,g.e)({product:e,attribute:"height"}),n=(0,g.e)({product:e,attribute:"patternHeight"});return a&&l?(n&&n>0&&(t=n/100),{rollWidthM:a,rollLengthM:l,patternHeightM:t}):null}(t);if(!l)return{quantity:null};let n=(a=e.map(e=>({widthCm:e.width,heightCm:e.height})),a.map(e=>(function(e,t){let{rollWidthM:a,rollLengthM:l,patternHeightM:n=0}
1=t,s=e.widthCm/100,i=e.heightCm/100;if(s<=0||i<=0||a<=0||l<=0)return 0;let o=Math.floor(l/(i+n));return o<1?0:Math.ceil(Math.ceil(s/a)/o)})(e,l)).reduce((e,t)=>e+t,0));return{quantity:n>0?n:null}})("function"==typeof e?e([]):e,A);if(M(t),t){let e=void 0!==P?Math.min(t,P):t;F.updateQuantity({product:z,quantity:e,additionalInfo:{type:"default"}})}L(e)},[A,P,F,z,L]),J=t=>(0,l.jsx)(m.A,{shoppingListInteractor:t,context:r,product:A,feedbackMode:e.actionCardFooterFeedbackMode}),K=E&&(0,l.jsxs)("div",{className:"text-grey flex items-center gap-2",children:[(0,l.jsx)("div",{children:(0,l.jsx)(d.x6,{values:{calculatedRolls:E},components:{0:(0,l.jsx)("strong",{})},id:"wallpaper.rolls-needed"})}),(0,l.jsx)(b.A,{content:(0,l.jsx)(d.x6,{id:"wallpaper.rolls-needed.info"}),isOpen:U,setIsOpen:D,gap:15,children:(0,l.jsx)("button",{type:"button",className:"text-black font-inter underline",children:(0,l.jsx)(d.x6,{id:"wallpaper.rolls-needed.see-how-calculated"})})})]}),X=T.length>0||W.length>0,Y=[{type:"rolls-counter",content:(0,l.jsx)(p.A,{header:(0,l.jsx)(d.x6,{id:"how-many-rolls-do-you-need"}),headerInfoText:(0,l.jsx)(d.x6,{id:"how-many-rolls-do-you-need.rolls-counter.info"}),shoppingListInteractor:V,product:z,maxQuantity:P}),footer:J(V)},{type:"calculate",content:(0,l.jsx)(p.A,{header:(0,l.jsx)(d.x6,{id:"how-many-rolls-do-you-need"}),headerInfoText:(0,l.jsx)(d.x6,{id:"how-many-rolls-do-you-need.calculate.info"}),product:z,shoppingListInteractor:F,wallMeasurementsForm:{inputWalls:O,setInputWalls:R,setValidatedWalls:G},calculatedRolls:E,calculationInfoNode:K,maxQuantity:P}),footer:J(F)},...X?[{type:"wallpaper-sample",content:(0,l.jsx)(x.A,{shoppingListInteractor:Q,samples:T,overrideSamples:W,showOwnerProductStockInfo:!0}),footer:J(Q)}]:[]];return(0,l.jsxs)("section",{className:H?"flex flex-col gap-5":"flex flex-col gap-4",children:[(0,l.jsx)(s.A,{...e,selectedVariant:S,variantSelectorElement:e.currentlyInCombinationView?void 0:(0,l.jsx)(u,{...e}),className:H?"gap-[11px] -mb-[5px]":void 0,brandTitleGapClassName:H?"gap-5":void 0,hideDescription:H,productPageLink:e.onNavigateToProductPage?{context:e.context,product:z,onNavigate:e.onNavigateToProductPage}:void 0}),!B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.A,{currentPage:C,setCurrentPage:k,context:r,product:A,components:Y}),H&&null!=(o=e.miscSectionV2)?o:e.miscSection]})]})}}}]);
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.