1import{x as I,u as le,r as l,b as ie,c as B,j as e,W as O,L as _,B as f,C as ne,U as z,_ as K,I as H,v as S,J as Q}from"./index-BRJ5ZK5v.js";import{S as ce}from"./switch-C7ErJ7gd.js";import{C as A,d as D}from"./card-CDridMaN.js";import{B as d}from"./badge-B3_-or2v.js";import{D as de,a as oe,b as xe,c as me}from"./dialog-BBwNo65S.js";import{S as L,a as q,b as P,c as T,d as m}from"./select-CmaxMc0N.js";import{C as ue}from"./chevron-up-8zgptxCn.js";import{T as he}from"./tag-C_oRtwxh.js";import{U as pe}from"./upload-CUENmDXe.js";import{T as ge}from"./trash-2-DtAeGN4W.js";import{I as je}from"./image-Bkih9AUc.js";import{A as fe}from"./arrow-up-down-B9smV01Q.js";import{A as be,a as Ne}from"./arrow-up-C9eLeQfm.js";import"./index-DMe0aH8K.js";import"./index-BdQq_4o_.js";import"./index-CHcawZx6.js";import"./check-D8iPEp1e.js";const ve=[["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"}]],ye=I("funnel",ve);const we=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],Ce=I("toggle-left",we);const ke=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],Se=I("toggle-right",ke);function ze(){const{toast:u}=le(),[g,F]=l.useState(""),[b,G]=l.useState("all"),[N,J]=l.useState("all"),[v,W]=l.useState("all"),[y,Y]=l.useState("name"),[w,M]=l.useState("asc"),[o,X]=l.useState(!1),[a,C]=l.useState(null),[$,U]=l.useState(!1),j=l.useRef(null),{data:Z,isLoading:ee}=ie({queryKey:["/api/square/products"]}),i=Z?.items||[],se=B({mutationFn:async({id:s,isEnabled:t})=>{await Q("PATCH",`/api/square/products/${s}`,{isEnabled:t})},onSuccess:()=>{S.invalidateQueries({queryKey:["/api/square/products"]})},onError:s=>{u({title:"Error",description:s.message,variant:"destructive"})}}),k=B({mutationFn:async({ids:s,isEnabled:t})=>{await Promise.all(s.map(r=>Q("PATCH",`/api/square/products/${r}`,{isEnabled:t})))},onSuccess:()=>{S.invalidateQueries({queryKey:["/api/square/products"]}),u({title:"Updated",description:"Products updated successfully."})}}),ae=l.useMemo(()=>{const s=new Set;return i.forEach(t=>{t.category&&s.add(t.category)}),Array.from(s).sort()},[i]),x=l.useMemo(()=>{const s=i.filter(t=>!(g&&!t.name.toLowerCase().includes(g.toLowerCase())||b!=="all"&&t.category!==b||N==="enabled"&&!t.isEnabled||N==="disabled"&&t.isEnabled||v==="online"&&!t.ecomAvailable||v==="not_online"&&t.ecomAvailable));return s.sort((t,r)=>{let n,c;switch(y){case"isEnabled":n=t.isEnabled?1:0,c=r.isEnabled?1:0;break;case"name":n=t.name.toLowerCase(),c=r.name.toLowerCase();break;case"category":n=(t.category||"").toLowerCase(),c=(r.category||"").toLowerCase();break;case"price":n=t.price,c=r.price;break;case"variationCount":n=t.variationCount,c=r.variationCount;break;case"ecomAvailable":n=t.ecomAvailable?1:0,c=r.ecomAvailable?1:0;break}return n<c?w==="asc"?-1:1:n>c?w==="asc"?1:-1:0}),s},[i,g,b,N,v,y,w]),E=i.filter(s=>s.isEnabled).length,V=i.length-E,R=x.filter(s=>s.isEnabled).length;function h(s){y===s?M(t=>t==="asc"?"desc":"asc"):(Y(s),M(s==="name"||s==="category"?"asc":"desc"))}async function te(s){if(!(!a||!s.target.files?.[0])){U(!0);try{const t=new FormData;t.append("file",s.target.files[0]);const r=await fetch(`/api/square/products/${a.id}/label`,{method:"POST",body:t});if(!r.ok){const c=await r.json();throw new Error(c.message||"Upload failed")}const n=await r.json();C({...a,labelImage:n.labelImage}),S.invalidateQueries({queryKey:["/api/square/products"]}),u({title:"Label uploaded"})}catch(t){u({title:"Error",description:t.message,variant:"destructive"})}finally{U(!1),j.current&&(j.current.value="")}}}async function re(){if(a)try{await fetch(`/api/square/products/${a.id}/label`,{method:"DELETE"}),C({...a,labelImage:null}),S.invalidateQueries({queryKey:["/api/square/products"]}),u({title:"Label removed"})}catch{u({title:"Error",description:"Failed to remove label",variant:"destructive"})}}function p({column:s}){return y!==s?e.jsx(fe,{className:"h-3 w-3 ml-1 opacity-40"}):w==="asc"?e.jsx(be,{className:"h-3 w-3 ml-1"}):e.jsx(Ne,{className:"h-3 w-3 ml-1"})}return ee?e.jsx(O,{children:e.jsx("div",{className:"flex justify-center py-20",children:e.jsx(_,{className:"h-8 w-8 animate-spin text-primary","data-testid":"loading-spinner"})})}):e.jsxs(O,{children:[e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-serif mb-1",style:{color:"#2B4650"},"data-testid":"text-page-title",children:"Products"}),o&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[i.length," products
1· ",E," enabled · ",V," disabled · Showing ",x.length]}),!o&&e.jsx("p",{className:"text-muted-foreground",children:"Toggle products on or off to control storefront visibility."})]}),e.jsxs(f,{variant:"ghost",size:"sm",onClick:()=>X(s=>!s),className:"gap-1 text-xs text-muted-foreground","data-testid":"button-toggle-top",children:[o?e.jsx(ne,{className:"h-4 w-4"}):e.jsx(ue,{className:"h-4 w-4"}),o?"Expand":"Collapse"]})]})}),!o&&e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[e.jsx(A,{children:e.jsx(D,{className:"pt-4 pb-3 px-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg flex items-center justify-center",style:{backgroundColor:"#F3D3cd"},children:e.jsx(z,{className:"h-5 w-5",style:{color:"#2B4650"}})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",style:{color:"#2B4650"},"data-testid":"text-total-products",children:i.length}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Products"})]})]})})}),e.jsx(A,{children:e.jsx(D,{className:"pt-4 pb-3 px-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg flex items-center justify-center",style:{backgroundColor:"#dde3c4"},children:e.jsx(Se,{className:"h-5 w-5",style:{color:"#708238"}})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",style:{color:"#708238"},"data-testid":"text-enabled-count",children:E}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Enabled"})]})]})})}),e.jsx(A,{children:e.jsx(D,{className:"pt-4 pb-3 px-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg flex items-center justify-center",style:{backgroundColor:"#Ece9eA"},children:e.jsx(Ce,{className:"h-5 w-5",style:{color:"#5a5456"}})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold",style:{color:"#5a5456"},"data-testid":"text-disabled-count",children:V}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Disabled"})]})]})})})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:[!o&&e.jsxs("div",{className:"p-4 border-b border-gray-200 flex flex-wrap gap-3 items-center",children:[e.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[e.jsx(K,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(H,{placeholder:"Search products...",className:"pl-10",value:g,onChange:s=>F(s.target.value),"data-testid":"input-search-products"})]}),e.jsxs(L,{value:b,onValueChange:G,children:[e.jsxs(q,{className:"w-[180px]","data-testid":"select-category-filter",children:[e.jsx(ye,{className:"h-4 w-4 mr-2"}),e.jsx(P,{placeholder:"Category"})]}),e.jsxs(T,{className:"max-h-[300px] overflow-y-auto",children:[e.jsx(m,{value:"all",children:"All Categories"}),ae.map(s=>e.jsx(m,{value:s,children:s},s))]})]}),e.jsxs(L,{value:N,onValueChange:s=>J(s),children:[e.jsx(q,{className:"w-[150px]","data-testid":"select-status-filter",children:e.jsx(P,{placeholder:"Status"})}),e.jsxs(T,{children:[e.jsx(m,{value:"all",children:"All Status"}),e.jsx(m,{value:"enabled",children:"Enabled"}),e.jsx(m,{value:"disabled",children:"Disabled"})]})]}),e.jsxs(L,{value:v,onValueChange:s=>W(s),children:[e.jsx(q,{className:"w-[150px]","data-testid":"select-online-filter",children:e.jsx(P,{placeholder:"Online"})}),e.jsxs(T,{children:[e.jsx(m,{value:"all",children:"All Online"}),e.jsx(m,{value:"online",children:"Online"}),e.jsx(m,{value:"not_online",children:"Not Online"})]})]}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(f,{size:"sm",variant:"outline",className:"text-xs",onClick:()=>{const s=x.filter(t=>!t.isEnabled).map(t=>t.id);s.length>0&&k.mutate({ids:s,isEnabled:!0})},disabled:k.isPending,"data-testid":"button-enable-all",children:["Enable All Shown (",x.length-R,")"]}),e.jsxs(f,{size:"sm",variant:"outline",className:"text-xs",onClick:()=>{const s=x.filter(t=>t.isEnabled).map(t=>t.id);s.length>0&&k.mutate({ids:s,isEnabled:!1})},disabled:k.isPending,"data-testid":"button-disable-all",children:["Disable All Shown (",R,")"]})]})]}),o&&e.jsxs("div",{className:"px-4 py-2 border-b border-gray-200 flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 max-w-xs",children:[e.jsx(K,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),e.jsx(H,{placeholder:"Search...",className:"pl-9 h-8 text-sm",value:g,onChange:s=>F(s.target.value),"data-testid":"input-search-products-compact"})]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Showing ",x.length," of ",i.length]})]}),!o&&e.jsxs("div",{className:"text-xs text-muted-foreground px-4 py-2 bg-gray-50 border-b",children:["Showing ",x.length," of ",i.length," products"]}),e.jsx("div",{className:"overflow-x-auto max-h-[65vh] overflow-y-auto",children:e.jsxs("table",{className:"w-full text-sm text-left",children:[e.jsx("thead",{className:"bg-gray-50 text-muted-foreground uppercase text-xs font-medium sticky top-0",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 w-16 text-center cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("isEnabled"),"data-testid":"sort-status",children:e.jsxs("div",{className:"flex items-center justify-center",children:["Status ",e.jsx(p,{column:"isEnabled"})]})}),e.jsx("th",{className:"px-4 py-3 cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("name"),"data-testid":"sort-product",children:e.jsxs("div",{className:"flex items-center",children:["Product ",e.jsx(p,{column:"name"})]})}),e.jsx("th",{className:"px-4 py-3 cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("category"),"data-testid":"sort-category",children:e.jsxs("div",{className:"flex items-center",children:["Category ",e.jsx(p,{column:"category"})]})}),e.jsx("th",{className:"px-4 py-3 text-right cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("price"),"data-testid":"sort-price",children:e.jsxs("div",{className:"flex items-center justify-end",children:["Price ",e.jsx(p,{column:"price"})]})}),e.jsx("th",{className:"px-4 py-3 text-center cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("variationCount"),"data-testid":"sort-variations",children:e.jsxs("div",{className:"flex items-center justify-center",children:["Variations ",e.jsx(p,{column:"variationCount"})]})}),e.jsx("th",{className:"px-4 py-3 text-center cursor-pointer hover:bg-gray-100 select-none transition-colors",onClick:()=>h("ecomAvailable"),"data-testid":"sort-ecom",children:e.jsxs("div",{className:"flex items-center justify-center",children:["E-Com ",e.jsx(p,{column:"ecomAvailable"})]})})]})}),e.jsx("tbody",{className:"divide-y divide-gray-100",children:x.map(s=>e.jsxs("tr",{className:`hover:bg-gray-50/50 transition-colors cursor-pointer ${s.isEnabled?"bg-green-50/30":""}`,onClick:()=>C(s),"data-testid":`row-product-${s.id}`,children:[e.jsx("td",{className:"px-4 py-3 text-center",onClick:t=>t.stopPropagation(),children:e.jsx(ce,{checked:s.isEnabled,onCheckedChange:t=>se.mutate({id:s.id,isEnabled:t}),"data-testid":`switch-product-${s.id}`})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[s.image?e.jsx("img",{src:s.image,alt:"",className:"h-10 w-10 object-cover rounded bg-gray-100"}):e.jsx("div",{className:"h-10 w-10 rounded bg-gray-100 flex items-center justify-center",children:e.jsx(z,{className:"h-4 w-4 text-gray-400"})}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-900","data-testid":`text-product-name-${s.id}`,children:s.name}),s.sku&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s.sku})]}),s.labelImage&&e.jsx(he,{className:"h-3.5 w-3.5 text-green-500 flex-shrink-0"})]})}),e.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:s.category||"â"}),e.jsx("td",{className:"px-4 py-3 text-right",children:s.price>0?`$${(s.price/100).toFixed(2)}`:"â"}),e.jsx("td",{className:"px-4 py-3 text-center text-muted-foreground",children:s.variationCount}),e.jsx("td",{className:"px-4 py-3 text-center",children:s.ecomAvailable?e.jsx("span",{className:"inline-flex items-center rounded-full bg-green-50 px-2 py-0.5 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:"Yes"}):e.jsx("span",{className:"text-xs text-gray-400",children:"No"})})]},s.id))})]})})]}),e.jsx(de,{open:!!a,onOpenChange:s=>!s&&C(null),children:e.jsx(oe,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:a&&e.jsxs(e.Fragment,{children:[e.jsx(xe,{children:e.jsx(me,{className:"text-xl font-serif",style:{color:"#2B4650"},"data-testid":"text-modal-product-name",children:a.name})}),e.jsxs("div",{className:"space-y-6 mt-2",children:[e.jsxs("div",{className:"flex gap-6",children:[a.image&&e.jsx("img",{src:a.image,alt:a.name,className:"h-32 w-32 object-cover rounded-lg border","data-testid":"img-product"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(d,{variant:a.isEnabled?"default":"secondary",className:a.isEnabled?"bg-green-600":"","data-testid":"badge-status",children:a.isEnabled?"Enabled":"Disabled"}),a.ecomAvailable&&e.jsx(d,{variant:"outline",className:"border-blue-200 text-blue-700","data-testid":"badge-ecom",children:"E-Commerce"}),a.isArchived&&e.jsx(d,{variant:"outline",className:"border-red-200 text-red-700","data-testid":"badge-archived",children:"Archived"}),a.isTaxable&&e.jsx(d,{variant:"outline",className:"border-amber-200 text-amber-700",children:"Taxable"}),a.isRawMaterial&&e.jsx(d,{variant:"outline",className:"border-purple-200 text-purple-700",children:"Raw Material"}),a.hasRecipe&&e.jsx(d,{variant:"outline",className:"border-green-200 text-green-700",children:"Has Recipe"}),a.googleMerchantSynced&&e.jsx(d,{variant:"outline",className:"border-orange-200 text-orange-700",children:"Google Merchant"})]}),a.description&&e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed","data-testid":"text-description",children:a.description})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-3 text-sm border rounded-lg p-4 bg-gray-50/50",children:[e.jsx("h3",{className:"col-span-2 font-semibold text-sm uppercase tracking-wider mb-1",style:{color:"#2B4650"},children:"Square Details"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Square ID"}),e.jsx("p",{className:"font-mono text-xs break-all","data-testid":"text-square-id",children:a.squareId})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Category"}),e.jsx("p",{className:"font-medium","data-testid":"text-category",children:a.category||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Price"}),e.jsx("p",{className:"font-medium","data-testid":"text-price",children:a.price>0?`$${(a.price/100).toFixed(2)}`:"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Currency"}),e.jsx("p",{className:"font-medium",children:a.currency})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"SKU"}),e.jsx("p",{className:"font-medium font-mono text-xs","data-testid":"text-sku",children:a.sku||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Product Type"}),e.jsx("p",{className:"font-medium",children:a.productType||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"E-Com Visibility"}),e.jsx("p",{className:"font-medium",children:a.ecomVisibility||"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Variations"}),e.jsx("p",{className:"font-medium","data-testid":"text-variations",children:a.variationCount})]}),a.rawMaterialCategory&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Raw Material Category"}),e.jsx("p",{className:"font-medium",children:a.rawMaterialCategory})]}),a.mlVolume&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Volume"}),e.jsxs("p",{className:"font-medium",children:[a.mlVolume," ml"]})]}),a.googleMerchantId&&e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Google Merchant ID"}),e.jsx("p",{className:"font-mono text-xs",children:a.googleMerchantId})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Created"}),e.jsx("p",{className:"font-medium text-xs",children:a.squareCreatedAt?new Date(a.squareCreatedAt).toLocaleDateString():"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Updated"}),e.jsx("p",{className:"font-medium text-xs",children:a.squareUpdatedAt?new Date(a.squareUpdatedAt).toLocaleDateString():"â"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-muted-foreground",children:"Last Synced"}),e.jsx("p",{className:"font-medium text-xs",children:a.syncedAt?new Date(a.syncedAt).toLocaleStr
1ing():"â"})]})]}),a.variations&&a.variations.length>0&&e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsxs("h3",{className:"font-semibold text-sm uppercase tracking-wider mb-3",style:{color:"#2B4650"},children:["Variations (",a.variations.length,")"]}),e.jsx("div",{className:"space-y-2",children:a.variations.map((s,t)=>e.jsxs("div",{className:"flex items-center justify-between text-sm py-1.5 px-3 bg-gray-50 rounded","data-testid":`variation-${t}`,children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium",children:s.name}),s.sku&&e.jsx("span",{className:"text-xs text-muted-foreground ml-2 font-mono",children:s.sku})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[s.price>0&&e.jsxs("span",{className:"font-medium",children:["$",(s.price/100).toFixed(2)]}),s.soldOut&&e.jsx(d,{variant:"destructive",className:"text-[10px] h-5",children:"Sold Out"}),s.trackInventory&&e.jsx(d,{variant:"outline",className:"text-[10px] h-5",children:"Tracked"})]})]},t))})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx("h3",{className:"font-semibold text-sm uppercase tracking-wider mb-3",style:{color:"#2B4650"},children:"Product Label"}),a.labelImage?e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"relative inline-block",children:e.jsx("img",{src:a.labelImage,alt:"Product label",className:"max-h-48 rounded-lg border shadow-sm","data-testid":"img-label"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(f,{variant:"outline",size:"sm",onClick:()=>j.current?.click(),disabled:$,"data-testid":"button-replace-label",children:[e.jsx(pe,{className:"h-3.5 w-3.5 mr-1.5"}),"Replace Label"]}),e.jsxs(f,{variant:"outline",size:"sm",className:"text-red-600 hover:text-red-700 hover:bg-red-50",onClick:re,"data-testid":"button-remove-label",children:[e.jsx(ge,{className:"h-3.5 w-3.5 mr-1.5"}),"Remove"]})]})]}):e.jsxs("div",{className:"border-2 border-dashed border-gray-200 rounded-lg p-8 text-center hover:border-gray-300 transition-colors cursor-pointer",onClick:()=>j.current?.click(),"data-testid":"dropzone-label",children:[e.jsx(je,{className:"h-8 w-8 mx-auto text-gray-300 mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"No label uploaded"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Click to upload a label image (JPG, PNG, WebP)"}),$&&e.jsx(_,{className:"h-4 w-4 animate-spin mx-auto mt-2"})]}),e.jsx("input",{ref:j,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",onChange:te,"data-testid":"input-label-file"})]})]})]})})})]})}export{ze 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.