PageSourceSearch

https://ainm.ai/assets/ContractsPage-DC-u3TtM.js

js ainm.ai collected 2026-10-05 12:22:24 UTC 21,188 bytes, 1 lines download raw bytes

1import{a as Re,u as K,b as P,j as e}from"./vendor-query-_WCqczoK.js";import{a,j as Le}from"./vendor-react-Bj_8hxfy.js";import{g as R}from"./errors-Bq1nIef6.js";import{K as $,o as he,X as Q,S as H,l as c,bD as De,C as Ie,T as Fe,ax as qe,aq as be,ap as Oe,bE as W,aL as ve,aY as je,b3 as Me,s as Ge,aE as Ue,aO as Ke}from"./vendor-ui-DPQRepxn.js";import{S as x,ae as $e,af as Qe,ag as He,c as We}from"./index-CzV89-Ui.js";import{A as Xe}from"./AIOutputCard-CahVwUFw.js";import{A as Be}from"./AiLoadingCard-DGTd55bb.js";import{S as Ye}from"./SignaturePad-4PFo9NSL.js";import"./vendor-markdown-qNR1fLI5.js";const L=[{value:"permanent",label:"Permanent",desc:"Open-ended employment"},{value:"fixed_term",label:"Fixed-Term",desc:"Defined end date"},{value:"part_time",label:"Part-Time",desc:"Reduced hours"},{value:"contractor",label:"Contractor",desc:"Self-employed / B2B"},{value:"zero_hours",label:"Zero Hours",desc:"No guaranteed hours"}],Ne=[{value:"entry",label:"Entry Level"},{value:"mid",label:"Mid Level"},{value:"senior",label:"Senior"},{value:"executive",label:"Executive"}],Se=["Names of parties","Address of employer","Place of work","Job title and description","Start date","Duration / end date (if fixed-term)","Pay rate and pay period","Hours of work","Rest periods and breaks","Annual leave entitlement","Sick leave policy","Pension","Notice periods","Collective agreements","Disciplinary and grievance procedures"],X={permanent:"bg-emerald-50 text-emerald-700",fixed_term:"bg-amber-50 text-amber-700",part_time:"bg-blue-50 text-blue-700",contractor:"bg-purple-50 text-purple-700",zero_hours:"bg-gray-100 text-gray-600"};function Ce(u){const w=u.toLowerCase(),p={},j={"Names of parties":["employer","employee","between"],"Address of employer":["address","registered office","place of business"],"Place of work":["place of work","work location","remote","office"],"Job title and description":["job title","role","position","duties","responsibilities"],"Start date":["start date","commencement","commencing"],"Duration / end date (if fixed-term)":["end date","fixed term","expiry","duration"],"Pay rate and pay period":["salary","pay","remuneration","wage"],"Hours of work":["hours of work","working hours","per week"],"Rest periods and breaks":["rest period","break","rest break","organisation of working time"],"Annual leave entitlement":["annual leave","holiday","vacation"],"Sick leave policy":["sick leave","illness","sick pay"],Pension:["pension","retirement","prsa"],"Notice periods":["notice period","notice of termination","notice"],"Collective agreements":["collective agreement","collective bargaining","not applicable"],"Disciplinary and grievance procedures":["disciplinary","grievance","procedures"]};for(const i of Se){const N=j[i]??[i.toLowerCase()];p[i]=N.some(E=>w.includes(E))}return p}const Je={draft:"bg-gray-100 text-gray-600",sent:"bg-blue-50 text-blue-700",pending_counter:"bg-amber-50 text-amber-700",signed:"bg-emerald-50 text-emerald-700",expired:"bg-red-50 text-red-700"},Ze={draft:"Draft",sent:"Sent",pending_counter:"Awaiting Countersign",signed:"Fully Signed",expired:"Expired"};function ot(){var ye,fe;const u=Re(),w=a.useRef(null),[p,j]=a.useState("generate"),[i,N]=a.useState(null),[E,D]=a.useState(null),[B]=Le();B.get("employee"),B.get("name");const[g,ke]=a.useState("permanent"),[I,_e]=a.useState("mid"),[A,we]=a.useState(""),[Y]=a.useState("IE"),[l,o]=a.useState(""),[y,b]=a.useState(!1),[d,f]=a.useState(null),[J,h]=a.useState(null),[Z,V]=a.useState(""),[F,ee]=a.useState(""),[Ee,T]=a.useState(!1),[Ae,z]=a.useState(!1),[v,Te]=a.useState(""),[te,se]=a.useState(""),[C,ae]=a.useState(""),[S,ne]=a.useState(""),[k,re]=a.useState(""),[_,le]=a.useState(""),[ie,oe]=a.useState(null),{data:q=[],isLoading:ce}=K({queryKey:["contract-templates"],queryFn:x.listTemplates}),O=P({mutationFn:t=>x.createTemplate(t),onSuccess:()=>{u.invalidateQueries({queryKey:["contract-templates"]}),o(""),f(null)}}),M=P({mutationFn:({id:t,data:s})=>x.updateTemplate(t,s),onSuccess:()=>{u.invalidateQueries({queryKey:["contract-templates"]}),T(!1)}}),{data:G=[]}=K({queryKey:["company-users-for-contracts"],queryFn:We.listUsers,staleTime:5*6e4}),{data:de=[]}=K({queryKey:["all-employee-contracts"],queryFn:x.listAllEmployeeContracts}),U=P({mutationFn:()=>!i||!v||!C||!k||!n?Promise.reject(new Error("Missing required fields")):x.createEmployeeContract({employee_id:v,template_id:i,content:l,role_title:C,contract_type:n.contract_type,start_date:k,salary:S?parseFloat(S):void 0,hours_per_week:_?parseFloat(_):void 0}),onSuccess:()=>{oe(`Contract saved for ${te}`),setTimeout(()=>
1oe(null),5e3),u.invalidateQueries({queryKey:["all-employee-contracts"]}),u.invalidateQueries({queryKey:["my-contracts"]})},onError:t=>{h(R(t,"Save failed"))}}),me=P({mutationFn:({id:t,signature_image:s})=>x.signContract(t,{signature_image:s,signer:"employer"}),onSuccess:()=>{u.invalidateQueries({queryKey:["all-employee-contracts"]}),D(null)}}),n=q.find(t=>t.id===i)??null;async function xe(){o(""),h(null),b(!0),f("generate");try{for await(const t of $e({contract_type:g,role_level:I,sector:A,country_code:Y}))t.type==="chunk"&&o(s=>s+t.text)}catch(t){h(R(t,"Generation failed"))}finally{b(!1)}}async function ze(t){o(""),h(null),b(!0),f("analyse");try{for await(const s of Qe(t,Y))s.type==="chunk"&&o(r=>r+s.text)}catch(s){h(R(s,"Analysis failed"))}finally{b(!1)}}async function Pe(){if(i){z(!1),o(""),h(null),b(!0),f("customise");try{for await(const t of He(i,{employee_name:te,employee_id:v||void 0,role_title:C,salary:S?parseFloat(S):void 0,start_date:k||void 0,hours_per_week:_?parseFloat(_):void 0}))t.type==="chunk"&&o(s=>s+t.text)}catch(t){h(R(t,"Customisation failed"))}finally{b(!1)}}}function ue(t){N(t.id),V(t.content??""),ee(t.name),T(!1),o(""),f(null)}const pe=((ye=L.find(t=>t.value===g))==null?void 0:ye.label)??g,ge=l?Ce(l):n!=null&&n.content?Ce(n.content):null;return e.jsxs("div",{className:"p-4 md:p-8 max-w-7xl mx-auto",children:[E&&e.jsx(Ye,{title:"Sign as Employer",subtitle:"Your signature confirms the company's acceptance of this employment contract.",loading:me.isPending,onCancel:()=>D(null),onConfirm:t=>me.mutate({id:E,signature_image:t})}),e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx($,{size:22,className:"text-brand-600"}),e.jsx("h1",{className:"text-xl md:text-2xl font-bold text-gray-900",children:"Contracts"})]}),e.jsx("p",{className:"text-gray-500 text-sm mb-6",children:"Generate legally compliant employment contracts with AI or analyse existing ones for compliance gaps."}),Ae&&n&&e.jsx("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"card w-full max-w-md p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"font-semibold text-gray-900 flex items-center gap-2",children:[e.jsx(he,{size:16,className:"text-brand-500"})," Customise for Employee"]}),e.jsx("button",{onClick:()=>z(!1),className:"text-gray-400 hover:text-gray-600",children:e.jsx(Q,{size:16})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Employee *"}),e.jsxs("select",{className:"input text-sm",value:v,onChange:t=>{const s=t.target.value;Te(s);const r=G.find(m=>m.id===s);r&&se(`${r.first_name??""} ${r.last_name??""}`.trim()||r.email||"")},children:[e.jsx("option",{value:"",children:"Select an employee…"}),G.map(t=>e.jsx("option",{value:t.id,children:t.first_name||t.last_name?`${t.first_name??""} ${t.last_name??""}`.trim():t.email},t.id))]}),G.length===0&&e.jsx("p",{className:"text-[11px] text-amber-600 mt-1",children:"No employees found. Invite one from Settings → Team first."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Role Title *"}),e.jsx("input",{className:"input text-sm",value:C,onChange:t=>ae(t.target.value),placeholder:"Senior Software Engineer"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Salary (EUR)"}),e.jsx("input",{className:"input text-sm",type:"number",value:S,onChange:t=>ne(t.target.value),placeholder:"55000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Hours/Week"}),e.jsx("input",{className:"input text-sm",type:"number",value:_,onChange:t=>le(t.target.value),placeholder:"39"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Start Date"}),e.jsx("input",{className:"input text-sm",type:"date",value:k,onChange:t=>re(t.target.value)})]}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsxs("button",{className:"btn-primary flex-1 justify-center",disabled:!v||!C||!k,onClick:Pe,children:[e.jsx(H,{size:14})," Generate Personalised Contract"]}),e.jsx("button",{className:"btn-secondary",onClick:()=>z(!1),children:"Cancel"})]})]})]})}
1),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[e.jsxs("div",{className:"card p-5",children:[e.jsxs("div",{className:"flex gap-1 p-1 bg-gray-100 rounded-xl mb-4",children:[e.jsx("button",{onClick:()=>j("generate"),className:c("flex-1 text-xs font-medium py-1.5 rounded-lg transition-colors",p==="generate"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),children:e.jsxs("span",{className:"flex items-center justify-center gap-1.5",children:[e.jsx(H,{size:12})," Generate"]})}),e.jsx("button",{onClick:()=>j("analyse"),className:c("flex-1 text-xs font-medium py-1.5 rounded-lg transition-colors",p==="analyse"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"),children:e.jsxs("span",{className:"flex items-center justify-center gap-1.5",children:[e.jsx(De,{size:12})," Analyse"]})})]}),p==="generate"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-600 mb-2",children:"Contract Type"}),e.jsx("div",{className:"grid grid-cols-1 gap-1.5",children:L.map(t=>e.jsxs("button",{onClick:()=>ke(t.value),className:c("flex items-center gap-3 px-3 py-2.5 rounded-xl border text-left transition-all",g===t.value?"border-brand-500 bg-brand-50 text-brand-700":"border-gray-200 hover:border-gray-300 hover:bg-gray-50 text-gray-700"),children:[e.jsx("span",{className:c("text-xs font-semibold px-2 py-0.5 rounded-full",X[t.value]),children:t.label}),e.jsx("span",{className:"text-xs text-gray-500",children:t.desc}),g===t.value&&e.jsx(Ie,{size:12,className:"ml-auto text-brand-500"})]},t.value))}),g==="zero_hours"&&e.jsxs("div",{className:"flex items-start gap-2 mt-2 p-3 bg-amber-50 border border-amber-200 rounded-xl",children:[e.jsx(Fe,{size:14,className:"text-amber-600 mt-0.5 flex-shrink-0"}),e.jsx("p",{className:"text-xs text-amber-800",children:"Zero-hour contracts are effectively banned in Ireland under the Employment (Miscellaneous Provisions) Act 2018, except for genuine casual work or emergency cover. Consider using a minimum hours contract instead."})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Role Level"}),e.jsx("select",{className:"input text-sm",value:I,onChange:t=>_e(t.target.value),children:Ne.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Sector"}),e.jsx("input",{className:"input text-sm",placeholder:"e.g. Tech, Retail",value:A,onChange:t=>we(t.target.value)})]})]}),e.jsxs("button",{className:"btn-primary w-full justify-center",onClick:xe,disabled:y,children:[e.jsx(H,{size:14}),y&&d==="generate"?"Generating...":`Generate ${pe} Contract`]})]}),p==="analyse"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"border-2 border-dashed border-gray-200 rounded-xl p-8 text-center cursor-pointer hover:border-brand-400 hover:bg-brand-50/30 transition-colors",onClick:()=>{var t;return(t=w.current)==null?void 0:t.click()},children:[e.jsx(qe,{size:24,className:"text-gray-400 mx-auto mb-2"}),e.jsx("p",{className:"text-sm font-medium text-gray-700 mb-0.5",children:"Upload Existing Contract"}),e.jsx("p",{className:"text-xs text-gray-400",children:"PDF or DOCX — AI analyses against Irish employment law"}),e.jsx("input",{ref:w,type:"file",accept:".pdf,.docx",className:"hidden",onChange:t=>{var r;const s=(r=t.target.files)==null?void 0:r[0];s&&ze(s),t.target.value=""}})]}),e.jsx("p",{className:"text-xs text-gray-400 text-center",children:"Checks against Terms of Employment Acts, Organisation of Working Time Act, National Minimum Wage Act, Payment of Wages Act."})]})]}),ge&&e.jsxs("div",{className:"card p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-3",children:"Required Clauses (Irish Law)"}),e.jsx("div",{className:"space-y-1.5",children:Se.map(t=>{const s=ge[t];return e.jsxs("div",{className:"flex items-center gap-2",children:[s?e.jsx(be,{size:13,className:"text-emerald-500 flex-shrink-0"}):e.jsx(Oe,{size:13,className:"text-gray-300 flex-shrink-0"}),e.jsx("span",{className:c("text-xs",s?"text-gray-700":"text-gray-400"),children:t})]},t)})})]})]}),e.jsxs("div",{className:"lg:col-span-3 space-y-4",children:[(y||l)&&e.jsxs("div",{className:"card p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:d==="analyse"?"Gap Analysis":d==="customise"?"Personalised Contract":"Generated Contract"}),e.jsxs("div",{className:"flex items-center gap-2",children:[!y&&l&&d==="generate"&&e.jsxs("button",{className:"btn-primary text-xs py-1.5 px-3",onClick:()=>O.mutate({name:`${pe} Contract${A?` — ${A}`:""}`,contract_type:g,role_level:I,content:l,is_ai_generated:!0}),disabled:O.isPending,children:[e.jsx(W,{size:12})," ",O.isPending?"Saving...":"Save Template"]}),!y&&l&&d==="customise"&&e.jsxs("button",{className:"btn-primary text-xs py-1.5 px-3",onClick:()=>U.mutate(),disabled:U.isPending||!v,children:[e.jsx(W,{size:12})," ",U.isPending?"Saving...":"Save Contract"]}),e.jsx("button",{onClick:()=>{o(""),f(null)},className:"text-gray-400 hover:text-gray-600",children:e.jsx(Q,{size:14})})]})]}),y&&!l&&e.jsx(Be,{messages:d==="analyse"?["Reading contract clauses...","Checking Irish employment law...","Identifying risks...","Preparing analysis..."]:["Drafting contract terms...","Applying employment law...","Structuring clauses...","Formatting document..."],size:"inline",title:d==="analyse"?"Analysing Contract":"Drafting Contract"}),l&&e.jsx(Xe,{content:l,isStreaming:y,context:d==="analyse"?"gap_analysis":"default",onRegenerate:d==="generate"?xe:void 0}),J&&e.jsx("p",{className:"text-xs text-red-500 mt-2",children:J}),ie&&e.jsxs("p",{className:"text-xs text-emerald-600 mt-2 font-medium",children:["✓ ",ie]})]}),n&&!l&&e.jsxs("div",{className:"card p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:c("text-xs px-2 py-0.5 rounded-full font-medium flex-shrink-0",X[n.contract_type]??"bg-gray-100 text-gray-600"),children:((fe=L.find(t=>t.value===n.contract_type))==null?void 0:fe.label)??n.contract_type}),e.jsx("input",{className:"text-sm font-semibold text-gray-900 bg-transparent border-0 outline-none focus:ring-0 min-w-0 flex-1",value:F,onChange:t=>{ee(t.target.value),T(!0)}})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[Ee&&e.jsxs("button",{className:"btn-primary text-xs py-1.5 px-3",onClick:()=>M.mutate({id:n.id,data:{name:F,content:Z}}),disabled:M.isPending,children:[e.jsx(W,{size:12})," ",M.isPending?"Saving...":"Save"]}),e.jsxs("button",{className:"btn-secondary text-xs py-1.5 px-3",onClick:()=>x.exportDocx(n.id,F),title:"Export DOCX",children:[e.jsx(ve,{size:12})," Export"]}),e.jsxs("button",{className:"btn-secondary text-xs py-1.5 px-3",onClick:()=>{ae(""),se(""),ne(""),re(""),le(""),z(!0)},title:"Customise for an employee",children:[e.jsx(he,{size:12})," Customise"]}),e.jsx("button",{onClick:()=>N(null),className:"text-gray-400 hover:text-gray-600",children:e.jsx(Q,{size:14})})]})]}),e.jsx("textarea",{className:"w-full min-h-[420px] text-sm text-gray-700 font-mono border border-gray-200 rounded-xl p-3 focus:outline-none focus:ring-2 focus:ring-brand-200 resize-y",value:Z,onChange:t=>{V(t.target.value),T(!0)},placeholder:"Contract content will appear here..."}),n.is_ai_generated&&e.jsx("p",{className:"text-[10px] text-gray-400 mt-1.5",children:"AI-generated — review all clauses before use. This is not legal advice."})]}),de.length>0&&e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-5 py-3 border-b border-gray-100",children:[e.jsxs("p",{className:"text-sm font-semibold text-gray-800 flex items-center gap-2",children:[e.jsx(je,{size:14,className:"text-brand-500"}
1)," Sent Contracts"]}),e.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:"Employee contracts awaiting signatures"})]}),e.jsx("div",{className:"divide-y divide-gray-50",children:de.map(t=>{const s=!t.employer_signed&&t.signed_by_employee;return e.jsxs("div",{className:"px-5 py-3 flex items-center gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-sm font-medium text-gray-800 truncate",children:[t.employee_name??"Employee"," — ",t.role_title]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:c("text-xs px-2 py-0.5 rounded-full font-medium",Je[t.status]??"bg-gray-100 text-gray-600"),children:Ze[t.status]??t.status}),t.signed_by_employee&&e.jsxs("span",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[e.jsx(Me,{size:11})," Employee signed"]}),!t.signed_by_employee&&e.jsxs("span",{className:"text-xs text-gray-400 flex items-center gap-1",children:[e.jsx(Ge,{size:11})," Awaiting employee"]})]})]}),t.employer_signed?e.jsxs("span",{className:"text-xs text-emerald-600 flex items-center gap-1 flex-shrink-0",children:[e.jsx(be,{size:13})," You signed"]}):e.jsxs("button",{onClick:()=>D(t.id),disabled:!s,className:c("flex-shrink-0 flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg font-medium transition-colors",s?"bg-brand-600 text-white hover:bg-brand-700":"bg-gray-100 text-gray-400 cursor-not-allowed"),title:s?"Sign as employer":"Waiting for employee to sign first",children:[e.jsx(je,{size:12})," Sign"]})]},t.id)})})]}),e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-gray-100",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"Contract Templates"}),e.jsxs("button",{onClick:()=>{o(""),f(null),N(null),j("generate"),window.scrollTo({top:0,behavior:"smooth"})},className:"flex items-center gap-1 text-xs text-brand-600 hover:text-brand-800 font-medium",children:[e.jsx(Ue,{size:12})," New"]})]}),ce&&e.jsx("div",{className:"p-8 text-center text-gray-400 text-sm",children:"Loading..."}),!ce&&q.length===0&&e.jsxs("div",{className:"p-12 text-center",children:[e.jsx($,{size:28,className:"text-gray-300 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"No templates yet"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Generate your first contract using the form on the left."})]}),e.jsx("div",{className:"divide-y divide-gray-50",children:q.map(t=>{var s,r;return e.jsxs("button",{onClick:()=>ue(t),className:c("w-full flex items-center gap-4 px-5 py-3.5 text-left hover:bg-gray-50 transition-colors",i===t.id&&"bg-brand-50/60"),children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-brand-50 flex items-center justify-center flex-shrink-0",children:e.jsx($,{size:14,className:"text-brand-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:t.name}),e.jsxs("p",{className:"text-xs text-gray-400",children:[((s=Ne.find(m=>m.value===t.role_level))==null?void 0:s.label)??t.role_level,t.is_ai_generated&&" · AI generated"," · v",t.version]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("span",{className:c("text-xs px-2 py-0.5 rounded-full font-medium",X[t.contract_type]??"bg-gray-100 text-gray-600"),children:((r=L.find(m=>m.value===t.contract_type))==null?void 0:r.label)??t.contract_type}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:m=>{m.stopPropagation(),ue(t)},className:"p-1 text-gray-400 hover:text-brand-600 rounded",title:"Edit",children:e.jsx(Ke,{size:12})}),e.jsx("button",{onClick:m=>{m.stopPropagation(),x.exportDocx(t.id,t.name)},className:"p-1 text-gray-400 hover:text-brand-600 rounded",title:"Export DOCX",children:e.jsx(ve,{size:12})})]})]})]},t.id)})})]})]})]})]})}export{ot 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.