1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9766],{87385:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var n=s(95155),r=s(12115),i=s(95604),l=s(86204),o=s(34777),a=s(17605),d=s(54721),c=s(86585),x=s(9567),p=s(54685),h=s(80317),u=s(60193),j=s(83451),m=s(75970),f=s(65131),g=s(65563),C=s(57828),k=s(24033),A=s(99975),v=s(90368),N=s(90088),b=s(27937);let w=e=>{let t,{status:s}=e,r=(0,i.useTranslations)("BuyerCenter.rfq.responseTable"),l="default";switch(s){case"interested":l="success",t=r("statusInterested");break;case"ignored":l="error",t=r("statusIgnored");break;case"unsorted":l="default",t=r("statusUnsorted");break;default:l="default",t=String(s).toUpperCase()}return(0,n.jsx)(h.default,{variant:"caption",className:"px-2 py-1 rounded-md font-semibold ".concat("success"===l?"bg-green-100 text-green-700":"error"===l?"bg-red-100 text-red-700":"bg-gray-100 text-gray-700"),children:t})},y=e=>{let{responses:t,totalCount:s,initialRowsPerPage:y,initialPage:D,onPageChange:_,onReviewResponse:M,onChangeState:W,token:L}=e,z=(0,i.useTranslations)("BuyerCenter.rfq.responseTable"),S=(0,i.useTranslations)("Common"),I=(0,i.useTranslations)("Cart"),B=Math.min(D*y+t.length,s),[F,O]=(0,r.useState)(!1),[T,H]=(0,r.useState)(D-1),[q,E]=(0,r.useState)(y),[P,R]=(0,r.useState)(String(D)),U=Math.ceil(s/q);(0,r.useEffect)(()=>{R(String(T+1))},[T]);let K=()=>{if(T+1<U){let e=T+1;H(e),_(e+1,q)}},Y=()=>{if(T>0){let e=T-1;H(e),_(e+1,q)}};return(0,n.jsxs)(m.A,{elevation:0,children:[(0,n.jsx)(p.A,{children:(0,n.jsxs)(o.A,{size:"small",children:[(0,n.jsx)(c.A,{children:(0,n.jsxs)(x.A,{className:"bg-[#F2F4F7]",children:[(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("repliedDate")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("company")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("quantity")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("unitPrice")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("leadTime")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("status")}),(0,n.jsx)(d.A,{sx:{fontWeight:600,px:3},children:z("action")})]})}),(0,n.jsx)(a.A,{children:0===s?(0,n.jsx)(x.A,{children:(0,n.jsx)(d.A,{colSpan:7,align:"center",children:(0,n.jsx)(j.default,{className:"flex items-center justify-center p-4",children:(0,n.jsx)(h.default,{children:z("noResponseYet")})})})}):t.map(e=>{let t,s,r=(null==e?void 0:e.replied_date)?(0,l.a8)(null==e?void 0:e.replied_date):"",i=e.lead_time?"".concat(e.lead_time," ").concat(I("item.days")):"";return(0,n.jsxs)(x.A,{className:"text-[#344054]",sx:{"&:last-child td, &:last-child th":{border:0}},children:[(0,n.jsx)(d.A,{sx:{px:3},children:r}),(0,n.jsx)(d.A,{sx:{px:3},children:(0,n.jsxs)(j.default,{className:"flex text-sm flex-col",children:[(0,n.jsx)("span",{className:"font-bold text-[#344054]",children:e.company_name}),(0,n.jsx)("span",{className:"font-normal text-[#344054]",children:e.email})]})}),(0,n.jsxs)(d.A,{sx:{px:3},className:"font-bold text-[#344054]",children:[e.proposed_quantity," \xa0",e.proposed_unit_quantity]}),(0,n.jsx)(d.A,{sx:{px:3},className:"font-bold text-[#344054]",children:(t=e.proposed_price,s=e.proposed_unit_price,"".concat(t," ").concat(s))}),(0,n.jsx)(d.A,{sx:{px:3},className:"font-bold text-[#344054]",children:i}),(0,n.jsx)(d.A,{sx:{px:3},children:(0,n.jsx)(w,{status:e.state})}),(0,n.jsxs)(d.A,{sx:{px:3},children:[(0,n.jsx)(u.A,{size:"small",onClick:()=>M(e),title:S("tooltips.viewResponse"),children:(0,n.jsx)(C.A,{size:20})}),"ignored"!==e.state&&(0,n.jsx)(u.A,{size:"small",onClick:()=>W(L,e.id,"ignored",()=>{}),title:S("tooltips.markIgnored"),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("path",{d:"M12.5 20H10.5C6.741 20 4.862 20 3.607 19.01C3.40756 18.852 3.2222 18.677 3.053 18.487C2 17.307 2 15.537 2 12C2 8.463 2 6.694 3.053 5.513C3.22167 5.32367 3.40633 5.14967 3.607 4.991C4.862 4 6.741 4 10.5 4H13.5C17.259 4 19.138 4 20.392 4.99C20.5933 5.15 20.7783 5.32433 20.947 5.513C21.896 6.577 21.99 8.118 22 11",stroke:"#475467",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 9H22",stroke:"#475467",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M22 14L16 20M22 20L16 14",stroke:"#FF2F2F",strokeWidth:"1.5",strokeLinecap:"round"})]})}),"interested"!==e.state&&(0,n.jsx)(u.A,{size:"small",onClick:()=>W(L,e.id,"interested",()=>{}),title:S("tooltips.markInterested"),children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("path",{d:"M11 20H10.5C6.741 20 4.862 20 3.607 19.01C3.40756 18.852 3.2222 18.677 3.053 18.487C2 17.307 2 15.537 2 12C2 8.463 2 6.694 3.053 5.513C3.22167 5.32367 3.40633 5.14967 3.607 4.991C4.862 4 6.741 4 10.5 4H13.5C17.259 4 19.138 4 20.392 4.99C20.5933 5.15 20.7783 5.32433 20.947 5.513C21.896 6.577 21.99 8.118 22 11",stroke:"#475467",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M2 9H22",stroke:"#475467",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M14 18C14 18 15 18 16 20C16 20 19.177 15 22 14",stroke:"#12B76A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]},e.id)})})]})}),(0,n.jsx)("div",{className:"px-[14px] py-[7px]",children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row justify-between md:items-center",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center px-[7px] py-[10.5px]",children:[(0,n.jsx)("div",{className:"text-[#98A2B3]",children:z("itemPerPage")}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(f.A,{IconComponent:()=>null,value:q.toString(),onChange:e=>{let t=parseInt(e.target.value,10);E(t),H(0),R("1"),_(1,t)},onOpen:()=>O(!0),onClose:()=>
1O(!1),className:"!rounded-lg !text-[14px] h-[40px] !border !p-[8px]",sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#9ca3af"}},children:[10,20,50,100].map(e=>(0,n.jsx)(g.A,{value:e,children:e},e))}),(0,n.jsx)(k.A,{size:18,className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 transition-transform duration-300 pointer-events-none ".concat(F?"rotate-180 text-gray-600":"rotate-0")})]}),(0,n.jsxs)("div",{className:"text-[#98A2B3]",children:[z("showing")," ",B," ",z("of")," ",s," ",z("entries")]})]}),(0,n.jsxs)("div",{className:"flex gap-6 items-center p-[14px]",children:[(0,n.jsx)(A.A,{className:"text-[#475467] cursor-pointer",size:14,onClick:Y}),(0,n.jsx)(v.A,{className:"text-[#475467] cursor-pointer",size:14,onClick:Y}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"text",value:P,onChange:e=>{let t=e.target.value;/^\d*$/.test(t)&&R(t)},onKeyDown:e=>{if("Enter"===e.key){let e=Number(P);e>=1&&e<=U?(H(e-1),_(e,q)):R(String(T+1))}},className:"w-[40px] h-[40px] border border-[#D0D5DD] rounded-lg focus:border-[#D0D5DD] focus:outline-none focus:ring-0 text-center"}),(0,n.jsxs)("div",{children:[z("of")," ",U]})]}),(0,n.jsx)(N.A,{className:"text-[#475467] cursor-pointer",size:14,onClick:K}),(0,n.jsx)(b.A,{className:"text-[#475467] cursor-pointer",size:14,onClick:K})]})]})})]})}}}]);
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.