"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[924,2992],{13012:(e,t,o)=>{o.r(t),o.d(t,{default:()=>g});var r=o(55984),i=o(42540),l=o(59986),n=o(15532),c=o(62392),a=o(23012),d=o(47364),u=o(69720),s=o(46160),p=o(8108),m=o(56712),v=o(15016);const _=["cta","customSwiperOptions","einstein_recommendations","einstein_recommender","isComparable","product_to_product_product_id","products","products_in_a_category_category","title"],g=e=>{var t;let{cta:o,customSwiperOptions:g,einstein_recommendations:f=!1,einstein_recommender:y="products-in-all-categories",isComparable:b=!1,product_to_product_product_id:C,products:h,products_in_a_category_category:S,title:w}=e,P=(0,i.c)(e,_);const[E,O]=(0,p.useState)([]),{getRecommendations:x,recommendations:I}=(0,u.c)(),k=null==h?void 0:h.product_id,D=((e,t,o)=>(0,m._C)(e).with("product-to-product",(()=>t?"product-to-product":"products-in-all-categories")).with("products-in-a-category",(()=>o?"products-in-a-category":"products-in-all-categories")).with("viewed-recently",(()=>"viewed-recently")).otherwise((()=>"products-in-all-categories")))(String(y),String(C),String(S)),T=E.map((e=>e.product_id)).toString(),{data:R}=(0,c.M)({parameters:{c_productIds:T}},{enabled:!!T.length}),A=(null==R?void 0:R.coupons)??[],L=(0,m._C)(f).with(!0,(()=>{var e;return 0===E.length||(null==I||null===(e=I.recs)||void 0===e?void 0:e.some(((e,t)=>{var o;return e.id!==(null==E||null===(o=E[t])||void 0===o?void 0:o.product_id)})))})).otherwise((()=>0===E.length||(null==k?void 0:k.length)!==(null==E?void 0:E.length)||(null==k?void 0:k.some(((e,t)=>{var o;return e!==(null==E||null===(o=E[t])||void 0===o?void 0:o.product_id)}))))),F=(0,s.useProducts)({parameters:{ids:(null==k?void 0:k.join(","))||""}},{enabled:!(null==k||!k.length||f),keepPreviousData:!0}),{data:N}=(0,s.useProduct)({parameters:{id:String(C)}},{enabled:!!f&&"product-to-product"===D,keepPreviousData:!0});return(0,p.useEffect)((()=>{var e;if(!f&&null!==(e=F.data)&&void 0!==e&&e.data&&L){const e=F.data.data;O((0,d.cx)(e))}}),[f,null===(t=F.data)||void 0===t?void 0:t.data]),(0,p.useEffect)((()=>{f&&"product-to-product"===D&&N&&L&&x(D,[N])}),[N]),(0,p.useEffect)((()=>{f&&x(D,void 0,"products-in-a-category"===D?{categories:[{id:S}]}:{})}),[f,D,S]),(0,p.useEffect)((()=>{var e;f&&null!=I&&null!==(e=I.recs)&&void 0!==e&&e.length&&L&&O((0,d.cx)(I.recs))}),[f,I]),p.createElement(l.default,(0,r.c)({autoHeight:!1,cta:o,customSwiperOptions:g??{centeredSlides:!1,showScrollbar:!0,slidersPerClick:1,slidesPerView:{sm:1.8,md:2.5,lg:3.1}},dimensions:v.oX,slides:null==E?void 0:E.map(((e,t)=>p.createElement(n.c,{coupon:A.find((t=>t.productID===e.product_id)),isComparable:b,itemListName:w,key:t,product:e}))),sx:{".swiper":{px:a.c.baseStyle.px},".swiper-slide:not(:first-of-type) > div:first-of-type:not(:has(video))":{inset:0,mb:"-5",position:"absolute"}},title:w??void 0},P))}},50924:(e,t,o)=>{o.r(t),o.d(t,{default:()=>X});var r=o(94572),i=o(55984),l=o(42540),n=o(85416),c=o(85632),a=o(67888),d=o(13012),u=o(12572),s=o(7700),p=o(29464),m=o(87160),v=o(73944),_=o(4),g=o(5792),f=o(91116),y=o(62396),b=o(28472),C=o(212),h=o(40408),S=o(12820),w=o(2580),P=o(42560),E=o(95040),O=o(18400),x=o(11216),I=o(47364),k=o(21728),D=o(51552),T=o(29320),R=o(35080),A=o(87748),L=o(21280),F=o(21144),N=o(88636),j=o(46160),q=o(74932),W=o(71176),B=o(28336),$=o(82676),H=o(66592),U=o(8108),z=o(74500),K=o(24144),G=o(47480);const Z=["containerWidth","enableContainer"];function J(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function M(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?J(Object(o),!0).forEach((function(t){(0,r.c)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):J(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}const Y=()=>{var e,t,o,r,n,a,_,b,h,S,k,R,A;const{res:L}=(0,W.useServerContext)(),B=(0,K.IT)(),{productId:H}=(0,K.W4)(),{locale:J}=(0,N.c)(),[Y,X]=(0,U.useState)(!1),ee=null!=H&&H.includes("-")?(null==H||null===(e=H.replace(".html","").split("-"))||void 0===e?void 0:e.at(-1))??"":H,{data:te}=(0,$.U)({queryFn:(0,f.A)({document:G.uJ,variables:{locale:J.id.toLocaleLowerCase()}}),queryKey:["pdp global information",J.id]}),{data:oe}=(0,y.I)({document:G.oy,variables:{id:ee,locale:J.id.toLocaleLowerCase()}},[G.YZ,G._O,G.ak,G._w,G.Ir],"all_pdp"),re=(0,U.useRef)(null),ie=null==te||null===(t=te.all_global_page_information)||void 0===t?void 0:t.items,le=null==ie||null===(o=ie.filter((e=>"pdp-auto-replenishment-information"===(null==e?void 0:e.pwa_id))))||void 0===o?void 0:o[0],ne=new URLSearchParams(B.search).get("pid")||ee,{data:ce,error:ae,isError:de}=(0,j.useProduct)({parameters:{id:ne,locale:J.id}},{keepPreviousData:!0}),ue=(0,C.c)([{product:ce,type:"product"}]),{t:se}=(0,z.Gy)();if(de){var pe;const e=null==ae||null===(pe=ae.response)||void 0===pe?void 0:pe.status;if(404===e)throw new q.HTTPNotFound("Product Not Found");throw new q.HTTPError(e,`HTTP Error ${String(e)} occurred.`)}L&&L.set("Cache-Control",`max-age=${g.QD}`);const me=(null==ce?void 0:ce.c_readyToOrder)&&ce.c_available&&ce.c_sellable,ve=null==oe||null===(r=oe.all_pdp)||void 0===r||null===(n=r.items)||void 0===n||null===(a=n[0])||void 0===a?void 0:a.seo;if((0,U.useEffect)((()=>{var e,t;(0,E.G)({pageType:g.CW.PRODUCT.ns}),null!=ce&&ce.name&&((0,w.g)("detail",J.id,{pi:ce.id}),(0,E.G)({currency:ce.c_price.sales.currency,ecommerce:{items:[(0,O.S)({c_displayCategories:ce.c_displayCategories,c_price:ce.c_price,index:0,list_price:null===(e=ce.c_price)||void 0===e||null===(t=e.list)||void 0===t?void 0:t.value,price:ce.c_price.sales.value,productId:ce.id,productName:ce.name})]},event:"view_item",value:ce.c_price.sales.value}))}),[!(null==ce||!ce.name)]),null!=ce&&ce.name&&!H.includes("-"))return U.createElement(K.YJ,{to:`/${J.id.toLowerCase()}${(0,P.u)(ce.name,ee)}`});const _e=F.q.ProductSpecifications,{containerWidth:ge,enableContainer:fe}=_e,ye=(0,l.c)(_e,Z),be=`${null!=ce&&ce.c_ecomTitle?ce.c_ecomTitle:(null==ce?void 0:ce.name)||""} ${null!=ce&&ce.c_ecomSubTitle?null==ce?void 0:ce.c_ecomSubTitle:""}`,Ce=se("pdp.productSpecifications.productName").replace("{{productName}}",be);return U.createElement(U.Fragment,null,U.createElement(v.c,(0,i.c)({},ve,{page_description:(null==ve?void 0:ve.page_description)??(null==ce?void 0:ce.pageDescription),page_title:(null==ve?void 0:ve.page_title)??(null==ce?void 0:ce.pageTitle),structuredData:ue})),U.createElement(V,{product:ce}),U.createElement(Q,{heroRef:re,isPromoCouponChecked:Y,product:ce}),(null==ce?void 0:ce.c_primaryCategoryDisplayName)&&ce.primaryCategoryId&&U.createElement(D.q,null,U.createElement(c.c,{links:[{href:`/category/${ce.primaryCategoryId}`,label:ce.c_primaryCategoryDisplayName}]})),U.createElement(s.c,(0,i.c)({autoReplenishmentInformation:le},(0,I.us)(ce),{isOldContent:(0,x.mq)(ce),isPromoCouponChecked:Y,product:ce,productId:ee,productIsAvailable:!!me,ref:re,setIsPromoCouponChecked:X})),ce&&U.createElement(U.Fragment,null,null!=oe&&null!==(_=oe.all_pdp)&&void 0!==_&&null!==(b=_.items)&&void 0!==b&&null!==(h=b[0])&&void 0!==h&&h.dynamicComponents?U.createElement(U.Fragment,null,!(null!=oe&&null!==(S=oe.all_pdp)&&void 0!==S&&null!==(k=S.items)&&void 0!==k&&null!==(R=k[0])&&void 0!==R&&null!==(A=R.dynamicComponents)&&void 0!==A&&A.find((e=>"PdpModularBlocksProductSpecifications"===(null==e?void 0:e.__typename))))&&U.createElement(D.q,{my:20,width:"8xl"},U.createElement(p.default,{mappedAttributes:ce.c_attributes,productName:Ce,productReviewId:ce.c_productReviewFamily??ce.id,pwrFeedlessProduct:ce,reviewCount:ce.c_PRRatingsCount})),oe.all_pdp.items[0].dynamicComponents.map(((e,t)=>{var o,r,i,l;return null!==e?U.createElement(m.c,{component:e,componentConfig:M(M({},F.q),{},{ComparisonSection:M(M({},F.q.ComparisonSection),{},{category:ce.primaryCategoryId,defaultProductId:ce.id,isComparisonPage:!1}),ProductBundleSection:M(M({},F.q.ProductBundleSection),{},{bonusProducts:ce.c_bonusProducts,image:(0,x.mq)(ce)?null===(o=ce.c_imagesZoom)||void 0===o||null===(r=o["hi-res"])||void 0===r?void 0:r[0]:null===(i=ce.c_imagesRedesignZoom)||void 0===i||null===(l=i["hi-res"])||void 0===l?void 0:l[0],mainProduct:(0,I.B1)(ce,!1),productIsAvailable:me,recommendedProducts:ce.c_defaultRecommendations,sellableStatus:ce.c_sellableStatus}),ProductSpecifications:M(M({},F.q.ProductSpecifications),{},{mappedAttributes:ce.c_attributes,productName:Ce,productReviewId:ce.c_productReviewFamily??ce.id,pwrFeedlessProduct:ce,reviewCount:ce.c_PRRatingsCount})}),key:t}):null}))):U.createElement(T.kv,{display:"flex",flexDirection:"column",gap:20,mb:20},U.createElement(D.q,null,ce.c_attributes&&U.createElement(p.default,(0,i.c)({mappedAttributes:ce.c_attributes,productName:Ce,productReviewId:ce.c_productReviewFamily??ce.id,pwrFeedlessProduct:ce,reviewCount:ce.c_PRRatingsCount},ye)),U.createElement(u.default,{cta_link:[{internal_link:{internal_linkConnection:{edges:[{node:{url:g.Oe}}]}}}],description:se("pdp.partsAndSupplies.description","Keep your vacuum running with original BISSELL® parts & supplies"),link_label:se("pdp.partsAndSupplies.linkLabel","Shop now"),title_variant:[{regular_title:{title:se("pdp.partsAndSupplies.title","Shop parts & supplies")}}]})),U.createElement(d.default,{einstein_recommendations:!0,einstein_recommender:"product-to-product",product_to_product_product_id:ee,title:se("pdp.carousel.title","Shop other products")}))))},Q=({heroRef:e,isPromoCouponChecked:t,product:o})=>{const r=(0,H.c)(e),{data:i}=(0,B.C)(),{data:l}=(0,b.E)({parameters:{c_productId:String(null==o?void 0:o.id)}},{enabled:!(null==o||!o.id)});return U.createElement(n.c,{justifyContent:"space-between",visible:!r},(({isSmall:e})=>U.createElement(U.Fragment,null,U.createElement(R._,{as:"span",color:"blue",display:"flex",flexDirection:"column",sx:S.We.terminaSmall},U.createElement(A.a,{as:"span",fontSize:null!=o&&o.c_ecomTitle?{}:{base:"xs",md:"sm"},fontWeight:"bold"},U.createElement(k.m,{fontSize:"xs",text:null!=o&&o.c_ecomTitle?o.c_ecomTitle:(null==o?void 0:o.name)||""})),(null==o?void 0:o.c_ecomSubTitle)&&U.createElement(A.a,{as:"span",fontSize:"xxs",fontWeight:"medium",textAlign:"center",textTransform:"uppercase"},U.createElement(k.m,{fontSize:"xxs",text:o.c_ecomSubTitle,top:"-4px"}))),U.createElement(L.C,{alignItems:"center",gap:{base:1,lg:2}},o&&U.createElement(U.Fragment,null,U.createElement(a.c,{basketId:null==i?void 0:i.basketId,coupon:null==l?void 0:l.coupon,hidePrice:e,isPromoCouponChecked:t,minWidth:"fit-content",product:o,variant:"withPrice"}),U.createElement(_.c,{productId:o.id}))))))},V=({product:e})=>{const t=(0,h.i)((e=>e.setProducts));return(0,U.useEffect)((()=>{e&&t({products:[e]})}),[]),null};Y.getTemplateName=()=>"pdp";const X=Y}}]);