1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,174708,e=>{"use strict";let i={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};e.s(["stripHtml",0,e=>e?e.replace(/<[^>]*>/g," ").replace(/ |&|<|>|"|'/g,e=>i[e]??e).replace(/\s+/g," ").trim():""])},548786,e=>{"use strict";function i(e,i,a){if(a&&e)try{return RegExp(`^${a}$`).test(e)?void 0:i("invalidFieldFormat")}catch{return i("invalidField")}}function a(e,i,a){if(a&&!(e.length<=a))return i("invalidLength")}function n(e,i,a){if(a)return e.trim()?void 0:i("requiredField")}function t(e){if(!e)return;let i=e.replace(/^\^/,"").replace(/\$$/,"").replace(/(?:[*+?]|\{\d+(?:,\d*)?\})$/,"");if(/^\[[^\]]+\]$/.test(i)||/^\\[dwsDWS]$/.test(i)||"."===i)return i}e.s(["filterValueByPattern",0,function(e,i){let a;if(!e)return e;let n=t(i);if(!n)return e;try{a=RegExp(`^(?:${n})$`,"u")}catch{return e}return Array.from(e).filter(e=>a.test(e)).join("")},"getPatternCharClass",0,t,"requiresUppercase",0,function(e){if(!e)return!1;let i=/A-Z/.test(e),a=/a-z/.test(e);return i&&!a},"transformTextInput",0,function(e){return e.toUpperCase()},"validateMaxLength",0,a,"validatePattern",0,i,"validateRequired",0,n,"validateTextCustomization",0,function({value:e,pattern:t,maxLength:d,isRequired:l,translate:o}){let s=n(e,o,l),m=e?i(e,o,t):void 0,r=a(e,o,d),u=s||m||r;return{patternError:u,requiredError:s,isValid:!u}}])},975438,e=>{"use strict";var i=e.i(222809),a=e.i(813931),n=e.i(768155),t=e.i(837862),d=e.i(62016);e.i(334421);var l=e.i(533029),o=e.i(982664);e.i(946755);var s=e.i(431500),m=e.i(559909),r=e.i(174708),u=e.i(731921),c=e.i(479024);e.i(813639);var k=e.i(144163),v=e.i(856249),p=e.i(601057),N=e.i(590168);e.i(754845);var S=e.i(945252);e.i(226958);var F=e.i(501953);function g({listItem:e,isSelected:a,isDisabled:n,isDimmed:t,onSelect:s,classNames:m,testId:r="product-service-list-option"}){return(0,i.jsxs)("button",{type:"button",role:"radio",disabled:n,onClick:s,"aria-checked":a,className:(0,d.cn)("flex flex-col items-center gap-1 rounded-md border border-transparent p-1 transition-opacity","enabled:cursor-pointer",a&&"border-primary bg-primary-light",(n||t)&&!a&&"opacity-40",m?.productServiceListOption,a&&m?.productServiceListOptionSelected),"data-testid":r,children:[!!e.imageUrl&&(0,i.jsx)(S.Image,{src:e.imageUrl,alt:"",width:48,height:48,className:(0,d.cn)("aspect-square w-full max-w-12 rounded-full object-cover md:max-w-10",m?.productServiceListOptionImage),testId:`${r}-image`}),(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.XS,className:(0,d.cn)("text-center leading-tight",m?.productServiceListOptionName),testId:`${r}-name`,children:e.name})]})}function _({stepIndex:e,stepNumberOffset:a=0,listItems:n,selectedId:s,isCollapsed:m,isOptionDisabled:r,onSelectOption:u,onRemove:f,onEdit:y,stepPrice:h,currency:x,secondaryCurrency:P,displayCurrency:C,locale:b,classNames:I,testId:z="product-service-list-step"}){let w=(0,t.useTranslations)("product.common"),{icons:T}=(0,c.getComponentsConfig)(),D=e+1+a;if(m){let e=n.find(e=>e.id===s);return(0,i.jsxs)("div",{className:(0,d.cn)("flex items-center gap-2 rounded-md border border-primary px-3 py-2",I?.productServiceListStep,I?.productServiceListStepCollapsed),"data-testid":z,children:[(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.SM,className:(0,d.cn)("flex size-6 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",I?.productServiceListStepNumber),testId:`${z}-number`,children:D}),!!e?.imageUrl&&(0,i.jsx)(S.Image,{src:e.imageUrl,alt:"",width:32,height:32,className:"size-8 shrink-0 rounded-full object-cover",testId:`${z}-selected-image`}),(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.SM,className:(0,d.cn)("grow truncate",I?.productServiceListStepSelectedName),testId:`${z}-selected-name`,children:e?.name}),h>0&&(0,i.jsx)(F.Price,{price:h,currency:x,secondaryCurrency:P,displayCurrency:C,locale:b,classNames:{price:(0,d.cn)("text-foreground-muted",I?.productServiceListStepPrice)},testId:`${z}-price`}),(0,i.jsx)(p.default,{icon:T.pencil,variant:N.IconButtonVariant.Outlined,size:N.IconButtonSize.SM,ariaLabel:w("listEdit"),onClickBtn:y,classNames:{iconButton:I?.productServiceListStepEditButton},testId:`${z}-edit`}),(0,i.jsx)(p.default,{icon:T.close,variant:N.IconButtonVariant.Outlined,size:N.IconButtonSize.SM,ariaLabel:w("listRemove"),onClickBtn:f,classNames:{iconButton:I?.productServiceListStepRemoveButton},testId:`${z}-remove`})]})}return(0,i.jsxs)("div",{className:(0,d.cn)("flex flex-col gap-2 rounded-md border p-3",!!s&&"border-primary",I?.productServiceListStep),"data-testid":z,children:[(0,i.jsxs)("div",{className:(0,d.cn)("flex items-center gap-2",I?.productServiceListStepHeader),"data-testid":`${z}-header`,children:[(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.SM,className:(0,d.cn)("flex size-6 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",I?.productServiceListStepNumber),testId:`${z}-number`,children:D}),(0,i.jsx)(l.Text,{component:o.TextComponent.Span,className:(0,d.cn)("grow",I?.productServiceListStepQuestion),testId:`${z}-question`,children:w("listStepQuestion",{step:D})}),h>0&&(0,i.jsx)(F.Price,{price:h,currency:x,secondaryCurrency:P,displayCurrency:C,locale:b,classNames:{price:I?.productServiceListStepPrice},testId:`${z}-price`})]}),(0,i.jsx)("div",{role:"radiogroup","aria-label":w("listStepQuestion",{step:D}),className:(0,d.cn)("grid grid-cols-3 gap-1 md:grid-cols-[repeat(auto-fit,minmax(4rem,1fr))]",I?.productServiceListStepOptions),"data-testid":`${z}-options`,children:n.map(e=>(0,i.jsx)(g,{listItem:e,isSelected:e.id===s,isDisabled:r(e.id),isDimmed:!!s&&e.id!==s,onSelect:()=>u(e.id),classNames:I,testId:`${z}-option-${e.id}`},e.id))}),!!s&&(0,i.jsx)(k.Button,{variant:v.ButtonVariant.Text,size:v.ButtonSize.SM,onClickBtn:f,ariaLabel:w("listRemove"),classNames:{button:(0,d.cn)("self-start !px-0 underline",I?.productServiceListStepRemoveLink)},testId:`${z}-remove`,children:w("listRemove")})]})}function f({selectedItems:e,totalPrice:a,currency:n,secondaryCurrency:s,displayCurrency:m,locale:r,classNames:u,testId:c="product-service-list-summary"}){let k=(0,t.useTranslations)("product.common");return(0,i.jsxs)("div",{className:(0,d.cn)("flex flex-col gap-2",u?.productServiceListSummary),"data-testid":c,children:[e.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Text,{component:o.TextComponent.P,size:o.TextSize.SM,className:(0,d.cn)("font-semibold uppercase",u?.productServiceListSummaryTitle),testId:`${c}-title`,children:k("listSelectedTitle")}),(0,i.jsx)("div",{className:(0,d.cn)("flex flex-wrap gap-2",u?.productServiceListSummaryItems),"data-testid":`${c}-items`,children:e.map((e,a)=>(0,i.jsxs)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.SM,className:(0,d.cn)("flex items-center gap-1 rounded-full border px-2 py-1",u?.productServiceListSummaryItem),testId:`${c}-item-${a}`,children:[!!e.imageUrl&&(0,i.jsx)(S.Image,{src:e.imageUrl,alt:e.name,width:20,height:20,className:"size-5 rounded-full object-cover",testId:`${c}-item-${a}-image`}),e.name]},`${e.id}-${a}`))})]}),(0,i.jsxs)("div",{className:(0,d.cn)("flex items-center justify-between border-t pt-2",u?.productServiceListSummaryTotal),"data-testid":`${c}-total`,children:[(0,i.jsx)(l.Text,{component:o.TextComponent.Span,className:u?.productServiceListSummaryTotalLabel,testId:`${c}-total-label`,children:k("listTotalPrice")}),(0,i.jsx)(F.Price,{price:a,currency:n,secondaryCurrency:s,displayCurrency:m,locale:r,classNames:{price:(0,d.cn)("font-semibold",u?.productServiceListSummaryTotalPrice)},testId:`${c}-total-price`})]})]})}e.s(["default",0,function({service:e,value:k,onChange:v,basePrice:p=0,classNames:N,testId:S="product-service-list"}){let F=(0,t.useTranslations)("product.common"),g=(0,n.useLocale)(),{withVat:y}=(0,s.useGlobalContext)(),{currency:h,secondaryCurrency:x,displayCurrency:P}=(0,u.useStoreCurrency)(),{productServiceList:C}=(0,c.getComponentsConfig)(),b=C?.stepNumberOffset??0,{listItems:I,stepCount:z,visibleStepCount:w,selected:T,editingStepIndex:D,isOptionDisabled:B,selectOption:j,removeStep:V,editStep:A}=(({service:e,value:i,onChange:n})=>{let t=e.listItems??[],[d,l]=(0,a.useState)(null),o=(0,a.useMemo)(()=>{let i=e.maxItems??Math.min(t.length,10);return!1===e.allowSameItem?Math.min(i,t.length):i},[e.maxItems,e.allowSameItem,t.length]),s=(0,a.useMemo)(()=>
1i.filter(Boolean).slice(0,o),[i,o]),m=Math.min(s.length+1,o),r=(i,a)=>!1===e.allowSameItem&&s.some((e,n)=>e===a&&n!==i);return{listItems:t,stepCount:o,visibleStepCount:m,selected:s,editingStepIndex:d,isOptionDisabled:r,selectOption:(e,i)=>{if(e>s.length||r(e,i))return;let a=[...s];a[e]=i,n(a),l(null)},removeStep:e=>{e>=s.length||(n(s.filter((i,a)=>a!==e)),l(null))},editStep:e=>l(e)}})({service:e,value:k,onChange:v}),L=p+(0,m.getListSelectionTotal)(e,T.length,y),W=(0,a.useMemo)(()=>T.flatMap(e=>{let i=I.find(i=>i.id===e);return i?[i]:[]}),[T,I]);return I.length&&z?(0,i.jsxs)("div",{className:(0,d.cn)("flex flex-col gap-3",N?.productServiceListContainer),"data-testid":S,children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)(l.Text,{component:o.TextComponent.Span,className:(0,d.cn)("font-semibold",N?.productServiceListTitle),testId:`${S}-title`,children:e.name}),!!C?.showMaxItemsBadge&&(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.XS,className:(0,d.cn)("rounded-full bg-primary-light px-2 py-0.5 text-primary",N?.productServiceListBadge),testId:`${S}-badge`,children:F("listMaxItemsBadge",{maxItems:z})}),!!C?.showSelectedCounter&&(0,i.jsx)(l.Text,{component:o.TextComponent.Span,size:o.TextSize.SM,className:(0,d.cn)("ms-auto text-foreground-muted",N?.productServiceListCounter),testId:`${S}-counter`,children:F("listSelectedCount",{count:T.length})})]}),!!e.description&&(0,i.jsx)(l.Text,{component:o.TextComponent.P,size:o.TextSize.SM,className:N?.productServiceListDescription,testId:`${S}-description`,children:(0,r.stripHtml)(e.description)}),(0,i.jsx)("div",{className:(0,d.cn)("flex flex-col gap-2",N?.productServiceListSteps),"data-testid":`${S}-steps`,children:Array.from({length:w},(a,n)=>(0,i.jsx)(_,{stepIndex:n,stepNumberOffset:b,listItems:I,selectedId:T[n],isCollapsed:!!T[n]&&D!==n,isOptionDisabled:e=>B(n,e),onSelectOption:e=>j(n,e),onRemove:()=>V(n),onEdit:()=>A(n),stepPrice:p+(0,m.getListSelectionTotal)(e,n+1,y),currency:h,secondaryCurrency:x,displayCurrency:P,locale:g,classNames:N,testId:`${S}-step-${n+1}`},n))}),T.length>0&&(0,i.jsx)(f,{selectedItems:W,totalPrice:L,currency:h,secondaryCurrency:x,displayCurrency:P,locale:g,classNames:N,testId:`${S}-summary`})]}):null}],975438)},895685,e=>{"use strict";var i=e.i(63221);i.default.env.NEXT_PUBLIC_IMAGE_UPLOAD_URL;let a=i.default.env.NEXT_PUBLIC_FILE_UPLOAD_URL||"/api/file-upload",n=i.default.env.NEXT_PUBLIC_FILE_DOWNLOAD_URL||"/api/download-file";e.s(["ALLOWED_FILE_TYPES",0,{"application/pdf":[".pdf"],"image/tiff":[".tif",".tiff"],"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"application/postscript":[".eps",".ai"],"image/svg+xml":[".svg"],"application/vnd.corel-draw":[".cdr"],"image/webp":[".webp"]},"FILE_DOWNLOAD_URL",0,n,"FILE_UPLOAD_URL",0,a])},97908,e=>{e.v({"tier-prices-tooltip__disabled-text":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__disabled-text","tier-prices-tooltip__highlighted-text":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__highlighted-text","tier-prices-tooltip__price-secondary":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__price-secondary","tier-prices-tooltip__price-secondary-container":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__price-secondary-container","tier-prices-tooltip__tier-prices-tooltip":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__tier-prices-tooltip","tier-prices-tooltip__tier-prices-tooltip-price-per-unit":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__tier-prices-tooltip-price-per-unit","tier-prices-tooltip__tier-prices-tooltip-qty-container":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__tier-prices-tooltip-qty-container","tier-prices-tooltip__toggle":"TierPricesTooltip-module-scss-module__DSQ67a__tier-prices-tooltip__toggle"})},493137,694138,e=>{"use strict";var i=e.i(222809),a=e.i(768155);e.i(127216);var n=e.i(728737),t=e.i(479024);e.i(754845);var d=e.i(945252),l=e.i(246165);e.i(226958);var o=e.i(501953);e.i(334421);var s=e.i(533029);e.i(901362);var m=e.i(660934),r=e.i(862281);e.i(597547);var u=e.i(199631);e.i(946755);var c=e.i(431500),k=e.i(731921),v=e.i(509618),p=e.i(97908);e.s([],493137),e.s(["TierPricesTooltip",0,function({tierPrices:e,quantityUnit:N,testId:S="tier-pricing-tooltip",testIdOverlay:F="tier-pricing-tooltip-overlay",priceForSingleUnit:g,hasSinglePrice:_,minQuantity:f}){let{icons:y}=(0,t.getComponentsConfig)(),{withVat:h}=(0,c.useGlobalContext)(),{currency:x,secondaryCurrency:P,displayCurrency:C}=(0,k.useStoreCurrency)(),b=(0,a.useLocale)(),I=(({tierPrices:e,priceForSingleUnit:i,hasSinglePrice:a,minQuantity:n})=>{let t=((e,i)=>{let a=(0,v.normalizeTierPrices)(e);if(i<=0)return a;let n=a.filter(e=>(e.minQuantity??0)>=i),t=a.filter(e=>(e.minQuantity??0)<i).at(-1),d=n[0]?.minQuantity===i;return!t||d?n:[{...t,minQuantity:i},...n]})(e,n??i?.minQuantity??0),d=i?.minQuantity??0,l=t[0]?.minQuantity??1/0;return!a||!i||d<=0||d>=l?t:[{id:"single-price",price:i.defaultPrice,priceTax:i.defaultPrice,minQuantity:d},...t]})({tierPrices:e,priceForSingleUnit:g,hasSinglePrice:_,minQuantity:f});return(0,i.jsx)(m.Tooltip,{placement:r.TooltipPlacement.Top,classNames:{tooltip:"relative w-[2rem] h-[2rem]"},content:(0,i.jsx)("ul",{className:p.default["tier-prices-tooltip__tier-prices-tooltip"],"data-testid":F,children:I.map((e,a)=>{var t;let d=h?e.priceTax??0:e.price??0;return(0,i.jsxs)("li",{children:[(0,i.jsx)("div",{className:p.default["tier-prices-tooltip__tier-prices-tooltip-qty-container"],children:(0,i.jsx)(s.Text,{className:p.default["tier-prices-tooltip__highlighted-text"],testId:`${e.id}-tier-price-quantity`,children:`${(t=e.minQuantity??1)<2e3?t.toString():t.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")} ${(0,u.formatQuantityUnit)({value:0,unit:N??n.QuantityUnit.Piece}).formattedUnit}`})}),(0,i.jsx)(o.Price,{price:d*(e.minQuantity??1),classNames:{price:p.default["tier-prices-tooltip__highlighted-text"],priceSecondary:p.default["tier-prices-tooltip__price-secondary"],priceSecondaryContainer:p.default["tier-prices-tooltip__price-secondary-container"]},testId:`${e.id}-tier-price-total-price`,currency:x,displayCurrency:C,secondaryCurrency:P,locale:b}),(0,i.jsxs)("div",{className:p.default["tier-prices-tooltip__tier-prices-tooltip-price-per-unit"],children:[(0,i.jsx)(o.Price,{price:d,classNames:{price:p.default["tier-prices-tooltip__disabled-text"],priceSecondary:p.default["tier-prices-tooltip__price-secondary"],priceSecondaryContainer:p.default["tier-prices-tooltip__price-secondary-container"]},testId:`${e.id}-tier-price-per-unit`,currency:x,displayCurrency:C,secondaryCurrency:P,locale:b}),(0,i.jsx)(s.Text,{className:p.default["tier-prices-tooltip__disabled-text"],children:`/ ${(0,u.formatQuantityUnit)({value:0,unit:N??n.QuantityUnit.Piece}).formattedUnit}`})]})]},`${e.id}-${a}`)})}),trigger:["click","hover"],children:(0,i.jsx)(d.Image,{testId:S,src:y.info,fill:!0,alt:"tier prices",filter:l.ImageFilter.Primary})})}],694138)},367435,e=>{e.v({"product-service-price":"ProductServicePrice-module-scss-module__0leg3G__product-service-price","product-service-price__service-price-secondary":"ProductServicePrice-module-scss-module__0leg3G__product-service-price__service-price-secondary","product-service-price__service-price-secondary-container":"ProductServicePrice-module-scss-module__0leg3G__product-service-price__service-price-secondary-container"})},419904,e=>{e.v({"select-option":"ProductServiceSelect-module-scss-module__s40v_a__select-option","select-option__checkbox-wrapper":"ProductServiceSelect-module-scss-module__s40v_a__select-option__checkbox-wrapper","select-option__icon-tooltip":"ProductServiceSelect-module-scss-module__s40v_a__select-option__icon-tooltip","select-option__info-wrapper":"ProductServiceSelect-module-scss-module__s40v_a__select-option__info-wrapper","select-option__service-min-qty":"ProductServiceSelect-module-scss-module__s40v_a__select-option__service-min-qty","select-option__service-name":"ProductServiceSelect-module-scss-module__s40v_a__select-option__service-name","select-option__service-name-container":"ProductServiceSelect-module-scss-module__s40v_a__select-option__service-name-container"})},706896,765001,e=>{"use strict";var i=e.i(222809);e.i(226958);var a=e.i(501953);e.i(334421);var n=e.i(533029),t=e.i(982664);e.i(597547);var d=e.i(199631),l=e.i(731921),o=e.i(768155);e.i(493137);var s=e.i(694138),m=e.i(367435);
1function r({testId:e,prices:u,quantityUnit:c,minQuantity:k,classNames:v,hasSinglePrice:p,singleDefaultPrice:N}){let{currency:S,secondaryCurrency:F,displayCurrency:g}=(0,l.useStoreCurrency)(),_=(0,o.useLocale)();return(0,i.jsxs)("div",{className:m.default["product-service-price"],children:[!!u?.tierPrices&&u.tierPrices.length>0&&(0,i.jsx)(s.TierPricesTooltip,{tierPrices:u.tierPrices,quantityUnit:c,hasSinglePrice:p,priceForSingleUnit:N,minQuantity:k,testId:`${e}-tier-pricing-tooltip`}),(0,i.jsx)(a.Price,{price:u.salePrice??u.defaultPrice,testId:`${e}-price`,classNames:{...v,priceSecondary:m.default["product-service-price__service-price-secondary"],priceSecondaryContainer:m.default["product-service-price__service-price-secondary-container"]},currency:S,displayCurrency:g,secondaryCurrency:F,locale:_}),(0,i.jsxs)(n.Text,{component:t.TextComponent.P,className:v?.quantityUnit,testId:`${e}-quantity-unit`,children:["/"," ",(0,d.formatQuantityUnit)({value:0,unit:c}).formattedUnit]})]})}e.s(["default",0,r],706896);var u=e.i(837862);e.i(127216);var c=e.i(728737);e.i(67567);var k=e.i(162772);e.i(754845);var v=e.i(945252),p=e.i(246165);e.i(901362);var N=e.i(660934),S=e.i(174708),F=e.i(419904);function g({service:e,wrappedGetServicePricingInfo:a,testId:n}){let{customizationTotalPrice:t,hasSinglePrice:d,singleDefaultPrice:l,minSingleCustomizationPriceQuantity:o}=a?.(e)??{},s=e.type===c.ProductServiceType.Text?t:e.prices;return(0,i.jsxs)("div",{className:F.default["select-option__info-wrapper"],children:[!!s&&(0,i.jsx)(r,{prices:s,quantityUnit:e.quantityUnit,minQuantity:e.minQuantity,hasSinglePrice:d,singleDefaultPrice:{defaultPrice:l??0,minQuantity:o??0},testId:n}),!!e.icon&&!!e.description&&(0,i.jsx)(N.Tooltip,{classNames:{tooltip:"relative w-[2.4rem] h-[2.4rem] [&_img]:filter-none"},content:(0,i.jsx)("p",{className:"max-w-[24rem]","data-testid":`${n}-service-icon-tooltip-content`,children:(0,S.stripHtml)(e.description)}),children:(0,i.jsx)(v.Image,{src:e.icon,fill:!0,alt:e.name,testId:`${n}-service-icon-tooltip`,filter:p.ImageFilter.Primary})}),!!e.icon&&!e.description&&(0,i.jsx)(v.Image,{src:e.icon,width:24,height:24,alt:e.name,testId:`${n}-service-icon`,filter:p.ImageFilter.Primary})]})}e.s(["ProductServiceSelectOption",0,function({service:e,isMultiselect:a,isSelected:t,testId:l="product-service-select-option",wrappedGetServicePricingInfo:o}){let s=(0,u.useTranslations)("product.customization"),{minSingleCustomizationPriceQuantity:m}=o?.(e)??{};return(0,i.jsxs)("div",{className:F.default["select-option"],"data-testid":`${l}-content`,children:[(0,i.jsxs)("div",{className:F.default["select-option__service-name-container"],children:[a?(0,i.jsx)(k.Checkbox,{classNames:{checkboxWrapper:F.default["select-option__checkbox-wrapper"]},label:e.name,id:`${e.id}-checkbox`,name:e.name,isChecked:t,testId:`${l}-checkbox`,onChange:()=>{}}):(0,i.jsx)(n.Text,{className:F.default["select-option__service-name"],children:e.name}),(m??0)>1&&(0,i.jsxs)(n.Text,{className:F.default["select-option__service-min-qty"],children:[s("minServiceQuantity")," ",(0,d.formatQuantityUnit)({value:m??0,unit:e.quantityUnit}).formattedQuantityWithUnit]})]}),(0,i.jsx)(g,{service:e,testId:l,wrappedGetServicePricingInfo:o})]})}],765001)},54085,e=>{"use strict";var i=e.i(222809),a=e.i(813931),n=e.i(62016);e.i(127216);var t=e.i(728737),d=e.i(479024);e.i(733750);var l=e.i(684771),o=e.i(410537),s=e.i(706896),m=e.i(765001);e.s(["default",0,function({id:e,name:r,services:u,isMultiselect:c,value:k,onChange:v,isDisabled:p=!1,error:N,variant:S,testId:F="product-service-select",wrappedGetServicePricingInfo:g,classNames:_={}}){let{productView:{serviceVariantsSelectVariant:f}}=(0,d.getComponentsConfig)(),y=S??f,h=(0,a.useMemo)(()=>u.map(e=>({...e,value:e.id,disabled:e.isDisabled})),[u]),x=(0,a.useCallback)((e,{selected:a})=>(0,i.jsx)(m.ProductServiceSelectOption,{service:e,isMultiselect:c,isSelected:a,testId:e.testId,wrappedGetServicePricingInfo:g}),[c,g]),P=(0,a.useCallback)((e,{placeholder:a})=>{if(!e)return(0,i.jsx)("span",{className:"text-foreground-muted",children:y===o.SelectVariant.FloatingLabel?" ":a});let{customizationTotalPrice:n}=g?.(e)??{},d=e.type===t.ProductServiceType.Text?n:e.prices;return(0,i.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,i.jsx)("span",{className:"truncate",children:e.name}),!!d&&(0,i.jsx)("span",{className:"text-sm font-normal normal-case",children:(0,i.jsx)(s.default,{prices:{...d,tierPrices:[]},quantityUnit:e.quantityUnit,minQuantity:e.minQuantity,testId:`${F}-value`})})]})},[y,F,g]),C={id:e,testId:F,label:r,placeholder:r,options:h,disabled:p,error:N,variant:y,renderOption:x,classNames:{selectWrapper:_?.productServiceSelectWrapper,selectTrigger:_?.productServiceSelectTrigger,selectChevron:_?.productServiceSelectChevron,selectPopup:_?.productServiceSelectPopup,selectLabel:_?.productServiceSelectLabel,selectOption:(0,n.cn)("flex-col items-start",_?.productServiceSelectOption)}};if(c){let e=Array.isArray(k)?k:[];
1return(0,i.jsx)(l.Select,{...C,multiple:!0,value:e,onChange:e=>v(e??[])})}let b=Array.isArray(k)?k[0]:k;return(0,i.jsx)(l.Select,{...C,value:b,onChange:e=>v(e??""),renderValue:P,classNames:{...C.classNames,selectValue:(0,n.cn)("h-auto py-1 block",_?.productServiceSelectValue)}})}])},617110,273914,e=>{"use strict";var i,a=e.i(785373),n=((i={}).ShowLoader="show-loader",i.HideLoader="hide-loader",i);e.s(["PageLoaderEvents",()=>n],273914);let t=new a.default;e.s(["hideLoader",0,function(){t.emit(n.HideLoader)},"pageLoaderEmitter",0,t,"showLoader",0,function(e){t.emit(n.ShowLoader,e)}],617110)},500363,e=>{e.v({"basket-list-customization-overlay__actions":"BasketListCustomizationOverlay-module-scss-module__lRb7Vq__basket-list-customization-overlay__actions","basket-list-customization-overlay__content":"BasketListCustomizationOverlay-module-scss-module__lRb7Vq__basket-list-customization-overlay__content"})},16583,e=>{e.v({"basket-simple-customization-overlay__actions":"BasketSimpleCustomizationOverlay-module-scss-module__6qXWZW__basket-simple-customization-overlay__actions","basket-simple-customization-overlay__content":"BasketSimpleCustomizationOverlay-module-scss-module__6qXWZW__basket-simple-customization-overlay__content"})},503169,e=>{e.v({"basket-text-customization-overlay__actions":"BasketTextCustomizationOverlay-module-scss-module__jXlQ-W__basket-text-customization-overlay__actions","basket-text-customization-overlay__content":"BasketTextCustomizationOverlay-module-scss-module__jXlQ-W__basket-text-customization-overlay__content","basket-text-customization-overlay__input-wrapper":"BasketTextCustomizationOverlay-module-scss-module__jXlQ-W__basket-text-customization-overlay__input-wrapper"})},772288,663758,69540,694772,97089,37927,128804,316477,900630,e=>{"use strict";let i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"productCustomizations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}
1,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"hideExpired"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productView"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}},{kind:"Argument",name:{kind:"Name",value:"productId"},value:{kind:"Variable",name:{kind:"Name",value:"productId"}}},{kind:"Argument",name:{kind:"Name",value:"hideExpired"},value:{kind:"Variable",name:{kind:"Name",value:"hideExpired"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"availableCustomizations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productAvailableCustomizationsFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productServiceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductAvaialbleCustomizationService"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productCustomizationId"}},{kind:"Field",name:{kind:"Name",value:"quantityPerProductUnit"}},{kind:"Field",name:{kind:"Name",value:"mandatory"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"maxLength"}},{kind:"Field",name:{kind:"Name",value:"pattern"}},{kind:"Field",name:{kind:"Name",value:"allowFullColorPrint"}},{kind:"Field",name:{kind:"Name",value:"maxNumberOfColors"}},{kind:"Field",name:{kind:"Name",value:"productInfoId"}},{kind:"Field",name:{kind:"Name",value:"applyPerUnitOfInput"}},{kind:"Field",name:{kind:"Name",value:"maxItems"}},{kind:"Field",name:{kind:"Name",value:"allowSameItem"}},{kind:"Field",name:{kind:"Name",value:"listItems"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"mediaAssetId"}}]}},{kind:"Field",name:{kind:"Name",value:"prices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"defaultPrice"}},{kind:"Field",name:{kind:"Name",value:"defaultPriceTax"}},{kind:"Field",name:{kind:"Name",value:"salePrice"}},{kind:"Field",name:{kind:"Name",value:"salePriceTax"}},{kind:"Field",name:{kind:"Name",value:"tierPrices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"priceTax"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productServiceGroupFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductAvaialbleCustomizationServiceGroup"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"inputType"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"services"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productServiceFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productAvailableCustomizationsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductAvailableCustomizations"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"quantityPerProductUnit"}},{kind:"Field",name:{kind:"Name",value:"serviceGroups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productServiceGroupFields"}}]}},{kind:"Field",name:{kind:"Name",value:"components"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"quantityPerProductUnit"}},{kind:"Field",name:{kind:"Name",value:"serviceGroups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productServiceGroupFields"}}]}},{kind:"Field",name:{kind:"Name",value:"locations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"maxPrintSize"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"serviceGroups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productServiceGroupFields"}}]}}]}}]}}]}}]};e.s(["ProductCustomizationsDocument",0,i],772288);var a=e.i(222809),n=e.i(583846),t=e.i(813931),d=e.i(837862);e.i(127216);var l=e.i(728737),o=e.i(685034);let s={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addBasketProductCustomizations"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"addBasketProductCustomizationsInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddBasketProductCustomizationsInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withAdditionalServices"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withRating"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}
1,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addBasketProductCustomizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"addBasketProductCustomizationsInput"},value:{kind:"Variable",name:{kind:"Name",value:"addBasketProductCustomizationsInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"orderId"}},{kind:"Field",name:{kind:"Name",value:"totalBasketQty"}},{kind:"Field",name:{kind:"Name",value:"totalBasketUniqueQty"}},{kind:"FragmentSpread",name:{kind:"Name",value:"basketAllFields"}},{kind:"FragmentSpread",name:{kind:"Name",value:"basketAdditionalServicesAllFields"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withAdditionalServices"}}}]}]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"singleBasketPriceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SingleBasketPrice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tax"}},{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"appliedCartDiscountsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketCartDiscount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"priceType"}},{kind:"Field",name:{kind:"Name",value:"productDiscountType"}},{kind:"Field",name:{kind:"Name",value:"discountAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketPricesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketPrices"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalBasketDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscountedShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalSubtotalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"appliedCartDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"appliedCartDiscountsFields"}}]}},{kind:"Field",name:{kind:"Name",value:"pricePerMerchant"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalBasketDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}
1,{kind:"Field",name:{kind:"Name",value:"totalDiscountedShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"appliedCartDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"appliedCartDiscountsFields"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"shippingCalculation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errors"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productPriceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Prices"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"discountPercent"}},{kind:"Field",name:{kind:"Name",value:"saleStartDate"}},{kind:"Field",name:{kind:"Name",value:"saleEndDate"}},{kind:"Field",name:{kind:"Name",value:"defaultPriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"salePriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"defaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"salePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"tierPrices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"priceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"price"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketProductAllPricesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketProduct"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"price"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"basePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salePriceTax"}},{kind:"Field",name:{kind:"Name",value:"salePrice"}}]}},{kind:"Field",name:{kind:"Name",value:"priceSnapshot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalPriceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"priceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalProductPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductPriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductSalePriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalItemDefaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalItemSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationDefaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationPriceAfterAllDiscounts"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productAttrValuesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductAttrValue"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attributeValue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attribute"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productInfoQuantityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductInfo"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isAdvancedQuantityEnabled"}},{kind:"Field",name:{kind:"Name",value:"quantityUnit"}},{kind:"Field",name:{kind:"Name",value:"quantitySellUnit"}},{kind:"Field",name:{kind:"Name",value:"startQuantity"}},{kind:"Field",name:{kind:"Name",value:"stepQuantity"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"maxQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderStepQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderMinQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderMaxQuantity"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"brandBaseFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Brand"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"categoryBaseFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Category"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"reviewRateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ReviewRating"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"score"}},{kind:"Field",name:{kind:"Name",value:"starsCounts"}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}
1]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productInfoListingFieldsCore"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductInfo"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"lowStock"}},{kind:"Field",name:{kind:"Name",value:"lowStockLabel"}},{kind:"Field",name:{kind:"Name",value:"outOfStockLabel"}},{kind:"Field",name:{kind:"Name",value:"productsCount"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"FragmentSpread",name:{kind:"Name",value:"productInfoQuantityFields"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}},{kind:"Field",name:{kind:"Name",value:"brand"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"brandBaseFields"}}]}},{kind:"Field",name:{kind:"Name",value:"category"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"categoryBaseFields"}}]}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"media"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"altText"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewRating"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withRating"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"reviewRateFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"customerFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Customer"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"firstName"}},{kind:"Field",name:{kind:"Name",value:"lastName"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"phone"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"isFollowed"}},{kind:"Field",name:{kind:"Name",value:"shippingAddresses"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addressOne"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"block"}},{kind:"Field",name:{kind:"Name",value:"district"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"reviewRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"reviewRateFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketProductCustomizationFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketProductCustomization"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userInput"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"productCustomizationId"}},{kind:"Field",name:{kind:"Name",value:"component"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"serviceGroup"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"service"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"maxLength"}},{kind:"Field",name:{kind:"Name",value:"pattern"}}]}},{kind:"Field",name:{kind:"Name",value:"selections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"listItemId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"position"}}]}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"maxPrintSize"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tax"}},{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalPriceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"defaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"salePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketAllFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Basket"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"canOrder"}},{kind:"Field",name:{kind:"Name",value:"prices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"basketPricesFields"}},{kind:"Field",name:{kind:"Name",value:"giftCardAllocatedAmount"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}]},{kind:"Field",name:{kind:"Name",value:"amountPayableAfterGiftCard"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}]}]}},{kind:"Field",name:{kind:"Name",value:"promoCode"}},{kind:"Field",name:{kind:"Name",value:"giftCardCode"}},{kind:"Field",name:{kind:"Name",value:"loyaltyCardNumber"}},{kind:"Field",name:{kind:"Name",value:"freeShippingThresholds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"giftThresholds"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cartDiscountId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"giftProducts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"product"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"productInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"declinedGiftDiscountIds"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}}}]}]},{kind:"Field",name:{kind:"Name",value:"giftCardPurchases"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"amount"}}
1,{kind:"Field",name:{kind:"Name",value:"fromName"}},{kind:"Field",name:{kind:"Name",value:"toName"}}]}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"isGift"}},{kind:"Field",name:{kind:"Name",value:"sourceCartDiscountId"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"quantityInSellUnit"}},{kind:"Field",name:{kind:"Name",value:"productQuantityInSellUnit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorder"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"availableOn"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"basketProductAllPricesFields"}},{kind:"Field",name:{kind:"Name",value:"basketProductUserInputs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"product"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isInWishlist"}},{kind:"Field",name:{kind:"Name",value:"sku"}},{kind:"Field",name:{kind:"Name",value:"availability"}},{kind:"Field",name:{kind:"Name",value:"isTrackInventory"}},{kind:"Field",name:{kind:"Name",value:"replenishmentDate"}},{kind:"Field",name:{kind:"Name",value:"deliveryDaysFrom"}},{kind:"Field",name:{kind:"Name",value:"deliveryDaysTo"}},{kind:"Field",name:{kind:"Name",value:"fixedShippingRate"}},{kind:"Field",name:{kind:"Name",value:"hasAvailableCustomizations"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}]},{kind:"Field",name:{kind:"Name",value:"applicableAdditionalServices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalService"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"imageName"}}]}},{kind:"Field",name:{kind:"Name",value:"isApplied"}}]}},{kind:"Field",name:{kind:"Name",value:"productAttrValues"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productAttrValuesFields"}}]}},{kind:"Field",name:{kind:"Name",value:"productInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productInfoListingFieldsCore"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"customerFields"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"basketProductCustomizations"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"basketProductCustomizationFields"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketAdditionalServicesAllFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Basket"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalServices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalService"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"imageName"}},{kind:"Field",name:{kind:"Name",value:"translations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"locale"}},{kind:"Field",name:{kind:"Name",value:"fields"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"priceTax"}},{kind:"Field",name:{kind:"Name",value:"originalPrice"}},{kind:"Field",name:{kind:"Name",value:"originalPriceTax"}},{kind:"Field",name:{kind:"Name",value:"isApplied"}}]}}]}}]};e.i(895160);var m=e.i(816368),r=e.i(235271);e.i(488721);var u=e.i(822667),c=e.i(252949);let k=e=>{let i=(0,c.getFeatureFlags)(),a=(0,d.useTranslations)("basket.notifications"),n=(0,t.useCallback)((i,n)=>{(0,m.showToast)(r.ToastType.Success,a("addBasketProductCustomizationSuccess")),e?.onCompleted?.(i,n)},[e,a]),l=(0,t.useCallback)((i,n)=>{(0,m.showToast)(r.ToastType.Error,a("addBasketProductCustomizationFailure")),e?.onError?.(i,n)},[e,a]),[k,...v]=(0,o.useMutation)(s,{...e,onCompleted:n,onError:l});return[async e=>k({variables:{addBasketProductCustomizationsInput:e?.variables?.addBasketProductCustomizationsInput,withAdditionalServices:!0,...(0,u.getPricesToInclude)(i.PRICES_MODE),withProductCustomizations:i.ENABLE_PRODUCT_CUSTOMIZATIONS}}),...v]};e.s(["useAddBasketProductCustomizations",0,k],663758);let v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateBasketProductCustomization"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"updateBasketProductCustomizationInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateBasketProductCustomizationInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withRating"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}
1,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateBasketProductCustomization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"updateBasketProductCustomizationInput"},value:{kind:"Variable",name:{kind:"Name",value:"updateBasketProductCustomizationInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"orderId"}},{kind:"Field",name:{kind:"Name",value:"totalBasketQty"}},{kind:"Field",name:{kind:"Name",value:"totalBasketUniqueQty"}},{kind:"FragmentSpread",name:{kind:"Name",value:"basketAllFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"singleBasketPriceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SingleBasketPrice"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tax"}},{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"appliedCartDiscountsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketCartDiscount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"priceType"}},{kind:"Field",name:{kind:"Name",value:"productDiscountType"}},{kind:"Field",name:{kind:"Name",value:"discountAmount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketPricesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketPrices"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalBasketDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscountedShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalSubtotalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"appliedCartDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"appliedCartDiscountsFields"}}]}},{kind:"Field",name:{kind:"Name",value:"pricePerMerchant"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalBasketDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalBasketSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}
1,{kind:"Field",name:{kind:"Name",value:"totalDiscountedShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalShippingPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"appliedCartDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"appliedCartDiscountsFields"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"shippingCalculation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errors"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productPriceFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Prices"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"discountPercent"}},{kind:"Field",name:{kind:"Name",value:"saleStartDate"}},{kind:"Field",name:{kind:"Name",value:"saleEndDate"}},{kind:"Field",name:{kind:"Name",value:"defaultPriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"salePriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"defaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"salePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"tierPrices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"priceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"price"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketProductAllPricesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketProduct"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"price"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"basePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"salePriceTax"}},{kind:"Field",name:{kind:"Name",value:"salePrice"}}]}},{kind:"Field",name:{kind:"Name",value:"priceSnapshot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalPriceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"priceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalProductPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductPriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithoutTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalProductSalePriceTax"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeWithTax"}}}]}]},{kind:"Field",name:{kind:"Name",value:"totalItemDefaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalItemSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationDefaultPrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationSalePrice"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCustomizationPriceAfterAllDiscounts"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"singleBasketPriceFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productAttrValuesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductAttrValue"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attributeValue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"attribute"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productInfoQuantityFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductInfo"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isAdvancedQuantityEnabled"}},{kind:"Field",name:{kind:"Name",value:"quantityUnit"}},{kind:"Field",name:{kind:"Name",value:"quantitySellUnit"}},{kind:"Field",name:{kind:"Name",value:"startQuantity"}},{kind:"Field",name:{kind:"Name",value:"stepQuantity"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"maxQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderStepQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderMinQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorderMaxQuantity"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"brandBaseFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Brand"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"categoryBaseFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Category"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"reviewRateFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ReviewRating"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"score"}},{kind:"Field",name:{kind:"Name",value:"starsCounts"}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}
1]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productInfoListingFieldsCore"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductInfo"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"lowStock"}},{kind:"Field",name:{kind:"Name",value:"lowStockLabel"}},{kind:"Field",name:{kind:"Name",value:"outOfStockLabel"}},{kind:"Field",name:{kind:"Name",value:"productsCount"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"FragmentSpread",name:{kind:"Name",value:"productInfoQuantityFields"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}},{kind:"Field",name:{kind:"Name",value:"brand"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"brandBaseFields"}}]}},{kind:"Field",name:{kind:"Name",value:"category"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"categoryBaseFields"}}]}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"media"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"altText"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"reviewRating"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withRating"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"reviewRateFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"customerFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Customer"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"firstName"}},{kind:"Field",name:{kind:"Name",value:"lastName"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"phone"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"isFollowed"}},{kind:"Field",name:{kind:"Name",value:"shippingAddresses"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addressOne"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"block"}},{kind:"Field",name:{kind:"Name",value:"district"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"reviewRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"reviewRateFields"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketProductCustomizationFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasketProductCustomization"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"userInput"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"minQuantity"}},{kind:"Field",name:{kind:"Name",value:"productCustomizationId"}},{kind:"Field",name:{kind:"Name",value:"component"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"serviceGroup"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"service"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"maxLength"}},{kind:"Field",name:{kind:"Name",value:"pattern"}}]}},{kind:"Field",name:{kind:"Name",value:"selections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"listItemId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"position"}}]}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"maxPrintSize"}}]}},{kind:"Field",name:{kind:"Name",value:"totalDefaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tax"}},{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalSalePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"totalPriceAfterAllDiscounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"defaultPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}},{kind:"Field",name:{kind:"Name",value:"salePrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"withTax"}},{kind:"Field",name:{kind:"Name",value:"withoutTax"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"basketAllFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Basket"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"canOrder"}},{kind:"Field",name:{kind:"Name",value:"prices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"basketPricesFields"}},{kind:"Field",name:{kind:"Name",value:"giftCardAllocatedAmount"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}]},{kind:"Field",name:{kind:"Name",value:"amountPayableAfterGiftCard"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}]}]}},{kind:"Field",name:{kind:"Name",value:"promoCode"}},{kind:"Field",name:{kind:"Name",value:"giftCardCode"}},{kind:"Field",name:{kind:"Name",value:"loyaltyCardNumber"}},{kind:"Field",name:{kind:"Name",value:"freeShippingThresholds"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"giftThresholds"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cartDiscountId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomerId"}},{kind:"Field",name:{kind:"Name",value:"giftProducts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"product"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"productInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"page"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}}]}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"declinedGiftDiscountIds"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftTiers"}}}]}]},{kind:"Field",name:{kind:"Name",value:"giftCardPurchases"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withGiftCards"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"amount"}}
1,{kind:"Field",name:{kind:"Name",value:"fromName"}},{kind:"Field",name:{kind:"Name",value:"toName"}}]}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"isGift"}},{kind:"Field",name:{kind:"Name",value:"sourceCartDiscountId"}},{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"quantityInSellUnit"}},{kind:"Field",name:{kind:"Name",value:"productQuantityInSellUnit"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableQuantity"}},{kind:"Field",name:{kind:"Name",value:"preorder"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"quantity"}},{kind:"Field",name:{kind:"Name",value:"availableOn"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"basketProductAllPricesFields"}},{kind:"Field",name:{kind:"Name",value:"basketProductUserInputs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"product"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isInWishlist"}},{kind:"Field",name:{kind:"Name",value:"sku"}},{kind:"Field",name:{kind:"Name",value:"availability"}},{kind:"Field",name:{kind:"Name",value:"isTrackInventory"}},{kind:"Field",name:{kind:"Name",value:"replenishmentDate"}},{kind:"Field",name:{kind:"Name",value:"deliveryDaysFrom"}},{kind:"Field",name:{kind:"Name",value:"deliveryDaysTo"}},{kind:"Field",name:{kind:"Name",value:"fixedShippingRate"}},{kind:"Field",name:{kind:"Name",value:"hasAvailableCustomizations"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}]},{kind:"Field",name:{kind:"Name",value:"applicableAdditionalServices"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"additionalService"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"imageName"}}]}},{kind:"Field",name:{kind:"Name",value:"isApplied"}}]}},{kind:"Field",name:{kind:"Name",value:"productAttrValues"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productAttrValuesFields"}}]}},{kind:"Field",name:{kind:"Name",value:"productInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"productInfoListingFieldsCore"}},{kind:"Field",name:{kind:"Name",value:"merchantCustomer"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"customerFields"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"basketProductCustomizations"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"withProductCustomizations"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"basketProductCustomizationFields"}}]}}]}}]}}]},p=e=>{let i=(0,d.useTranslations)("basket.notifications"),a=(0,t.useCallback)(()=>{(0,m.showToast)(r.ToastType.Success,i("updateBasketProductCustomizationSuccess"))},[i]),n=(0,t.useCallback)((a,n)=>{(0,m.showToast)(r.ToastType.Error,i("updateBasketProductCustomizationFailure")),e?.onError?.(a,n)},[e,i]);return(0,o.useMutation)(v,{onCompleted:a,onError:n})};e.s(["useUpdateBasketProductCustomization",0,p],69540),e.s([],694772);var N=e.i(975438);e.i(813639);var S=e.i(144163),F=e.i(856249),g=e.i(500363);let _=(0,t.memo)(function({customizationToEdit:e,service:i,serviceGroups:o=[],basketProductId:s="",selectedCustomizations:m=[],onClose:r}){let u=(0,d.useTranslations)("basket.common"),[c]=(0,t.useState)(()=>e?i:o.flatMap(e=>e.services.filter(e=>e.type===l.ProductServiceType.List)).find(e=>!m.some(i=>i.service.productCustomizationId===e.productCustomizationId))),[v,_]=(0,t.useState)(()=>e?.selections?.map(e=>e.listItemId)??[]),[f,y]=(0,t.useState)(!1),[h]=p(),[x]=k(),P=(0,t.useCallback)(async()=>
1{if(!f&&c&&v.length){y(!0);try{let i,a=(i=v.filter(Boolean),{productCustomizationId:c.productCustomizationId,listItemIds:null!=c.maxItems?i.slice(0,c.maxItems):i});e?await h({variables:{updateBasketProductCustomizationInput:{id:e.id,...a}}}):await x({variables:{addBasketProductCustomizationsInput:{basketProductId:s,customizations:[a]}}}),r()}catch(e){n.default.error({err:e},"Failed to save list customization")}finally{y(!1)}}},[e,c,s,v,h,x,f,r]);return c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:g.default["basket-list-customization-overlay__content"],children:(0,a.jsx)(N.default,{service:c,value:v,onChange:_,testId:"basket-list-customization"})}),(0,a.jsxs)("div",{className:g.default["basket-list-customization-overlay__actions"],children:[(0,a.jsx)(S.Button,{ariaLabel:u("cancel"),testId:"list-customization-overlay-cancel-button",variant:F.ButtonVariant.Outlined,onClickBtn:r,disabled:f,children:u("cancel")}),(0,a.jsx)(S.Button,{ariaLabel:u("save"),testId:"list-customization-overlay-confirm-button",onClickBtn:P,disabled:f||!v.length,children:u("save")})]})]}):null});e.s([],97089),e.s(["BasketListCustomizationOverlay",0,_],37927);var f=e.i(16583);let y={ProductServiceSelect:(0,t.lazy)(()=>e.A(704594))},h=(0,t.memo)(function({serviceGroups:e,customizationToEdit:i,basketProductId:n="",selectedCustomizations:l=[],onClose:o}){let s=(0,d.useTranslations)("basket.common"),m=(0,t.useMemo)(()=>i?[{[i.service.serviceGroupId]:i.service.productCustomizationId}]:e.map(e=>({[e.id]:l?.find(i=>i.service.serviceGroupId===e.id)?.service.productCustomizationId??""})),[e,i,l]),[r,u]=(0,t.useState)(m),[c]=p(),[v]=k(),N=(0,t.useCallback)(async()=>{if(i)await c({variables:{updateBasketProductCustomizationInput:{id:i.id,productCustomizationId:r[0][i.service.serviceGroupId]}}});else{let e=(l.length>0?r.filter(e=>{let i=Object.keys(e)[0];return!l.some(e=>e.service.serviceGroupId===i)}):r).map(e=>Array.isArray(Object.values(e)[0])?Object.values(e)[0].map(e=>({productCustomizationId:e})):{productCustomizationId:Object.values(e)[0]}).flat().filter(e=>""!==e.productCustomizationId);e.length>0&&await v({variables:{addBasketProductCustomizationsInput:{basketProductId:n,customizations:e}}})}o()},[r,i,l,n,c,v,o]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:f.default["basket-simple-customization-overlay__content"],children:(0,a.jsx)(t.Suspense,{fallback:null,children:e.length>0&&e.filter(e=>!l.find(i=>i.service.serviceGroupId===e.id)).map((e,n)=>(0,a.jsx)(y.ProductServiceSelect,{id:i?i.service.serviceGroupId:e.id,name:i?i.serviceGroup.name:e.name,services:e.services||[],value:i?r[0][i.service.serviceGroupId]:r[n][e.id],isMultiselect:!!e.isMultiselect,isDisabled:!!l.find(i=>i.service.serviceGroupId===e.id),onChange:a=>{u(i?[{[i.service.serviceGroupId]:a}]:r.map((i,t)=>t===n?{[e.id]:a}:i))}},i?i.service.serviceGroupId:e.id))})}),(0,a.jsxs)("div",{className:f.default["basket-simple-customization-overlay__actions"],children:[(0,a.jsx)(S.Button,{ariaLabel:s("cancel"),testId:"simple-customization-overlay-cancel-button",variant:F.ButtonVariant.Outlined,onClickBtn:o,children:s("cancel")}),(0,a.jsx)(S.Button,{ariaLabel:s("save"),testId:"simple-customization-overlay-confirm-button",onClickBtn:N,children:s("save")})]})]})});e.s([],128804),e.s(["BasketSimpleCustomizationOverlay",0,h],316477),e.i(891853);var x=e.i(181102),P=e.i(173232),C=e.i(174708),b=e.i(548786),I=e.i(503169);let z=(0,t.memo)(function({customizationToEdit:e,serviceGroups:i=[],basketProductId:o="",selectedCustomizations:s=[],onClose:m}){let r=(0,d.useTranslations)("basket.common"),u=(0,d.useTranslations)("productCard.fieldErrors"),c=(0,t.useMemo)(()=>e?e.service:i.flatMap(e=>e.services.filter(e=>e.type===l.ProductServiceType.Text)).find(e=>!s.some(i=>i.service.productCustomizationId===e.productCustomizationId)),[e,i,s]),[v,N]=(0,t.useState)(e?.uploadedImageUrl||""),[g,_]=(0,t.useState)(!1),[f]=p(),[y]=k(),{patternError:h,requiredError:z,isValid:w}=(0,t.useMemo)(()=>(0,b.validateTextCustomization)({value:v,pattern:c?.pattern,maxLength:c?.maxLength,isRequired:!0,translate:u}),[v,c?.pattern,c?.maxLength,u]),T=(0,t.useCallback)(e=>{N((0,b.requiresUppercase)(c?.pattern)?(0,b.transformTextInput)(e.target.value):e.target.value)},[c?.pattern]),D=(0,t.useCallback)(async()=>
1{if(!g&&w&&c){_(!0);try{e?await f({variables:{updateBasketProductCustomizationInput:{id:e.id,productCustomizationId:c.productCustomizationId,userInput:v}}}):await y({variables:{addBasketProductCustomizationsInput:{basketProductId:o,customizations:[{productCustomizationId:c.productCustomizationId,userInput:v}]}}}),m()}catch(e){n.default.error({err:e},"Failed to save text customization")}finally{_(!1)}}},[e,c,o,v,f,y,g,w,m]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:I.default["basket-text-customization-overlay__content"],children:(0,a.jsx)("div",{className:I.default["basket-text-customization-overlay__input-wrapper"],children:(0,a.jsx)(x.Input,{id:"text-customization-input",name:"text-customization",label:c?.name??"",placeholder:c?.name??"",value:v,type:P.InputType.Text,maxLength:c?.maxLength,pattern:c?.pattern,helperText:(0,C.stripHtml)(c?.description),error:z||h,onChange:T,testId:"basket-text-customization-input"})})}),(0,a.jsxs)("div",{className:I.default["basket-text-customization-overlay__actions"],children:[(0,a.jsx)(S.Button,{ariaLabel:r("cancel"),testId:"text-customization-overlay-cancel-button",variant:F.ButtonVariant.Outlined,onClickBtn:m,disabled:g,children:r("cancel")}),(0,a.jsx)(S.Button,{ariaLabel:r("save"),testId:"text-customization-overlay-confirm-button",onClickBtn:D,disabled:g||!w,children:r("save")})]})]})});e.s(["default",0,z],900630)},112192,e=>{"use strict";var i=e.i(813931),a=e.i(837862),n=e.i(703965),t=e.i(93348);e.i(726840);var d=e.i(413311);e.i(946755);var l=e.i(431500);e.s(["useProductCustomizationDrawer",0,({components:e,quantitySelectorQuantity:o,initiallySelectedComponent:s,initiallySelectedLocation:m,initiallySelectedServices:r,initiallyUploadedImages:u,productImage:c,selectedCustomizations:k,customizationToEdit:v,onSubmit:p,productQuantityPerProductUnit:N})=>{let{withVat:S}=(0,l.useGlobalContext)(),F=(0,a.useTranslations)("product.common"),g=(0,a.useTranslations)("productCard.fieldErrors"),{openImagePreview:_,imagePreviewOverlay:f}=(0,n.useImagePreview)(),[y,h]=(0,i.useState)({}),[x,P]=(0,i.useState)(s??null),[C,b]=(0,i.useState)(m??null),[I,z]=(0,i.useState)(u??null),[w,T]=(0,i.useState)(()=>{let e={...r??{}};return v?.service&&(e[v.service.serviceGroupId]=v.service.productCustomizationId),e}),D=(0,i.useMemo)(()=>{let i=new Map;return e.forEach(e=>{e.serviceGroups?.forEach(e=>{e.services.forEach(e=>{i.has(e.id)||i.set(e.id,{...e.prices})})}),e.locations?.forEach(e=>{e.serviceGroups?.forEach(e=>{e.services.forEach(e=>{i.has(e.id)||i.set(e.id,{...e.prices})})})})}),i},[e]),B=(0,i.useCallback)((e,i)=>{let a=D.get(e);return a?{...a}:i},[D]),j=(0,i.useCallback)((e,i)=>(0,t.getEffectiveQuantityPerProductUnit)(e.quantityPerProductUnit,i?.quantityPerProductUnit??0,N),[N]),V=(0,i.useCallback)((e,i)=>(0,t.getCustomizationServiceValues)({prices:B(e.id,e.prices),serviceMinQuantity:e.minQuantity,requestedQuantity:o,withVat:S,serviceQuantityPerProductUnit:j(e,i)}),[o,S,j,B]),A=(0,i.useMemo)(()=>C?.imageId?(0,d.buildImageUrl)({id:C.imageId}):x?.imageId?(0,d.buildImageUrl)({id:x.imageId}):(0,d.buildImageUrl)({id:c?.imageId}),[c?.imageId,x?.imageId,C?.imageId]),L=(0,i.useMemo)(()=>{if(!v?.service?.productCustomizationId)return null;let e=null;return x?.serviceGroups?.forEach(i=>{i.services.some(a=>a.productCustomizationId===v.service.productCustomizationId&&(e=i,!0))}),e||C?.serviceGroups?.forEach(i=>{i.services.some(a=>a.productCustomizationId===v.service.productCustomizationId&&(e=i,!0))}),e},[v?.service.productCustomizationId,x?.serviceGroups,C?.serviceGroups]),W=(0,i.useMemo)(()=>e.map(({id:e,name:i})=>({name:i,value:e})),[e]),U=(0,i.useMemo)(()=>x?.locations?.map(({id:e,name:i})=>({name:i,value:e})),[x?.locations]),$=(0,i.useMemo)(()=>x?.serviceGroups?.map(e=>{let i=[];k?.forEach(e=>{e.component.id===x.id&&i.push(e.service.productCustomizationId)});let a=!e.isMultiselect&&e.services.find(e=>i.includes(e.productCustomizationId)),n=!1;return L?n=!(v?.service?.productCustomizationId&&e.services.find(e=>e.productCustomizationId===v.service.productCustomizationId)):a?n=!0:k?.length&&k.forEac
1h(i=>{i.component.id===x.id&&i.service?.serviceGroupId===e.id&&(n=!0,a=i.service)}),{...e,value:a?a?.id:"",isDisabled:n,services:e.services.map(e=>{let{customizationTotalPrice:i}=V(e,x);return{...e,prices:i}})}}),[v?.service.productCustomizationId,k,L,V,x]),Q=(0,i.useMemo)(()=>C?.serviceGroups?.map(e=>{let i=[];k?.forEach(e=>{e.location?.id===C.id&&i.push(e.service.productCustomizationId)});let a=!e.isMultiselect&&e.services.find(e=>i.includes(e.productCustomizationId)),n=!1;return L?n=!(v?.service?.productCustomizationId&&e.services.find(e=>e.productCustomizationId===v.service.productCustomizationId)):a&&(n=!0),{...e,value:n&&a?a?.id:w[e.id],isDisabled:n,services:e.services.map(e=>{let{customizationTotalPrice:i}=V(e,x);return{...e,prices:i}})}}),[v?.service.productCustomizationId,k,C?.id,C?.serviceGroups,w,L,V,x]),E=(0,i.useMemo)(()=>Object.values(w).flatMap(e=>Array.isArray(e)?e:[e]).map(i=>{let a;if(e.forEach(e=>{e.serviceGroups&&e.serviceGroups.forEach(e=>{e.services.forEach(e=>{e.id===i&&(a=e)})}),e.locations&&e.locations.forEach(e=>{e.serviceGroups&&e.serviceGroups.forEach(e=>{e.services.forEach(e=>{e.id===i&&(a=e)})})})}),!a)return null;let{customizationTotalPrice:n}=V(a,x);return{...a,prices:n}}).filter(e=>!!e),[e,w,V,x]),G=(0,i.useMemo)(()=>E.reduce((e,i)=>{let a=V(i,x);return e+(0,t.calculateServiceTotalPrice)(a)},0),[E,V,x]),O=(0,i.useCallback)(i=>{P(e.find(e=>e.id===i)??null),b(null),T({}),h({})},[e]),q=(0,i.useCallback)(e=>{x&&(b(x.locations?.find(i=>i.id===e)??null),T(e=>{let i={};return Object.keys(e).filter(e=>!C?.serviceGroups?.find(i=>i.id===e)).forEach(a=>{i[a]=e[a]}),i}),h({...y,locationError:"",imageUploadErrors:{}}))},[y,x,C?.serviceGroups]),M=(0,i.useCallback)((e,i)=>{if(y.serviceGroupErrors?.[e]){let{serviceGroupErrors:i,...a}=y,{[e]:n,...t}=i;h(1===Object.keys(y.serviceGroupErrors).length?a:{...a,serviceGroupErrors:t})}T(a=>({...a,[e]:i}))},[y]),R=(0,i.useCallback)(({serviceGroupId:e,serviceId:i,file:a})=>{y.imageUploadErrors?.[e]&&h({}),z(e=>({...e,[i]:a}))},[y]),Z=(0,i.useCallback)(e=>{z(i=>i?Object.keys(i).reduce((a,n)=>(n!==e&&(a[n]=i[n]),a),{}):null)},[]),X=(0,i.useCallback)(()=>{let e=!!Object.keys(w).length,i={};return x?(C?Q&&Q.length>0&&Q.forEach(e=>{e.isDisabled||w[e.id]||(i=i.serviceGroupErrors?{...i,serviceGroupErrors:{...i.serviceGroupErrors,[e.id]:g("requiredField")}}:{...i,serviceGroupErrors:{[e.id]:g("requiredField")}})}):$&&$.length>0?$.forEach(a=>{a.isDisabled||w[a.id]||e||(i={...i,serviceGroupErrors:{...i.serviceGroupErrors,[a.id]:g("requiredField")}})}):i={...i,locationError:g("requiredField")},h(i),0===Object.keys(i).length):(h(i={componentError:g("requiredField")}),!1)},[$,Q,x,C,w,g]),H=(0,i.useCallback)(()=>{X()&&(v&&0===E.length?p([v]):p(E.map(e=>{let i=!1;return C&&(i=C.serviceGroups?.some(i=>i.services.some(i=>i.id===e.id))),{service:e,image:I?.[e.id],component:{id:x.id,name:x.name,quantityPerProductUnit:x.quantityPerProductUnit},location:i&&C?{id:C.id,name:C.name}:void 0}})))},[v,X,p,x,C,E,I]),K=(0,i.useCallback)(e=>{let i=e?(0,d.buildImageUrl)({id:e}):A;_({title:e?F("image"):void 0,singleSlide:{src:i,alt:"Product Preview",width:312,height:412},testId:"customization-product-preview-modal-overlay",hasNavigation:!1,pagination:!1,loop:!1})},[A,F,_]);return{imagePreviewOverlay:f,componentOptions:W,locationOptions:U,componentServiceGroups:$,locationServiceGroups:Q,selectedComponent:x,selectedLocation:C,selectedServiceIdsByGroup:w,getServicePricingInfo:V,selectedServices:E,image:A,totalPrice:G,uploadedImages:I,formErrors:y,handleComponentChange:O,handleLocationChange:q,handleServiceChange:M,handleFullScreenImagePreview:K,handleFileDrop:R,handleFileDelete:Z,handleSubmit:H,getQuantityPerProductUnit:j}}])},655912,e=>{e.v({"customization-drawer":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer","customization-drawer__body":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__body","customization-drawer__cancel-button":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__cancel-button","customization-drawer__controls":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__controls","customization-drawer__dropdown-group":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__dropdown-group","customization-drawer__footer":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__footer","customization-drawer__image":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__image","customization-drawer__min-quantity-tooltip":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__min-quantity-tooltip","customization-drawer__preview":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__preview","customization-drawer__quantity-selector":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__quantity-selector","customization-drawer__save-button":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__save-button","customization-drawer__select-container":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__select-container","customization-drawer__separator":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__separator","customization-drawer__summary":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary","customization-drawer__summary-alert":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-alert","customization-drawer__summary-list":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-list","customization-drawer__summary-list-container":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-list-container","customization-drawer__summary-service-single-price":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-service-single-price","customization-drawer__summary-total-price":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-total-price","customization-drawer__summary-total-price-container":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-total-price-container","customization-drawer__summary-total-price-label":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-drawer__summary-total-price-label","customization-preview-modal__dialog-header":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-preview-modal__dialog-header","customization-preview-modal__drawer":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-preview-modal__drawer","customization-preview-modal__drawer
1-body":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-preview-modal__drawer-body","customization-preview-modal__slide":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-preview-modal__slide","customization-preview-modal__slider":"ProductCustomizationDrawer-module-scss-module__nIWfpW__customization-preview-modal__slider"})},558930,e=>{e.v({"image-upload":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload","image-upload--error":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload--error","image-upload--preview":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload--preview","image-upload--preview-with-file-size":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload--preview-with-file-size","image-upload__container":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__container","image-upload__file-formats":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__file-formats","image-upload__file-info":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__file-info","image-upload__file-info-container":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__file-info-container","image-upload__file-name":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__file-name","image-upload__file-size":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__file-size","image-upload__highlighted-placeholder-text":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__highlighted-placeholder-text","image-upload__placeholder-text":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__placeholder-text","image-upload__preview-image":"ProductCustomizationImageUpload-module-scss-module__Z-mbMW__image-upload__preview-image"})},57006,457784,227679,353031,e=>{"use strict";var i=e.i(222809),a=e.i(583846),n=e.i(813931);e.i(430623);var t=e.i(914533),d=e.i(837862);e.i(127216);var l=e.i(728737),o=e.i(479024);e.i(813639);var s=e.i(144163),m=e.i(856249);e.i(652044);var r=e.i(183203),u=e.i(590168);e.i(733750);var c=e.i(684771);e.i(754845);var k=e.i(945252);e.i(26689);var v=e.i(631664),p=e.i(826416);e.i(239329);var N=e.i(517093),S=e.i(112192);e.s([],457784);var F=e.i(768155);e.i(975264);var g=e.i(461325);e.s(["QuantitySelector",()=>g.default],227679);var g=g,_=e.i(246165);e.i(226958);var f=e.i(501953);e.i(334421);var y=e.i(533029);e.i(901362);var h=e.i(660934),x=e.i(862281);e.i(597547);var P=e.i(199631),C=e.i(731921);e.i(946755);var b=e.i(431500),I=e.i(179174),z=e.i(655912);function w({selectedServices:e,getServicePricingInfo:a,selectedComponent:n}){let t=(0,d.useTranslations)("product.customization"),{withVat:l}=(0,b.useGlobalContext)(),{currency:o}=(0,C.useStoreCurrency)();return e&&e.length>0&&e.map((e,d)=>{let{minSingleCustomizationPriceQuantity:s}=a(e,n),m=(0,I.getSinglePriceFromCalculatedPrices)((0,I.getSelectedTierPrice)(s,e.prices,l));return(0,i.jsx)(v.Alert,{title:t("customizationWarning",{minCustomizationQuantity:s,firstCurrency:o,firstServicePrice:m.toFixed(2),totalPrice:(m*s).toFixed(2),serviceName:e.name}),type:p.AlertType.Warning,classNames:{alert:z.default["customization-drawer__summary-alert"]},testId:`${e.name}-customization-warning-alert`},`${e.name}-${d}`)})}var T=e.i(706896);function D({quantity:e,onQuantityChange:a,availability:t,quantities:l,quantitySelectorSettings:s,selectedServices:m,totalPrice:r,getServicePricingInfo:u,selectedComponent:c,testId:v="product-customization-drawer"}){let{currency:p,secondaryCurrency:N,displayCurrency:S}=(0,C.useStoreCurrency)(),b=(0,F.useLocale)(),{icons:I}=(0,o.getComponentsConfig)(),B=(0,d.useTranslations)("product.common"),j=(0,n.useMemo)(()=>m.map(e=>({service:e,pricingInfo:u(e,c)})),[m,c,u]),V=(0,n.useMemo)(()=>j.some(e=>e.pricingInfo.isQuantityTooltipVisible),[j]);return(0,i.jsxs)("div",{className:z.default["customization-drawer__summary"],children:[!!V&&(0,i.jsx)(w,{selectedServices:m,getServicePricingInfo:u,selectedComponent:c}
1),(0,i.jsx)(g.default,{value:e,onChange:a,availability:t,quantities:l,settings:s,classNames:{stepSelector:z.default["customization-drawer__quantity-selector"]},testId:`${v}-quantity-selector`}),j.length>0&&(0,i.jsx)("ul",{className:z.default["customization-drawer__summary-list"],children:j.map(({service:e,pricingInfo:a})=>{let{customizationTotalPrice:n,customizationTotalQuantity:t,minSingleCustomizationPriceQuantity:d,isQuantityTooltipVisible:l,hasSinglePrice:o,singleDefaultPrice:s}=a;return(0,i.jsx)("li",{children:(0,i.jsxs)("dl",{children:[(0,i.jsx)("dt",{children:e.name}),(0,i.jsx)("dd",{children:(0,i.jsx)(T.default,{classNames:{price:z.default["customization-drawer__summary-service-single-price"]},prices:n,quantityUnit:e.quantityUnit,minQuantity:d,hasSinglePrice:o,singleDefaultPrice:{defaultPrice:s,minQuantity:d}})}),(0,i.jsx)("dt",{children:B("quantity")}),(0,i.jsxs)("dd",{children:[!!l&&(0,i.jsx)(h.Tooltip,{placement:x.TooltipPlacement.Top,content:(0,i.jsx)(y.Text,{className:z.default["customization-drawer__min-quantity-tooltip"],children:B("serviceMinQuantity",{minQuantity:(0,P.formatQuantityUnit)({value:d,unit:e.quantityUnit}).formattedQuantityWithUnit})}),trigger:["click","hover"],classNames:{tooltip:"relative w-[2rem] h-[2rem]"},children:(0,i.jsx)(k.Image,{testId:`${e.id}-min-quantity-info`,src:I.info,fill:!0,filter:_.ImageFilter.Primary,alt:"min quantity"})}),"x"," ",(0,P.formatQuantityUnit)({value:t,unit:e.quantityUnit}).formattedQuantityWithUnit]})]})},`customization-service-${e.id}`)})}),(0,i.jsx)(f.Price,{label:B("total"),price:r,classNames:{priceContainer:z.default["customization-drawer__summary-total-price-container"],priceLabel:z.default["customization-drawer__summary-total-price-label"],price:z.default["customization-drawer__summary-total-price"]},testId:`${v}-total-price`,currency:p,displayCurrency:S,secondaryCurrency:N,locale:b})]})}var B=e.i(798843),j=e.i(23045);e.i(895160);var V=e.i(816368),A=e.i(235271);function L(e,i,a){let{maxSize:n,allowedTypes:t}=i;if(e.size>n){let i=(e.size/1024/1024).toFixed(2),t=(n/1024/1024).toFixed(2),d={type:"size",message:`File size (${i}MB) exceeds the maximum allowed size of ${t}MB`,file:e};return(0,V.showToast)(A.ToastType.Info,(({maxFileSizeMB:e,uploadFileSizeMB:i,translate:a})=>a("uploadFileSizeExceeded",{maxFileSizeMB:e,uploadFileSizeMB:i}))({uploadFileSizeMB:i,maxFileSizeMB:t,translate:a})),{isValid:!1,error:d}}if(t&&!(!t||Object.entries(t).some(([i,a])=>{if(e.type===i)return!0;if(a&&a.length>0){let i=`.${e.name.split(".").pop()?.toLowerCase()}`;return a.includes(i)}return!1}))){let i=Object.values(t).flat().join(", "),n={type:"type",message:`File type "${e.type}" is not allowed. Allowed types: ${i}`,file:e};return(0,V.showToast)(A.ToastType.Info,(({uploadFileType:e,allowedFileTypes:i,translate:a})=>a("uploadFileTypeNotSupported",{uploadFileType:e,allowedFileTypes:i}))({uploadFileType:e.type,allowedFileTypes:i,translate:a})),{isValid:!1,error:n}}return{isValid:!0}}var W=e.i(895685);e.i(240815);var U=e.i(839472);function $({classNames:e,maxFiles:a,accept:n=W.ALLOWED_FILE_TYPES,children:t,onDrop:l,onError:o,...s}){let{maxFileSize:m}=(0,U.getEnvVars)(),r=(0,d.useTranslations)("files.notifications"),{getRootProps:u,getInputProps:c}=(0,j.useDropzone)({accept:n,maxSize:m,maxFiles:a,multiple:!1,onDrop:(e,i)=>{if(i.length>0){let e=L(i[0].file,{maxSize:m,allowedTypes:n},r);!e.isValid&&e.error&&o&&o(e.error);return}if(e.length>0){let[i]=e,a=L(i,{maxSize:m,allowedTypes:n},r);if(!a.isValid){a.error&&o&&o(a.error);return}l(Object.assign(i,{preview:URL.createObjectURL(i)}))}},...s});return(0,i.jsxs)("div",{...u(),className:e?.fileUpload,children:[(0,i.jsx)("input",{...c()}),t]})}e.i(377974);var Q=e.i(932562),E=e.i(982664),G=e.i(876174),O=e.i(558930);function q({uploadedImage:e,error:a,onFileDrop:t,onDelete:l,testId:s="product-customization-image-upload"}){let{icons:m}=(0,o.getComponentsConfig)(),c=(0,d.useTranslations)("product.common"),v=(0,n.useMemo)(()=>e?.size&&(e.size/1048576).toFixed(2),[e]);return(0,i.jsxs)("div",{className:O.default["image-upload__container"],"data-testid":s,children:[(0,i.jsxs)($,{classNames:{fileUpload:(0,B.default)(O.default["image-upload"],{[O.default["image-upload--preview"]]:!v&&!!e,[O.default["image-upload--error"]]:!!a,[O.default["image-upload--preview-with-file-size"]]:v&&!!e})},onDrop:t,children:[!!e?.preview&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.Image,{className:O.default["image-upload__preview-image"],src:e.preview,alt:e.name,width:64,height:64}),(0,i.jsxs)("div",{className:O.default["image-upload__file-info-container"],children:[(0,i.jsxs)("div",{className:O.default["image-upload__file-info"],children:[(0,i.jsx)(y.Text,{className:O.default["image-upload__file-name"],component:E.TextComponent.P,children:e.name}),!(0,G.isNil)(v)&&(0,i.jsxs)(y.Text,{className:O.default["image-upload__file-size"],component:E.TextComponent.P,children:[v," MB"]})]}),(0,i.jsx)(r.IconButton,{onClickBtn:e=>{e.stopPropagation(),e.preventDefault(),l()},variant:u.IconButtonVariant.Default,icon:m.trashCan,testId:`${s}-delete-button`,ariaLabel:"Delete image",color:u.IconButtonColor.Primary})]})]}),!e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.Image,{src:m.cloud,width:24,height:24,alt:c("uploadImage")}),(0,i.jsxs)(y.Text,{className:O.default["image-upload__placeholder-text"],component:E.TextComponent.P,children:[(0,i.jsx)(y.Text,{className:O.default["image-upload__highlighted-placeholder-text"],component:E.TextComponent.Span,children:c("chooseFile")})," ",c("orDropHere")]}),(0,i.jsxs)(y.Text,{className:O.default["image-upload__file-formats"],component:E.TextComponent.Span,children:[c("fileFormats"),": .png, .jpg, .pdf .webp, .eps, .ai, .cdr, .tif, .tiff, .svg"]})]})]}),!!a&&(0,i.jsx)(Q.HelperText,{text:a,asError:!0})]})}var M=e.i(54085);e.i(765001),e.s([],353031);function R({components:e,selectedCustomizations:a,productImage:t,onSubmit:F,onClose:g,productQuantityPerProductUnit:_,customizationToEdit:f,initiallySelectedComponent:y,initiallySelectedLocation:h,initiallySelectedServices:x,initiallyUploadedImages:P,quantitySelectorQuantity:C,quantitySelectorSetQuantity:b,quantitySelectorAvailability:I,quantitySelectorQuantities:w,quantitySelectorQuantitySelectorSettings:T,testId:B="product-customization-drawer"}){let{icons:j}=(0,o.getComponentsConfig)(),V=(0,d.useTranslations)("product.common"),A=(0,d.useTranslations)("product.customization"),L=(0,N.useIsMobile)(),[W,U]=(0,n.use
1State)(C),$=(0,n.useCallback)(e=>{U(e),b(e)},[b]),{componentOptions:Q,locationOptions:E,componentServiceGroups:G=[],locationServiceGroups:O=[],selectedComponent:Z,selectedLocation:X,selectedServiceIdsByGroup:H,selectedServices:K,image:Y,totalPrice:J,uploadedImages:ee,formErrors:ei,handleComponentChange:ea,handleServiceChange:en,handleLocationChange:et,handleFullScreenImagePreview:ed,handleFileDrop:el,handleFileDelete:eo,handleSubmit:es,getServicePricingInfo:em,imagePreviewOverlay:er}=(0,S.useProductCustomizationDrawer)({components:e,productImage:t,quantitySelectorQuantity:W,selectedCustomizations:a,customizationToEdit:f,initiallySelectedComponent:y,initiallySelectedLocation:h,initiallySelectedServices:x,initiallyUploadedImages:P,onSubmit:F,onClose:g,productQuantityPerProductUnit:_}),eu=(0,n.useCallback)(e=>em(e,Z),[em,Z]);return(0,i.jsxs)("div",{className:z.default["customization-drawer"],"data-testid":B,children:[er,(0,i.jsxs)("div",{className:z.default["customization-drawer__body"],children:[(0,i.jsxs)("div",{className:z.default["customization-drawer__preview"],children:[!L&&(0,i.jsx)(k.Image,{className:z.default["customization-drawer__image"],src:Y,alt:"Product Preview",width:312,height:412,testId:`${B}-product-image`,onClick:()=>ed()}),!L&&(0,i.jsx)(D,{quantity:W,onQuantityChange:$,availability:I,quantities:w,quantitySelectorSettings:T,selectedServices:K,totalPrice:J,getServicePricingInfo:eu,selectedComponent:Z,testId:B})]}),(0,i.jsxs)("div",{className:z.default["customization-drawer__controls"],children:[(0,i.jsxs)("div",{className:z.default["customization-drawer__dropdown-group"],children:[(0,i.jsx)(c.Select,{id:"customization-component",label:`${A("component")}*`,options:Q,value:Z?.id??"",placeholder:A("component"),onChange:e=>ea(`${e}`),classNames:{selectWrapper:"w-full"},disabled:!!f,error:ei?.componentError,testId:`${B}-component-select`}),!!L&&(0,i.jsx)(r.IconButton,{onClickBtn:()=>ed(Z?.imageId),icon:j.imagePreview,variant:u.IconButtonVariant.Outlined,ariaLabel:"Component Image Preview",testId:`${B}-component-image-preview-button`})]}),G?.map((e,a)=>(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(M.default,{...e,value:H[e.id]||e?.value,onChange:i=>{en(e.id,"string"==typeof i?[i]:i)},error:ei?.serviceGroupErrors?.[e.id],testId:`${B}-component-service-group-select-${e.id}`,wrappedGetServicePricingInfo:eu}),!!e.isDisabled&&(0,i.jsx)(v.Alert,{type:p.AlertType.Warning,description:A("customizationWarningMessage"),testId:`${B}-component-service-group-select-${e.id}-warning-alert`})]},`customization-component-service-group-${e.id}-${a}`)),G?.length>0&&!!E&&E.length>0&&(0,i.jsx)("hr",{className:z.default["customization-drawer__separator"]}),!!E&&E.length>0&&(0,i.jsxs)("div",{className:z.default["customization-drawer__dropdown-group"],children:[(0,i.jsx)("div",{className:z.default["customization-drawer__select-container"],children:(0,i.jsx)(c.Select,{id:"customization-location",label:V("location"),options:E,placeholder:V("location"),onChange:e=>et(`${e}`),value:X?.id??"",disabled:!!f,error:ei?.locationError,classNames:{selectWrapper:"w-full"},testId:`${B}-location-select`})}),!!L&&(0,i.jsx)(r.IconButton,{onClickBtn:()=>ed(X?.imageId),variant:u.IconButtonVariant.Outlined,icon:j.imagePreview,ariaLabel:"Location Image Preview",testId:`${B}-location-image-preview-button`})]}),O?.map((e,a)=>(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(M.default,{...e,value:H[e.id]||e?.value,onChange:i=>{en(e.id,i)},error:ei?.serviceGroupErrors?.[e.id],testId:`${B}-location-service-group-select-${e.id}`,wrappedGetServicePricingInfo:eu}),!!e.isDisabled&&(0,i.jsx)(v.Alert,{type:p.AlertType.Warning,description:A("customizationWarningMessage"),testId:`${B}-location-service-group-select-${e.id}-warning-alert`}),!e.isMultiselect&&!!e.value&&!e.isDisabled&&e.services.find(i=>i.id===e.value)?.type===l.ProductServiceType.Printing&&(0,i.jsx)(q,{uploadedImage:"string"==typeof e.value?ee?.[e.value]:null,onFileDrop:i=>el({serviceGroupId:e.id,serviceId:e.value,file:i}),onDelete:()=>eo(e.value),error:ei?.imageUploadErrors?.[e.id],testId:`${B}-image-upload`})]},`customization-location-service-group-${e.id}-${a}`))]}),!!L&&(0,i.jsx)(D,{quantity:W,onQuantityChange:$,availability:I,quantities:w,quantitySelectorSettings:T,selectedServices:K,totalPrice:J,getServicePricingInfo:eu,selectedComponent:Z,testId:B})]}),(0,i.jsxs)("div",{className:z.default["customization-drawer__footer"],children:[(0,i.jsx)(s.Button,{classNames:{button:z.default["customization-drawer__cancel-button"]},onClickBtn:g,variant:m.ButtonVariant.Outlined,testId:`${B}-cancel-button`,ariaLabel:"Cancel",children:V("cancel")}),(0,i.jsx)(s.Button,{classNames:{button:z.default["customization-drawer__save-button"]},onClickBtn:es,isFullWidth:!0,ariaLabel:"Save",testId:`${B}-save-button`,children:V("save")})]})]})}e.s(["useProductCustomizationDrawerOverlay",0,function(){let[e,d]=(0,n.use
1State)(null);return{openProductCustomizationDrawer:(0,n.useCallback)(e=>d(e),[]),productCustomizationDrawerOverlay:(0,i.jsx)(t.AppOverlay,{isOpen:null!==e,onClose:()=>{e?.onClose?.(),d(null)},title:e?.title,shouldOpenDrawerOnDesktop:!0,testId:"product-customization",classNames:{drawerBody:"!px-0",drawerContent:"md:!w-full md:!max-w-[60rem] lg:!max-w-[72rem]"},children:null!==e?(0,i.jsx)(R,{...e,onClose:()=>{e.onClose?.(),d(null)},onSubmit:async i=>{try{await Promise.resolve(e.onSubmit(i))}catch(e){a.default.error({err:e},"Error submitting product customizations");return}e.onClose?.(),d(null)}}):null})}}],57006)},946618,e=>{"use strict";e.i(57006),e.s([])},508826,254333,e=>{"use strict";var i=e.i(583846);let a=(e=21)=>{let i="",a=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&a[e]];return i};var n=e.i(895685);e.i(895160);var t=e.i(816368),d=e.i(235271);e.i(440991);var l=e.i(776755);async function o(e,o){try{let i=e.filter(e=>e).map(e=>(Object.assign(e,{fileKey:a(),uploadId:a()}),e)).map(async e=>{let i=new FormData;return i.append("file",e),i.append("fileKey",`${e.fileKey||a()}.${e.name.split(".").pop()}`),i.append("fileName",e.name),e.type&&i.append("contentType",e.type),await (0,l.post)(n.FILE_UPLOAD_URL,i),e}),s=await Promise.all(i);return o&&(0,t.showToast)(d.ToastType.Success,o("uploadFileSuccess")),s}catch(e){return i.default.error({err:e},"[file-upload]"),o&&(0,t.showToast)(d.ToastType.Error,o("uploadFileFailure")),[]}}e.s(["uploadFiles",0,o],508826),e.i(240815);var s=e.i(839472);e.s(["buildFileUrl",0,function(e){let i,a="";e&&("string"==typeof e?i=e:(i=e.fileKey,e.fallbackImage&&(a=e.fallbackImage)));let{storefrontUrl:n}=(0,s.getEnvVars)();return i?`${n}/api/download-file?id=${i}`:a}],254333)}]);
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.