1import{j as t}from"./jsx-runtime-D_zvdyIk.js";import{d as I,e as w,sE as v,sF as L,sG as M,sH as D,L as O,gM as n,bh as T}from"./loginCallback-DUlVA6A0.js";import{N as A}from"./addLoader-p8WLB-bt.js";import{r as b,R as E,N as G}from"./createLucideIcon-CiWnlb16.js";import{P}from"./PageTitle-BqRYU3UK.js";import{D as k}from"./DebtorCaseInformation-uDpYOKSK.js";import{N as K}from"./NumberRounding-D2cPCpEN.js";import{F as U}from"./FormatNumber-CRRkVCz6.js";import{R as i}from"./requirementGroundSection-BkwKGQgB.js";import{u as _,c as y,b as B,S as $,g as z,d as o}from"./groundCalc-BsFK0T92.js";import{a as H}from"./auctionNumber-e8qX9CCs.js";import"./config.release-CKeoGYk7.js";import"./index-CQOuJFSK.js";import"./declarantCompare-BOnRNkTz.js";import"./CustomToolTip-BQH2lGNu.js";import"./Tooltip-DqudYRkP.js";import"./TransitionGroupContext-BqazGbpp.js";import"./useSlot-C7WZeYvg.js";import"./useControlled-BlpSYMej.js";import"./useId-DUHkaswp.js";import"./utils-CrHD0CeB.js";import"./IconButton-BXAY2iRp.js";import"./createSimplePaletteValueFilter-CXCoacm9.js";import"./TextField-CrjUJzPO.js";import"./useFormControl-B_DA_RwI.js";import"./Close-C9FyhMtz.js";const F=[[{idx:1,label:"â",width:"w-[48px]",colSpan:1,rowSpan:2},{idx:2,label:"ТÑебование",width:"w-[120px]",colSpan:1,rowSpan:2},{idx:3,label:"Ðаименование",width:"w-[250px]",filterable:!0,fieldName:"creditorName",tooltip:"ФамилиÑ, ÑобÑÑвенное имÑ, оÑÑеÑÑво (еÑли Ñаковое имееÑÑÑ) кÑедиÑоÑа - ÑизиÑеÑкого лиÑа, наименование кÑедиÑоÑа - ÑÑидиÑеÑкого лиÑа",rowSpan:2},{idx:4,label:"СÑмма",width:"w-[200px]",tooltip:"СÑмма ÑÑебований кÑедиÑоÑа, подлежаÑÐ°Ñ ÑдовлеÑвоÑениÑ",rowSpan:2},{idx:5,label:"ÐокÑменÑÑ",width:"w-[220px]",tooltip:"ÐÑÑ
одÑÑие даннÑе докÑменÑов, подÑвеÑждаÑÑие ÑÑебование кÑедиÑоÑа",rowSpan:2},{idx:6,label:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾Ð± ÑдовлеÑвоÑении ÑÑебований кÑедиÑоÑов",width:"w-[710px]",align:"center",rowSpan:1,colSpan:3},{idx:7,label:"% Ñдов.",width:"w-[100px]",tooltip:"% ÑдовлеÑвоÑÐµÐ½Ð¸Ñ ÑÑебований кÑедиÑоÑов пÑÑем пеÑеÑиÑÐ»ÐµÐ½Ð¸Ñ Ð´ÐµÐ½ÐµÐ¶Ð½ÑÑ
ÑÑедÑÑв",rowSpan:2},{idx:8,label:"СÑмма погаÑеннÑÑ
",width:"w-[150px]",tooltip:"Ð¡Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¾ погаÑении ÑÑебований кÑедиÑоÑов",rowSpan:2},{idx:9,label:"ÐнÑе ÑведениÑ",width:"w-[180px]",tooltip:"ÐнÑе ÑведениÑ, каÑаÑÑиеÑÑ ÑдовлеÑвоÑÐµÐ½Ð¸Ñ ÑÑебований кÑедиÑоÑов, вклÑÑеннÑÑ
во вÑоÑой Ñаздел",rowSpan:2}],[{idx:11,label:"ÐÑего",width:"w-[150px]"},{idx:12,label:"ÐÑÑем пеÑеÑиÑлениÑ",width:"w-[150px]",tooltip:"ÐÑÑем пеÑеÑиÑÐ»ÐµÐ½Ð¸Ñ Ð´ÐµÐ½ÐµÐ¶Ð½ÑÑ
ÑÑедÑÑв"},{idx:13,label:"ÐнÑми ÑпоÑобами",width:"w-[150px]"}]],J=a=>{switch(a){case i.FourthSection:return"4.1 ÐÑновной долг";case i.FourthSectionSecond:return"4.2 ÐÑоÑенÑÑ, неÑÑÑойка (ÑÑÑаÑÑ, пени), ÑбÑÑки, ÑÑдебнÑе ÑаÑÑ
Ð¾Ð´Ñ Ð¸ Ñ.п. (п. 4 ÑÑ. 123).";case i.FourthSectionThird:return"4.3 ТÑÐµÐ±Ð¾Ð²Ð°Ð½Ð¸Ñ Ð·Ð°Ð¸Ð½ÑеÑеÑованнÑÑ
/аÑÑилиÑованнÑÑ
Ð»Ð¸Ñ Ð¸ ÑÑÑедиÑелей (ÑÑаÑÑников) (п. 5 ÑÑ. 123).";case i.FourthSectionFourth:return"4.4 ТÑебованиÑ, пÑедÑÑвленнÑе по иÑÑеÑении ÑÑока (п. 1 ÑÑ. 70), возникÑие до оÑкÑÑÑÐ¸Ñ ÐºÐ¾Ð½ÐºÑÑÑного пÑоизводÑÑва.";default:return""}},g=z(F);function Q({debtorId:a,isClosed:p=!1}){const d=I(),u=w(v),l=w(L);b.useEffect(()=>{if(!a)return;const e=new AbortController;return d(M()),d(D({id:String(a),sections:[i.FourthSection,i.FourthSectionSecond,i.FourthSectionThird,i.FourthSectionFourth],signal:e.signal})),()=>e.abort()},[d,a]);const h=b.useMemo(()=>Object.entries(l).flatMap(([e,s])=>s.items.map(r=>({...r,sectionKey:e}))),[l]),{filters:C,handleFilterChange:R,filteredItems:f,displayItems:N,visibleCount:q,loaderRef
1:Y}=_(h,["creditorName"],a),c=b.useMemo(()=>{let e=0,s=0,r=0,x=0,m=0;return f.forEach(j=>{const S=y(j.ground);e+=S.requirementBYN,s+=S.satisfactionBYN,r+=S.remainingBYN,x+=Number(j.cashSatisfactionSum)||0,m+=Number(j.otherSatisfactionSum)||0}),{totalReqBYN:e,totalSatBYN:s,totalRemBYN:r,totalSatCash:x,totalSatOther:m,coverage:B(e,r)}},[f]);return u?t.jsx(O,{}):t.jsxs($,{groups:F,filters:C,onFilterChange:R,children:[t.jsx("tbody",{children:N.length>0?t.jsxs(t.Fragment,{children:[N.map((e,s)=>{const r=y(e.ground),x=B(r.requirementBYN,r.remainingBYN),m=s===0||e.sectionKey!==N[s-1].sectionKey;return t.jsxs(E.Fragment,{children:[m&&t.jsx("tr",{className:"bg-[#f8fafc] border-y border-[#e2e8f0]",children:t.jsx("td",{colSpan:g,className:"px-4 py-2 text-[13px] font-bold text-[#64748b] uppercase tracking-wider text-center",children:J(e.sectionKey)})}),t.jsxs("tr",{className:"hover:bg-[#f3f8ff]/50 transition-colors group",children:[t.jsx("td",{className:"px-4 py-3 text-sm text-[#94a3b8]",children:s+1}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#2295c3]",children:t.jsx(G,{to:`/creditor-requirements/${e.requirementId}/result`,children:H(e.requirementId)})}),t.jsx("td",{className:"px-4 py-3 text-sm font-medium text-[#334e68]",children:e.creditorName||"â"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(o,{amountRB:r.requirementBYN,amountCur:r.requirementInCurrency,currency:e.ground?.currency})}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68] wrap-anywhere",children:e.supportingDocuments??"â"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(o,{amountRB:r.satisfactionBYN,amountCur:r.satisfactionInCurrency,currency:e.ground?.currency})}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(o,{amountRB:e.cashSatisfactionSum})}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(o,{amountRB:e.otherSatisfactionSum})}),t.jsx("td",{className:n("px-4 py-3 text-left text-sm font-bold text-[#10b981]"),children:`${x.toFixed(2)}%`}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68]",children:p?t.jsx(o,{amountRB:r.remainingBYN,amountCur:r.remainingInCurrency,currency:e.ground?.currency}):null}),t.jsx("td",{className:"px-4 py-3 text-sm text-[#334e68]",children:e.otherSectionNotes})]})]},s)}),q<f.length&&t.jsx("tr",{ref:Y,children:t.jsx("td",{colSpan:g,className:"py-8 text-center text-sm text-[#94a3b8]",children:t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("div",{className:"w-4 h-4 border-2 border-[#0f6fff] border-t-transparent rounded-full animate-spin"}),"ÐагÑÑзка даннÑÑ
..."]})})})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:g,className:"px-4 py-10 text-center text-[#94a3b8]",children:"Совпадений не найдено"})})}),t.jsx("tfoot",{children:t.jsxs("tr",{children:[t.jsx("td",{colSpan:3,className:n("px-6 py-4 text-left"),children:t.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#94a3b8]",children:"ÐÑого по ÑееÑÑÑÑ:"})}),t.jsx("td",{className:n("px-4 py-4 align-top"),children:t.jsx(o,{amountRB:c.totalReqBYN})}),t.jsx("td",{}),t.jsx("td",{className:n("px-4 py-4 align-top"),children:t.jsx(o,{amountRB:c.totalSatBYN})}),t.jsx("td",{className:n("px-4 py-4 align-top"),children:t.jsx(o,{amountRB:c.totalSatCash})}),t.jsx("td",{className:n("px-4 py-4 align-top"),children:t.jsx(o,{amountRB:c.totalSatOther})}),t.jsx("td",{className:n("px-4 py-3 text-left text-sm font-bold text-[#10b981]"),children:`${c.coverage.toFixed(2)}%`}),t.jsx("td",{className:n("px-4 py-3 text-left text-sm font-bold text-[#ef4444]"),children:p?U(K(c.totalRemBYN)):null}),t.jsx("td",{})]})})]})}function wt({handleShowFilters:a,toggle:p,setToggle:d,debtorId:u}){const l=w(T),h=l?.debtorModel?.organization?.fullName||l?.debtorModel?.organization?.shortName;return t.jsxs("div",{className:"debtor-creditors-requirements-fourth-phase",children:[t.jsx(A,{title:"Раздел 4",handleShowFilters:a,toggle:p,setToggle:d}),t.jsx(P,{title:h,className:"debtor-creditors-requirements-fourth-phase-page-title"}),t.jsx(k,{debtor:l}),t.jsx(Q,{debtorId:u,isClosed:!!l?.endDate})]})}export{wt 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.