1import{j as e,e as B,b as N,r as z,L as C}from"./emotion-element-f0de968e.browser.esm-DAcAn3jx.js";import{S as W}from"./SkipNext-BP6HZFXB.js";import{c as E,T as n,B as i}from"./Box-CdsPgKjk.js";import{D as H}from"./Download-CukHS6ED.js";import{S as v}from"./Stop-BV5ChDza.js";import{u as V,s as $,h as Q,bx as q,by as G,bz as K,bA as J,ba as X}from"./api-KZNW2Ket.js";import{D as Z}from"./DataloadSettings-BvosWff2.js";import{B as d,u as T}from"./Button-KVxmVPcQ.js";import{p as P}from"./parseFileSize-k5H6-IPF.js";import{L as I,M as O}from"./ItemNotFound-ryDCeKGA.js";import{b as ee,c as F}from"./Stepper-Bdsog9jr.js";import{C as ne}from"./Card-QqbP_w_-.js";import{S as A,M as te}from"./index-DkVogYJF.js";import{G as f}from"./StorePage-DCZRiikn.js";import"./imageUtils-Bv75Hoxq.js";import"./Divider-DJxQQ4t0.js";import"./FormControlLabel-gDZUzoP6.js";import"./Checkbox-BQKglEA7.js";import"./useId-BOtalUON.js";import"./Snackbar-BLmOveHA.js";import"./Favorite-V6xGmSVP.js";import"./LocationOn-DM2UKiY4.js";import"./Price-CnfREIyP.js";import"./moment-BLMuvzoS.js";import"./appPaths-B9EFiJhW.js";import"./IconButton-C4bln0zo.js";import"./Edit-DQtX7EYK.js";import"./DialogTitle-BztL3sGR.js";import"./TextField-BKbREhBK.js";import"./Tooltip-BamK8vw1.js";import"./DefaultButton-EB8kJvev.js";import"./Chip-BmmJUiHy.js";import"./LocalizationProvider-DSrdV9YK.js";import"./useThemeProps-DVgs-USV.js";import"./getThemeProps-B4ZF914Q.js";import"./Drawer-D9kGXRYg.js";import"./index.esm-CUxG0IsZ.js";import"./AtlasSearchProvider-DaJ6clz-.js";import"./ArrowRight-B4QKvvAX.js";import"./FilterDrawer-CGoJp7ei.js";import"./PagingControls-DTElKLL1.js";import"./GridView-DBRoP9ri.js";import"./CollectionItems-i54bjIho.js";import"./AnimatedLink-CaZ5Lp4_.js";import"./Message-Cfmnl7mY.js";import"./seo-N-rINtPA.js";import"./Skeleton-DSjqnrBB.js";import"./cssUtils-BDukCBHC.js";const Y=E(e.jsx("path",{d:"M7 9H2V7h5zm0 3H2v2h5zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3M2 19h10v-2H2z"})),M=E(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M7 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"})),ie=t=>{},_=({value:t,onChange:s=ie,...l})=>e.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:"10px"},children:[e.jsxs("label",{children:[e.jsx(d,{variant:"contained",size:"small",sx:{textTransform:"none",backgroundColor:"#d9d9d9",color:"black",fontWeight:700,"&:hover":{backgroundColor:"#bababa",color:"black"}},component:"span",children:"Select File"}),e.jsx("input",{...l,style:{display:"none"},type:"file",onChange:o=>{s([...o.target.files??[]])}})]}),!t&&e.jsx(n,{children:"No file selected"}),Array.isArray(t)&&!!(t!=null&&t.length)&&e.jsx(n,{children:t.map(o=>o.name).join(", ")}),!Array.isArray(t)&&t&&e.jsx(n,{children:t.name})]}),rn=()=>{var k;const t=T(),s=B(),l=V($);let{storeId:o}=N();o||(o=(k=l==null?void 0:l.role)==null?void 0:k.store);const{data:y,isLoading:h,isError:a,isSuccess:p}=Q({storeId:o},{skip:!o}),[r,j]=q(),[g,c]=G(),[x,u]=K(),[m,D]=z.useState(null),[b,w]=z.useState(0),S=()=>{s(`/admin/inventory/submit/${o}`)};if(h)return e.jsx("div",{children:"Loading..."});if(a)return e.jsx("div",{children:"Error..."});if(p&&y)return e.jsxs(i,{sx:{p:4,color:"text.primary"},children:[e.jsxs(i,{sx:{display:"flex"},children:[e.jsx(C,{to:`/admin/dashboard/${o}`,style:{textDecoration:"none"},children:e.jsx(n,{color:"text.secondary",sx:{fontWeight:600,"&:hover":{textDecoration:"underline"}},children:"Admin"})}),"/",e.jsx(C,{to:"/admin/inventory/view",style:{textDecoration:"none"},children:e.jsx(n,{color:"text.secondary",sx:{fontWeight:600,"&:hover":{textDecoration:"underline"}},children:"Inventory"})}),"/",e.jsx(C,{to:`/admin/inventory/submit/${o}`,style:{textDecoration:"none"},children:e.jsx(n,{color:"text.secondary",sx:{fontWeight:600,"&:hover":{textDecoration:"underline"}},children:"Submit"})}),"/",e.jsx(n,{color:"text.secondary",sx:{fontWeight:600},children:"File"})]}),(m==null?void 0:m.type)!=="application/json"&&b>0&&e.jsx(i,{sx:{p:4},children:e.jsxs(i,{sx:{width:"100%",my:4},children:[e.jsxs(n,{variant:"h4",sx:{fontWeight:700,textAlign:"center",my:2},children:["Step ",b]}
1),e.jsxs(ee,{activeStep:b,sx:{maxWidth:"400px",mx:"auto"},children:[e.jsx(F,{children:e.jsx(L,{theme:t,thisStep:1,currentStep:b,setStep:w})}),e.jsx(F,{children:e.jsx(L,{theme:t,thisStep:2,currentStep:b,setStep:w})})]})]})}),b===0&&e.jsx(se,{data:y,fileToUpload:m,setFileToUpload:D,setStep:w,validateInventoryFileTrigger:r,uploadInventoryTrigger:g,cancelProcess:S}),b===1&&e.jsx(oe,{validatedFileResult:j,validateInventoryFileTrigger:r,validateInventoryFileDataTrigger:x,uploadInventoryTrigger:g,fileToUpload:m,setStep:w,storeId:o,cancelProcess:S}),b===2&&e.jsx(ae,{validateInventoryFileDataResult:u,uploadInventoryResult:c,cancelProcess:S,storeId:o,setStep:w})]})};function re(t,s,l){return s===l?t.palette.warning.main:s>l?t.palette.background.default:t.palette.text.secondary}const L=({theme:t,thisStep:s,currentStep:l,setStep:o})=>e.jsx(i,{sx:{borderRadius:"50%",backgroundColor:re(t,l,s),width:"30px",height:"30px","&:hover":{cursor:"pointer",border:"1px solid black"}},onClick:()=>{o(s)}}),se=({data:t,fileToUpload:s,setFileToUpload:l,setStep:o,validateInventoryFileTrigger:y,uploadInventoryTrigger:h,cancelProcess:a})=>e.jsxs(i,{sx:{p:4,color:"text.primary"},children:[e.jsx(n,{variant:"h5",sx:{fontWeight:800,fontSize:"14px"},children:"Please review your Dataload Settings for Manual Uploads"}),e.jsx(i,{sx:{my:4},children:e.jsx(Z,{store:t.store,config:"manual"})}),e.jsx(n,{variant:"h5",sx:{fontWeight:800,fontSize:"14px"},children:"Choose the File you want to upload"}),e.jsxs(n,{variant:"body1",sx:{fontSize:"12px",pl:4,mb:1},children:["To add inventory this way, please use our process to upload a"," ",e.jsx("strong",{children:".csv, .xls, .xlsx, or .json"})," file with your store's inventory. Only UPCs for RSD's historical catalog , RSD Essentials, and all Indie Exclusives will be accepted (for now)."]}),e.jsxs(n,{variant:"body1",sx:{fontSize:"12px",pl:4,mb:2},children:["You may provide ",e.jsx("strong",{children:"UPC, price, and quantity"})," columns of data and then you will have the opportunity to check your columns before submitting for your store."]}),e.jsx(_,{value:s,name:"inventory",accept:".csv, .xls, .xlsx, .json",onChange:p=>{l(p[0])}}),e.jsxs(i,{sx:{mt:4,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(d,{variant:"outlined",color:"warning",size:"small",onClick:()=>{a()},sx:{mt:2,textTransform:"none"},children:[e.jsx(v,{})," Cancel Process"]}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",disabled:!s,onClick:()=>{(s==null?void 0:s.type)==="application/json"?(h({storeId:t.store.id,file:s}),o(2)):(y({storeId:t.store.id,file:s}),o(1))},sx:{mt:2,textTransform:"none"},children:["Submit And Move On ",e.jsx(W,{})]})]})]}),oe=({validatedFileResult:t,fileToUpload:s,validateInventoryFileTrigger:l,validateInventoryFileDataTrigger:o,uploadInventoryTrigger:y,storeId:h,setStep:a,cancelProcess:p})=>{const{data:r,isLoading:j,isError:g,error:c}=t,[x,u]=z.useState(null),[m,D]=z.useState(1),[b,w]=z.useState(2),[S,k]=z.useState(3);return j?e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1,color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Checking some things..."}),e.jsx(Y,{color:"warning",sx:{fontSize:"48px"}}),e.jsx(i,{sx:{width:"50%"},children:e.jsx(I,{color:"warning"})})]}):g?e.jsxs(i,{sx:{color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"File Rejected"}),e.jsxs(i,{sx:{display:"flex",flexDirection:"row",gap:1},children:[e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600},children:x?x.name:s.name}),e.jsx(n,{variant:"body1",color:"secondary",sx:{fontSize:"14px",fontWeight:600},children:P(s.size)})]}),e.jsx(n,{variant:"body1",color:"error",sx:{fontSize:"14px",fontWeight:600},children:c.data.error.message}),e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600,mt:4,mb:2},children:"Retry with a new file"}),e.jsx(_,{value:x,name:"inventory",accept:".csv, .xls, .xlsx, .json",onChange:U=>{u(U[0])}}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",disabled:!x,onClick:()=>{(x==null?void 0:x.type)==="application/json"?(y({storeId:h,file:x}),a(2)):l({storeId:h,file:x})},sx:{mt:2,textTransform:"none"},children:["Resubmit ",e.jsx(W,{})]})]}):e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.primary"},children:[e.jsx(n,{variant:"h4",color:"warning.main",sx:{fontSize:"16px",fontWeight:600},children:"File Accepted!"}),e.jsxs(i,{sx:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:1},children:[e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600},children:(r==null?void 0:r.file.originalname)||"unknown filename"}),e.jsx(n,{variant:"body1",color:"secondary",sx:{fontSize:"12px",fontWeight:600},children:P(r==null?void 0:r.file.size)||"unknown filesize"})]}),e.jsxs(n,{variant:"body1",sx:{fontSize:"12px",fontWeight:600},children:["CONFIRMED"," ",e.jsx(O,{format:"MM/DD/YYYY hh:mm a",children:r==null?void 0:r.file.confirmedDate})]}),e.jsx(n,{variant:"h3",sx:{fontSize:"16px",fontWeight:600,mt:4,mb:2},children:"Content Allocation"}),e.jsxs(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600},children:["We have detected ",(r==null?void 0:r.maxColumns)||0," columns"]}),e.jsx(n,{variant:"body1",sx:{fontSize:"12px",fontWeight:500},children:"Here are your first 2 detectable rows"}),e.jsx(le,{upcColumn:m,qtyColumn:b,priceColumn:S,setUpcColumn:D,setQtyColumn:w,setPriceColumn:k,rows:r==null?void 0:r.fileHead,maxColumns:r==null?void 0:r.maxColumns}),e.jsxs(i,{sx:{mt:4,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:1},children:[e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},onClick:()=>{p()},children:[e.jsx(v,{})," Cancel Process"]}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},onClick:()=>{o({file:r.file,columns:{upcColumn:m-1,qtyColumn:b-1,priceColumn:S-1},storeId:h,dataLoadId:r.dataLoad}),a(2)},children:["Continue ",e.jsx(W,{})]})]})]})},le=({rows:t,upcColumn:s=1,qtyColumn:l=2,priceColumn:o=3,setUpcColumn:y,setQtyColumn:h,setPriceColumn:a,maxColumns:p})=>{const r=T(),j=c=>{const x=[];for(let u=0;u<c;u++)x.push(e.jsx(te,{value:u+1,children:u+1}));return x},g=c=>e.jsx(e.Fragment,{children:c.split(",").map((x,u)=>{let m=null;return u===s-1?m=e.jsx("span",{style:{color:r.palette.error.main},children:x}):u===l-1?m=e.jsx("span",{style:{color:r.palette.primary.main},children:x}):u===o-1?m=e.jsx("span",{style:{color:r.palette.secondary.main},children:x}):m=e.jsx(e.Fragment,{children:x}),u===c.split(",").length-1?e.jsx(e.Fragment,{children:m}):e.jsxs(e.Fragment,{children:[m,","]})})});return e.jsxs(i,{sx:{mt:2,color:"text.primary"},children:[e.jsxs(i,{sx:{borderRadius:"10px",border:"1px solid gray",display:"flex",flexDirection:"row"},children:[e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRight:"1px solid gray",borderRadius:"10px 0 0 10px",backgroundColor:"#313131",color:"white",p:1},children:[e.jsx(n,{sx:{fontSize:"12px",fontWeight:600},children:"1"}),e.jsx(n,{sx:{fontSize:"12px",fontWeight:600},children:"2"})]}),t&&e.jsx(i,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",borderRadius:"0 10px 10px 0",backgroundColor:r.palette.background.default,p:1,width:"100%"},children:t.map((c,x)=>e.jsx(n,{sx:{fontSize:"12px",fontWeight:600},children:g(c)}))})]}),e.jsxs(i,{sx:{mt:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2},children:[e.jsx(ne,{sx:{backgroundColor:"#313131",color:"white",p:1,fontSize:"14px",minWidth:"600px",textAlign:"center"},children:"These are our best guesses. Please change any that are incorrect."}),e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:1},children:[e.jsxs(i,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2},children:[e.jsxs(n,{sx:{fontSize:"14px",fontWeight:700},children:["Your ",e.jsx("span",{style:{color:r.palette.error.main},children:"UPC"}
1)," ","is in column"]}),e.jsx(A,{size:"small",value:s,onChange:c=>{y(c.target.value)},children:j(p)})]}),e.jsxs(i,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2},children:[e.jsxs(n,{sx:{fontSize:"14px",fontWeight:700},children:["Your"," ",e.jsx("span",{style:{color:r.palette.primary.main},children:"Quantity"})," ","is in column"]}),e.jsx(A,{size:"small",value:l,onChange:c=>{h(c.target.value)},children:j(p)})]}),e.jsxs(i,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2},children:[e.jsxs(n,{sx:{fontSize:"14px",fontWeight:700},children:["Your"," ",e.jsx("span",{style:{color:r.palette.secondary.main},children:"Price"})," ","is in column"]}),e.jsx(A,{size:"small",value:o,onChange:c=>{a(c.target.value)},children:j(p)})]})]})]})]})},ae=({validateInventoryFileDataResult:t,uploadInventoryResult:s,cancelProcess:l,storeId:o,setStep:y})=>{var p,r,j,g,c,x;const[h,a]=J();return t.isLoading||s.isLoading?e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1,color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Validating upload..."}),e.jsx(Y,{color:"warning",sx:{fontSize:"48px"}}),e.jsx(i,{sx:{width:"50%"},children:e.jsx(I,{color:"warning"})})]}):t.isError?e.jsxs(i,{sx:{color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"There was a problem validating the contents of your file"}),e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600,mt:4,mb:2},children:t.error.data.error.message}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",onClick:()=>{l()},sx:{mt:2,textTransform:"none"},children:[e.jsx(v,{})," Cancel Process"]})]}):s.isError?e.jsxs(i,{sx:{color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"There was a problem validating the contents of your file"}),e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600,mt:4,mb:2},children:s.error.data.error.message}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",onClick:()=>{l()},sx:{mt:2,textTransform:"none"},children:[e.jsx(v,{})," Cancel Process"]})]}):t.isSuccess?e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"24px",fontWeight:500,fontFamily:"Oswald",mb:4},children:"Final Report"}),e.jsx(R,{dataload:t.data.dataload,storeId:o}),e.jsxs(i,{sx:{mt:4,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:1},children:[e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},disabled:a.isSuccess,onClick:()=>{l()},children:[e.jsx(v,{})," Cancel Process"]}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},disabled:!a.isUninitialized,onClick:()=>{h({storeId:o,dataloadId:t.data.dataload._id})},children:["Finish Upload Process ",e.jsx(W,{})]})]}),a.isLoading&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1,color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Processing data..."}),e.jsx(M,{color:"warning",sx:{fontSize:"48px"}}),e.jsx(i,{sx:{width:"50%"},children:e.jsx(I,{color:"warning"})})]}),a.isError&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Something went wrong while processing your data"}),e.jsx(n,{variant:"body1",color:"error.main",sx:{fontSize:"12px",fontWeight:600},children:(j=(r=(p=a.error)==null?void 0:p.data)==null?void 0:r.error)==null?void 0:j.message})]}),a.isSuccess&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1,color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Processing Started"}),e.jsx(n,{variant:"body1",sx:{fontSize:"12px",fontWeight:600},children:"Your inventory file is now being processed. This may take a few minutes for large files."}),e.jsx(C,{to:`/admin/inventory/submit/${o}`,children:e.jsx(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},children:"Done"})})]})]}):s.isSuccess?e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"24px",fontWeight:500,fontFamily:"Oswald",mb:4},children:"Final Report"}),e.jsx(R,{dataload:s.data.dataload,storeId:o}),e.jsxs(i,{sx:{mt:4,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:1},children:[e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},disabled:a.isSuccess,onClick:()=>{l()},children:[e.jsx(v,{})," Cancel Process"]}),e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},disabled:!a.isUninitialized,onClick:()=>{h({storeId:o,dataloadId:s.data.dataload._id})}
1,children:["Finish Upload Process ",e.jsx(W,{})]})]}),a.isLoading&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1,color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Processing data..."}),e.jsx(M,{color:"warning",sx:{fontSize:"48px"}}),e.jsx(i,{sx:{width:"50%"},children:e.jsx(I,{color:"warning"})})]}),a.isError&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Something went wrong while processing your data"}),e.jsx(n,{variant:"body1",color:"error.main",sx:{fontSize:"12px",fontWeight:600},children:(x=(c=(g=a.error)==null?void 0:g.data)==null?void 0:c.error)==null?void 0:x.message})]}),a.isSuccess&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Processing Started"}),e.jsx(n,{variant:"body1",sx:{fontSize:"12px",fontWeight:600},children:"Your inventory file is now being processed. This may take a few minutes for large files."}),e.jsx(C,{to:`/admin/inventory/submit/${o}`,children:e.jsx(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none"},children:"Done"})})]})]}):e.jsxs(i,{sx:{color:"text.primary"},children:[e.jsx(n,{variant:"h4",sx:{fontSize:"16px",fontWeight:600},children:"Sorry, something went wrong"}),e.jsx(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none",mt:2},onClick:()=>{y(0)},children:"Back to Upload Page"})]})},R=({dataload:t,storeId:s})=>{const l=T(),[o,y]=X(),h=a=>{o({storeId:s,inventoryDataloadId:a}).unwrap().then(p=>{const r=new Blob([p.data],{type:"text/json"}),j=window.URL.createObjectURL(r),g=document.createElement("a");g.href=j,g.download=p.filename,g.click()})};return e.jsxs(f,{container:!0,spacing:0,sx:{textAlign:"center",color:"text.primary"},children:[e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,pl:2,mb:1,display:"flex",alignItems:"center"},size:2,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Uploaded"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:4,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",pl:"4ch",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Info"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Total SKUs"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Successful"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Warnings"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontFamily:"Oswald",fontSize:"16px",fontWeight:500},children:"Errors"})}),e.jsx(f,{sx:{backgroundColor:"#313131",color:"white",p:1,mb:1,display:"flex",alignItems:"center"},size:2}),t&&[e.jsx(f,{sx:{pr:1,pl:2,py:2,backgroundColor:l.palette.background.paper,mb:1,display:"flex",flexDirection:"row",alignItems:"center"},size:2,children:e.jsx(n,{variant:"body1",sx:{fontWeight:700},children:t.createdAt?e.jsx(O,{format:"MM/DD/YY",children:t.createdAt}):"unknown"})}),e.jsxs(f,{sx:{px:1,py:2,display:"flex",flexDirection:"row",alignItems:"center",gap:1,backgroundColor:l.palette.background.paper,mb:1},size:4,children:[e.jsx(n,{color:"text.secondary",sx:{fontSize:"14px",fontWeight:400},children:t.size?P(t.size):""}),e.jsx(n,{variant:"body1",sx:{fontSize:"14px",fontWeight:600},children:t.originalName||""})]}),e.jsx(f,{sx:{px:1,py:2,backgroundColor:l.palette.background.paper,display:"flex",flexDirection:"row",alignItems:"center",mb:1},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontSize:"14px",fontWeight:500},children:t.summary?t.summary.successful_rows+t.summary.failed_rows:"unknown"})}),e.jsx(f,{sx:{px:1,py:2,backgroundColor:l.palette.background.paper,display:"flex",flexDirection:"row",alignItems:"center",mb:1},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontSize:"14px",fontWeight:500},children:t.summary?t.summary.successful_rows:"unknown"})}),e.jsx(f,{sx:{px:1,py:2,backgroundColor:l.palette.background.paper,display:"flex",flexDirection:"row",alignItems:"center",mb:1},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontSize:"14px",fontWeight:500},children:t.summary?t.summary.success_warning_rows+t.summary.failed_warning_rows:"unknown"})}),e.jsx(f,{sx:{px:1,py:2,backgroundColor:l.palette.background.paper,display:"flex",flexDirection:"row",alignItems:"center",mb:1},size:1,children:e.jsx(n,{variant:"body1",sx:{textAlign:"left",fontSize:"14px",fontWeight:500},children:t.summary?t.summary.failed_rows:"unknown"})}),e.jsx(f,{sx:{px:1,py:2,backgroundColor:l.palette.background.paper,mb:1},size:2,children:e.jsxs(d,{variant:"outlined",color:"warning",size:"small",sx:{textTransform:"none",fontSize:"14px",fontWeight:600,p:"3px 10px"},onClick:()=>{h(t._id)},children:["Download Full Report"," ",e.jsx(H,{sx:{ml:1,fontSize:"14px"}})]})})]]})};export{rn as default};
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.