PageSourceSearch

https://www.bestofsigns.com/_next/static/chunks/17171.20260923.dda3abd01acf7e44.js

js bestofsigns.com collected 2026-09-26 00:25:31 UTC 51,887 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17171],{17171:function(t,e,i){i.r(e),i.d(e,{default:function(){return tr}});var o=i(85893),a=i(1864),s=i.n(a),n=i(67294),d=i(45697),l=i.n(d),r=i(2664),u=i(11752),p=i.n(u),c=i(22031),h=i(69441),v=i(19601),g=i(32374),m=i(73935),_=i(93967),P=i.n(_),y=i(14890),O=i(68652),w=i(84144),D=i(66261),b=i(21438),f=i(7107),S=i(57014),k=i(47394),x=i(45248),T=i(47037),C=i(42829),j=i(15261),I=i(33804),N=i(70075);i(4925);var A=i(76437),z=i(58495),B=i(17185),R=i(34171),q=i(7754),L=i(82870),H=i(66741),U=i(84169),G=i(63910),M=i(18863),Z=i(54595),E=i(53493),F=i(24743),Q=i(62266),K=i(94389),V=i(91138),W=i(4725),Y=i(55473),$=i(12643),X=i(22018),J=i(83399);let{publicRuntimeConfig:tt}=p()(),te="";class ti extends n.Component{async componentDidMount(){var t,e,i,o,a,s;let{reviewOptions:n}=this.props;if(this.initiateOptionState(n),this.setState({mode:(0,B.z_)()}),window.addEventListener("resize",this.onResize),window.addEventListener("scroll",this.onScroll),((null===(t=this.props.productData)||void 0===t?void 0:t.child_products)&&(null===(i=this.props)||void 0===i?void 0:null===(e=i.productData)||void 0===e?void 0:e.child_products.length)>0||(null===(o=this.props.productData)||void 0===o?void 0:o.package_child_options)&&(null===(s=this.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:a.package_child_options.length)>0)&&(this.handleFetchChildPkgProducts(),this.setState(t=>({...t,isDisplayPackageProduct:!0}))),te=window.requestAnimationFrame?window.requestAnimationFrame.bind(window):t=>setTimeout(t,16),this.props.isAbUrl){let t=(0,b.createHeader)(this.props.storedata),e=await this.props.actions.getArtworkTwoSideOptionList(t);this.setState({twoSidedOptionsList:(null==e?void 0:e.data)||[]})}}componentWillUnmount(){window.removeEventListener("resize",this.onResize),window.removeEventListener("scroll",this.onScroll)}async handleFetchChildPkgProducts(){var t,e,i,o,a,s,n,d;let l={isNewPDP:this.props.isNewPDPOptionPage||this.props.isNewReviewOptionPage?1:0};!1==this.props.isLogin?l.price=(null===(s=this.props.productData)||void 0===s?void 0:s.price)&&(null===(n=this.props.productData)||void 0===n?void 0:n.price[0])&&(null===(d=this.props.productData)||void 0===d?void 0:d.price[0].product_base_price)||0:l.price=this.state.initialPrice||0;let r=(0,b.createHeader)(this.props.storedata),u=null===(e=this.props.productData)||void 0===e?void 0:null===(t=e.package_child_options)||void 0===t?void 0:t.filter((t,e,i)=>i.findIndex(i=>{var o,a;return(null==i?void 0:null===(o=i.graphicsOption)||void 0===o?void 0:o.sku)===(null==t?void 0:null===(a=t.graphicsOption)||void 0===a?void 0:a.sku)===e})).map(t=>{var e;let i=null===(e=this.props.productData)||void 0===e?void 0:e.child_products.find(e=>{var i,o,a,s;return(null==t?void 0:t.hasGraphicsOption)?null==t?void 0:null===(o=t.graphicsOption)||void 0===o?void 0:null===(i=o.sku)||void 0===i?void 0:i.includes(e.sku):(null==t?void 0:t.hasHardwareOption)?null==t?void 0:null===(s=t.hardwareOption)||void 0===s?void 0:null===(a=s.sku)||void 0===a?void 0:a.includes(e.sku):void 0});return{...t,...i}}),p=(null===(i=this.props)||void 0===i?void 0:i.eventType)==4?u||[]:(null===(a=this.props)||void 0===a?void 0:null===(o=a.productData)||void 0===o?void 0:o.child_products)||[],c=async(t,e,i)=>{var o,a,s,n,d;let u={isDesignOnline:this.state.isDesignOnline,cdtSizeData:this.state.cdtSizeData,isNewPDPOptionPage:null===(o=this.state)||void 0===o?void 0:o.isNewPDPOptionPage,isNewReviewOptionPage:null===(a=this.state)||void 0===a?void 0:a.isNewReviewOptionPage};try{let o=await (0,f.SD)({...l,sku:e},r).then(e=>{let o=null==e?void 0:e.data;return o=e.data,{id:i,options:{...o,...t}}}),a=(null==o?void 0:null===(s=o.options)||void 0===s?void 0:s.option)||{},p=null==a?void 0:a.hasHardwareOption,c=null==a?void 0:null===(n=a.hardwareOption)||void 0===n?void 0:n.options,h=null==a?void 0:a.hasGraphicsOption,v=null==a?void 0:null===(d=a.graphicsOption)||void 0===d?void 0:d.options;if("graphicsOption"in a||"hardwareOption"in a){let t=p&&!c,e=h&&!v;t&&void 0===h||e&&void 0===p||t&&e?o.showCustomizeLink=!1:o.showCustomizeLink=!0}let g=await (0,f.CJ)({...l,sku:e},r).then(e=>({id:i,sizes:{...null==e?void 0:e.data,...t}})),m=(0,x.OL)({...o.options,...null==g?void 0:g.sizes,...u}),_=await this.props.actions.getProductPrice(m,r).then(e=>({id:i,optionsPrice:{...null==e?void 0:e.data,...t}}));return{...o,...g,..._}}catch(t){return console.log("package=>child product fetching error",t),console.error("package=>child product fetching error",t)}};Promise.all(p.map((t,e)=>c(t,null==t?void 0:t.sku,e+1))).then(async t=>{var e;t.length>0&&await this.loadPrice();let i=t.filter(Boolean).map((t,e)=>({...t,id:e+1}
1)),o=[];4==this.props.eventType&&(o=i.map(t=>{let e=p.find(e=>{var i;return e.sku===(null==t?void 0:null===(i=t.options)||void 0===i?void 0:i.sku)});if(e){var i,o,a,s,n,d,l;return{...t,options:{...null==t?void 0:t.options,option:{...null==t?void 0:null===(i=t.options)||void 0===i?void 0:i.option,graphicsOption:null!==(d=null==e?void 0:e.graphicsOption)&&void 0!==d?d:null==t?void 0:null===(a=t.options)||void 0===a?void 0:null===(o=a.option)||void 0===o?void 0:o.graphicsOption,hardwareOption:null!==(l=null==e?void 0:e.hardwareOption)&&void 0!==l?l:null==t?void 0:null===(n=t.options)||void 0===n?void 0:null===(s=n.option)||void 0===s?void 0:s.hardwareOption}}}}return t}));let a=2==this.props.eventType?o:i;(null===(e=this.props)||void 0===e?void 0:e.eventType)==4?this.setState(t=>{var e,i,o,s;return{childPkgProductData:[...Array.isArray(t.childPkgProductData)?t.childPkgProductData:[],...a],quantity:{...t.quantity,default_value:null===(s=this.props)||void 0===s?void 0:null===(o=s.productData)||void 0===o?void 0:null===(i=o.child_products)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.parent_product_qty}}}):this.setState(t=>({childPkgProductData:[...Array.isArray(t.childPkgProductData)?t.childPkgProductData:[],...a]}))}).catch(t=>{console.error("Error fetching child product data:",t)})}getButtonStatus(){let{option:t,isOptionLoaded:e,responseMessage:i}=this.state;return!i&&(!0!=e||!0!=t.hasGraphicsOption||!0!=t.hasHardwareOption||!!((0,w.Z)(t.graphicsOption.selection.child_options,{selected:!0,display_options:!0})||(0,w.Z)(t.hardwareOption.selection.child_options,{selected:!0,display_options:!0})))}scrollTop(){if(document&&window){let t=(document.getElementById("errorScrollHere")&&document.getElementById("errorScrollHere").getBoundingClientRect()).top+window.pageYOffset;D.default.animateScroll.scrollTo(t)}}setShowDiv(t){this.state.showBorderTop!==t&&this.setState({showBorderTop:t})}render(){let{is_size:t,sku:e,singleOptionsData:i,sizes:a,selectedOption:s,is_option:d,option:l,isOptionLoaded:r,user_comment:u,errorCode:p,selectedPdpPopupInfo:c,showproductInfoPopup:h,isSKUChanged:v,uploadRequiredErr:g,responseMessage:m,show_user_comment_box:_,enable_product_combination:y,download_template:O,showOrientationBasedSizes:w,popupAddedClass:D,childPkgProductData:b,activePkgProduct:f,isDisplayPackageProduct:S}=this.state,{reviewType:k,priceData:T,storedata:N,breadcrumbsData:z,productData:B,isReviewPage:L,isPrintready:G,eventType:tt,pageRouteUrl:te,yotpoData:ti,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,isAbUrl:ts}=this.props,tn=this.state.responseMessage||g,td=!0==d&&(null==l?void 0:l.hasHardwareOption)==!0&&(null==l?void 0:l.defaultOption)=="hardwareOption",tl=!0==d&&!0==l.hasGraphicsOption,tr=!0==d&&(null==l?void 0:l.hasHardwareOption)==!0&&"hardwareOption"!=l.defaultOption,tu=!0==d&&!0==l.hasCustomOption,tp=4==tt?"Admin_Edit":"Admin_Add",tc="designtool"===k,th=ts&&(ts||N.deviceType<3);if(!0!=r)return"";{var tv,tg,tm,t_,tP,ty,tO;let d=l&&!0==l.hasGraphicsOption&&!0==l.hasHardwareOption;return(0,o.jsx)(n.Fragment,{children:(0,o.jsxs)(C.Z,{className:"productOptionsMainBox ".concat(ts?"productOptionsMainBoxabUrl":""),ref:t=>this.stickyBox=t,children:[L&&(0,o.jsxs)("div",{className:"pageTitleBox productReviewTitleBox",children:[(0,o.jsx)("h2",{children:"Review Product"}),(0,o.jsx)("p",{children:"Finishing options shown in the preview can be different than your selection. This preview is solely for the purpose of viewing the design in a lifestyle setting."})]}),(1==N.deviceType||2==N.deviceType)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"productInfoGroup productInfoMobileBox orderaddeditcase  mobileTabcase",children:(0,o.jsx)(M.default,{productData:B,yotpoData:ti,storedata:N,isNewReviewOptionPage:ta,isNewPDPOptionPage:to,breadcrumbsData:z,gallery:null==B?void 0:B.np_gallery,eventType:tt,pageRouteUrl:te,setActiveTab:null===(tv=this.props)||void 0===tv?void 0:tv.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info")}),(0,o.jsx)("div",{className:"clearfix"})]}
1),(0,o.jsx)("div",{className:P()("productGalleryBox","sticky-box",this.state.mode,{"is-sticky":this.state.isSticky||!0}),children:this.renderGallerySection()}),(0,o.jsxs)("div",{className:"newCROOptionBox ".concat(ts?"newCROOptionBoxAburl":""),children:[(null===(tm=this.newProductPrice)||void 0===tm?void 0:null===(tg=tm.state)||void 0===tg?void 0:tg.displaySelectOptions)?(0,o.jsx)("div",{className:"pricePopupOverlay"}):"",tn&&(0,o.jsx)(H.default,{content:this.state.responseMessage?m:g||"",alerttype:"danger"}),!0===G?1!=N.deviceType&&2!=N.deviceType?(0,o.jsxs)("div",{className:"productInfoGroup orderaddeditcase editdesktcase",children:[(0,o.jsx)(M.default,{productData:B,yotpoData:ti,storedata:N,isNewReviewOptionPage:ta,isNewPDPOptionPage:to,breadcrumbsData:z,gallery:null==B?void 0:B.np_gallery,pageRouteUrl:te,eventType:tt,setActiveTab:null===(t_=this.props)||void 0===t_?void 0:t_.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info")," "]}):(0,o.jsx)(o.Fragment,{}):(0,o.jsx)("div",{className:"productInfoGroup orderaddeditcase pdpcase",children:1!=N.deviceType?(0,o.jsx)(M.default,{productData:B,yotpoData:ti,storedata:N,isNewPDPOptionPage:to,breadcrumbsData:z,gallery:null==B?void 0:B.np_gallery,pageRouteUrl:te,eventType:tt,setActiveTab:this.props.setActiveTab,customerGroupId:this.props.customerGroupId,pdpOffer:this.state.pdpOffer,isAdminPage:!0,isDisplayPackageProduct:S},"product-info"):(0,o.jsx)(o.Fragment,{})}),(0,o.jsxs)("div",{className:"newPDPOptionBox ".concat(ts?"newPDPOptionBoxAnUrl":""),children:[(0,o.jsxs)("div",{className:"optionControlGroupBox",style:this.state.isLoadingStatus?{pointerEvents:"none"}:{},children:[(0,o.jsx)("div",{style:{display:r?"initial":!0===v?"initial":"none"},children:(0,o.jsxs)("div",{style:!1==r?{opacity:"0.3"}:{},children:[(0,o.jsx)(A.default,{storedata:N,combinationTypes:this.state.combinationTypes,handleOptionChange:this.handleOptionChange,setCombinationTypes:this.setCombinationTypes,productData:this.props.productData,isOptionsAvailable:this.state.option,isDisplayPackageProduct:S,isAbUrl:ts}),S&&(null==b?void 0:b.length)>0&&(0,o.jsx)(X.default,{childPkgProductData:b,activePkgProduct:f,handleChangeActivePkgProduct:this.handleChangeActivePkgProduct,handleOptionChange:this.handleOptionChange,isPrintreadyDesign:tc,enable_product_combination:y,storedata:N,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==B?void 0:B.name,pageType:tp,eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,sku:B.sku,productCategory:z},breadcrumbsData:z,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,productData:B,combinationTypes:this.state.combinationTypes,isLoadingStatus:this.state.isLoadingStatus}),1==t&&(0,o.jsx)(o.Fragment,{children:ts?(0,o.jsx)(V.default,{data:a,handleChange:this.handleChange,selectedOption:s,isDisabled:tc,onBlur:this.onOptionBlur,eventType:tt,errorCode:p,isDisplayOrientation:this.state.isDisplayOrientation,orientation:this.state.orientation,config:{pOptionData:x.kH,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,isReviewPage:L,productCategory:z,mainProductName:null==B?void 0:B.name,sku:null==B?void 0:B.sku},storedata:N,salePriceData:null==T?void 0:T.sale_price,orientationBasedSizes:this.state.orientationBasedSizes,handleOrientationChange:this.handleOrientationChange,sizeTabChange:this.sizeTabChange,handleSizeTab
1Change:this.handleSizeTabChange,show_orientation:w,isAbUrl:ts},"NewPDPSizeSectionForAB"):(0,o.jsx)($.default,{data:a,handleChange:this.handleChange,selectedOption:s,isDisabled:tc,onBlur:this.onOptionBlur,eventType:tt,errorCode:p,isDisplayOrientation:this.state.isDisplayOrientation,orientation:this.state.orientation,config:{pOptionData:x.kH,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,isReviewPage:L},storedata:N,salePriceData:null==T?void 0:T.sale_price,orientationBasedSizes:this.state.orientationBasedSizes,handleOrientationChange:this.handleOrientationChange,sizeTabChange:this.sizeTabChange,handleSizeTabChange:this.handleSizeTabChange,show_orientation:w},"NewPDPSizeSection")}),!t&&O&&(0,o.jsx)(R.Z,{templateUrl:O},"download-template"),(0,o.jsx)(j.Z,{className:"pdpoptionpanel productAddPanelBox ".concat(ts?"pdpoptionpanelAburl":""),children:(0,o.jsxs)(I.e,{shouldRenderAsPanel:th,clickOnArrowOnly:!0,activeKey:"pdp"===this.state.pdpVsAddonOpenGroup?this.state.pdpOpenPanelKey:null,onSelect:this.handlePdpAddonAccordionPdpSelect,children:[td&&!S&&(0,o.jsx)(q.default,{uniqueKey:"hardware-priority-optionsection",data:l.hardwareOption,handleOptionChange:this.handleOptionChange,type:"hardwareOption",isPrintreadyDesign:tc,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.hardwarePrice,enable_product_combination:y,storedata:N,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.hardwareOption&&l.hardwareOption.options&&l.hardwareOption.options.length>0,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==B?void 0:B.name,pageType:tp,eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,sku:B.sku,productCategory:z},highlightClass:null==D?void 0:D.hardwareOptionClass,breadcrumbsData:z,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:ts,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tl&&!S&&(0,o.jsx)(q.default,{uniqueKey:"graphic-optionsection",data:l.graphicsOption,handleOptionChange:this.handleOptionChange,type:"graphicsOption",isPrintreadyDesign:tc,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.graphicsPrice,enable_product_combination:y,storedata:N,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.graphicsOption&&l.graphicsOption.options&&l.graphicsOption.options.length>0,onBlur:this.onOptionBlur,toggleProductInfoPopup:this.toggleProductInfoPopup,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==B?void 0:B.name,pageType:tp,eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,sku:B.sku,productCategory:z},highlightClass:null==D?void 0:D.graphicsOptionClass,breadcrumbsData:z,uploadRequiredErr:this.state.uploadRequiredErr,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:ts,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tr&&!S&&(0,o.jsx)(q.default,{uniqueKey:"hardware-optionsection",data:l.hardwareOption,handleOptionChange:this.handleOptionChange,type:"hardwareOption",isPrintreadyDesign:tc,optionPrice:null==T?void 0:T.options_price,headerPrice:null==T?void 0:T.hardwarePrice,enable_product_combination:y,storedata:N,addSeparator:!0==l.hasGraphicsOption&&!0==l.hasHardwareOption||l.hardwareOption&&l.hardwareOption.options&&l.hardwareOption.options.length>0,onBlur:this.onOptionBlur,isHeaderHidden:d,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==B?void 0:B.name,pageType:tp,eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,sku:B.sku,productCategory:z},highlightClass:null==D?void 0:D.hardwareOptionClass,breadcrumbsData:z,uploadRequiredErr:this.state.uploadRequiredErr,toggleProductInfoPopup:this.toggleProductInfoPopup,isReviewPage:this.props.isReviewPage,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:ts,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv}),tu&&!S&&(0,o.jsx)(U.default,{productName:null==B?void 0:B.name,data:l.customOption,handleOptionChange:this.handleOptionChange,type:"customOption",storedata:N,optionPrice:null==T?void 0:T.options_price,enable_product_combination:y,onBlur:this.onOptionBlur,config:{datalayer:!0,customerId:this.props.customerId,isPrintready:this.props.isPrintready,pOptionData:x.kH,mainProductName:null==B?void 0:B.name,pageType:tp,eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta,sku:B.sku,productCategory:z},breadcrumbsData:z,toggleProductInfoPopup:this.toggleProductInfoPopup,setGalleryHoverImage:this.setGalleryHoverImage,isAbUrl:ts,twoSideOptions:this.state.twoSidedOptionsList,setShowDiv:this.setShowDiv},"custom-optionsection")]})},"pdpOptionsPanel"),!0===_&&_&&!ts&&(0,o.jsx)("div",{className:"newCommentBox commentMainBox",children:(0,o.jsxs)("div",{className:"formGroup",children:[(0,o.jsx)("label",{htmlFor:"user_comment",children:"Specific Instru
1ctions (Optional)"}),(0,o.jsx)("textarea",{id:"user_comment",className:"textinstruction",name:"user_comment",value:u,onChange:t=>this.onCommentChange(t.target.name,t.target.value),onMouseDown:t=>t.target.focus()})]})}),!S&&(0,o.jsx)(Z.Z,{singleOptionsData:i,isAbUrl:ts,showBorderTop:this.state.showBorderTop&&ts}),(0,o.jsx)("div",{className:"newCommentBox commentMainBox",style:{display:"none"},children:(0,o.jsxs)("div",{className:"formGroup",children:[(0,o.jsx)("label",{htmlFor:"hidden_attribute",children:"Hidden Attribute"}),(0,o.jsx)("textarea",{id:"hidden_attribute",className:"textinstruction",name:"hidden_attribute",value:this.state.otherParams.hidden_attribute,onChange:t=>this.onCommentChange(t.target.name,t.target.value),onMouseDown:t=>t.target.focus()})]})}),h&&(0,o.jsx)(E.Z,{onClose:t=>this.toggleProductInfoPopup(t),data:null==c?void 0:c.option,handleOptionChange:this.handleOptionChange,isPrintreadyDesign:tc,storedata:N,type:null==c?void 0:c.type,isHeader:null==c?void 0:c.isHeader,config:{eventType:tt,isNewPDPOptionPage:to,isNewReviewOptionPage:ta},isAbUrl:ts})]})}),!1==r&&!1===v&&(0,o.jsx)(F.Z,{}
1),Object.keys(this.state.quantity).length>0&&!(null===(tP=this.state.quantity)||void 0===tP?void 0:tP.is_remove_qty)&&1==N.deviceType&&!ts&&(0,o.jsxs)("div",{className:"QuantityMobileBox ".concat(ts?"QuantityMobileBoxAburl":""),children:[(0,o.jsx)("label",{children:"Quantity"}),(0,o.jsx)(Q.default,{data:this.state.quantity,handleChange:this.handleChange,storedata:N,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:to,isNewReviewOptionPage:ta},className:to||ta?"newQuantityBox":"ReadMoreText",productData:B,discountText:"Save More"},"quantitybox")]}),1==tt&&(null===(ty=this.state.shippingDetail)||void 0===ty?void 0:ty.enable_pdp_page_shipping_option)&&!ts&&(0,o.jsx)(K.Z,{priceData:T,productData:B,stateData:this.state,productType:""}),!S&&(0,o.jsx)(W.Z,{data:this.state.quantity,handleChange:this.handleChange,storedata:N,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:to,isNewReviewOptionPage:ta},className:to||ta?"newQuantityBox":"ReadMoreText",productData:B,discountText:"Save More",isAbUrl:ts,priceData:T}),Object.keys(this.state.quantity).length>0&&!(null===(tO=this.state.quantity)||void 0===tO?void 0:tO.is_remove_qty)&&1==N.deviceType&&ts&&(0,o.jsxs)("div",{className:"QuantityMobileBox ".concat(ts?"QuantityMobileBoxAburl":""),children:[(0,o.jsx)("label",{children:"Quantity"}),(0,o.jsx)(Q.default,{data:this.state.quantity,handleChange:this.handleChange,storedata:N,onBlur:this.onOptionBlur,config:{pOptionData:x.kH,isNewPDPOptionPage:to,isNewReviewOptionPage:ta},className:to||ta?"newQuantityBox":"ReadMoreText",productData:B,discountText:"Save More"},"quantitybox")]}),(0,o.jsx)("div",{className:"clearfix"})]}),(0,o.jsx)(Y.Z,{className:P()(!0==this.state.displaySelectOptions?"productPriceMainBox BtnPricePopup":"productPriceMainBox","sticky-box",this.state.mode,{"is-sticky":this.state.isSticky||!0},{UploadPopup:this.state.showUploadArtworkPopup}),children:(0,o.jsx)(J.default,{isLoadingStatus:this.state.isLoadingStatus,buttonStatus:this.getButtonStatus(l,r),onClickUpdateOrder:this.onClickUpdateOrder,isPrintready:G,eventType:tt,sku:e,priceData:T,breadcrumbsData:z,quantity:this.state.quantity,isNewPDPOptionPage:this.state.isNewPDPOptionPage,isNewReviewOptionPage:this.state.isNewReviewOptionPage,productData:this.props.productData,handleChange:this.handleChange,onOptionBlur:this.onOptionBlur,ctaLoader:this.state.ctaLoader,option:l})})]})]})]})})}}constructor(t){var e;
1super(t),e=this,this.handleSizeTabChange=t=>{this.sizeTabChange=t},this.onResize=()=>{te(()=>{this.setState({mode:(0,B.z_)(this.state.deviceMediumMinWidthInPixels),isSticky:!1})})},this.onScroll=()=>{let t=m.findDOMNode(this.stickyBox);t&&te(()=>{let e=t.getBoundingClientRect(),i=this.state.isSticky;if("is-bottom"===this.state.mode&&e.top>=-1&&e.top<=1)i=!0;else if("is-bottom"===this.state.mode){let t=Math.max(window.innerHeight,0);i=e.bottom+250>=t}i!==this.state.isSticky&&this.setState({isSticky:i})})},this.initiateOptionState=t=>{var e,i,o,a,s,n,d,l;let{productData:r,isPrintready:u}=this.props;if(!0==this.isUploadOptionCheck("multi_color",t)&&!1==u){let{option:e}=t;if(e.hasGraphicsOption&&e.graphicsOption&&e.graphicsOption.options&&e.graphicsOption.options.length>0){let t=null==e?void 0:null===(a=e.graphicsOption)||void 0===a?void 0:a.options,i=t&&t.find(t=>"multi_color"==t.option_input_type);null==i||null===(s=i.child_options)||void 0===s||s.forEach(t=>{null==t||delete t.selected})}}let p=(0,z.Sw)({option:null==t?void 0:t.option,newOption:null==t?void 0:t.option,rules:null==t?void 0:t.rules,sizes:null==t?void 0:t.sizes,quantity:null==t?void 0:t.quantity,addon:null==t?void 0:t.addon,newAddon:null==t?void 0:t.addon});console.log("RULES APPLIEDD!!",p),4==this.props.eventType&&3==this.props.itemType&&"artwork"==this.props.reviewType&&(null==t?void 0:null===(e=t.otherParams)||void 0===e?void 0:e.uniqueHQId)&&(null===(l=this.props.uploadContext)||void 0===l||l.fetchAndSetUploads(null==t?void 0:null===(n=t.otherParams)||void 0===n?void 0:n.uniqueHQId,null===(d=this.props.productData)||void 0===d?void 0:d.name));let c={sku:t.sku,isOptionLoaded:!0,is_size:t.is_size,sizes:t.sizes,quantity:t.quantity,is_option:t.is_option,allOptions:(0,O.Z)(t.option),option:null==p?void 0:p.option,rules:(null==t?void 0:t.rules)||[],allAddons:t.addon?(0,O.Z)(t.addon):{},addon:p.addon?p.addon:{},buttons:t.buttons,prevOptionData:(0,O.Z)((0,h.Z)(t,["sizes","quantity","option","addon"])),show_user_comment_box:t.show_user_comment_box,enable_product_combination:(null==t?void 0:null===(i=t.product_combination)||void 0===i?void 0:i.enable_product_combination)||!1,orientationBasedSizes:null==t?void 0:t.orientationBasedSizes,user_comment:(null==t?void 0:null===(o=t.otherParams)||void 0===o?void 0:o.user_comment)||"",showOrientationBasedSizes:null==t?void 0:t.show_orientation,shipping_ratio:(0,x.Yn)(null==t?void 0:t.shipping_slab)};(null==r?void 0:r.child_products)&&(null==r?void 0:r.child_products.length)>0&&(t.isDisplayPackageProduct=!0);let v=(0,B.ZQ)(t);if(v){c.combinationTypes=v;let t=this.setSingleOptionData(p,v);c.singleOptionsData=t}else{c.combinationTypes=null;let t=this.setSingleOptionData(p,null);c.singleOptionsData=t}(null==t?void 0:t.download_template)&&(c.download_template=t.download_template),this.setState(c,()=>{this.props.actions.isLoading(!1),this.loadPrice()})},this.setSingleOptionData=(t,e)=>{var i,o,a,s;let n=[];if(e&&(null===(i=e.child_options)||void 0===i?void 0:i.length)>0){let i=(0,w.Z)(e.child_options,{display_options:!0,selected:!0});if(i){let e=null==t?void 0:t.option;"hardware_selection"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.hardwareOption)),"graphics_selection"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.graphicsOption)),"combinedOption"===i.option_code&&n.push(...(0,x.oY)(null==e?void 0:e.hardwareOption),...(0,x.oY)(null==e?void 0:e.graphicsOption)),n.push(...(0,x.oY)(null==e?void 0:e.customOption))}}else n.push(...(0,x.oY)(null==t?void 0:null===(o=t.option)||void 0===o?void 0:o.hardwareOption),...(0,x.oY)(null==t?void 0:null===(a=t.option)||void 0===a?void 0:a.graphicsOption),...(0,x.oY)(null==t?void 0:null===(s=t.option)||void 0===s?void 0:s.customOption));return n},this.setCombinationTypes=t=>{var e;let i=null===(e=this.state)||void 0===e?void 0:e.option,o=this.setSingleOptionData({option:i},t);this.setState({combinationTypes:t,singleOptionsData:o})},this.handleChangeActivePkgProduct=t=>{this.setState({activePkgProduct:t})},this.handleDataPkgChildProduct=t=>{var e,i,o,a,s;let{childPkgProductData:n,activePkgProduct:d}=this.state;if((null==n?void 0:n.length)==0)return console.error("No child products"),[];let l={isDesignOnline:this.state.isDesignOnline,cdtSizeData:this.state.cdtSizeData,isNewPDPOptionPage:null===(e=this.state)||void 0===e?void 0:e.isNewPDPOptionPage,isNewReviewOptionPage:null===(i=this.state)||void 0===i?void 0:i.isNewReviewOptionPage};return"for_price_call"===t?d?null===(o=this.state.activePkgProduct)||void 0===o?void 0:o.activeProducts.map(t=>{var e,i,o;let a=(0,x.OL)({...null==t?void 0:t.options,...null==t?void 0:t.sizes,...l});return a.quantity=Number((null==t?void 0:null===(e=t.options)||void 0===e?void 0:e.default_min_qty)*(null===(i=this.state.quantity)||void 0===i?void 0:i.default_value)),{product_option:{...a},sku:null==t?void 0:null===(o=t.sizes)||void 0===o?void 0:o.sku}}):null===(a=this.state.childPkgProductData)||void 0===a?void 0:a.map(t=>{var e,i,o;let a=(0,x.OL)({...null==t?void 0:t.options,...null==t?void 0:t.sizes,...l});return a.quantity=Number((null==t?void 0:null===(e=t.options)||void 0===e?void 0:e.default_min_qty)*(null===(i=this.state.quantity)||void 0===i?void 0:i.default_value)),{product_option:{...a},sku:null==t?void 0:null===(o=t.sizes)||void 0===o?void 0:o.sku}}):d&&(null==d?void 0:d.activeProducts)&&n.length>0?null==d?void 0:null===(s=d.activeProducts)||void 0===s?void 0:s.map(t=>{var e,i,o;let a=(0,x.OL)({...null==t?void 0:t.options,...null==t?void 0:t.sizes,...l},!0);return a.quantity=Number((null==t?void 0:null===(e=t.options)||void 0===e?void 0:e.default_min_qty)*(null===(i=this.state.quantity)||void 0===i?void 0:i.default_value)),{product_option:{...a},sku:null==t?void 0:null===(o=t.sizes)||void 0===o?void 0:o.sku}}):[]},this.onCommentChange=(t,e)=>{"hidden_attribute"===t?this.setState({otherParams:{[t]:e}}):this.setState({[t]:e})},this.handleChange=(t,e)=>{!this.state.isLoadingStatus&&("main_quantity"!=e||(0,x.b7)(t))&&(0,x.Cp)(t,e,{...this.state},{datalayer:!1},(i,o)=>{var a,s,n,d,l,r,u,p,c,h,v,m,_,P,y,D,b,f;if("size_w"==e||"size_h"==e||"size_d"===e){let{sizes:t}=i,e=(0,O.Z)(null==t?void 0:t.custom);if(e&&t){let i=(0,w.Z)(null==t?void 0:null===(a=t.size)||void 0===a?void 0:a.field_values,["selected",!0]),o=e[1]?"".concat(e[0].default_value,"x").concat(e[1].default_value):e[0].default_value,r=(0,g.Z)(null==t?void 0:null===(s=t.size)||void 0===s?void 0:s.field_values,t=>t.value==o),u=(0,w.Z)(null==t?void 0:null===(n=t.size)||void 0===n?void 0:n.field_values,t=>t.value==o);if(-1!==r&&i&&(i.selected=!1,u.selected=!0),-1==r&&(null==t?void 0:null===(d=t.size)||void 0===d?void 0:d.field_values.length)>0){let e=null==t?void 0:null===(l=t.size)||void 0===l?void 0:l.field_values;e[0].selected=!0,e.map((t,e)=>0!=e?t.selected=!1:null)}}}let S=(0,O.Z)(i);if("size"==e&&(null==t?void 0:t.value)=="setStandardSize"){let t=null==S?void 0:null===(c=S.sizes)||void 0===c?void 0:null===(p=c.size)||void 0===p?void 0:null===(u=p.field_values)||void 0===u?void 0:null===(r=u.find)||void 0===r?void 0:r.call(u,t=>!0==t.selected);if(t){let e=null==t?void 0:t.value.split("x"),i=e&&Number(e[0]),o=e&&Number(e[1]),a=null==S?void 0:null===(m=S.sizes)||void 0===m?void 0:null===(v=m.custom)||void 0===v?void 0:null===(h=v.find)||void 0===h?void 0:h.call(v,t=>"size_w"===t.field_code),s=null==S?void 0:null===(y=S.sizes)||void 0===y?void 0:null===(P=y.custom)||void 0===P?void 0:null===(_=P.find)||void 0===_?void 0:_.call(P,t=>"size_h"===t.field_code),n=null==S?void 0:null===(f=S.sizes)||void 0===f?void 0:null===(b=f.custom)||void 0===b?void 0:null===(D=b.find)||void 0===D?void 0:D.call(b,t=>"size_d"===t.field_code);a&&s?(a.default_value=i,s.default_value=o):n&&(n.default_value=i)}}S.selectedOption=e;let k=(0,z.Sw)({option:S.allOptions,newOption:S.option,rules:this.state.rules,sizes:S.sizes,quantity:S.quantity,addon:null==S?void 0:S.allAddons,newAddon:null==S?void 0:S.addon});S.option=null==k?void 0:k.option,S.addon=null==k?void 0:k.addon,S.singleOptionsData=this.setSingleOptionData(k,this.state.combinationTypes),this.setState(S,()=>{!0==o&&this.loadPrice()})})},this.handleOrientationChange=t=>
1{t&&t!==this.sizeTabChange&&(this.setState(e=>{var i,o,a,s,n,d,l;let r=null==e?void 0:null===(a=e.sizes)||void 0===a?void 0:null===(o=a.custom)||void 0===o?void 0:null===(i=o.find)||void 0===i?void 0:i.call(o,t=>"size_w"===t.field_code),u=null==e?void 0:null===(d=e.sizes)||void 0===d?void 0:null===(n=d.custom)||void 0===n?void 0:null===(s=n.find)||void 0===s?void 0:s.call(n,t=>"size_h"===t.field_code),p=null===(l=e.orientationBasedSizes[t][0])||void 0===l?void 0:l.value.split("x");return r&&u&&(r.default_value=Number(p[0]),u.default_value=Number(p[1])),{...e,orientation:t,sizes:{...e.sizes,field_selection:"size",size:{...e.sizes.size,field_values:e.orientationBasedSizes[t]}}}}),this.sizeTabChange=t,this.loadPrice())},this.onOptionBlur=(t,e)=>{var i,o;if(this.state.isLoadingStatus)return;let{isDisplayPackageProduct:a}=this.state.isDisplayPackageProduct,s=a?(0,h.Z)(this.state.activePkgProduct,["sizes","quantity","option","addon"]):(0,h.Z)(this.state,["sizes","quantity","option","addon"]),n=a?{...(null===(o=this.state)||void 0===o?void 0:null===(i=o.activePkgProduct)||void 0===i?void 0:i.prevOptionData)||{}}:{...this.state.prevOptionData};(0,x.n_)(t,e,{...s},{...n||{}},{datalayer:!1},t=>{"size_w"==e?this.setState({prevOptionData:(0,O.Z)(s)},()=>{!0==t&&this.loadPrice(e)}):!0==t&&this.loadPrice()})},this.handleOptionChange=function(t,i,o,a){var s,n,d;let l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],{productData:r}=e.props,{option:u}=e.state;if((0==u.length||0==Object.values(u).length)&&(null==r?void 0:r.is_package_product_enable)=="1"&&(null==r?void 0:r.child_products)&&(null==r?void 0:null===(s=r.child_products)||void 0===s?void 0:s.length)>0&&((null==t?void 0:t.option_code)=="combinedOption"||(null==t?void 0:t.option_code)=="graphics_selection")){(null===(d=e.state.activePkgProduct)||void 0===d?void 0:null===(n=d.selectedFilter)||void 0===n?void 0:n.option_code)!=(null==t?void 0:t.option_code)&&setTimeout(()=>{e.loadPrice()},100);return}(0,x.Cu)(t,i,o,a,{...e.state},{datalayer:!1},async(t,o)=>{let s=(0,z.Sw)({option:t.allOptions,newOption:t.option,rules:e.state.rules,sizes:t.sizes,quantity:t.quantity,addon:null==t?void 0:t.allAddons,newAddon:null==t?void 0:t.addon});t.option=null==s?void 0:s.option,t.addon=null==s?void 0:s.addon,t.singleOptionsData=e.setSingleOptionData(s,e.state.combinationTypes),e.setState(t,()=>{var t,s,n;if(!0==o){if(a&&e.state.priceData){let t=e.state.priceData;i.includes("graphics_selection")?t.graphicsPrice=null:t.hardwarePrice=null,e.setState({priceData:(0,O.Z)(t)},()=>{e.loadPrice()})}else e.loadPrice()}else(0,w.Z)(null===(n=e.state)||void 0===n?void 0:null===(s=n.addon)||void 0===s?void 0:null===(t=s.selection)||void 0===t?void 0:t.child_options,{display_options:!0,selected:!0})&&"addon_selection"===i&&e.loadPrice()})},!1,l)},this.handleAddonProductChange=(t,e,i)=>{let o=this.state.addon.addon_products,a=(0,g.Z)(o,["sku",e]);o[a].product_option=t,this.setState(t=>({addon:{...t.addon,addon_products:o}}),()=>{!0==i&&this.loadPrice()})},this.getUpdateOptionData=()=>({...(0,x.OL)({...this.state},!0),mpn:this.state.mpn,user_comment:this.state.user_comment,orderId:this.props.orderId}),this.loadPrice=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.setState({isLoadingStatus:!0},async()=>{var o,a,s,n,d,l,r,u,p,c;let v=(0,b.createHeader)(e.props.storedata);(null===(o=e.props)||void 0===o?void 0:o.eventType)==4&&(null===(s=e.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:a.isDisplayPackageProduct)&&(null===(d=e.props)||void 0===d?void 0:null===(n=d.productData)||void 0===n?void 0:n.child_products.length)>0&&!e.state.isLoaded&&e.setState(t=>{var i,o,a,s;return{isLoaded:!0,quantity:{...t.quantity,default_value:null===(s=e.props)||void 0===s?void 0:null===(a=s.productData)||void 0===a?void 0:null===(o=a.child_products)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.parent_product_qty}}});let g={...(0,x.OL)(e.state),hideRetailPriceOnCustomOrder:[3,4].includes(e.props.eventType)};if((null===(r=e.props)||void 0===r?void 0:null===(l=r.productData)||void 0===l?void 0:l.child_products)&&(null===(c=e.props)||void 0===c?void 0:null===(p=c.productData)||void 0===p?void 0:null===(u=p.child_products)||void 0===u?void 0:u.length)>0){let t=e.handleDataPkgChildProduct("for_price_call");t&&(null==t?void 0:t.length)>0&&(null==t||delete t.isNewPDPCro,g={...g,childProducts:t})}(0,x.$U)(g,e.state.shipping_ratio),await e.props.actions.getProductPrice(g,v).then(async o=>{if(400===o.responseCode||404===o.responseCode||500===o.responseCode){let t=(0,O.Z)((0,h.Z)(e.state,["sizes","quantity","option","addon"]));e.setState({prevOptionData:t,sizes:(0,x.pV)(e.state.sizes),responseMessage:o.message,isLoadingStatus:!1,ctaLoader:"",orientation:"",errorCode:o.errorCode,isDisplayOrientation:!1}),(0,B.SM)()}else{var a,s,n,d,l,r,u,p;let c=(0,O.Z)({isLoadingStatus:!1,ctaLoader:"",responseMessage:null,quantity:e.state.quantity,sizes:e.state.sizes,addon:e.state.addon,orientation:null==o?void 0:null===(a=o.data)||void 0===a?void 0:a.orientation,errorCode:0,priceData:o.data,isDisplayOrientation:null==o?void 0:null===(s=o.data)||void 0===s?void 0:s.orientation_box_display});(null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.orientation)&&"sizes"in g&&"custom"in g.sizes&&(e.sizeTabChange=null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.orientation);let v=c.priceData;c.combinationTypes=(0,B.tH)(e.state.combinationTypes,c.priceData),(null==(c=(0,x.FS)(c,v))?void 0:null===(d=c.addon)||void 0===d?void 0:d.addon_products)&&await (null==c?void 0:null===(u=c.addon)||void 0===u?void 0:null===(r=u.addon_products)||void 0===r?void 0:r.map(async t=>{var e;return null!=v&&v.addon&&null!=v&&v.addon[null==t?void 0:t.sku]&&(t.product_option=await (0,x.FS)(null==t?void 0:t.product_option,null==v?void 0:v.addon[null==t?void 0:t.sku]),t.product_price=null==v?void 0:null===(e=v.addon[null==t?void 0:t.sku])||void 0===e?void 0:e.finalprice),t}));let m={...(0,h.Z)(c,["sizes","quantity","addon"]),option:e.state.option};c.prevOptionData="size_w"==t?(0,O.Z)(e.state.prevOptionData):(0,O.Z)(m),e.setState(c,()=>{i&&(0,B.t$)({...e.state},{...e.props})}),e.state.orientationBasedSizes&&-1===Object.keys(e.state.orientationBasedSizes).indexOf(e.sizeTabChange)&&(e.sizeTabChange=null==o?void 0:null===(p=o.data)||void 0===p?void 0:p.orientation)}})})},this.onClickUpdateOrder=async()=>{var t,e,i,o,a,s,n;if(this.isSubmitting)return;this.isSubmitting=!0;let{eventType:d,eventItemId:l,storedata:r,adminAuthKey:u,uploadContext:p,productData:c}=this.props,{otherParams:h}=this.state,{childPkgProductData:v,isDisplayPackageProduct:g}=this.state;if(this.isUploadOptionCheck("upload")||this.isUploadOptionCheck("multi_color")){let t=this.getValidatedOptionData();if(t&&t.status){this.isSubmitting=!1;return}}let m=(0,b.createHeader)(r);
1m.Authorization="Bearer ".concat("68nqgmrrqos1d4ek7wl7yshr2im15j05");let _=this.getUpdateOptionData();if(4==d&&(_.itemId=l),_.otherParams=this.state.otherParams,_.otherParams.user_comment=_.user_comment,_.user_comment=void 0,_.adminKey=u,_.orderId=this.props.orderId,(null==c?void 0:c.is_package_product_enable)&&h&&(_.otherParams.is_package_product_enable=null==c?void 0:c.is_package_product_enable),h&&(null==h?void 0:h.is_package_product_enable)&&(_.otherParams.is_package_product_enable=null==h?void 0:h.is_package_product_enable),h&&(null==h?void 0:h.reorder_item_id)&&(_.otherParams.reOrderItemId=null==h?void 0:h.reorder_item_id),h&&(null==h?void 0:null===(t=h.voiceNotes)||void 0===t?void 0:t.length)>0&&(_.otherParams.voiceNotes=null==h?void 0:h.voiceNotes),h&&(null==h?void 0:null===(e=h.hireDesignVoiceNotes)||void 0===e?void 0:e.length)>0&&(_.otherParams.hireDesignVoiceNotes=null==h?void 0:h.hireDesignVoiceNotes),g&&(null==v?void 0:v.length)>0){let t=this.handleDataPkgChildProduct();if(_.otherParams.childProducts=t.length>0?t:[],(null===(i=this.state)||void 0===i?void 0:i.combinationTypes)&&(null===(s=this.state)||void 0===s?void 0:null===(a=s.combinationTypes)||void 0===a?void 0:null===(o=a.child_options)||void 0===o?void 0:o.length)>0){let t=(0,w.Z)(this.state.combinationTypes.child_options,{selected:!0});_.otherParams.packageProductType=null==t?void 0:t.displayLabel}}_.otherParams.use_same_artwork_for_back=(null==h?void 0:h.use_same_artwork_for_back)==1;let{isDoubleSideSelected:P,twoSidedOption:y}=await this.getTwoSidedOption();if(null!==y&&(null==y?void 0:y.option_code)&&!1==P){let t=null==_?void 0:null===(n=_.otherParams)||void 0===n?void 0:n.uniqueHQId,{uploads:e}=p,i=(null==e?void 0:e[t])||[];_.otherParams.use_same_artwork_for_back=!1;let o=null==i?void 0:i.filter(t=>(null==t?void 0:t.side)=="back");o.length>0&&(null==o||o.forEach(e=>{let{removeFile:i}=p;i(e,t)}))}await this.props.actions.updateOrder(_,d,m).then(t=>{!0==t.status?window.location=t.url:(this.setState({responseMessage:t.message}),this.isSubmitting=!1)})},this.getTwoSidedOption=async()=>{var t,e,i,o;let{option:a}=this.state,{twoSideOptions:s,actions:n,storedata:d}=this.props;if(!(null==a?void 0:a.hasGraphicsOption)||!(null===(e=a.graphicsOption)||void 0===e?void 0:null===(t=e.options)||void 0===t?void 0:t.length))return{isDoubleSideSelected:!1,twoSidedOption:null};let l=null==a?void 0:null===(i=a.graphicsOption)||void 0===i?void 0:i.options,r=(0,b.createHeader)(d);if(null==l?void 0:l.length){let t=Array.isArray(s)&&(null==s?void 0:s.length)?s:[];if(!(null==t?void 0:t.length)){let e=await n.getArtworkTwoSideOptionList(r);if(!(null==e?void 0:e.status)||!Array.isArray(e.data)||!e.data.length)return{isDoubleSideSelected:!1,twoSidedOption:null};t=null==e?void 0:e.data}let e=l.find(e=>t.some(t=>(null==t?void 0:t.option_code)===(null==e?void 0:e.option_code))),i=t.find(t=>l.some(e=>(null==e?void 0:e.option_code)===t.option_code));if(!e||(null==e?void 0:null===(o=e.child_options)||void 0===o?void 0:o.length)!==2)return{isDoubleSideSelected:!1,twoSidedOption:null};{let t=null==e?void 0:e.child_options,o=null==i?void 0:i.option_value_1,a=t.find(t=>null==t?void 0:t.selected);return{isDoubleSideSelected:(null==a?void 0:a.value)===o,twoSidedOption:e}}}},this.isUploadOptionCheck=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"upload",i=!1,{option:o}=e.state;if(o.hasGraphicsOption&&o.graphicsOption&&o.graphicsOption.options&&o.graphicsOption.options.length>0){let e=o.graphicsOption.options;(e&&e.findIndex(e=>e.option_input_type==t))>-1&&(i=!0)}return i},this.getValidatedOptionData=()=>{let t;let e=(0,x.OL)(this.state),i=this.isUploadOptionCheck("upload"),o=this.isUploadOptionCheck("multi_color"),a=this.isUploadOptionCheck(N.iK);return!0==i?(t=(0,x.w4)(e),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,B.SM)()})):!0==o?(t=(0,x.XP)(e,"multi_color"),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,B.SM)()})):!0==a&&(t=(0,x.XP)(e,N.iK),this.setState({uploadRequiredErr:t&&t.msg},()=>{null!=this.state.uploadRequiredErr&&(0,B.SM)()})),t},this.renderGallerySection=()=>{var t,e,i,a,s;let{priceData:n}=this.state,{isPrintready:d,reviewType:l,storedata:r,productData:u,breadcrumbsData:p,itemType:c,thumbNailImageArr:h,imageUrl:v}=this.props,g={infinite:!1,speed:200,slidesToShow:5,slidesToScroll:1,focusOnSelect:!0,responsive:[{breakpoint:3e3,settings:{slidesToShow:3}},{breakpoint:1024,settings:{slidesToShow:2}},{breakpoint:767,settings:{slidesToShow:1}}],initialSlide:0,dots:1==this.props.storedata.deviceType,swipe:1==this.props.storedata.deviceType,containerClass:"carousel-container",touchThreshold:60,prevArrow:1==r.deviceType?null:(0,o.jsx)("button",{className:"slick-prev",children:"Previous"}),nextArrow:1==r.deviceType?null:(0,o.jsx)("button",{className:"slick-next",children:"Next"})};if(1==c||5==c)return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(G.default,{onRef:t=>this.productGallery=t,gallery:null==u?void 0:u.np_gallery,storedata:r,productData:u,breadcrumbsData:p,selectedImage:(null===(e=this.state)||void 0===e?void 0:null===(t=e.selectedTemplate)||void 0===t?void 0:t.template_id)?this.state.selectedTemplate:null,priceData:n})});if(!0!==d||"designtool"!==l||1==r.deviceType)return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"galleryMainBox galleryReviewBox",children:[(0,o.jsxs)("div",{className:"staticImgBox",children:[(0,o.jsx)("div",{className:"mainImageBox",children:1==r.deviceType&&(null===(s=this.props.renderMainImages(h))||void 0===s?void 0:s.length)>1?(0,o.jsx)(k.Z,{settings:g,children:this.props.renderMainImages(h)}):(0,o.jsx)("img",{src:v,alt:""})}),(0,o.jsx)("div",{className:"clearfix"}),(0,o.jsx)("div",{className:"galleryThumbBox",children:(0,o.jsx)("ul",{children:this.props.renderThumImages(h)})})]}),(0,o.jsx)("div",{className:"clearfix"}),(0,o.jsxs)("div",{className:"priceGuaranteeBox",children:[(0,o.jsx)("img",{src:"".concat(tt.CDN_FOR_STATIC_DATA,"/static/images/catalog/price-guarantee-icon.png"),alt:""}),(0,o.jsx)("h5",{children:"100% satisfaction Guaranteed!"}),(0,o.jsx)("p",{children:"We promise the best price, product, and service! We have a dedicated customer service department ready to assist you with your order"})]})]})});{let t=h&&Array.isArray(h)&&(null==h?void 0:h.map((t,e)=>({url:(null==t?void 0:t.replaceAll("thumb/",""))||"",id:e,thumb_url:t||"",media_type:"image"})));return(0,o.jsxs)("div",{className:"DesigntoolReview",children:[(0,o.jsx)(G.default,{onRef:t=>this.productGallery=t,gallery:null==t?void 0:t.filter(t=>""!=t.url),storedata:r,productData:u,breadcrumbsData:p,selectedImage:(null===(a=this.state)||void 0===a?void 0:null===(i=a.selectedTemplate)||void 0===i?void 0:i.template_id)?this.state.selectedTemplate:null,priceData:n}),(0,o.jsxs)("div",{className:"EditDT",children:[(0,o.jsx)("div",{className:"clearfix"}),(0,o.jsxs)("div",{className:"priceGuaranteeBox",children:[(0,o.jsx)("img",{src:"".concat(tt.CDN_FOR_STATIC_DATA,"/static/images/catalog/price-guarantee-icon.png"),alt:""}),(0,o.jsx)("h5",{children:"100% satisfaction Guaranteed!"}),(0,o.jsx)("p",{children:"We promise the best price, product, and service! We have a dedicated customer service department ready to assist you with your order"})]})]})]})}},this.toggleProductInfoPopup=(t,e,i,o)=>{let{selectedPdpPopupInfo:a}=this.state;this.setState(s=>({selectedPdpPopupInfo:{...s[a],option:e,type:i,isHeader:o},showproductInfoPopup:t}))},this.handlePdpAddonAccordionPdpSelect=t=>
1{this.setState({pdpVsAddonOpenGroup:t?"pdp":null,pdpOpenPanelKey:t})},this.state={isNewPDPOptionPage:t.isNewPDPOptionPage,isLoadingStatus:!1,uploadRequiredErr:null,isOptionLoaded:!1,is_size:0,sizes:{},quantity:{},is_option:!1,option:{},addon:{},responseMessage:null,mode:"is-top",isSticky:"true",deviceMediumMinWidthInPixels:1170,otherParams:{itemType:t.itemType,designId:t.productData.designId?t.productData.designId:null,tooltype:t.productData.cdtToolType?t.productData.cdtToolType:null,front_image_url:t.productData.front_image_url?t.productData.front_image_url:null,back_image_url:t.productData.back_image_url?t.productData.back_image_url:null,front_image_url_thumb:t.productData.front_image_url_thumb?t.productData.front_image_url_thumb:null,back_image_url_thumb:t.productData.back_image_url_thumb?t.productData.back_image_url_thumb:null,artworkFiles:t.productData.artworkFiles||[],artworkFileDriveHQ:!!t.productData.artworkFileDriveHQ&&t.productData.artworkFileDriveHQ,uniqueHQId:t.productData.uniqueHQId&&void 0!==t.productData.uniqueHQId?t.productData.uniqueHQId:void 0,isLowRes:!!t.productData&&!!t.productData.isLowRes&&t.productData.isLowRes,okWithLowRes:!!t.productData&&!!t.productData.okWithLowRes&&t.productData.okWithLowRes,isUnderline:!!t.productData&&!!t.productData.isUnderline&&t.productData.isUnderline,isVectorUpload:!!t.productData&&!!t.productData.isVectorUpload&&t.productData.isVectorUpload,hireDesignDesc:t.productData&&t.productData.hireDesignDesc?t.productData.hireDesignDesc:"",hireBgSuggestion:t.productData&&t.productData.hireBgSuggestion?t.productData.hireBgSuggestion:[],hireColorPreference:t.productData&&t.productData.hireColorPreference?t.productData.hireColorPreference:[]},user_comment:t.reviewOptions&&t.reviewOptions.user_comment?t.reviewOptions.user_comment:"",show_user_comment_box:null,singleOptionData:[],isDisplayPackageProduct:!1},this.sliderRef=n.createRef(),this.sizeTabChange="All",this.handleChangeActivePkgProduct=this.handleChangeActivePkgProduct.bind(this),this.handleDataPkgChildProduct=this.handleDataPkgChildProduct.bind(this),this.handleChange=this.handleChange.bind(this),this.onOptionBlur=this.onOptionBlur.bind(this),this.onClickUpdateOrder=this.onClickUpdateOrder.bind(this),this.loadPrice=this.loadPrice.bind(this),this.onCommentChange=this.onCommentChange.bind(this),this.onResize=this.onResize.bind(this),this.setShowDiv=this.setShowDiv.bind(this),this.handlePdpAddonAccordionPdpSelect=this.handlePdpAddonAccordionPdpSelect.bind(this)}}ti.propTypes={customerGroupId:l().any,actions:l().object,storedata:l().object,optionData:l().object,productData:l().object,priceData:l().object,eventType:l().number,isLogin:l().bool,eventItemId:l().number,reviewType:l().string,reviewOptions:l().object,itemType:l().number,orderId:l().number,adminAuthKey:l().string,breadcrumbsData:l().string,isPrintready:l().bool,thumbNailImageArr:l().array,imageUrl:l().string,renderMainImages:l().func,renderThumImages:l().func,isReviewPage:l().bool,pageRouteUrl:l().string,setActiveTab:l().func,yotpoData:l().object,isNewPDPOptionPage:l().bool,isNewReviewOptionPage:l().bool,customerId:l().number,twoSideOptions:l().array,getArtworkTwoSideOptionList:l().func,uploadContext:l().object,isAbUrl:l().bool};var to=(0,L.Z)((0,r.$j)(t=>{var e,i;let{app:o,product:a,customer:s}=t;return{storedata:o.storedata,optionData:a.optionData||{},priceData:a.priceData||{},designTool:a?a.designTool:{},isLogin:s.isLogin,customerGroupId:(null==s?void 0:null===(i=s.profile)||void 0===i?void 0:null===(e=i.customer_extra_fields)||void 0===e?void 0:e.group_code)||"not_logged_in",twoSideOptions:(null==a?void 0:a.twoSideOptions)||[]}},t=>({actions:{getProductPrice:(0,y.DE)(f.mt,t),updateOrder:(0,y.DE)(S.C,t),isLoading:(0,y.DE)(T.hg,t),getArtworkTwoSideOptionList:(0,y.DE)(f.Wk,t)}}))(ti)),ta=i(39078),ts=i(64067),tn=i(50399);let{publicRuntimeConfig:td}=p()(),tl=t=>{let{storedata:e,productData:i,reviewType:a,reviewId:d,data:l,eventType:r,eventItemId:u,productURL:p,orderId:g,adminAuthKey:m,breadcrumbsData:_,itemType:P}=t,[y,O]=(0,n.useState)(""),[w,D]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let t="".concat(td.CDN_FOR_STATIC_DATA,"/static/images/common/not-viewable-print-ready.jpg"),o=!1;
1switch(a){case"designtool":i.front_image_url&&(t=i.front_image_url,i.back_image_url&&(o=!0));break;case"artwork":if(i.artworkFiles&&i.artworkFiles.length>0){if(t="".concat(td.CDN_FOR_STATIC_DATA,"/static/images/common/not-viewable-print-ready.jpg"),i.artworkFiles[0].thumbfilePath){var n,d;let o="".concat(e.awsCloudfrontUrl,"/media/").concat(i.artworkFiles[0].thumbfilePath);"-1"!=[".jpeg",".jpg",".gif",".png"].indexOf(null===(d=s().extname(o))||void 0===d?void 0:null===(n=d.toLowerCase)||void 0===n?void 0:n.call(d))&&(t=o)}}else t=(null==i?void 0:i.artworkThumbImg)&&"string"==typeof(null==i?void 0:i.artworkThumbImg)&&(null==i?void 0:i.artworkThumbImg.trim())!==""?i.artworkThumbImg:(null==i?void 0:i.image_url)||"".concat(td.CDN_FOR_STATIC_DATA,"/static/images/common/sendartworklater.png");break;case"hiredesign":t="".concat(td.CDN_FOR_STATIC_DATA,"/static/images/catalog/hireadesigner/edithad.jpg")}O(t),D(o)},[]);let b=t=>{O(t.target.src)},f="".concat(e.domain,"/").concat(p),S=(null==i?void 0:i.canopy_type_product)||(null==i?void 0:i.front_image_url_thumb_canopy)?Object.values(null==i?void 0:i.front_image_url_thumb_canopy):Object.values((0,h.Z)(i,["front_image_url","front_image_url_2d","back_image_url","back_image_url_2d"])),k=(null==i?void 0:i.is_newpdp_ab)==1;return(0,o.jsx)(c.Z,{className:"productDetailsMainBox ".concat((null==i?void 0:i.is_neonsign)?"neonDetailMainBox":""),id:"errorScrollHere",children:(0,o.jsx)("div",{className:(null==i?void 0:i.is_neonsign)?" ":"container",children:(0,o.jsxs)("div",{className:"productOptionsBox sticky-container",children:[!0==i.is_neonsign?(0,o.jsx)(ta.Z,{isPrintready:4==r,productData:i,itemType:7,pageRouteUrl:f,eventType:r,breadcrumbsData:_,isNewPDPOptionPage:!0,productURL:p,isNeonProduct:!0==i.is_neonsign,eventItemId:u,reviewOptions:l,orderId:g,adminAuthKey:m,reviewType:a,reviewId:d,otherParams:null==l?void 0:l.otherParams}):!0==i.is_acrylic?(0,o.jsx)(ts.Z,{pageRouteUrl:f,isPrintready:4==r,productData:i,itemType:P||5,eventType:r,breadcrumbsData:_,isNewPDPOptionPage:!0,productURL:p,isNeonProduct:!0==i.is_neonsign,eventItemId:u,reviewOptions:l,orderId:g,adminAuthKey:m,reviewType:a,reviewId:d,otherParams:null==l?void 0:l.otherParams}):1==i.is_assettag?(0,o.jsx)(tn.Z,{isPrintready:4==r,productData:i,itemType:P,pageRouteUrl:f,eventType:r,breadcrumbsData:_,isNewPDPOptionPage:!0,productURL:p,isNeonProduct:!0==i.is_neonsign,eventItemId:u,reviewOptions:l,orderId:g,adminAuthKey:m,reviewType:a,reviewId:d,otherParams:null==l?void 0:l.otherParams}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(to,{productData:i,reviewType:a,reviewId:d,reviewOptions:l,itemType:P,eventType:r,eventItemId:u,orderId:g,adminAuthKey:m,breadcrumbsData:_,imageUrl:y,hasBackImage:w,thumbNailImageArr:S,productURL:p,isPrintready:4==r,isReviewPage:4==r,isNewPDPOptionPage:!0,renderMainImages:t=>{var e,i;let a=t&&(null===(i=Object.values(t))||void 0===i?void 0:null===(e=i.filter(t=>void 0!==t))||void 0===e?void 0:e.map((t,e)=>""!=t&&(0,o.jsx)("img",{src:t,alt:""},"ThumbImage-".concat(e))));return(0,v.Z)(a,t=>!1!==t)},renderThumImages:t=>t&&Object.values(t).map((t,e)=>""==t?"":(0,o.jsx)("li",{className:y===t?"active":"",children:(0,o.jsx)("span",{onClick:()=>b(t),children:(0,o.jsx)("img",{src:t,alt:""})})},"ThumbImage-".concat(e))),pageRouteUrl:f,isAbUrl:k})}),(0,o.jsx)("div",{className:"clearfix"})]})})})};tl.propTypes={productData:l().object,productURL:l().string,reviewType:l().string,reviewId:l().string,data:l().object,imageData:l().object,storedata:l().object,itemType:l().number,eventType:l().number,eventItemId:l().number,orderId:l().number,adminAuthKey:l().string,breadcrumbsData:l().string};var tr=(0,r.$j)(t=>{let{app:e}=t;return{storedata:e.storedata}})(tl)}}]);

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.