@endora-commerce/mod-invoices 0.108.0 → 0.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/pages/InvoiceDetail.d.ts.map +1 -1
- package/dist/admin/pages/InvoiceDetail.js +1 -1
- package/dist/admin/pages/InvoiceDetail.js.map +1 -1
- package/dist/admin/templates/invoice-puck-config.d.ts.map +1 -1
- package/dist/admin/templates/invoice-puck-config.js +227 -135
- package/dist/admin/templates/invoice-puck-config.js.map +1 -1
- package/dist/backend/document/block-descriptions.d.ts.map +1 -1
- package/dist/backend/document/block-descriptions.js +2 -0
- package/dist/backend/document/block-descriptions.js.map +1 -1
- package/dist/backend/document/invoice-document-type.d.ts +6 -1
- package/dist/backend/document/invoice-document-type.d.ts.map +1 -1
- package/dist/backend/document/invoice-document-type.js +25 -1
- package/dist/backend/document/invoice-document-type.js.map +1 -1
- package/dist/backend/entities/invoice-line.entity.d.ts +18 -1
- package/dist/backend/entities/invoice-line.entity.d.ts.map +1 -1
- package/dist/backend/entities/invoice-line.entity.js +20 -0
- package/dist/backend/entities/invoice-line.entity.js.map +1 -1
- package/dist/backend/index.d.ts.map +1 -1
- package/dist/backend/index.js +36 -4
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/invoices-prose.d.ts +65 -0
- package/dist/backend/invoices-prose.d.ts.map +1 -0
- package/dist/backend/invoices-prose.js +80 -0
- package/dist/backend/invoices-prose.js.map +1 -0
- package/dist/backend/pdf-components/embed-logo-images.d.ts.map +1 -1
- package/dist/backend/pdf-components/embed-logo-images.js +2 -15
- package/dist/backend/pdf-components/embed-logo-images.js.map +1 -1
- package/dist/backend/pdf-components/sample.d.ts.map +1 -1
- package/dist/backend/pdf-components/sample.js +1 -0
- package/dist/backend/pdf-components/sample.js.map +1 -1
- package/dist/backend/pdf-components/sections.d.ts +22 -6
- package/dist/backend/pdf-components/sections.d.ts.map +1 -1
- package/dist/backend/pdf-components/sections.js +70 -37
- package/dist/backend/pdf-components/sections.js.map +1 -1
- package/dist/backend/pdf-components/tree-mapper.d.ts +3 -0
- package/dist/backend/pdf-components/tree-mapper.d.ts.map +1 -1
- package/dist/backend/pdf-components/tree-mapper.js +5 -5
- package/dist/backend/pdf-components/tree-mapper.js.map +1 -1
- package/dist/backend/plugin.d.ts +13 -1
- package/dist/backend/plugin.d.ts.map +1 -1
- package/dist/backend/plugin.js +4 -2
- package/dist/backend/plugin.js.map +1 -1
- package/dist/backend/routes.customer.d.ts +3 -3
- package/dist/backend/routes.customer.d.ts.map +1 -1
- package/dist/backend/routes.customer.js +17 -9
- package/dist/backend/routes.customer.js.map +1 -1
- package/dist/backend/seeds/generic-invoice-template.d.ts +13 -7
- package/dist/backend/seeds/generic-invoice-template.d.ts.map +1 -1
- package/dist/backend/seeds/generic-invoice-template.js +36 -19
- package/dist/backend/seeds/generic-invoice-template.js.map +1 -1
- package/dist/backend/services/auto-issue-reactor.d.ts.map +1 -1
- package/dist/backend/services/auto-issue-reactor.js +6 -2
- package/dist/backend/services/auto-issue-reactor.js.map +1 -1
- package/dist/backend/services/corrective-invoice.d.ts +167 -16
- package/dist/backend/services/corrective-invoice.d.ts.map +1 -1
- package/dist/backend/services/corrective-invoice.js +389 -52
- package/dist/backend/services/corrective-invoice.js.map +1 -1
- package/dist/backend/services/cross-module-context.d.ts +7 -0
- package/dist/backend/services/cross-module-context.d.ts.map +1 -1
- package/dist/backend/services/cross-module-context.js +19 -0
- package/dist/backend/services/cross-module-context.js.map +1 -1
- package/dist/backend/services/invoice-copy-host.service.d.ts.map +1 -1
- package/dist/backend/services/invoice-copy-host.service.js +3 -0
- package/dist/backend/services/invoice-copy-host.service.js.map +1 -1
- package/dist/backend/services/invoice-email-dispatch.d.ts +7 -0
- package/dist/backend/services/invoice-email-dispatch.d.ts.map +1 -1
- package/dist/backend/services/invoice-email-dispatch.js +10 -3
- package/dist/backend/services/invoice-email-dispatch.js.map +1 -1
- package/dist/backend/services/invoice-line-builder.d.ts +4 -0
- package/dist/backend/services/invoice-line-builder.d.ts.map +1 -1
- package/dist/backend/services/invoice-line-builder.js +1 -0
- package/dist/backend/services/invoice-line-builder.js.map +1 -1
- package/dist/backend/services/invoice-paid.d.ts +56 -0
- package/dist/backend/services/invoice-paid.d.ts.map +1 -0
- package/dist/backend/services/invoice-paid.js +74 -0
- package/dist/backend/services/invoice-paid.js.map +1 -0
- package/dist/backend/services/invoice-service.d.ts +53 -2
- package/dist/backend/services/invoice-service.d.ts.map +1 -1
- package/dist/backend/services/invoice-service.js +135 -29
- package/dist/backend/services/invoice-service.js.map +1 -1
- package/dist/backend/services/kept-quantities.d.ts +24 -0
- package/dist/backend/services/kept-quantities.d.ts.map +1 -0
- package/dist/backend/services/kept-quantities.js +32 -0
- package/dist/backend/services/kept-quantities.js.map +1 -0
- package/dist/backend/services/order-returns-lock.d.ts +19 -0
- package/dist/backend/services/order-returns-lock.d.ts.map +1 -0
- package/dist/backend/services/order-returns-lock.js +37 -0
- package/dist/backend/services/order-returns-lock.js.map +1 -0
- package/dist/manifest.d.ts +11 -3
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +14 -1
- package/dist/manifest.js.map +1 -1
- package/dist/migrations/20261108T073244_invoices_invoice_line_kind.d.ts +21 -0
- package/dist/migrations/20261108T073244_invoices_invoice_line_kind.d.ts.map +1 -0
- package/dist/migrations/20261108T073244_invoices_invoice_line_kind.js +28 -0
- package/dist/migrations/20261108T073244_invoices_invoice_line_kind.js.map +1 -0
- package/dist/migrations/index.d.ts +2 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +3 -1
- package/dist/migrations/index.js.map +1 -1
- package/docs/invoices.md +120 -12
- package/i18n/en.json +41 -2
- package/i18n/pl.json +41 -2
- package/package.json +16 -16
|
@@ -2,7 +2,8 @@ import type { EntityManager } from '@mikro-orm/postgresql';
|
|
|
2
2
|
import type { InvoiceNumberGenerator } from './invoice-number-generator.js';
|
|
3
3
|
import type { InvoiceAuditRecorder, InvoiceDomainEventEmitter } from './invoice-service.js';
|
|
4
4
|
import { type LedgerNumberingLookup } from './vendor-number-hold.js';
|
|
5
|
-
import type { CorrectiveInvoiceInput, CorrectiveInvoicePort, CorrectiveInvoiceResult } from '@endora-commerce/contracts';
|
|
5
|
+
import type { CorrectionLineBasis, CorrectiveInvoiceInput, CorrectiveInvoicePort, CorrectiveInvoiceResult, SupportedLanguage } from '@endora-commerce/contracts';
|
|
6
|
+
import { type InvoicesTranslate } from '../invoices-prose.js';
|
|
6
7
|
/** One corrected line's amounts, as the `invoice_lines` columns store them. */
|
|
7
8
|
export interface CorrectionLineAmounts {
|
|
8
9
|
gross: string;
|
|
@@ -15,13 +16,83 @@ export declare class CorrectionTotalExceedsLinesError extends Error {
|
|
|
15
16
|
readonly linesTotal: string;
|
|
16
17
|
constructor(total: string, linesTotal: string);
|
|
17
18
|
}
|
|
18
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* A correction asked to credit more goods at one VAT rate than the invoice
|
|
21
|
+
* still charges at that rate (issue #885). Crediting it would take back more
|
|
22
|
+
* VAT than the rate charged.
|
|
23
|
+
*/
|
|
24
|
+
export declare class CorrectionExceedsRateRemainingError extends Error {
|
|
25
|
+
readonly taxRate: string;
|
|
26
|
+
readonly remaining: string;
|
|
27
|
+
constructor(taxRate: string, remaining: string);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A correction asked to credit more of an order charge — the delivery or the
|
|
31
|
+
* payment surcharge — than the invoice still charges for it (issue #876).
|
|
32
|
+
*/
|
|
33
|
+
export declare class CorrectionExceedsChargeRemainingError extends Error {
|
|
34
|
+
readonly kind: CorrectionChargeKind;
|
|
35
|
+
readonly remaining: string;
|
|
36
|
+
constructor(kind: CorrectionChargeKind, remaining: string);
|
|
37
|
+
}
|
|
38
|
+
/** The order charges a correction may credit (issue #876), named as `invoice_lines.line_kind` names their lines. */
|
|
39
|
+
export type CorrectionChargeKind = 'delivery' | 'payment_surcharge';
|
|
40
|
+
/** One order charge a correction credits (issue #876). */
|
|
41
|
+
export interface CorrectionCharge {
|
|
42
|
+
kind: CorrectionChargeKind;
|
|
43
|
+
/** The gross credited. */
|
|
44
|
+
amount: string | number;
|
|
45
|
+
/** The rate of the invoice line that charged it, as stored (`0.0000` today). */
|
|
46
|
+
rate: string | number;
|
|
47
|
+
/** What the invoice still charges for it: the line's gross less what earlier corrections credited of it. */
|
|
48
|
+
remaining: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* On a correction, a goods line (one naming an order item) stored with
|
|
52
|
+
* quantity 0 is a price reduction (issue #885): its value changed, not its
|
|
53
|
+
* quantity. Corrections written before #885 never stored a goods line with
|
|
54
|
+
* quantity 0, so the rule holds for the whole history.
|
|
55
|
+
*/
|
|
56
|
+
export declare function isPriceReductionLine(l: {
|
|
57
|
+
orderItemId?: string | null;
|
|
58
|
+
quantity: string | number;
|
|
59
|
+
}): boolean;
|
|
60
|
+
/** The units a correction line credits: none for a price reduction. */
|
|
61
|
+
export declare function creditedQuantity(l: {
|
|
62
|
+
orderItemId?: string | null;
|
|
63
|
+
quantity: string | number;
|
|
64
|
+
}): number;
|
|
65
|
+
/**
|
|
66
|
+
* The quantity a correction line is stored with: 0 for a price reduction, the
|
|
67
|
+
* returned quantity otherwise — and never 0 for returned goods, so a returned
|
|
68
|
+
* line is never read back as a price reduction.
|
|
69
|
+
*/
|
|
70
|
+
export declare function storedCorrectionQuantity(basis: CorrectionLineBasis | undefined, quantity: number): number;
|
|
71
|
+
/** A line already credited by an earlier correction of the same invoice, or a goods line of that invoice. */
|
|
19
72
|
export interface CreditedLine {
|
|
20
73
|
orderItemId: string;
|
|
21
74
|
rate: string;
|
|
22
75
|
net: string;
|
|
23
76
|
gross: string;
|
|
77
|
+
/** As stored. On an earlier correction, 0 is a price reduction ({@link isPriceReductionLine}). */
|
|
78
|
+
quantity: number;
|
|
79
|
+
unitNetPrice: string;
|
|
24
80
|
}
|
|
81
|
+
/** One row of the corrected invoice's per-rate summary, as `invoices.vat_summary` stores it. */
|
|
82
|
+
export interface CorrectedSummaryRow {
|
|
83
|
+
taxRate: string;
|
|
84
|
+
netTotal: string;
|
|
85
|
+
vatAmount: string;
|
|
86
|
+
grossTotal: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* How a rate's credited net was found (issue #873). Returned for tests and not
|
|
90
|
+
* persisted: `quantity` — the refund is the default one, and the invoice keeps
|
|
91
|
+
* `vatByRate` of the kept nets; `gross` — what the invoice keeps at the rate
|
|
92
|
+
* has a net under the rule; `gross_credit` — it has none, but the credit does;
|
|
93
|
+
* `gross_nearest` — neither does, so the nearest net is kept.
|
|
94
|
+
*/
|
|
95
|
+
export type CorrectionPath = 'quantity' | 'gross' | 'gross_credit' | 'gross_nearest';
|
|
25
96
|
export interface CorrectionInput {
|
|
26
97
|
/** The gross the correction credits. Refused when above the sum of `lines`. */
|
|
27
98
|
total: string | number;
|
|
@@ -35,9 +106,11 @@ export interface CorrectionInput {
|
|
|
35
106
|
* credited line by line, in proportion to what each line was invoiced.
|
|
36
107
|
*/
|
|
37
108
|
perRate: boolean;
|
|
38
|
-
/** The corrected invoice's lines
|
|
109
|
+
/** The corrected invoice's goods lines, with the quantities and unit prices it invoiced. */
|
|
39
110
|
originalLines: readonly CreditedLine[];
|
|
40
|
-
/** The
|
|
111
|
+
/** The corrected invoice's stored per-rate summary — read on an invoice issued per rate. */
|
|
112
|
+
originalSummary?: readonly CorrectedSummaryRow[] | null;
|
|
113
|
+
/** The goods lines of earlier, not cancelled, corrections of the same invoice. */
|
|
41
114
|
earlierLines: readonly CreditedLine[];
|
|
42
115
|
lines: ReadonlyArray<{
|
|
43
116
|
amount: string | number;
|
|
@@ -46,12 +119,18 @@ export interface CorrectionInput {
|
|
|
46
119
|
quantity: number;
|
|
47
120
|
rate: string | number;
|
|
48
121
|
orderItemId: string;
|
|
122
|
+
/** What the line documents (issue #885); `returned_goods` when absent. */
|
|
123
|
+
basis?: CorrectionLineBasis;
|
|
49
124
|
}>;
|
|
125
|
+
/**
|
|
126
|
+
* Issue #876 — the order charges a consumer's withdrawal refunds, credited
|
|
127
|
+
* beside the goods: `total` includes them. Absent: goods only.
|
|
128
|
+
*/
|
|
129
|
+
charges?: readonly CorrectionCharge[];
|
|
50
130
|
}
|
|
51
131
|
/**
|
|
52
132
|
* A correction's amounts, in exact decimal arithmetic, under the invoice's VAT
|
|
53
|
-
* method
|
|
54
|
-
* owner ruling of 2026-10-24, review of PR #423).
|
|
133
|
+
* method (issue #417, owner ruling of 2026-10-24, review of PR #423).
|
|
55
134
|
*
|
|
56
135
|
* The credited amount is gross (a return credits what was paid, tax included),
|
|
57
136
|
* capped at what remains of the invoice after earlier corrections (FR-020),
|
|
@@ -59,15 +138,36 @@ export interface CorrectionInput {
|
|
|
59
138
|
* refused ({@link CorrectionTotalExceedsLinesError}) rather than booked as a
|
|
60
139
|
* net with no VAT and no line.
|
|
61
140
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
141
|
+
* **An invoice issued per rate** (issue #873) is corrected on what it keeps,
|
|
142
|
+
* rate by rate. Before the correction the invoice keeps `Nb` net and `Vb` VAT
|
|
143
|
+
* at a rate, `Gb` gross: its summary row less what earlier corrections credited
|
|
144
|
+
* there. The correction credits `G` gross at the rate. Its goods lines leave
|
|
145
|
+
* each invoiced line with a kept quantity — the invoiced quantity less every
|
|
146
|
+
* credited quantity, where a price reduction (issue #885) credits none — and
|
|
147
|
+
* the kept net `K` is those quantities at the invoiced unit prices.
|
|
148
|
+
* - **Quantity path**: when `Gb − G` is `K + round(K × rate)`, the refund is the
|
|
149
|
+
* default one; the invoice keeps `K` net and `round(K × rate)` VAT, exactly
|
|
150
|
+
* what `vatByRate` charges on the kept nets, and the correction credits the
|
|
151
|
+
* rest.
|
|
152
|
+
* - **Gross path** otherwise — an operator-reduced amount, a price reduction, a
|
|
153
|
+
* capped credit, an order placed before 0.108.0: the invoice keeps `Gb − G`
|
|
154
|
+
* gross. When a net has that gross under the rule, the invoice keeps it;
|
|
155
|
+
* otherwise, when one has `G`, the correction credits it; otherwise the
|
|
156
|
+
* invoice keeps the nearest (owner ruling E1, 2026-11-07: the money is exact,
|
|
157
|
+
* and what is left may be a cent off the rule until the next correction).
|
|
158
|
+
*
|
|
159
|
+
* In every case the credited VAT is `G` less the credited net, which lies
|
|
160
|
+
* within `[0, G]` and never above `Nb`; a `G` above `Gb` is refused
|
|
161
|
+
* ({@link CorrectionExceedsRateRemainingError}). On the quantity path a rate's
|
|
162
|
+
* net is shared over its lines by what each line's kept net fell; otherwise in
|
|
163
|
+
* proportion to their gross.
|
|
164
|
+
*
|
|
165
|
+
* **An invoice issued before 0.108.0** is credited line by line, cumulatively:
|
|
166
|
+
* the invoiced line net in proportion to the cumulative gross, less the nets
|
|
167
|
+
* earlier corrections credited.
|
|
168
|
+
*
|
|
169
|
+
* An order-level discount the goods carried is credited back as a negative
|
|
170
|
+
* 0 % amount. A price-reduction line carries none.
|
|
71
171
|
*/
|
|
72
172
|
export declare function correctionAmounts(input: CorrectionInput): {
|
|
73
173
|
credited: string;
|
|
@@ -83,6 +183,38 @@ export declare function correctionAmounts(input: CorrectionInput): {
|
|
|
83
183
|
}>;
|
|
84
184
|
/** The order-level discount credited back, as a negative 0 % amount (`0.00` when none). */
|
|
85
185
|
discountCredit: string;
|
|
186
|
+
/** Per rate of an invoice issued per rate, how its net was found. Not persisted. */
|
|
187
|
+
paths: Record<string, CorrectionPath>;
|
|
188
|
+
/** The order charges credited (issue #876), each at its line's rate. */
|
|
189
|
+
chargeLines: Array<{
|
|
190
|
+
kind: CorrectionChargeKind;
|
|
191
|
+
gross: string;
|
|
192
|
+
net: string;
|
|
193
|
+
rate: string;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* The invoice's delivery and payment-surcharge lines (issue #876), by
|
|
198
|
+
* `line_kind`. A line issued before #904 has none. Issuance has written the
|
|
199
|
+
* delivery before the surcharge, each a positive 0 % line naming no order item,
|
|
200
|
+
* since it first itemised them (`ee860569e`, "itemize delivery, payment
|
|
201
|
+
* surcharge, and discount as lines"), so with two such lines the first is the
|
|
202
|
+
* delivery and the second the surcharge. Only 0 % lines are matched (ruling Q3
|
|
203
|
+
* on PR #965): a positive line at another rate is no charge issuance wrote, so
|
|
204
|
+
* a credit asked of it is refused `no_corrected_line`. With one, it is whichever charge the order had — the settlement
|
|
205
|
+
* names only a charge that was paid, so it never asks for both — and it answers
|
|
206
|
+
* for either. On those invoices both are 0 % lines, so the rate a credit
|
|
207
|
+
* mirrors is the same either way.
|
|
208
|
+
*/
|
|
209
|
+
export declare function chargeLinesOf<T extends {
|
|
210
|
+
orderItemId?: string | null;
|
|
211
|
+
lineKind?: string | null;
|
|
212
|
+
grossValue: string;
|
|
213
|
+
taxRate: string;
|
|
214
|
+
ordinal: number;
|
|
215
|
+
}>(lines: readonly T[]): {
|
|
216
|
+
delivery?: T;
|
|
217
|
+
payment_surcharge?: T;
|
|
86
218
|
};
|
|
87
219
|
/**
|
|
88
220
|
* Invoices-side implementation of the returns module's `CorrectiveInvoicePort`
|
|
@@ -107,6 +239,14 @@ export declare class CorrectiveInvoiceProvider implements CorrectiveInvoicePort
|
|
|
107
239
|
private readonly audit?;
|
|
108
240
|
private readonly events?;
|
|
109
241
|
private readonly ledgerRouting?;
|
|
242
|
+
/**
|
|
243
|
+
* The language a price-reduction line is named in, and this module's
|
|
244
|
+
* bundle to name it from (issue #885), as `InvoiceService` names the lines
|
|
245
|
+
* it itemises: the name is stored with the line, so it is written in the
|
|
246
|
+
* document's language, `INVOICE_RENDER_LANGUAGE`. Without a translator,
|
|
247
|
+
* English.
|
|
248
|
+
*/
|
|
249
|
+
private readonly lineProse;
|
|
110
250
|
/**
|
|
111
251
|
* `numbers` is an accessor for the same reason `emFactory` is: the generator
|
|
112
252
|
* is a gated port, so resolving it is a question about `invoices`' effective
|
|
@@ -114,7 +254,18 @@ export declare class CorrectiveInvoiceProvider implements CorrectiveInvoicePort
|
|
|
114
254
|
* resolved it while wiring this provider asked at boot, and an operator who
|
|
115
255
|
* had switched `invoices` off took the backend down with it.
|
|
116
256
|
*/
|
|
117
|
-
constructor(emFactory: () => EntityManager, numbers?: (() => InvoiceNumberGenerator) | undefined, audit?: InvoiceAuditRecorder | undefined, events?: InvoiceDomainEventEmitter | undefined, ledgerRouting?: LedgerNumberingLookup | undefined
|
|
257
|
+
constructor(emFactory: () => EntityManager, numbers?: (() => InvoiceNumberGenerator) | undefined, audit?: InvoiceAuditRecorder | undefined, events?: InvoiceDomainEventEmitter | undefined, ledgerRouting?: LedgerNumberingLookup | undefined,
|
|
258
|
+
/**
|
|
259
|
+
* The language a price-reduction line is named in, and this module's
|
|
260
|
+
* bundle to name it from (issue #885), as `InvoiceService` names the lines
|
|
261
|
+
* it itemises: the name is stored with the line, so it is written in the
|
|
262
|
+
* document's language, `INVOICE_RENDER_LANGUAGE`. Without a translator,
|
|
263
|
+
* English.
|
|
264
|
+
*/
|
|
265
|
+
lineProse?: {
|
|
266
|
+
readonly translate?: InvoicesTranslate | undefined;
|
|
267
|
+
readonly language?: SupportedLanguage;
|
|
268
|
+
});
|
|
118
269
|
/**
|
|
119
270
|
* Refuse, without writing anything, exactly what {@link createCorrection}
|
|
120
271
|
* would refuse for this input (issue #417, review of PR #423): a settlement
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corrective-invoice.d.ts","sourceRoot":"","sources":["../../../src/backend/services/corrective-invoice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"corrective-invoice.d.ts","sourceRoot":"","sources":["../../../src/backend/services/corrective-invoice.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBA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