1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8718],{8961:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(37876);a(14232);let s=function(){return(0,l.jsxs)("div",{className:"flex w-full flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-tertiary",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("strong",{className:"font-medium text-text-secondary",children:"Accepted file type:"}),(0,l.jsx)("span",{children:".csv, .xlsx, .xls"})]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("strong",{className:"font-medium text-text-secondary",children:"File size:"}),(0,l.jsx)("span",{children:"10 MB Max"})]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("strong",{className:"font-medium text-text-secondary",children:"Count:"}),(0,l.jsx)("span",{children:"1 File Max"})]})]})}},17739:(e,t,a)=>{"use strict";a.d(t,{T:()=>r});var l=a(37876);a(14232);var s=a(74317);function r(e){let{className:t,...a}=e;return(0,l.jsx)("textarea",{"data-slot":"textarea",className:(0,s.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...a})}},31706:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/entity-details/[metric]/[entityId]/[year]",function(){return a(42784)}])},42063:(e,t,a)=>{"use strict";a.d(t,{u:()=>s});var l=a(14232);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{excludeKeys:a=[],includeKeys:s,maxOptionsForSelect:r=10}=t;return(0,l.useMemo)(()=>0===e.length?[]:Object.keys(e[0]).filter(e=>s?s.includes(e):!a.includes(e)).map(t=>{let a=Array.from(new Set(e.map(e=>e[t]))).filter(Boolean);return a.length>0&&a.length<=r?{name:t,type:"select",options:a.map(e=>e.toString())}:{name:t,type:"text"}}),[e,a,s,r])}},42784:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>L});var l=a(37876),s=a(14232),r=a(86506),n=a(11713);let i=(0,n.A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var o=a(498),d=a(65104);let c=(0,n.A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);var x=a(29812),m=a(7446),u=a(54613),p=a(19937),h=a(12089),f=a(46961),b=a(77041),v=a(89099),g=a.n(v),j=a(56311),y=a(93769),w=a(42063),N=a(98514),k=a(92161),C=a(59688),T=a(74317),z=a(34846),A=a(80307),S=a(76943),E=a(66184),R=a(17739),F=a(48971),U=a(89285),D=a(8961),_=a(55375);let $="align-middle",O="h-[3rem] gap-2 rounded-full font-semibold 4xl:pl-4 4xl:pr-6 4xl:font-medium 4xl:has-[>svg]:pl-4 4xl:has-[>svg]:pr-6";function L(){let[e,t]=(0,s.useState)([]),[a,n]=(0,s.useState)([]),[v,L]=(0,s.useState)([]),[I,M]=(0,s.useState)(!1),[q,P]=(0,s.useState)(!1),[B,V]=(0,s.useState)(!1),[H,Y]=(0,s.useState)(null),X=(0,s.useRef)(null),[G,Q]=(0,s.useState)(null),[K,Z]=(0,s.use
1State)(!1),{t:J}=(0,z.Bd)(),[W,ee]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(null),[el,es]=(0,s.useState)(null),[er,en]=(0,s.useState)(new Set),[ei,eo]=(0,s.useState)(!1),[ed,ec]=(0,s.useState)(!1),ex=e=>{en(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},em=(0,y.R2)(),eu=e=>{let t=J("labels.".concat(e),{defaultValue:""});return t||e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,e=>e.toUpperCase())},ep=(0,y.SQ)(),eh=(0,w.u)(a,{excludeKeys:["id","createdAt","updatedAt","firmId"],maxOptionsForSelect:10}),{metric:ef,entityId:eb,year:ev,month:eg}=g().query,ej=async(e,a)=>{var l;eg&&t([{column:"Month",value:"".concat(eg)}]),ep(!0);let s=await (0,j.uE)("Upload/metricData?metricName=".concat(e,"&entityId=").concat(a),{method:"GET"});L((null==s?void 0:s.headers)||[]),(null==s||null==(l=s.objects)?void 0:l.length)>0?(ep(!1),n(s.objects)):ep(!1)};(0,s.useEffect)(()=>{if(!g().isReady)return;let{metric:e,entityId:t,year:a}=g().query;"string"==typeof e&&"string"==typeof a&&ej(e,t)},[g().isReady,g().query]);let ey=a=>{e.find(e=>e.column===a)||t(e=>[...e,{column:a,value:""}])},ew=(e,a)=>{t(t=>t.map(t=>t.column===e?{...t,value:a}:t))},eN=e=>eh.find(t=>t.name===e),ek=(0,s.useMemo)(()=>a.filter(t=>e.every(e=>{var a;let{column:l,value:s}=e;return!s||((null==(a=t[l])?void 0:a.toString().toLowerCase())||"").includes(s.toLowerCase())})),[e,a]),eC=new Set(["Id","FirmId","EntityId","IsNew","IsDuplicate","CreatedAt","UpdatedAt"]),eT=(null==a?void 0:a[0])?Object.keys(a[0]).filter(e=>!eC.has(e)):[],ez=v.filter(e=>!eC.has(e)),eA=(0,s.useMemo)(()=>{let e={};return 0===ek.length||eT.forEach(t=>{let a=ek.map(e=>e[t]);if("Emissions"===t){let l=a.reduce((e,t)=>{let a=parseFloat(t);return isNaN(a)?e:e+a},0);e[t]={sum:l}}else{let l=new Set(a.filter(e=>null!=e&&""!==e));e[t]={uniqueCount:l.size}}}),e},[ek,eT]),eS=async()=>{try{Z(!0);let e=await (0,j.uE)("PreValidatedTemplate/generate-template",{method:"POST",body:{templateName:ef,allowedEntities:eb,financialYear:ev},responseType:"blob"});eE(e,"".concat(ef,"_Template_").concat(ev,".xlsx")),Z(!1)}catch(e){Z(!1),C.oR.error(J("metricTabs.toast.downloadFailedTitle"),{description:J("metricTabs.toast.downloadFailedDescription")})}},eE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"metric.xlsx",a=window.URL.createObjectURL(e),l=document.createElement("a");l.href=a,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(a)};function eR(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?V(!0):"dragleave"===e.type&&V(!1)}function eF(){var e;null==(e=X.current)||e.click()}let eU=async e=>{if(e.preventDefault(),!G)return;let t=new FormData(e.currentTarget);t.append("file",G),t.set("templateName",String(ef)),ev&&t.set("financialYear",String(ev)),t.set("allowedEntities","");try{let e=await (0,j.uE)("Validation",{method:"POST",body:t});if(0!==e.invalidRows&&0!==e.totalRows){var a;C.oR.warning(J("metricTabs.toast.invalidFormatTitle"),{description:J("metricTabs.toast.invalidFormatDescription")}),Q(null),Y(null),eD(null==e||null==(a=e.fileUrls)?void 0:a.errorLogFileUrl)}else e.totalRows==e.validRows?(M(!1),e_(e.fileUrls.correctedFileUrl),Q(null),Y(null),C.oR.success(J("metricTabs.toast.uploadSuccessTitle"),{description:J("metricTabs.toast.uploadSuccessDescription")})):C.oR.error(J("metricTabs.toast.uploadFailedTitle"),{description:J("metricTabs.toast.uploadFailedDescription")})}catch(e){C.oR.error(J("metricTabs.toast.uploadFailedTitle"),{description:J("metricTabs.toast.uploadFailedDescriptionWithError",{error:e||"Unknown"})})}},eD=e=>{let t=document.createElement("a");t.href=e,document.body.appendChild(t),t.click(),document.body.removeChild(t)},e_=async e=>{try{await (0,j.uE)("Upload/corrected",{method:"POST",body:{url:e,templateName:ef,allowedEntities:"",financialYear:ev}})&&(e$(),C.oR.success("File Upload!",{description:"File Upload successfully!"}))}catch(e){}},e$=async()=>{try{await (0,j.uE)("Upload/calculate",{method:"POST",body:{templateName:ef}})&&(ej(ef,eb),C.oR.success("File Upload!",{description:"File Upload successfully!"}))}catch(e){}};return(0,l.jsxs)("div",{className:"flex min-h-0 w-full flex-col",children:[(0,l.jsxs)("div",{className:"mb-4 flex w-full min-w-0 flex-wrap items-center gap-x-3 gap-y-3 xl:max-4xl:mb-6 xl:max-4xl:gap-3 4xl:flex-nowrap 4xl:justify-between 4xl:gap-3",children:[(0,l.jsx)("div",{className:"max-4xl:contents 4xl
1:flex 4xl:min-w-0 4xl:items-center 4xl:gap-2",children:e.map(e=>{var t;let{column:a,value:s}=e,r=eN(a);if(!r)return null;let n="entity-filter-".concat(a),i="Month"===a;return(0,l.jsxs)("div",{className:(0,T.cn)("flex min-w-0 max-w-full flex-row items-center gap-2",i&&"overflow-hidden xl:max-2xl:w-[16rem] xl:max-2xl:shrink-0 2xl:max-4xl:w-[25.5rem] 2xl:max-4xl:shrink-0 4xl:w-64 4xl:shrink-0"),children:[(0,l.jsx)("label",{className:"shrink-0 text-sm font-medium text-text-secondary xl:max-4xl:text-[1rem] xl:max-4xl:font-normal xl:max-4xl:text-text-tertiary 4xl:text-[1rem] 4xl:font-normal 4xl:text-text-tertiary",htmlFor:n,children:eu(a)}),"select"===r.type?(0,l.jsxs)(U.l6,{value:s||void 0,onValueChange:e=>ew(a,e),children:[(0,l.jsx)(U.bq,{id:n,className:(0,T.cn)("h-[3rem]",i?"min-w-0 xl:max-2xl:w-[10.25rem] xl:max-2xl:flex-none xl:max-2xl:shrink-0 2xl:max-4xl:min-w-0 2xl:max-4xl:flex-1 4xl:min-w-0 4xl:flex-1":"min-w-[10rem] w-max max-w-[min(100%,20rem)] shrink-0"),children:(0,l.jsx)(U.yv,{placeholder:J("filterableTable.filters.selectOption")})}),(0,l.jsx)(U.gC,{className:"max-h-[min(60vh,24rem)]",children:null==(t=r.options)?void 0:t.map(e=>(0,l.jsx)(U.eb,{value:e,children:e},e))})]}):(0,l.jsx)(F.p,{id:n,type:"text",placeholder:J("filterableTable.filters.placeholder",{column:eu(a)}),className:"h-[3rem] min-w-[10rem] max-w-[min(100%,20rem)]",value:s,onChange:e=>ew(a,e.target.value)})]},a)})}),(0,l.jsxs)("div",{className:"max-4xl:contents 4xl:flex 4xl:shrink-0 4xl:items-center 4xl:gap-3",children:[(0,l.jsxs)(b.$,{type:"button",variant:"bordered",className:O,disabled:0===er.size,onClick:()=>ec(!0),children:[(0,l.jsx)(i,{className:"size-4 shrink-0 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0}),J("filterableTable.buttons.rejectRequest")]}),(0,l.jsxs)(b.$,{type:"button",variant:"action",className:O,disabled:0===er.size,onClick:()=>eo(!0),children:[(0,l.jsx)(o.A,{className:"size-4 shrink-0 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0}),J("filterableTable.buttons.approved")]}),(0,l.jsxs)(r.rI,{children:[(0,l.jsx)(r.ty,{asChild:!0,children:(0,l.jsxs)(b.$,{type:"button",variant:"action",className:O,children:[(0,l.jsx)(d.A,{className:"size-4 shrink-0 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0}),J("filterableTable.buttons.addData")]})}),(0,l.jsxs)(r.SQ,{align:"end",className:"min-w-[12rem]",children:[(0,l.jsx)(r._2,{onClick:()=>P(!0),children:J("filterableTable.dialogs.enterData")}),(0,l.jsx)(r._2,{onClick:()=>M(!0),children:J("filterableTable.dialogs.bulkUpload")})]})]}),(0,l.jsxs)(r.rI,{children:[(0,l.jsx)(r.ty,{asChild:!0,children:(0,l.jsxs)(b.$,{type:"button",variant:"bordered",className:O,children:[(0,l.jsx)(c,{className:"size-4 shrink-0 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0}),J("filterableTable.buttons.addFilter")]})}),(0,l.jsx)(r.SQ,{align:"end",className:"max-h-[min(60vh,24rem)] overflow-y-auto",children:eh.map(t=>{let{name:a}=t;return(0,l.jsx)(r._2,{disabled:e.some(e=>e.column===a),onClick:()=>{e.some(e=>e.column===a)||ey(a)},children:eu(a)},a)})})]}),(0,l.jsxs)(b.$,{type:"button",variant:"bordered",className:O,disabled:K,onClick:eS,children:[(0,l.jsx)(x.A,{className:"size-4 shrink-0 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0}),J("filterableTable.buttons.downloadTemplate"),K&&(0,l.jsx)(m.A,{className:"size-4 shrink-0 animate-spin xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0})]}),(0,l.jsx)(b.$,{type:"button",variant:"bordered",size:"icon",className:"size-12 shrink-0 rounded-full p-3",onClick:()=>{let e=new Blob([[eT.join(","),...ek.map(e=>eT.map(t=>{var a;return'"'.concat(null!=(a=e[t])?a:"",'"')}).join(","))].join("\n")],{type:"text/csv;charset=utf-8;"}),t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.setAttribute("download","table-data.csv"),document.body.appendChild(a),a.click(),document.body.removeChild(a)},title:J("filterableTable.buttons.exportTable"),children:(0,l.jsx)(x.A,{className:"size-4 xl:max-4xl:size-6 4xl:size-6","aria-hidden":!0})})]})]}),(0,l.jsx)("div",{className:"min-h-0 w-full min-w-0 flex-1 overflow-x-auto overflow-y-auto",children:(null==ek?void 0:ek.length)?(0,l.jsxs)(_.XI,{variant:"bordered",className:"w-max min-w-full border-separate border-spacing-0",children:[(0,l.jsx)(_.A0,{variant:"bordered",children:(0,l.jsxs)(_.Hj,{variant:"bordered",children:[(0,l.jsx)(_.nd,{variant:"bordered",className:(0,T.cn)($,"w-12 min-w-12 text-center xl:max-4xl:px-3 xl:max-4xl:py-2"),children:(0,l.jsx)("input",{type:"checkbox",checked:er.size===ek.length&&ek.length>0,onChange:e=>{e.target.checked?en(new Set(ek.map((e,t)=>t))):en(new Set)}})}),eT.map(e=>(0,l.jsx)(_.nd,{variant:"bordered",className:(0,T.cn)($,"min-w-[16rem] whitespace-nowrap xl:max-4xl:px-3 xl:max-4xl:py-2"),children:eu(e)},e))]})}),(0,l.jsx)(_.BF,{children:ek.map((e,t)=>{var a;return(0,l.jsxs)(_.Hj,{variant:"bordered",children:[(0,l.jsx)(_.nA,{variant:"bordered",className:"text-center xl:max-4xl:px-3 xl:max-4xl:py-2",children:(0,l.jsx)("input",{type:"checkbox",checked:er.has(t),onChange:()=>ex(t)})}),eT.map(t=>(0,l.jsx)(_.nA,{variant:"bordered",className:"min-w-[16rem] whitespace-nowrap xl:max-4xl:px-3 xl:max-4xl:py-2",children:"status"===t?(0,l.jsx)("span",{className:"inline-block rounded-full border border-divider bg-surface3 px-2 py-1 text-xs font-medium text-text-primary",children:e[t]}
1):"Evidence"===t?(0,l.jsx)("a",{href:e[t],title:"Download",target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-text-primary hover:opacity-80",children:(0,l.jsx)(x.A,{size:18})}):e[t]},t))]},null!=(a=null==e?void 0:e.id)?a:t)})}),(0,l.jsx)(_.Gg,{className:"border-t border-divider bg-surface2 text-text-secondary",children:(0,l.jsxs)(_.Hj,{variant:"bordered",className:"!bg-surface2 hover:!bg-surface2 odd:!bg-surface2 even:!bg-surface2 text-center text-sm font-normal",children:[(0,l.jsx)(_.nA,{variant:"bordered",className:"!bg-surface2 xl:max-4xl:px-3 xl:max-4xl:py-2"}),eT.map(e=>{var t,a,s;return(0,l.jsx)(_.nA,{variant:"bordered",className:"min-w-[16rem] !bg-surface2 xl:max-4xl:px-3 xl:max-4xl:py-2",children:"Emissions"===e?(0,l.jsxs)("span",{children:[(null==(a=eA[e])||null==(t=a.sum)?void 0:t.toFixed(2))||0,(0,l.jsx)("br",{}),"Total Amount"]}):(0,l.jsxs)("span",{children:[null==(s=eA[e])?void 0:s.uniqueCount,(0,l.jsx)("br",{}),"Unique Value"]})},"footer-".concat(e))})]})})]}):(0,l.jsxs)(_.XI,{variant:"bordered",className:"min-w-[600px] text-sm",children:[(0,l.jsx)(_.A0,{variant:"bordered",children:(0,l.jsx)(_.Hj,{variant:"bordered",children:ez.map(e=>(0,l.jsx)(_.nd,{variant:"bordered",className:(0,T.cn)($,"whitespace-nowrap"),children:e},e))})}),(0,l.jsx)(_.BF,{children:(0,l.jsx)(_.Hj,{className:"hover:bg-transparent",children:(0,l.jsx)(_.nA,{colSpan:Math.max(ez.length,1),variant:"bordered",className:"py-8 text-center text-text-tertiary",children:J("filterableTable.table.noData")})})})]})}),(0,l.jsxs)("div",{className:"text-sm text-text-tertiary p-2",children:[J("filterableTable.table.totalRows",{count:ek.length}),ek.length>0&&" (".concat(J("filterableTable.table.showingRows",{start:1,end:ek.length}),")")]}),(0,l.jsx)(A.A,{isOpen:q,setIsOpen:P,selectedMetric:ef,selectedYear:ev}),(0,l.jsxs)(N.A,{isOpen:ei,onClose:()=>eo(!1),children:[(0,l.jsx)("h2",{className:"text-xl font-bold mb-2",children:"Send for Approval"}),(0,l.jsx)("p",{children:"Are you sure you want to approve all selections from the table?"}),(0,l.jsxs)("div",{className:"flex justify-end gap-3 mt-4",children:[(0,l.jsx)(b.$,{variant:"outline",onClick:()=>eo(!1),children:"Cancel"}),(0,l.jsx)(b.$,{className:"bg-green-600 hover:bg-green-700",onClick:()=>{console.log("Approve rows:",[...er]),eo(!1)},children:"Send"})]})]}),(0,l.jsxs)(N.A,{isOpen:ed,onClose:()=>ec(!1),children:[(0,l.jsx)("h2",{className:"text-xl font-bold mb-2",children:"Reject Request"}),(0,l.jsx)("p",{children:"Are you sure you want to reject all selected data from the table?"}),(0,l.jsxs)("div",{className:"flex justify-end gap-3 mt-4",children:[(0,l.jsx)(b.$,{variant:"outline",onClick:()=>ec(!1),children:"Cancel"}),(0,l.jsx)(b.$,{className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>{console.log("Reject rows:",[...er]),ec(!1)},children:"Yes, Reject"})]})]}),(0,l.jsx)(k.lG,{open:I,onOpenChange:e=>{e||M(!1)},children:(0,l.jsxs)(k.Cf,{className:"gap-6 overflow-x-hidden border-divider bg-surface1 p-6 text-text-primary sm:max-w-xl",children:[(0,l.jsxs)(k.c7,{className:"gap-2 pr-8",children:[(0,l.jsx)(k.L3,{className:"text-text-primary",children:J("metricTabs.dialog.bulkUploadTitle")}),(0,l.jsx)(k.rr,{className:"text-text-tertiary",children:"Upload a CSV or Excel file to add metric data in bulk."})]}),(0,l.jsxs)("form",{onSubmit:eU,className:"flex min-w-0 w-full flex-col gap-6",children:[W&&(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)(S.A,{fileName:H,onDelete:()=>{Y(null),Q(null)}}),et&&(0,l.jsx)(S.A,{fileName:et,onDelete:()=>{ea(null),es(null)}})]}),(!H||!et)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),eF())},onDragEnter:eR,onDragOver:eR,onDragLeave:eR,onDrop:function(e){e.preventDefault(),e.stopPropagation(),V(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&(Y(e.dataTransfer.files[0].name),Q(e.dataTransfer.files[0]))},onClick:eF,className:(0,T.cn)("cursor-pointer rounded-2xl border-2 border-dashed px-6 py-8 text-center transition-colors",B?"border-action-primary bg-selection-tertiary":"border-divider bg-surface2 hover:bg-surface3"),children:[(0,l.jsx)("input",{type:"file",ref:X,onChange:function(e){e.target.files&&e.target.files[0]&&(Y(e.target.files[0].name),Q(e.target.files[0]))},className:"hidden",accept:".csv, .xlsx, .xls"}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,l.jsx)(u.A,{size:28,className:"text-action-primary"}),(0,l.jsx)("p",{className:"text-sm text-text-secondary",children:"Drag and drop a file here, or click to select"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Supported formats: .csv, .xlsx, .xls"}),(0,l.jsx)(b.$,{type:"button",variant:"bordered",size:"sm",className:"pointer-events-none",children:"Browse files"})]})]}),H&&(!W||et)&&(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-3 rounded-xl border border-divider bg-surface2 px-3 py-2",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,l.jsx)(p.A,{size:18,className:"shrink-0 text-action-primary"}),(0,l.jsx)("span",{className:"truncate text-sm font-medium text-text-primary",children:W?et:H})]}),(0,l.jsx)(b.$,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-text-tertiary hover:bg-surface3 hover:text-alert-severe",onClick:()=>{W?(ea(null),es(null)):(Y(null),Q(null))},children:(0,l.jsx)(h.A,{className:"size-4"})})]}),em&&(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)(E.k,{className:"[&>*]:bg-action-primary",value:33}),(0,l.jsxs)("div",{className:"flex items-center gap-1 text-xs text-text-secondary",children:[(0,l.jsx)(f.A,{size:14,className:em?"animate-spin":""}),(0,l.jsx)("span",{children:"33%"})]})]})]}),(0,l.jsx)(D.A,{}),(0,l.jsx)(R.T,{className:"min-h-[5rem] w-full rounded-xl border border-divider bg-surface2 px-3 py-2 text-text-primary placeholder:text-text-tertiary",placeholder:J("metricTabs.dialog.commentPlaceholder")})]}),(0,l.jsxs)(k.Es,{className:"w-full gap-3 sm:flex-wrap sm:justify-end sm:gap-3",children:[(0,l.jsx)(b.$,{type:"button",variant:"bordered",onClick:()=>M(!1),children:"Cancel"}),(0,l.jsx)(b.$,{type:"button",variant:"bordered",disabled:!G,onClick:()=>{ee(!0)},children:J("metricTabs.buttons.uploadEvidence")}),(0,l.jsxs)(b.$,{type:"submit",variant:"action",disabled:em,className:"gap-2",children:[em&&(0,l.jsx)(m.A,{className:"h-5 w-5 animate-spin"}),J("metricTabs.buttons.sendForReview")]})]})]})]})})]})}},66184:(e,t,a)=>{"use strict";a.d(t,{k:()=>n});var l=a(37876);a(14232);var s=a(24972),r=a(74317);function n(e){let{className:t,value:a,...n}=e;return(0,l.jsx)(s.bL,{"data-slot":"progress",className:(0,r.cn)("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...n,children:(0,l.jsx)(s.C1,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:"translateX(-".concat(100-(a||0),"%)")}})})}},76943:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(37876),s=a(19937),r=a(12089);a(14232);var n=a(77041);let i=function(e){let{fileName:t,onDelete:a}=e;return(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-3 rounded-xl border border-divider bg-surface2 px-3 py-2",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,l.jsx)(s.A,{size:18,className:"shrink-0 text-action-primary"}),(0,l.jsx)("span",{className:"truncate text-sm font-medium text-text-primary",children:t})]}),(0,l.jsx)(n.$,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-text-tertiary hover:bg-surface3 hover:text-alert-severe",onClick:a,children:(0,l.jsx)(r.A,{className:"size-4"})})]})}},92161:(e,t,a)=>{"use strict";a.d(t,{Cf:()=>x,Es:()=>u,L3:()=>p,c7:()=>m,lG:()=>i,rr:()=>h,zM:()=>o});var l=a(37876);a(14232);var s=a(26303),r=a(70672),n=a(74317);function i(e){let{...t}=e;return(0,l.jsx)(s.bL,{"data-slot":"dialog",...t})}function o(e){let{...t}=e;return(0,l.jsx)(s.l9,{"data-slot":"dialog-trigger",...t})}function d(e){let{...t}=e;return(0,l.jsx)(s.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...a}=e;return(0,l.jsx)(s.hJ,{"data-slot":"dialog-overlay",className:(0,n.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1100] bg-black/50",t),...a})}function x(e){let{className:t,children:a,...i}=e;return(0,l.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,l.jsx)(c,{}),(0,l.jsxs)(s.UC,{"data-slot":"dialog-content",className:(0,n.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[1101] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
1ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[a,(0,l.jsxs)(s.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,l.jsx)(r.A,{}),(0,l.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m(e){let{className:t,...a}=e;return(0,l.jsx)("div",{"data-slot":"dialog-header",className:(0,n.cn)("flex flex-col gap-2 text-center sm:text-left",t),...a})}function u(e){let{className:t,...a}=e;return(0,l.jsx)("div",{"data-slot":"dialog-footer",className:(0,n.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function p(e){let{className:t,...a}=e;return(0,l.jsx)(s.hE,{"data-slot":"dialog-title",className:(0,n.cn)("text-lg leading-none font-semibold",t),...a})}function h(e){let{className:t,...a}=e;return(0,l.jsx)(s.VY,{"data-slot":"dialog-description",className:(0,n.cn)("text-muted-foreground text-sm",t),...a})}},98514:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(37876);a(14232);var s=a(74317),r=a(77041),n=a(70672);let i=e=>{let{isOpen:t,onClose:a,children:i,className:o="",showCloseBtn:d=!0}=e;return t?(0,l.jsx)("div",{className:"fixed inset-0 bg-background/60 flex justify-center items-center z-100 border border-divider rounded-4xl",children:(0,l.jsxs)("div",{className:(0,s.cn)("bg-surface2 p-4 rounded-4xl relative min-w-80 max-w-120 border border-divider",o),children:[(0,l.jsx)(r.$,{onClick:a,variant:"ghost",className:"absolute right-4 top-4",children:(0,l.jsx)(n.A,{size:18})}),i,d&&(0,l.jsx)(r.$,{variant:"action",onClick:a,className:"bg-action-primary text-text-btn rounded-full hover:bg-action-hover hover:text-text-btn-hover transition px-6 py-3 text-[1rem]",children:"Close"})]})}):null}}},e=>{var t=t=>e(e.s=t);e.O(0,[7058,5681,307,636,6593,8792],()=>t(31706)),_N_E=e.O()}]);
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.