"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3678],{2081:(e,t,a)=>{a.d(t,{A:()=>O});var r=a(37876),n=a(14232),l=a(8733),i=a(5596),s=a(47866),o=a(60058),d=a(99846),c=a(25628),u=a(71538),p=a(21690),m=a(63724),g=a(77018),A=a(45756),h=a(99220),x=a(48504),N=a(85278),b=a(89996),y=a(46744),_=a(21834),f=a(38554),j=a(46282),E=a(5612),v=a(50032),I=a(87505),C=a(87905),P=a(52510),T=a(35146);let L=(0,h.makeStyles)()(e=>({root:{alignItems:"center",borderBottom:"1px solid ".concat(e.palette.grey[400])},productPriceAvailability:{"& table":{"& thead th":{padding:e.spacing(1),fontSize:e.typography.pxToRem(12),fontWeight:e.typography.fontWeightBold},"& tbody td":{padding:e.spacing(1),verticalAlign:"middle","&:nth-of-type(1) strong":{fontWeight:e.typography.fontWeightRegular}}}},alignRight:{textAlign:"right","& svg":{position:"relative",top:5}},container:{backgroundColor:e.palette.background.grey},gridPadding:{padding:e.spacing(1)}})),R=e=>{let{replacementProduct:t,alternateMaterials:a,showCompare:i,selectedForCompare:s,setSelectedForCompare:o,addToList:c}=e,{classes:u,cx:p}=L(),[g,A]=n.useState(!1);return(0,r.jsxs)(m.A,{container:!0,className:p(u.root,s&&u.container),children:[i&&(0,r.jsx)(m.A,{xs:1,className:u.gridPadding,children:(0,r.jsx)(d.A,{checked:s,onChange:e=>o(e.target.checked)})}),(0,r.jsx)(m.A,{xs:2,className:u.gridPadding,children:(0,r.jsx)(E.N,{...b.aR.index(t.brand.key,t.productNumber),passHref:!0,children:(0,r.jsx)(f.A,{children:t.productNumber})})}),(0,r.jsx)(m.A,{xs:i?6:7,className:u.gridPadding,children:(0,r.jsx)(N.A,{value:t.description})}),(0,r.jsx)(m.A,{xs:1,className:u.gridPadding,children:(0,r.jsx)(T.A,{sdsLanguages:t.sdsLanguages,productNumber:t.productNumber,brandKey:t.brand.key,trigger:(0,r.jsx)(v.A,{})})}),(0,r.jsx)(m.A,{xs:2,className:p(u.gridPadding,u.alignRight),children:g?(0,r.jsxs)("a",{href:"#",onClick:()=>{A(!1)},children:[(0,r.jsx)(l.A,{..._.A.HIDE}),(0,r.jsx)(C.A,{})]}):(0,r.jsxs)("a",{href:"#",onClick:()=>{A(!0)},children:[(0,r.jsx)(l.A,{..._.A.EXPAND}),(0,r.jsx)(I.A,{})]})}),g&&(0,r.jsx)(m.A,{xs:12,className:p(u.gridPadding,u.productPriceAvailability),children:(0,r.jsx)(j.A,{in:g,children:(0,r.jsx)(P.A,{productNumber:t.productNumber,materialIds:a.map(e=>e.number),brandKey:t.brand.key,addToList:c})})})]})};var S=a(88669);let k=(0,h.makeStyles)()(e=>({closeIcon:{position:"absolute",right:e.spacing(4),top:e.spacing(4),color:e.palette.grey[100],cursor:"pointer"},compare:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:e.spacing(5),"& > div":{flex:"0 0 auto"}},divider:{margin:e.spacing(4,0)},replacementProducts:{maxHeight:450,overflowY:"auto"},productHead:{borderBottom:"1px solid ".concat(e.palette.grey[400]),width:"100%"},alignRight:{textAlign:"right"},boldPaddingText:{padding:e.spacing(1),fontSize:e.typography.pxToRem(12),fontWeight:e.typography.fontWeightBold}})),O=e=>{let{open:t,setOpen:a,productNumber:h,images:f,brandKey:j,materialNumber:E,materialName:v,discontinuedPricingInfo:I,hideCompare:C=!1,addToList:P}=e,{classes:T,cx:L}=k(),{addCompareProduct:O,removeCompareProduct:U,clearAllCompareProducts:M,compareProducts:D,sendToProductCompareDetail:B}=(0,y.Zn)(),w=(0,b.rd)(),[V]=(0,S.useSearchQuery)();n.useEffect(()=>{j&&t&&M([{productKey:h,images:f,brandKey:j}])},[t,M,h,j]);let{replacementProducts:F,alternateMaterials:q}=I,K=n.useCallback((e,t)=>!!D.find(a=>a.productKey===e&&a.brandKey===t),[D]),W=n.useMemo(()=>K(h,j),[K,h,j]),Y=n.useCallback((e,t,a,r)=>{r?O({productKey:e,brandKey:a,images:t}):U({productKey:e,brandKey:a})},[O,U]),z=n.useMemo(()=>K(h,j)&&D.length>1&&D.length<=4,[K,h,j,D]);return(0,r.jsxs)(i.A,{open:t,onClose:()=>a(!1),maxWidth:"md",fullWidth:!0,children:[(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{..._.A.REPLACEMENT_PRODUCTS_TITLE,values:{materialNumber:E||h,materialName:(0,r.jsx)(N.A,{value:v})}}),(0,r.jsx)(x.A,{className:T.closeIcon,fontSize:"large",onClick:()=>a(!1)}),!C&&(0,r.jsxs)("div",{className:T.compare,children:[(0,r.jsx)("div",{children:(0,r.jsx)(o.A,{control:(0,r.jsx)(d.A,{checked:K(h,j),onChange:e=>{M(e.target.checked&&j?[{productKey:h,brandKey:j,images:f}]:[])}}),label:(0,r.jsx)(l.A,{..._.A.COMPARE_SELECTED_WITH,values:{productNumber:(0,r.jsx)("b",{children:h})}})})}),(0,r.jsx)("div",{children:(0,r.jsxs)(c.A,{variant:"contained",color:"secondary",onClick:()=>B(V,w),disabled:!z,children:[(0,r.jsx)(l.A,{..._.A.COMPARE}),D.length>0&&" (".concat(D.length,")")]})})]}),(0,r.jsx)(u.A,{className:T.divider})]}),(0,r.jsx)(p.A,{style:{maxHeight:600,padding:"8px 24px"},children:(0,r.jsxs)(m.A,{container:!0,spacing:4,className:T.replacementProducts,children:[(0,r.jsx)(m.A,{xs:12,children:(0,r.jsx)(l.A,{..._.A.REPLACEMENT_PRODUCTS_FOR,values:{materialNumber:E||h},children:e=>(0,r.jsx)(g.A,{variant:"h3",children:e})})}),F&&q&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.A,{container:!0,className:T.productHead,children:[!C&&(0,r.jsx)(m.A,{xs:1,className:T.boldPaddingText,children:(0,r.jsx)(l.A,{..._.A.COMPARE})}),(0,r.jsx)(m.A,{xs:2,className:T.boldPaddingText,children:(0,r.jsx)(l.A,{..._.A.PRODUCT_NO})}),(0,r.jsx)(m.A,{xs:C?7:6,className:T.boldPaddingText,children:(0,r.jsx)(l.A,{..._.A.DESCRIPTION})}),(0,r.jsx)(m.A,{xs:1,className:T.boldPaddingText,children:(0,r.jsx)(l.A,{..._.A.SDS})}),(0,r.jsx)(m.A,{xs:2,className:L(T.boldPaddingText,T.alignRight),children:(0,r.jsx)(l.A,{..._.A.PRICING})})]}),(0,r.jsx)(A.A,{mb:4,width:"100%",children:F.map(e=>(0,r.jsx)(R,{replacementProduct:e,alternateMaterials:q,addToList:P,showCompare:W&&!C,selectedForCompare:K(e.productNumber,e.brand.key),setSelectedForCompare:t=>Y(e.productNumber,e.images,e.brand.key,t)},e.productNumber))})]})]})})]})}},8425:(e,t,a)=>{a.d(t,{$X:()=>p,Ac:()=>i,Gb:()=>g,MA:()=>d,OV:()=>N,co:()=>A,h_:()=>u,kt:()=>o,qF:()=>m,rH:()=>h}),a(14232);var r=a(77742),n=a(21834),l=a(81905),i=function(e){return e.Order="order",e.Quote="quote",e.SavedCart="saved_cart",e.List="list",e}({});let s=(e,t,a)=>e.replaceAll(/[\uff0c]/g,",").split(/[\r\n]/g).filter(e=>e.trim()).filter(a).map(e=>{let a=e.split(/[\t,]/g);return t.reduce((e,r,n)=>(n===t.length-1?e[r]=a.slice(n).join(",").trim():e[r]=(a[n]||"").trim(),e),{})}),o=e=>s(e,["materialNumber","quantity","itemNote"],e=>!e.match(/^SKU\s*[,\t]\s*Quantity\s*[,\t]\s*Product\sNote*$/)).map(e=>({...e,materialNumber:e.materialNumber.toUpperCase(),quantity:parseInt(e.quantity)||1})),d=e=>s(e,["materialNumber","quantity","promoCode","yourReference"],e=>!e.match(/^SKU\s*[,\t]\s*Quantity\s*[,\t]Promo\sCode*[,\t]\s*Reference\sNumber*[,\t]$/)).map(e=>({...e,materialNumber:e.materialNumber.toUpperCase(),quantity:parseInt(e.quantity)||1})),c=async(e,t)=>new Promise((r,n)=>{if(!e)return r([]);let l=new FileReader;l.onload=async e=>{try{let n=await Promise.all([a.e(9509),a.e(8436)]).then(a.bind(a,12770)),l=new Uint8Array(e.target.result),i=n.read(l,{type:"array",raw:!0}),s=i.SheetNames[0],o=i.Sheets[s],d=("SKU"===o.A1.v||"Product Number"===o.A1.v)&&"Quantity"===o.B1.v,c=Array.from(t),u=n.utils.sheet_to_json(o,{header:c});d&&u.splice(0,1),r(u)}catch(e){n(e)}},l.readAsArrayBuffer(e)}),u=e=>c(e,["materialNumber","quantity","promoCode","yourReference"]).then(e=>e.map(e=>{let{materialNumber:t,quantity:a="1",promoCode:r,yourReference:n}=e;return{materialNumber:(null==t?void 0:t.toString())||"",quantity:parseInt(a)||1,promoCode:r,yourReference:n}})),p=e=>c(e,["materialNumber","quantity","itemNote"]).then(e=>e.map(e=>{let{materialNumber:t,quantity:a="1",itemNote:r}=e;return{materialNumber:(null==t?void 0:t.toString())||"",quantity:parseInt(a)||1,itemNote:r}})),m=e=>c(e,["materialNumber","quantity"]).then(e=>e.map(e=>{let{materialNumber:t,quantity:a="1"}=e;return{materialNumber:(null==t?void 0:t.toString())||"",quantity:parseInt(a)||1}})),g=e=>e.map(e=>{let{materialNumber:t,quantity:a,promoCode:r,yourReference:n}=e;t=t?t.toUpperCase():"";let l="";return(r||n)&&(r=r||"",n=n||"",l=",".concat(r,",").concat(n)),"".concat(t,",").concat(a).concat(l)}).join("\n"),A=e=>e.map(e=>{let{materialNumber:t,quantity:a,itemNote:r}=e;t=t?t.toUpperCase():"";let n="";return r&&(r=r||"",n=",".concat(r)),"".concat(t,",").concat(a).concat(n)}).join("\n"),h=e=>e.map(e=>{let{materialNumber:t,quantity:a}=e;return t=t?t.toUpperCase():"","".concat(t,",").concat(a)}).join("\n"),x={QuickOrder:/^SKU\s*[,\t]\s*Promo\sCode*[,\t]\s*Quantity\s$/,List:/^SKU\s*[,\t]\s*Quantity\s*[,\t]\s*Product\sNote*$/,CreateQuote:/^SKU\s*[,\t]\s*Quantity\s*/},N=e=>{let{formatMessage:t}=(0,r.A)(),{isDarmstadtUser:a}=(0,l.iZ)();return{validateBulkUpload:(r,l)=>{let i=[],s=r.split(/[\r\n]/g).filter(e=>!!e.trim()).filter(t=>!t.match(x[e]));if(s){let e=a?500:50;s.length>e&&i.push(t(n.A.BULK_UPLOAD_ERROR_MAX_PRODUCTS,{maxProducts:e})),s.forEach(e=>{let a=(e.split(",")[1]||"").trim();a&&(isNaN(parseInt(a))||parseInt(a)>9999)&&i.push(t(n.A.BULK_UPLOAD_ERROR_BAD_QTY,{row:e}))})}return l(i),{hasValidationErrors:!!i.length}}}}},29718:(e,t,a)=>{a.d(t,{Yd:()=>d,wc:()=>c});var r=a(28888);a(37876);var n=a(82897),l=a(54932);a(14232);var i=a(78248);function s(){let e=(0,r._)(["\n query MultiplePricingAndAvailability($productDetails: [GetPricingForProductInput!]!, $displaySDS: Boolean = false) {\n getPricingForMultipleProducts(input: {productDetails: $productDetails}) {\n ...ProductPricingDetail\n }\n}\n ",""]);return s=function(){return e},e}let o={},d=(0,n.J1)(s(),l.$m);function c(e){let t={...o,...e};return i._(d,t)}},31891:(e,t,a)=>{a.d(t,{b:()=>d});var r=a(14232),n=a(67994),l=a(29718),i=a(65103),s=a(41175);let o=(e,t)=>[e,t],d=()=>{let e=(0,n.m)(),t=(0,r.useRef)({}),[a,d]=(0,r.useState)();return o((0,r.useCallback)(async(a,r)=>{let n=a.filter(e=>!t.current[e.materialNumber]);if(n.length){let a,s;n.forEach(e=>{let{materialNumber:a}=e;t.current[a]={...t.current[a]||{data:null},loading:!0}});try{a=await e.query({query:l.Yd,variables:{productDetails:n.map(e=>{var t,a;return{productNumber:e.materialNumber,quantity:e.quantity,catalogType:(null===(a=r[e.materialNumber])||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.isMarketplace)?i.Mh.Marketplace:void 0}})},fetchPolicy:"network-only"})}catch(e){s=e}n.forEach(e=>{let{materialNumber:r}=e;t.current[r]={loading:!1,data:a.data.getPricingForMultipleProducts.find(e=>e.productNumber===r),error:s}})}d({getPricingForMultipleProducts:a.map(e=>{var a;let{materialNumber:r,quantity:n}=e,l=null===(a=t.current[r])||void 0===a?void 0:a.data,i=null==l?void 0:l.materialPricing[0];return l&&i?{...l,materialPricing:[{...i,quantity:n}]}:null}).filter(s.O)})},[e]),{data:a,isLoading:(0,r.useCallback)(()=>Object.values(t.current).some(e=>null==e?void 0:e.loading),[]),pricingCache:t})}},35436:(e,t,a)=>{a.d(t,{A:()=>P});var r=a(37876),n=a(6995),l=a(77018),i=a(63724),s=a(38554),o=a(86250),d=a(99220),c=a(30566),u=a(95833),p=a(56171),m=a(50032),g=a(21834),A=a(78206),h=a(14232),x=a(77742),N=a(8733),b=a(57735);let y=(0,d.makeStyles)()(e=>({validationError:{color:e.palette.error.main,fontSize:e.typography.pxToRem(12)},validationErrorsList:{marginTop:e.spacing(2),marginBottom:0},truncationButton:{paddingLeft:e.spacing(10)}})),_=e=>{let{errors:t,truncate:a=5}=e,{classes:n}=y(),[l,i]=(0,h.useState)(!1);if((0,h.useEffect)(()=>{i(!1)},[t]),!t||0===t.length)return null;let o=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.A,{...g.A.MULTI_PRODUCT_INVALID_INPUT}),t.length<=a||l?(0,r.jsx)("ul",{className:n.validationErrorsList,children:t.map(e=>(0,r.jsx)("li",{children:e},e))}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ul",{className:n.validationErrorsList,children:t.slice(0,a).map(e=>(0,r.jsx)("li",{children:e},e))}),(0,r.jsx)(s.A,{className:n.truncationButton,component:"button",onClick:()=>i(!0),children:(0,r.jsx)(N.A,{...g.A.INVALID_INPUT_VIEW_MORE,values:{remaining:t.length-a}})})]})]});return(0,r.jsx)("div",{className:n.validationError,children:o})};var f=a(36820),j=a(64221),E=a(35152),v=a(92636),I=a(89996);let C=(0,d.makeStyles)()(e=>({materialInputLabel:{marginBottom:e.spacing(2)},bulkUploadInput:{"& > textarea":{resize:"vertical",margin:e.spacing(1,1.5,0,3),padding:e.spacing(0,1.5,1.5,0),fontSize:e.typography.pxToRem(16)}},bulkUploadTemplateButton:{fontSize:e.typography.pxToRem(14),padding:0,borderRadius:0,color:e.palette.secondary.light,marginTop:e.spacing(2),"&:hover":{background:"none",textDecoration:"none",borderBottom:"none"}},bulkUploadTemplateIcon:{display:"flex",height:e.typography.pxToRem(14),width:e.typography.pxToRem(14),color:e.palette.primary.main},bulkUploadTemplateText:{marginLeft:e.spacing(1),color:e.palette.primary.main},validationError:{color:e.palette.error.main,fontSize:e.typography.pxToRem(12)},modalLink:{marginLeft:e.spacing(2),cursor:"pointer"},fieldset:{border:0,padding:"0.01em 0 0 0",margin:0,minWidth:0},legend:{padding:0,display:"table"},vr2:{marginBottom:e.spacing(2)}})),P=e=>{let{formikBag:t,validationErrors:a,setValidationErrors:d,pricingErrors:y,pricing:P,setModalOpen:T,formInstructions:L,helperText:R,parseSpreadsheet:S,validate:k,dlType:O,fileName:U,formatEntry:M,onBlur:D}=e,B=(0,c.A)(),{classes:w,cx:V}=C(),{formatMessage:F}=(0,x.A)(),q=(0,n.A)(B.breakpoints.down("md")),{userSession:{country:K}}=(0,v.j)();h.useEffect(()=>{(0,b.CC)(y)},[y]);let{setFieldTouched:W,setFieldValue:Y}=t;return(0,r.jsxs)("fieldset",{className:w.fieldset,children:[(0,r.jsx)("legend",{className:V(w.legend,w.vr2),children:(0,r.jsx)(l.A,{variant:"body1",component:"span",children:L||(0,r.jsx)(N.A,{id:"QUICK_ORDER_BULK_UPLOAD_INSTRUCTIONS",defaultMessage:"Type or paste product SKU (product number and pack size), quantity, promo code and reference number separated by commas*. Enter separate products on new lines."})})}),(0,r.jsxs)(i.A,{container:!0,justifyContent:q?"center":"flex-end",spacing:5,children:[(0,r.jsxs)(i.A,{xs:12,sm:8,children:[(0,r.jsx)(A.D0,{name:"bulkUploadMaterials",className:w.bulkUploadInput,component:u.A,size:"large",filled:!0,fullWidth:!0,placeholder:F(g.A.BULK_UPLOAD_ENTRY_EXAMPLE),multiline:!0,minRows:6,maxRows:10,onChange:e=>{let t=e.target;W("bulkUploadMaterials"),Y("bulkUploadMaterials",t.value),k(t.value,d)},onBlur:D,inputProps:{"data-testid":"material-numbers-input","aria-describedby":"bulk-upload-helper-text"}}),R&&(0,r.jsx)("span",{id:"bulk-upload-helper-text",children:R}),(0,r.jsx)(i.A,{xs:12,className:w.validationError,children:(0,r.jsx)("ul",{children:Object.entries(y||{}).map(e=>{var t;let[a,n]=e,l=n.errorMsg,i={productNumber:a};"CUSTOMER_NUMBER_BLOCKED"===l&&Object.assign(i,{customerNumber:n.paramList?n.paramList[0]:""}),"EMD_MILLIPORE_PRICING_AND_INVENTORY_UNAVAILABLE"===l&&Object.assign(i,{link:(0,r.jsx)("a",{href:"http://www.emdmillipore.com",target:"_blank",rel:"noreferrer",children:"Millipore"})}),"MERCK_MILLIPORE_PRICING_AND_INVENTORY_UNAVAILABLE"===l&&Object.assign(i,{link:(0,r.jsx)("a",{href:"http://merckmillipore.com",target:"_blank",rel:"noreferrer",children:"Merck Millipore"})}),("MM_PRICING_AND_INVENTORY_UNAVAILABLE_HAS_STOCK"===l||"MM_PRICING_AND_INVENTORY_UNAVAILABLE"===l)&&Object.assign(i,{link:(0,r.jsx)("a",{href:"http://hg.y866.cn/germ/",target:"_blank",rel:"noreferrer",children:"Sigma-Aldrich"})}),"PRODUCT_ONLY_SOLD_VIA_OFFLINE_CHANNELS"===l&&Object.assign(i,{link:(0,r.jsx)("a",{href:I.mA.customerSupport(),children:(0,r.jsx)(N.A,{id:"PLEASE_CONTACT_CUSTOMER_SERVICE",defaultMessage:"Please Contact Customer Service"})})});let o=!(!(null===(t=n.replacementProducts)||void 0===t?void 0:t.length)||n.hideReplacementProductLink);return"EMD_MILLIPORE_PRICING_AND_INVENTORY_UNAVAILABLE"===l?(0,r.jsxs)(r.Fragment,{children:["US"===K&&(0,r.jsx)("li",{children:(0,r.jsx)(N.A,{id:"PRODUCT_SOLD_EXCLUSIVELY_BY_MILLIPORE_VIA_OFFLINE_CHANNELS",defaultMessage:"This product is sold exclusively by Millipore via offline channels. {link}",values:{link:(0,r.jsx)("a",{href:I.mA.customerSupport(),children:(0,r.jsx)(N.A,{id:"CONTACT_CUSTOMER_SERVICE_FIRST_UPPERCASE",defaultMessage:"Contact Customer Service"})})}})},a),"CA"===K&&(0,r.jsx)("li",{children:(0,r.jsx)(N.A,{id:"PRODUCT_ONLY_SOLD_VIA_OFFLINE_CHANNELS",defaultMessage:"This product is only sold via offline channels. {link}",values:{link:(0,r.jsx)("a",{href:I.mA.customerSupport(),children:(0,r.jsx)(N.A,{id:"PLEASE_CONTACT_CUSTOMER_SERVICE",defaultMessage:"Please Contact Customer Service"})})}})},a)]}):"UNABLE_TO_GET_RESPONSE_FROM_PI"===l?(0,r.jsx)("li",{children:(0,r.jsx)(N.A,{...g.A.PRICING_AND_AVAILABILITY_UNAVAILABLE})},a):"PRICING_AND_AVAILABILITY_UNAVAILABLE"===l?(0,r.jsx)("li",{children:(0,r.jsx)(N.A,{...g.A.IS_NOT_A_VALID_PRODUCT_NUMBER,values:i})},a):"THIS_PRODUCT_HAS_BEEN_DISCONTINUED"===l?(0,r.jsx)("li",{children:(0,r.jsxs)(j.M,{source:"bulk upload",item:a,replacementProducts:o?n.replacementProducts:null,children:[(0,r.jsx)(f.J,{...g.A[l],values:i}),o&&(0,r.jsx)(s.A,{className:w.modalLink,onClick:()=>{var e;T((null===(e=P[a])||void 0===e?void 0:e.data)||null)},children:F(g.A[n.displaySimilarProductLabel?"VIEW_SIMILAR_PRODUCTS":"VIEW_REPLACEMENT_PRODUCTS"])})]})},a):(0,r.jsx)("li",{children:(0,r.jsx)(N.A,{...g.A[l],values:i})},a)})})}),a.length>0&&(0,r.jsx)(i.A,{xs:12,children:(0,r.jsx)(_,{errors:a})})]}),(0,r.jsxs)(i.A,{container:!0,xs:12,sm:4,alignItems:q?"center":"flex-end",direction:"column",sx:{padding:5},children:[(0,r.jsx)(p.A,{onChange:async e=>{let[t]=e;if(t){let e=M(await S(t));k(e,d),W("bulkUploadMaterials"),Y("bulkUploadMaterials",e)}},dropText:F(g.A.DROP_CSV_XLS_FILE_OR),accept:".csv,.xls,.xlsx, text/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",clearInput:!0,browseText:F(g.A.CHOOSE_FILE)}),(0,r.jsxs)(o.A,{className:w.bulkUploadTemplateButton,href:"/static/".concat(U),download:U,"data-dlname":U,"data-event":"download","data-dltype":O,onClick:()=>(0,E.sendDownloadFileEvent)({action:"bulk upload template"},{fileExtension:"csv",fileCategory:"template",component:"body",elementType:"link",linkText:"download template",linkUrl:"/static/".concat(U)}),size:"large",children:[(0,r.jsx)("div",{className:w.bulkUploadTemplateIcon,children:(0,r.jsx)(m.A,{})}),(0,r.jsx)("div",{className:w.bulkUploadTemplateText,children:F(g.A.DOWNLOAD_TEMPLATE)})]})]})]})]})}},35550:(e,t,a)=>{a.d(t,{s:()=>u});var r=a(28888);function n(){let e=(0,r._)(["\n query MaterialsDetail(\n $materialNumbers: [String!]!\n $catalogType: CatalogType\n $filter: String\n ) {\n getMaterialsDetail(\n input: {\n materialNumbers: $materialNumbers\n catalogType: $catalogType\n filter: $filter\n }\n ) {\n ...MaterialsDetail\n }\n }\n\n fragment MaterialsDetail on Material {\n id\n number\n name\n isMarketplace\n marketplaceOfferId\n description\n brand {\n key\n erpKey\n name\n color\n }\n product\n image {\n altText\n smallUrl\n mediumUrl\n largeUrl\n }\n packageSize\n shipsToday\n freeFreight\n erpType\n }\n"]);return n=function(){return e},e}let l=(0,a(82897).J1)(n());var i=a(14232),s=a(95497),o=a(67994),d=a(32189),c=a(97963);let u=()=>{let e=(0,o.m)(),{catalogType:t,filter:a}=(0,d.O)(),[r,n]=(0,i.useState)({}),u=(0,c.A)(r);return{loadMaterialsData:async i=>{let o,d=i.filter(e=>{let{materialNumber:t}=e;return!r[t]});if(d.length){n(e=>({...e,...(0,s.A)(d.map(t=>{let{materialNumber:a}=t;return[a,{...e[a]||{data:null},loading:!0}]}))}));let r=await e.query({query:l,variables:{materialNumbers:d.map(e=>e.materialNumber),catalogType:t,filter:a},errorPolicy:"all",fetchPolicy:"no-cache"});return n(o={...u.current,...(0,s.A)(d.map(e=>{var t;let{materialNumber:a}=e;return[a,{loading:!1,data:null===(t=r.data)||void 0===t?void 0:t.getMaterialsDetail.find(e=>(null==e?void 0:e.number)===a)}]}))}),{materialsDetailResult:r,updatedMaterialsCache:o}}return{}},materialsCache:r,latestMaterialsCache:u}}},51098:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(37876),n=a(77742),l=a(16928),i=a(79521),s=a(17138),o=a(71538);let d=(0,a(99220).makeStyles)()(e=>({tablist:{"& .MuiTabs-indicator":{backgroundColor:e.palette.text.primary,height:"4px"}},tab:{color:e.palette.primary.main,fontSize:e.typography.pxToRem(12),fontWeight:e.typography.fontWeightMedium,padding:e.spacing(2.5,4),minWidth:"auto",opacity:1,textTransform:"capitalize","&:hover":{color:e.palette.primary.dark},"&.Mui-selected":{color:e.palette.text.primary},[e.breakpoints.up("md")]:{fontSize:e.typography.pxToRem(18),fontWeight:e.typography.fontWeightBold,padding:e.spacing(4)}},vr6:{marginBottom:e.spacing(6)}})),c=e=>{let{tabValue:t,setTabValue:a,manualEntryForm:c,bulkUploadForm:u,bulkUploadTabLabel:p,onTabClick:m}=e,{classes:g}=d(),{formatMessage:A}=(0,n.A)(),[h]=(0,l.A)(["_ga"]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.A,{value:t,onChange:(e,t)=>{a(t)},className:g.tablist,children:[(0,r.jsx)(s.A,{className:g.tab,label:A({id:"MANUAL_ENTRY",defaultMessage:"Manual Entry"}),onClick:()=>{m&&m("manual entry",h._ga)}}),(0,r.jsx)(s.A,{className:g.tab,label:p||A({id:"BULK_UPLOAD",defaultMessage:"Bulk Upload"}),onClick:()=>{m&&m("bulk upload",h._ga)}})]}),(0,r.jsx)(o.A,{className:g.vr6}),0===t&&c,1===t&&u]})}},56171:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(18847);let n=a.n(r)()(()=>a.e(1525).then(a.bind(a,21525)),{loadableGenerated:{webpack:()=>[21525]},loadableGenerated:{webpack:()=>[21525]},ssr:!1})},81402:(e,t,a)=>{a.d(t,{A:()=>r.A});var r=a(77036)},90398:(e,t,a)=>{a.d(t,{Z:()=>r});function r(e,t,a){let r={};return e.forEach(e=>{var n;let{materialNumber:l}=e,i=t.current[l];if((null==i?void 0:i.loading)||(null===(n=a[l])||void 0===n?void 0:n.loading))return;let s=null==i?void 0:i.data;s?s.discontinuedPricingInfo?r[s.productNumber]=s.discontinuedPricingInfo:0!==s.materialPricing.length&&s.materialPricing.find(e=>e.materialNumber===l)||(r[s.productNumber]={errorMsg:"PRICING_AND_AVAILABILITY_UNAVAILABLE"}):r[l]={errorMsg:"UNABLE_TO_GET_RESPONSE_FROM_PI"}}),r}}}]); //# sourceMappingURL=./3678-8a6b36bc7be152b7.js.map