@tricoteuses/tisseuse 0.1.2 → 0.1.3
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/dist/index.js +3010 -414
- package/dist/lib/dates.d.ts +1 -0
- package/dist/lib/index.d.ts +18 -0
- package/dist/lib/text_parsers/ast.d.ts +8 -8
- package/dist/lib/text_parsers/text_titles_infos.json.d.ts +1220 -0
- package/dist/lib/text_parsers/texts.d.ts +1 -0
- package/dist/scripts/test.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,63 +1,2551 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const vt = new Intl.DateTimeFormat("fr-FR", {
|
|
2
|
+
dateStyle: "long"
|
|
3
|
+
});
|
|
4
|
+
function Vi(e) {
|
|
5
|
+
return vt.format(new Date(e)).replace(/^1 /, "1er ");
|
|
3
6
|
}
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const mt = [
|
|
8
|
+
[],
|
|
9
|
+
["un"],
|
|
10
|
+
["du"],
|
|
11
|
+
// duo
|
|
12
|
+
["ter"],
|
|
13
|
+
["quater"],
|
|
14
|
+
["quin"],
|
|
15
|
+
["sex"],
|
|
16
|
+
["sept"],
|
|
17
|
+
["oct"],
|
|
18
|
+
// octo
|
|
19
|
+
["nov"]
|
|
20
|
+
// novo
|
|
21
|
+
], Ge = [
|
|
22
|
+
[],
|
|
23
|
+
["decies"],
|
|
24
|
+
["vicies", "vecies"],
|
|
25
|
+
["tricies", "trecies"],
|
|
26
|
+
["quadragies"],
|
|
27
|
+
["quinquagies"],
|
|
28
|
+
["sexagies"],
|
|
29
|
+
["septuagies"],
|
|
30
|
+
["octogies"],
|
|
31
|
+
["nonagies"]
|
|
32
|
+
], It = [
|
|
33
|
+
[],
|
|
34
|
+
["semel"],
|
|
35
|
+
["bis"],
|
|
36
|
+
["ter"],
|
|
37
|
+
["quater"],
|
|
38
|
+
["quinquies"],
|
|
39
|
+
["sexies"],
|
|
40
|
+
["septies"],
|
|
41
|
+
["octies"],
|
|
42
|
+
["nonies", "novies"]
|
|
43
|
+
], R = [
|
|
44
|
+
1e3,
|
|
45
|
+
"M",
|
|
46
|
+
900,
|
|
47
|
+
"CM",
|
|
48
|
+
500,
|
|
49
|
+
"D",
|
|
50
|
+
400,
|
|
51
|
+
"CD",
|
|
52
|
+
100,
|
|
53
|
+
"C",
|
|
54
|
+
90,
|
|
55
|
+
"XC",
|
|
56
|
+
50,
|
|
57
|
+
"L",
|
|
58
|
+
40,
|
|
59
|
+
"XL",
|
|
60
|
+
10,
|
|
61
|
+
"X",
|
|
62
|
+
9,
|
|
63
|
+
"IX",
|
|
64
|
+
5,
|
|
65
|
+
"V",
|
|
66
|
+
4,
|
|
67
|
+
"IV",
|
|
68
|
+
1,
|
|
69
|
+
"I"
|
|
70
|
+
], de = [
|
|
71
|
+
"dix",
|
|
72
|
+
"onze",
|
|
73
|
+
"douze",
|
|
74
|
+
"treize",
|
|
75
|
+
"quatorze",
|
|
76
|
+
"quinze",
|
|
77
|
+
"seize",
|
|
78
|
+
"dix-sept",
|
|
79
|
+
"dix-huit",
|
|
80
|
+
"dix-neuf"
|
|
81
|
+
], ht = [
|
|
82
|
+
"",
|
|
83
|
+
"dix",
|
|
84
|
+
"vingt",
|
|
85
|
+
"trente",
|
|
86
|
+
"quarante",
|
|
87
|
+
"cinquante",
|
|
88
|
+
"soixante",
|
|
89
|
+
"soixante-dix",
|
|
90
|
+
"quatre-vingt",
|
|
91
|
+
"quatre-vingt-dix"
|
|
92
|
+
], ee = [
|
|
93
|
+
"",
|
|
94
|
+
"un",
|
|
95
|
+
"deux",
|
|
96
|
+
"trois",
|
|
97
|
+
"quatre",
|
|
98
|
+
"cinq",
|
|
99
|
+
"six",
|
|
100
|
+
"sept",
|
|
101
|
+
"huit",
|
|
102
|
+
"neuf"
|
|
103
|
+
];
|
|
104
|
+
function H(e) {
|
|
105
|
+
if (!(e < 0)) {
|
|
106
|
+
if (e === 0)
|
|
107
|
+
return "zéro";
|
|
108
|
+
if (e < 10)
|
|
109
|
+
return ee[e];
|
|
110
|
+
if (e < 20)
|
|
111
|
+
return de[e - 10];
|
|
112
|
+
if (e < 100) {
|
|
113
|
+
const t = Math.floor(e / 10), n = e % 10;
|
|
114
|
+
if (t === 7)
|
|
115
|
+
return `soixante-${de[n]}`;
|
|
116
|
+
if (t === 9)
|
|
117
|
+
return `quatre-vingt-${de[n]}`;
|
|
118
|
+
const a = ht[t];
|
|
119
|
+
return n === 0 ? a : n === 1 && t !== 8 ? `${a} et ${ee[n]}` : a + `-${ee[n]}`;
|
|
120
|
+
}
|
|
121
|
+
if (e < 1e3) {
|
|
122
|
+
const t = Math.floor(e / 100), n = e % 100;
|
|
123
|
+
let a = t === 1 ? "cent" : `${ee[t]} cents`;
|
|
124
|
+
return n === 0 ? a : (t > 1 && n > 0 && (a = a.slice(0, -1)), `${a} ${H(n)}`);
|
|
125
|
+
}
|
|
126
|
+
if (e < 1e6) {
|
|
127
|
+
const t = Math.floor(e / 1e3), n = e % 1e3, a = t === 1 ? "mille" : `${H(t)} mille`;
|
|
128
|
+
return n === 0 ? a : a + ` ${H(n)}`;
|
|
129
|
+
}
|
|
130
|
+
throw new Error("Number must be a less than one million.");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function* Wi(e) {
|
|
134
|
+
e === 1 && (yield "premier", yield "première", yield "unique", yield "Ier", yield "Ière", yield "1er", yield "1ère");
|
|
135
|
+
const t = H(e);
|
|
136
|
+
t !== void 0 && (yield t);
|
|
137
|
+
const n = Fe(e);
|
|
138
|
+
n !== void 0 && (yield n), yield e.toString();
|
|
139
|
+
}
|
|
140
|
+
function* Ji(e) {
|
|
141
|
+
if (!(e <= 0))
|
|
142
|
+
if (e < 10)
|
|
143
|
+
yield* It[e];
|
|
144
|
+
else if (e < 100) {
|
|
145
|
+
const t = Math.floor(e / 10), n = e % 10;
|
|
146
|
+
for (const a of Ge[t])
|
|
147
|
+
for (const o of mt[n])
|
|
148
|
+
yield `${o}${[2, 8, 9].includes(n) && a[0] !== "o" ? "o" : ""}${a}`;
|
|
149
|
+
if (t < 9 && [8, 9].includes(n)) {
|
|
150
|
+
const a = Ge[t + 1];
|
|
151
|
+
for (const o of a)
|
|
152
|
+
yield `${n === 8 ? "duo" : "un"}${o[0] === "o" ? "d" : "de"}${o}`;
|
|
153
|
+
}
|
|
154
|
+
} else
|
|
155
|
+
throw new Error("Number must be a less than 100.");
|
|
156
|
+
}
|
|
157
|
+
function* Yi(e) {
|
|
158
|
+
if (e === 1)
|
|
159
|
+
yield "premier", yield "première", yield "Ier", yield "Ière", yield "1er", yield "1ère";
|
|
160
|
+
else {
|
|
161
|
+
const t = Lt(e);
|
|
162
|
+
t !== void 0 && (yield t);
|
|
163
|
+
const n = Fe(e);
|
|
164
|
+
n !== void 0 && (yield `${n}e`, yield `${n}ème`), e > 0 && (yield `${e}e`, yield `${e}ème`), e === 2 && (yield "second", yield "seconde", yield "2nd", yield "2nde");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function ne(e) {
|
|
168
|
+
e = e.toUpperCase();
|
|
169
|
+
let t = 0, n = 0;
|
|
170
|
+
for (let a = 0; a < R.length; a += 2)
|
|
171
|
+
for (; e.substring(
|
|
172
|
+
t,
|
|
173
|
+
t + R[a + 1].length
|
|
174
|
+
) === R[a + 1]; )
|
|
175
|
+
n += R[a], t += R[a + 1].length;
|
|
176
|
+
return n;
|
|
177
|
+
}
|
|
178
|
+
function Lt(e) {
|
|
179
|
+
if (e <= 0)
|
|
180
|
+
return;
|
|
181
|
+
if (e === 1)
|
|
182
|
+
return "premier";
|
|
183
|
+
const t = H(e);
|
|
184
|
+
if (t === void 0)
|
|
185
|
+
return;
|
|
186
|
+
const n = t.match(/(^| )([^ ]+)$/)[2];
|
|
187
|
+
return n === "un" ? t.slice(0, -2) + "unième" : n === "cinq" ? t.slice(0, -4) + "cinquième" : n === "neuf" ? t.slice(0, -3) + "euvième" : n.endsWith("e") ? t.slice(0, -1) + "ième" : t + "ième";
|
|
188
|
+
}
|
|
189
|
+
function Fe(e) {
|
|
190
|
+
if (e < 0)
|
|
191
|
+
return;
|
|
192
|
+
if (e === 0)
|
|
193
|
+
return "0I";
|
|
194
|
+
let t = "";
|
|
195
|
+
for (let n = 0; n < R.length; n += 2)
|
|
196
|
+
for (; e >= R[n]; )
|
|
197
|
+
t += R[n + 1], e -= R[n];
|
|
198
|
+
return t;
|
|
199
|
+
}
|
|
200
|
+
class Ct {
|
|
201
|
+
constructor(t, n = 0) {
|
|
202
|
+
this.input = t, this.offset = n;
|
|
203
|
+
}
|
|
204
|
+
currentArticle = void 0;
|
|
205
|
+
currentText = void 0;
|
|
206
|
+
length = 0;
|
|
207
|
+
usedInputs = void 0;
|
|
208
|
+
variables = {};
|
|
209
|
+
position() {
|
|
210
|
+
return {
|
|
211
|
+
start: this.offset,
|
|
212
|
+
stop: this.offset + this.length
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
remaining() {
|
|
216
|
+
return this.input.slice(this.offset);
|
|
217
|
+
}
|
|
218
|
+
text(t) {
|
|
219
|
+
return t === void 0 ? this.input.slice(this.offset, this.offset + this.length) : this.input.slice(t.start, t.stop);
|
|
220
|
+
}
|
|
221
|
+
textFromResults(t) {
|
|
222
|
+
return t === void 0 ? "" : Ue(t);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const r = (...e) => (t) => {
|
|
226
|
+
for (const n of e) {
|
|
227
|
+
const a = (Array.isArray(n) ? l(n, { exportVariables: !0 }) : n)(t);
|
|
228
|
+
if (a !== void 0)
|
|
229
|
+
return a;
|
|
230
|
+
}
|
|
231
|
+
}, l = (e, {
|
|
232
|
+
exportVariables: t,
|
|
233
|
+
value: n
|
|
234
|
+
} = {}) => (a) => {
|
|
235
|
+
const o = a.offset, s = a.variables;
|
|
236
|
+
a.variables = { ...s };
|
|
237
|
+
const u = [], f = [];
|
|
238
|
+
for (const c of e) {
|
|
239
|
+
const g = (Array.isArray(c) ? l(c, { exportVariables: t }) : c)(a);
|
|
240
|
+
if (g === void 0) {
|
|
241
|
+
a.length = 0, a.offset = o, a.usedInputs = void 0, a.variables = s;
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
a.usedInputs !== void 0 && u.push(a.usedInputs), f.push(g);
|
|
245
|
+
}
|
|
246
|
+
a.length = a.offset - o, a.offset -= a.length, a.usedInputs = u.length === 0 ? void 0 : u;
|
|
247
|
+
let d;
|
|
248
|
+
if (n === void 0)
|
|
249
|
+
d = f;
|
|
250
|
+
else if (typeof n == "function") {
|
|
251
|
+
const c = n(f, a);
|
|
252
|
+
if (c === void 0) {
|
|
253
|
+
a.length = 0, a.offset = o, a.usedInputs = void 0, a.variables = s;
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
d = c;
|
|
257
|
+
} else
|
|
258
|
+
d = n;
|
|
259
|
+
return a.offset += a.length, a.length = 0, t || (a.variables = s), d;
|
|
260
|
+
}, O = (e, { value: t }) => (n) => {
|
|
261
|
+
const a = n.offset, o = n.variables;
|
|
262
|
+
n.variables = { ...o };
|
|
263
|
+
const s = (Array.isArray(e) ? l(e, { exportVariables: !0 }) : e)(n);
|
|
264
|
+
if (s !== void 0) {
|
|
265
|
+
if (n.length = n.offset - a, n.offset -= n.length, typeof t == "function") {
|
|
266
|
+
const u = t(s, n);
|
|
267
|
+
if (u === void 0) {
|
|
268
|
+
n.length = 0, n.offset = a, n.usedInputs = void 0, n.variables = o;
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
return n.offset += n.length, n.length = 0, u;
|
|
272
|
+
}
|
|
273
|
+
return n.offset += n.length, n.length = 0, t;
|
|
274
|
+
}
|
|
275
|
+
}, p = (e, {
|
|
276
|
+
default: t,
|
|
277
|
+
value: n
|
|
278
|
+
}) => (a) => {
|
|
279
|
+
let o = (Array.isArray(e) ? l(e, { exportVariables: !0 }) : e)(a);
|
|
280
|
+
if (o === void 0)
|
|
281
|
+
o = typeof t == "function" ? t(a) : t;
|
|
282
|
+
else if (n !== void 0)
|
|
283
|
+
if (typeof n == "function") {
|
|
284
|
+
const s = n(o, a);
|
|
285
|
+
if (s === void 0) {
|
|
286
|
+
a.length = 0, a.usedInputs = void 0;
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
o = s;
|
|
290
|
+
} else
|
|
291
|
+
o = n;
|
|
292
|
+
return o;
|
|
293
|
+
}, Zi = (e, t) => (Array.isArray(t) ? l(t) : t)(new Ct(e)), i = (e, {
|
|
294
|
+
flags: t,
|
|
295
|
+
value: n
|
|
296
|
+
} = {}) => (a) => {
|
|
297
|
+
const o = new RegExp(e, "gy" + (t ?? ""));
|
|
298
|
+
o.lastIndex = a.offset;
|
|
299
|
+
const s = o.exec(a.input);
|
|
300
|
+
if (s === null)
|
|
301
|
+
return;
|
|
302
|
+
a.length = s[0].length, a.usedInputs = s[0];
|
|
303
|
+
let u;
|
|
304
|
+
if (n === void 0)
|
|
305
|
+
u = s[0];
|
|
306
|
+
else if (typeof n == "function") {
|
|
307
|
+
const f = n(s, a);
|
|
308
|
+
if (f === void 0) {
|
|
309
|
+
a.length = 0, a.usedInputs = void 0;
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
u = f;
|
|
313
|
+
} else
|
|
314
|
+
u = n;
|
|
315
|
+
return a.offset += a.length, a.length = 0, u;
|
|
316
|
+
}, G = (e, {
|
|
317
|
+
max: t,
|
|
318
|
+
min: n,
|
|
319
|
+
separator: a,
|
|
320
|
+
value: o
|
|
321
|
+
} = {}) => (s) => {
|
|
322
|
+
const u = s.offset, f = s.variables;
|
|
323
|
+
s.variables = { ...f };
|
|
324
|
+
const d = [], c = [];
|
|
325
|
+
let g = 0;
|
|
326
|
+
for (; t === void 0 || g < t; g++) {
|
|
327
|
+
const E = (g === 0 || a === void 0 ? Array.isArray(e) ? l(e) : e : l([a, e]))(s);
|
|
328
|
+
if (E === void 0)
|
|
329
|
+
break;
|
|
330
|
+
s.usedInputs !== void 0 && d.push(s.usedInputs), c.push(E);
|
|
331
|
+
}
|
|
332
|
+
if (n !== void 0 && g < n) {
|
|
333
|
+
s.length = 0, s.offset = u, s.usedInputs = void 0, s.variables = f;
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
s.length = s.offset - u, s.offset -= s.length, s.usedInputs = d.length === 0 ? void 0 : d;
|
|
337
|
+
let m;
|
|
338
|
+
if (o === void 0)
|
|
339
|
+
m = c;
|
|
340
|
+
else if (typeof o == "function") {
|
|
341
|
+
const E = o(c, s);
|
|
342
|
+
if (E === void 0) {
|
|
343
|
+
s.length = 0, s.offset = u, s.usedInputs = void 0, s.variables = f;
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
m = E;
|
|
347
|
+
} else
|
|
348
|
+
m = o;
|
|
349
|
+
return s.offset += s.length, s.length = 0, m;
|
|
350
|
+
}, Ue = (e) => e.filter((t) => t !== null).map((t) => typeof t == "string" ? t : Ue(t)).join(""), b = (e, t, { value: n } = {}) => (a) => {
|
|
351
|
+
const o = a.offset, s = a.variables;
|
|
352
|
+
a.variables = { ...s };
|
|
353
|
+
const u = (Array.isArray(t) ? l(t, { exportVariables: !0 }) : t)(a);
|
|
354
|
+
if (u === void 0) {
|
|
355
|
+
delete a.variables[e];
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
if (n === void 0)
|
|
359
|
+
return a.variables[e] = u, u;
|
|
360
|
+
if (a.length = a.offset - o, a.offset -= a.length, typeof n == "function") {
|
|
361
|
+
const f = n(u, a);
|
|
362
|
+
if (f === void 0) {
|
|
363
|
+
a.length = 0, a.offset = o, a.usedInputs = void 0, a.variables = s, delete a.variables[e];
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
return a.offset += a.length, a.length = 0, a.variables[e] = f, f;
|
|
367
|
+
}
|
|
368
|
+
return a.offset += a.length, a.length = 0, a.variables[e] = n, n;
|
|
369
|
+
}, ye = (e, {
|
|
370
|
+
value: t
|
|
371
|
+
} = {}) => (n) => {
|
|
372
|
+
let a = e, o = n.offset;
|
|
373
|
+
const s = /([\-\/\d\p{Alphabetic}'°]+)($|[^\-\/\d\p{Alphabetic}°]+)/gvy;
|
|
374
|
+
s.lastIndex = n.offset;
|
|
375
|
+
const u = [];
|
|
376
|
+
let f;
|
|
377
|
+
for (; ; ) {
|
|
378
|
+
const g = s.exec(n.input);
|
|
379
|
+
if (g === null)
|
|
380
|
+
break;
|
|
381
|
+
let m = g[1];
|
|
382
|
+
if (m = /^[IVX]+$/g.test(m) ? ne(m).toString() : m.toLowerCase().replace(/^no$/, "n°"), m === "constitution" && g[1][0] !== "C")
|
|
383
|
+
break;
|
|
384
|
+
const E = a[m];
|
|
385
|
+
if (E === void 0)
|
|
386
|
+
break;
|
|
387
|
+
f = g[2], a = E, o = s.lastIndex, u.push(g[0]);
|
|
388
|
+
}
|
|
389
|
+
if (a.cid === void 0) {
|
|
390
|
+
n.length = 0, n.usedInputs = void 0;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
f && (o -= f.length, u[u.length - 1] = u[u.length - 1].slice(0, -f.length)), n.length = o - n.offset, n.usedInputs = u.length === 0 ? void 0 : u;
|
|
394
|
+
const d = { cid: a.cid };
|
|
395
|
+
let c;
|
|
396
|
+
if (t === void 0)
|
|
397
|
+
c = d;
|
|
398
|
+
else if (typeof t == "function") {
|
|
399
|
+
const g = t(d, n);
|
|
400
|
+
if (g === void 0) {
|
|
401
|
+
n.length = 0, n.usedInputs = void 0;
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
c = g;
|
|
405
|
+
} else
|
|
406
|
+
c = t;
|
|
407
|
+
return n.offset = o, n.length = 0, c;
|
|
408
|
+
};
|
|
409
|
+
i(" ?' ?", { value: "'" });
|
|
410
|
+
const T = i(" "), pe = i(" ?", { value: "" }), Ot = i("[a-z]"), Xt = i(String.raw`(?=$|\P{Alphabetic})`, {
|
|
411
|
+
flags: "iv"
|
|
412
|
+
}), Be = i("n ?[°o] ?", { flags: "i", value: "n° " }), xe = i("-"), Gt = i(", ?", { value: ", " }), S = i("(, ?| )", { value: ", " }), yt = i(String.raw`^« ?([^»\n]+)`, {
|
|
413
|
+
flags: "dm",
|
|
414
|
+
value: (e) => {
|
|
415
|
+
let t = e.indices[1][1];
|
|
416
|
+
return e[1].endsWith(" ") && t--, {
|
|
417
|
+
position: {
|
|
418
|
+
start: e.indices[1][0],
|
|
419
|
+
stop: t
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
}), xt = i(String.raw`« ?(.*?) ?»`, {
|
|
424
|
+
flags: "d",
|
|
425
|
+
value: (e, t) => ({
|
|
426
|
+
content: [
|
|
427
|
+
{
|
|
428
|
+
position: {
|
|
429
|
+
start: e.indices[1][0],
|
|
430
|
+
stop: e.indices[1][1]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
position: t.position(),
|
|
435
|
+
type: "citation"
|
|
436
|
+
})
|
|
437
|
+
}), F = r(
|
|
438
|
+
l(
|
|
439
|
+
[
|
|
440
|
+
G(yt, {
|
|
441
|
+
separator: i(String.raw`»?\n`),
|
|
442
|
+
// Remove separators from results.
|
|
443
|
+
value: (e) => e.map(
|
|
444
|
+
(t, n) => n === 0 ? t : t[1]
|
|
445
|
+
)
|
|
446
|
+
}),
|
|
447
|
+
i("»")
|
|
448
|
+
],
|
|
449
|
+
{
|
|
450
|
+
value: (e, t) => ({
|
|
451
|
+
content: e[0],
|
|
452
|
+
position: t.position(),
|
|
453
|
+
type: "citation"
|
|
454
|
+
})
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
l([pe, xt], { value: (e) => e[1] })
|
|
458
|
+
), je = r(
|
|
459
|
+
l(
|
|
460
|
+
[
|
|
461
|
+
S,
|
|
462
|
+
i("(après|avant) (le mot|les mots) :", { flags: "i" }),
|
|
463
|
+
F,
|
|
464
|
+
S,
|
|
465
|
+
r(
|
|
466
|
+
i("(il )?est (ajouté|inséré)e?", { flags: "i" }),
|
|
467
|
+
i("sont (ajouté|inséré)e?s", { flags: "i" })
|
|
468
|
+
)
|
|
469
|
+
],
|
|
470
|
+
{ value: { action: "CREATION", actionInContent: !0 } }
|
|
471
|
+
),
|
|
472
|
+
l(
|
|
473
|
+
[
|
|
474
|
+
S,
|
|
475
|
+
r(
|
|
476
|
+
l([
|
|
477
|
+
p(
|
|
478
|
+
l([
|
|
479
|
+
i("(après|avant) la référence :", { flags: "i" }),
|
|
480
|
+
F,
|
|
481
|
+
S
|
|
482
|
+
]),
|
|
483
|
+
{ default: [] }
|
|
484
|
+
),
|
|
485
|
+
r(
|
|
486
|
+
i("(il )?est (ajouté|inséré)e?", { flags: "i" }),
|
|
487
|
+
i("sont (ajouté|inséré)e?s", { flags: "i" })
|
|
488
|
+
)
|
|
489
|
+
]),
|
|
490
|
+
i("est complétée?", { flags: "i" }),
|
|
491
|
+
i("sont complétée?s", { flags: "i" })
|
|
492
|
+
)
|
|
493
|
+
],
|
|
494
|
+
{ value: { action: "CREATION" } }
|
|
495
|
+
),
|
|
496
|
+
l(
|
|
497
|
+
[
|
|
498
|
+
S,
|
|
499
|
+
r(
|
|
500
|
+
i("est ainsi rédigée?", { flags: "i" }),
|
|
501
|
+
i("est rédigée? (ainsi qu'il|comme) suit", { flags: "i" }),
|
|
502
|
+
i("sont ainsi rédigée?s", { flags: "i" }),
|
|
503
|
+
i("sont rédigée?s (ainsi qu'il|comme) suit", { flags: "i" })
|
|
504
|
+
)
|
|
505
|
+
],
|
|
506
|
+
{ value: { action: "CREATION_OU_MODIFICATION" } }
|
|
507
|
+
),
|
|
508
|
+
l(
|
|
509
|
+
[
|
|
510
|
+
S,
|
|
511
|
+
r(
|
|
512
|
+
i("est ainsi (modifié|rétabli)e?", { flags: "i" }),
|
|
513
|
+
i("est (modifié|rétabli)e? (ainsi qu'il|comme) suit", {
|
|
514
|
+
flags: "i"
|
|
515
|
+
}),
|
|
516
|
+
i("est remplacée?", { flags: "i" }),
|
|
517
|
+
i("sont ainsi (modifié|rétabli)e?s", { flags: "i" }),
|
|
518
|
+
i("sont (modifié|rétabli)e?s (ainsi qu'il|comme) suit", {
|
|
519
|
+
flags: "i"
|
|
520
|
+
}),
|
|
521
|
+
i("sont remplacée?s", { flags: "i" })
|
|
522
|
+
)
|
|
523
|
+
],
|
|
524
|
+
{ value: { action: "MODIFICATION" } }
|
|
525
|
+
),
|
|
526
|
+
l(
|
|
527
|
+
[
|
|
528
|
+
S,
|
|
529
|
+
r(
|
|
530
|
+
l([
|
|
531
|
+
r(
|
|
532
|
+
i("l'année", { flags: "i" }),
|
|
533
|
+
i("la (date|mention|référence)", { flags: "i" }),
|
|
534
|
+
i("le (montant|mot|taux)", { flags: "i" }),
|
|
535
|
+
i("le tableau intitulé", { flags: "i" }),
|
|
536
|
+
i("les mots", { flags: "i" })
|
|
537
|
+
),
|
|
538
|
+
i(" ?:"),
|
|
539
|
+
F,
|
|
540
|
+
T,
|
|
541
|
+
r(
|
|
542
|
+
i("est ainsi modifiée?", { flags: "i" }),
|
|
543
|
+
i("est remplacée?", { flags: "i" }),
|
|
544
|
+
i("sont remplacée?s", { flags: "i" })
|
|
545
|
+
)
|
|
546
|
+
]),
|
|
547
|
+
l([
|
|
548
|
+
i("les nombres", { flags: "i" }),
|
|
549
|
+
i(" ?:"),
|
|
550
|
+
G(F, {
|
|
551
|
+
min: 1,
|
|
552
|
+
separator: i("(,| et)", { flags: "i" })
|
|
553
|
+
}),
|
|
554
|
+
T,
|
|
555
|
+
i("sont respectivement remplacés", { flags: "i" })
|
|
556
|
+
])
|
|
557
|
+
)
|
|
558
|
+
],
|
|
559
|
+
{ value: { action: "MODIFICATION", actionInContent: !0 } }
|
|
560
|
+
),
|
|
561
|
+
l(
|
|
562
|
+
[
|
|
563
|
+
S,
|
|
564
|
+
r(
|
|
565
|
+
i("est supprimée la (mention|référence)", { flags: "i" }),
|
|
566
|
+
l([
|
|
567
|
+
i("la (mention|référence)", { flags: "i" }),
|
|
568
|
+
i(" ?:"),
|
|
569
|
+
F,
|
|
570
|
+
T,
|
|
571
|
+
i("est supprimée", { flags: "i" })
|
|
572
|
+
]),
|
|
573
|
+
l([
|
|
574
|
+
i("les mots", { flags: "i" }),
|
|
575
|
+
i(" ?:"),
|
|
576
|
+
F,
|
|
577
|
+
T,
|
|
578
|
+
i("sont supprimés", { flags: "i" })
|
|
579
|
+
]),
|
|
580
|
+
l([
|
|
581
|
+
i("les références", { flags: "i" }),
|
|
582
|
+
i(" ?:"),
|
|
583
|
+
F,
|
|
584
|
+
T,
|
|
585
|
+
i("sont supprimées", { flags: "i" })
|
|
586
|
+
])
|
|
587
|
+
)
|
|
588
|
+
],
|
|
589
|
+
{ value: { action: "SUPPRESSION", actionInContent: !0 } }
|
|
590
|
+
),
|
|
591
|
+
l([S, i("est (abrogé|supprimé)e?", { flags: "i" })], {
|
|
592
|
+
value: { action: "SUPPRESSION" }
|
|
593
|
+
})
|
|
594
|
+
);
|
|
595
|
+
function ae(e, t) {
|
|
596
|
+
throw `Unexpected type ${e}: ${t}`;
|
|
597
|
+
}
|
|
598
|
+
const Qi = [
|
|
599
|
+
",",
|
|
600
|
+
"à",
|
|
601
|
+
"et",
|
|
602
|
+
"ou",
|
|
603
|
+
"sauf"
|
|
604
|
+
], bt = [
|
|
605
|
+
"DIRECTIVE_EURO",
|
|
606
|
+
"REGLEMENTEUROPEEN"
|
|
607
|
+
], St = [
|
|
608
|
+
"ARRETE",
|
|
609
|
+
"CIRCULAIRE",
|
|
610
|
+
"CODE",
|
|
611
|
+
"CONSTITUTION",
|
|
612
|
+
"DECRET",
|
|
613
|
+
"DECRET_LOI",
|
|
614
|
+
"LOI",
|
|
615
|
+
"LOI_CONSTIT",
|
|
616
|
+
"LOI_ORGANIQUE",
|
|
617
|
+
"ORDONNANCE"
|
|
618
|
+
], Dt = ["CONVENTION"], At = [
|
|
619
|
+
"partie",
|
|
620
|
+
"livre",
|
|
621
|
+
"titre",
|
|
622
|
+
"sous-titre",
|
|
623
|
+
"chapitre",
|
|
624
|
+
"section",
|
|
625
|
+
"sous-section",
|
|
626
|
+
"paragraphe",
|
|
627
|
+
"sous-paragraphe",
|
|
628
|
+
"sous-sous-paragraphe"
|
|
629
|
+
], Ki = [
|
|
630
|
+
...bt,
|
|
631
|
+
...St,
|
|
632
|
+
...Dt
|
|
633
|
+
], Nt = ["item", "alinéa", "phrase"], en = [
|
|
634
|
+
"après",
|
|
635
|
+
"avant",
|
|
636
|
+
"dessous",
|
|
637
|
+
"dessus"
|
|
638
|
+
];
|
|
639
|
+
function Rt(e) {
|
|
640
|
+
switch (e.type) {
|
|
641
|
+
case "alinéa":
|
|
642
|
+
case "article":
|
|
643
|
+
case "chapitre":
|
|
644
|
+
case "incomplete-header":
|
|
645
|
+
case "livre":
|
|
646
|
+
case "paragraphe":
|
|
647
|
+
case "item":
|
|
648
|
+
case "partie":
|
|
649
|
+
case "phrase":
|
|
650
|
+
case "section":
|
|
651
|
+
case "sous-paragraphe":
|
|
652
|
+
case "sous-section":
|
|
653
|
+
case "sous-sous-paragraphe":
|
|
654
|
+
case "sous-titre":
|
|
655
|
+
case "texte":
|
|
656
|
+
case "titre":
|
|
657
|
+
return !0;
|
|
658
|
+
case "bounded-interval":
|
|
659
|
+
case "counted-interval":
|
|
660
|
+
case "enumeration":
|
|
661
|
+
case "exclusion":
|
|
662
|
+
case "parent-enfant":
|
|
663
|
+
case "reference_et_action":
|
|
664
|
+
return !1;
|
|
665
|
+
default:
|
|
666
|
+
ae("isTextAstAtomicReference", e);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
function tn(e) {
|
|
670
|
+
return At.includes(e.type);
|
|
671
|
+
}
|
|
672
|
+
function nn(e) {
|
|
673
|
+
return Nt.includes(e.type);
|
|
674
|
+
}
|
|
675
|
+
const be = {
|
|
676
|
+
",": 1,
|
|
677
|
+
à: 3,
|
|
678
|
+
et: 1,
|
|
679
|
+
ou: 1,
|
|
680
|
+
sauf: 2
|
|
681
|
+
}, D = (e, t) => {
|
|
682
|
+
if (!Rt(e) && e.type !== "parent-enfant")
|
|
683
|
+
switch (e.type) {
|
|
684
|
+
case "bounded-interval":
|
|
685
|
+
return {
|
|
686
|
+
...e,
|
|
687
|
+
first: D(e.first, t),
|
|
688
|
+
last: D(e.last, t)
|
|
689
|
+
// Don't update position,
|
|
690
|
+
};
|
|
691
|
+
case "counted-interval":
|
|
692
|
+
return {
|
|
693
|
+
...e,
|
|
694
|
+
first: D(e.first, t)
|
|
695
|
+
// Don't update position,
|
|
696
|
+
};
|
|
697
|
+
case "enumeration":
|
|
698
|
+
return {
|
|
699
|
+
...e,
|
|
700
|
+
left: D(e.left, t),
|
|
701
|
+
right: D(e.right, t)
|
|
702
|
+
// Don't update position,
|
|
703
|
+
};
|
|
704
|
+
case "exclusion":
|
|
705
|
+
return {
|
|
706
|
+
...e,
|
|
707
|
+
left: D(e.left, t)
|
|
708
|
+
// Don't add child to right, because it is excluded.
|
|
709
|
+
// Don't update position,
|
|
710
|
+
};
|
|
711
|
+
case "reference_et_action":
|
|
712
|
+
return {
|
|
713
|
+
...e,
|
|
714
|
+
reference: D(e.reference, t)
|
|
715
|
+
// Don't update position,
|
|
716
|
+
};
|
|
717
|
+
default:
|
|
718
|
+
ae("Neither AtomicReference nor ParentChild", e);
|
|
12
719
|
}
|
|
13
|
-
|
|
720
|
+
if (e.type === "parent-enfant") {
|
|
721
|
+
if (e.parent.type === "texte")
|
|
722
|
+
for (const n of y(t))
|
|
723
|
+
n.type === "article" && delete n.implicitText;
|
|
724
|
+
return {
|
|
725
|
+
...e,
|
|
726
|
+
child: D(e.child, t),
|
|
727
|
+
position: {
|
|
728
|
+
start: t.position.start,
|
|
729
|
+
stop: e.position.stop
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
if (e.type === "texte")
|
|
734
|
+
for (const n of y(t))
|
|
735
|
+
n.type === "article" && delete n.implicitText;
|
|
736
|
+
return {
|
|
737
|
+
child: t,
|
|
738
|
+
parent: e,
|
|
739
|
+
position: {
|
|
740
|
+
start: t.position.start,
|
|
741
|
+
stop: e.position.stop
|
|
742
|
+
},
|
|
743
|
+
type: "parent-enfant"
|
|
14
744
|
};
|
|
745
|
+
}, $ = (e, t, n) => {
|
|
746
|
+
for (; t.length > 0; )
|
|
747
|
+
e = ke(
|
|
748
|
+
e,
|
|
749
|
+
t,
|
|
750
|
+
n,
|
|
751
|
+
0
|
|
752
|
+
);
|
|
753
|
+
return {
|
|
754
|
+
...e,
|
|
755
|
+
position: n
|
|
756
|
+
};
|
|
757
|
+
}, ke = (e, t, n, a) => {
|
|
758
|
+
if (t.length > a) {
|
|
759
|
+
const [o, s] = t[a], u = be[o], f = t[a + 1]?.[0], d = f === void 0 ? 0 : be[f];
|
|
760
|
+
if (u < d)
|
|
761
|
+
t[a][1] = ke(
|
|
762
|
+
s,
|
|
763
|
+
t,
|
|
764
|
+
{
|
|
765
|
+
start: s.position.start,
|
|
766
|
+
stop: n.stop
|
|
767
|
+
},
|
|
768
|
+
a + 1
|
|
769
|
+
);
|
|
770
|
+
else {
|
|
771
|
+
if (o === "sauf") {
|
|
772
|
+
let c;
|
|
773
|
+
for (let g = e; g.type === "enumeration"; g = g.right)
|
|
774
|
+
c = g;
|
|
775
|
+
c === void 0 ? e = {
|
|
776
|
+
left: e,
|
|
777
|
+
position: {
|
|
778
|
+
start: e.position.start,
|
|
779
|
+
stop: s.position.stop
|
|
780
|
+
},
|
|
781
|
+
right: s,
|
|
782
|
+
type: "exclusion"
|
|
783
|
+
} : c.right = {
|
|
784
|
+
left: c.right,
|
|
785
|
+
position: {
|
|
786
|
+
start: c.right.position.start,
|
|
787
|
+
stop: s.position.stop
|
|
788
|
+
},
|
|
789
|
+
right: s,
|
|
790
|
+
type: "exclusion"
|
|
791
|
+
};
|
|
792
|
+
} else if (e.type !== "texte" && s.type === "parent-enfant" && s.parent.type === "texte") {
|
|
793
|
+
for (const c of y(e))
|
|
794
|
+
c.type === "article" && delete c.implicitText;
|
|
795
|
+
e = {
|
|
796
|
+
...s,
|
|
797
|
+
child: o === "à" ? {
|
|
798
|
+
first: e,
|
|
799
|
+
last: s.child,
|
|
800
|
+
position: {
|
|
801
|
+
start: e.position.start,
|
|
802
|
+
stop: s.child.position.stop
|
|
803
|
+
},
|
|
804
|
+
type: "bounded-interval"
|
|
805
|
+
} : {
|
|
806
|
+
coordinator: o,
|
|
807
|
+
left: e,
|
|
808
|
+
right: s.child,
|
|
809
|
+
position: {
|
|
810
|
+
start: e.position.start,
|
|
811
|
+
stop: s.child.position.stop
|
|
812
|
+
},
|
|
813
|
+
type: "enumeration"
|
|
814
|
+
},
|
|
815
|
+
position: {
|
|
816
|
+
start: e.position.start,
|
|
817
|
+
stop: s.position.stop
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
} else if (e.type === "parent-enfant" && e.parent.type === "texte" && s.type !== "texte") {
|
|
821
|
+
for (const c of y(s))
|
|
822
|
+
c.type === "article" && delete c.implicitText;
|
|
823
|
+
e = {
|
|
824
|
+
...e,
|
|
825
|
+
child: o === "à" ? {
|
|
826
|
+
first: e.child,
|
|
827
|
+
last: s,
|
|
828
|
+
position: {
|
|
829
|
+
start: e.child.position.start,
|
|
830
|
+
stop: s.position.stop
|
|
831
|
+
},
|
|
832
|
+
type: "bounded-interval"
|
|
833
|
+
} : {
|
|
834
|
+
coordinator: o,
|
|
835
|
+
left: e.child,
|
|
836
|
+
right: s,
|
|
837
|
+
position: {
|
|
838
|
+
start: e.child.position.start,
|
|
839
|
+
stop: s.position.stop
|
|
840
|
+
},
|
|
841
|
+
type: "enumeration"
|
|
842
|
+
},
|
|
843
|
+
position: {
|
|
844
|
+
start: e.position.start,
|
|
845
|
+
stop: s.position.stop
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
} else
|
|
849
|
+
e = o === "à" ? {
|
|
850
|
+
first: e,
|
|
851
|
+
last: s,
|
|
852
|
+
position: {
|
|
853
|
+
start: e.position.start,
|
|
854
|
+
stop: s.position.stop
|
|
855
|
+
},
|
|
856
|
+
type: "bounded-interval"
|
|
857
|
+
} : {
|
|
858
|
+
coordinator: o,
|
|
859
|
+
left: e,
|
|
860
|
+
position: {
|
|
861
|
+
start: e.position.start,
|
|
862
|
+
stop: s.position.stop
|
|
863
|
+
},
|
|
864
|
+
right: s,
|
|
865
|
+
type: "enumeration"
|
|
866
|
+
};
|
|
867
|
+
t.splice(a, 1);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
return e;
|
|
871
|
+
}, se = (e, t, n) => {
|
|
872
|
+
for (const a of t) {
|
|
873
|
+
if (a.type === "texte")
|
|
874
|
+
for (const o of y(e))
|
|
875
|
+
o.type === "article" && delete o.implicitText;
|
|
876
|
+
e = {
|
|
877
|
+
child: e,
|
|
878
|
+
parent: a,
|
|
879
|
+
position: {
|
|
880
|
+
start: e.position.start,
|
|
881
|
+
stop: a.position.stop
|
|
882
|
+
},
|
|
883
|
+
type: "parent-enfant"
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
return e.position = n, e;
|
|
887
|
+
};
|
|
888
|
+
function* C(e) {
|
|
889
|
+
switch (e.type) {
|
|
890
|
+
case "bounded-interval": {
|
|
891
|
+
yield* C(e.first), yield* C(e.last);
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
case "counted-interval": {
|
|
895
|
+
yield* C(e.first);
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
case "enumeration":
|
|
899
|
+
case "exclusion": {
|
|
900
|
+
yield* C(e.left), yield* C(e.right);
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
case "parent-enfant": {
|
|
904
|
+
yield e.parent;
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
case "reference_et_action": {
|
|
908
|
+
yield* C(e.reference);
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
default:
|
|
912
|
+
yield e;
|
|
913
|
+
}
|
|
15
914
|
}
|
|
16
|
-
function*
|
|
17
|
-
|
|
18
|
-
|
|
915
|
+
function* B(e) {
|
|
916
|
+
switch (e.type) {
|
|
917
|
+
case "bounded-interval": {
|
|
918
|
+
yield* B(e.first), yield* B(e.last);
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
case "counted-interval": {
|
|
922
|
+
yield* B(e.first);
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
case "enumeration":
|
|
926
|
+
case "exclusion": {
|
|
927
|
+
yield* B(e.left), yield* B(e.right);
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
case "reference_et_action": {
|
|
931
|
+
yield* B(e.reference);
|
|
932
|
+
break;
|
|
933
|
+
}
|
|
934
|
+
default:
|
|
935
|
+
yield e;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
function* y(e) {
|
|
939
|
+
switch (e.type) {
|
|
940
|
+
case "bounded-interval": {
|
|
941
|
+
yield* y(e.first), yield* y(e.last);
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
case "counted-interval": {
|
|
945
|
+
yield* y(e.first);
|
|
946
|
+
break;
|
|
947
|
+
}
|
|
948
|
+
case "enumeration":
|
|
949
|
+
case "exclusion": {
|
|
950
|
+
yield* y(e.left), yield* y(e.right);
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
case "parent-enfant": {
|
|
954
|
+
yield* y(e.parent), yield* y(e.child);
|
|
955
|
+
break;
|
|
956
|
+
}
|
|
957
|
+
case "reference_et_action": {
|
|
958
|
+
yield* y(e.reference);
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
default:
|
|
962
|
+
yield e;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
function* w(e) {
|
|
966
|
+
switch (yield e, e.type) {
|
|
967
|
+
case "bounded-interval": {
|
|
968
|
+
yield* w(e.first), yield* w(e.last);
|
|
969
|
+
break;
|
|
970
|
+
}
|
|
971
|
+
case "counted-interval": {
|
|
972
|
+
yield* w(e.first);
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
case "enumeration":
|
|
976
|
+
case "exclusion": {
|
|
977
|
+
yield* w(e.left), yield* w(e.right);
|
|
978
|
+
break;
|
|
979
|
+
}
|
|
980
|
+
case "parent-enfant": {
|
|
981
|
+
yield* w(e.parent), yield* w(e.child);
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
case "reference_et_action": {
|
|
985
|
+
yield* w(e.reference);
|
|
986
|
+
break;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
const oe = i("(èm)?e"), Pt = r(
|
|
991
|
+
i("1er", {
|
|
992
|
+
value: (e, t) => ({
|
|
993
|
+
position: t.position(),
|
|
994
|
+
text: t.text(),
|
|
995
|
+
value: 1
|
|
996
|
+
})
|
|
997
|
+
}),
|
|
998
|
+
i("unique", {
|
|
999
|
+
value: (e, t) => ({
|
|
1000
|
+
position: t.position(),
|
|
1001
|
+
text: t.text(),
|
|
1002
|
+
value: 1
|
|
1003
|
+
})
|
|
1004
|
+
}),
|
|
1005
|
+
l([i(String.raw`\d+`), p(oe, { default: "" })], {
|
|
1006
|
+
value: (e, t) => ({
|
|
1007
|
+
position: t.position(),
|
|
1008
|
+
text: t.text(),
|
|
1009
|
+
value: parseInt(e[0])
|
|
1010
|
+
})
|
|
1011
|
+
})
|
|
1012
|
+
), fe = i(String.raw`\d+`, {
|
|
1013
|
+
value: (e) => parseInt(e[0])
|
|
1014
|
+
}), qt = r(
|
|
1015
|
+
i("1er", { value: 1 }),
|
|
1016
|
+
l([i(String.raw`\d+`), oe], {
|
|
1017
|
+
value: (e) => parseInt(e[0])
|
|
1018
|
+
})
|
|
1019
|
+
), wt = i(String.raw`[IVXLCDM]+`, {
|
|
1020
|
+
value: (e) => ne(e[0])
|
|
1021
|
+
}), an = r(
|
|
1022
|
+
i("Ier", { value: 1 }),
|
|
1023
|
+
l([i(String.raw`[IVXLCDM]+`), oe], {
|
|
1024
|
+
value: (e) => ne(e[0])
|
|
1025
|
+
})
|
|
1026
|
+
), $t = r(
|
|
1027
|
+
i("0I", {
|
|
1028
|
+
value: (e, t) => ({
|
|
1029
|
+
position: t.position(),
|
|
1030
|
+
text: t.text(),
|
|
1031
|
+
value: 0
|
|
1032
|
+
})
|
|
1033
|
+
}),
|
|
1034
|
+
i("Ier", {
|
|
1035
|
+
value: (e, t) => ({
|
|
1036
|
+
position: t.position(),
|
|
1037
|
+
text: t.text(),
|
|
1038
|
+
value: 1
|
|
1039
|
+
})
|
|
1040
|
+
}),
|
|
1041
|
+
l([i(String.raw`[IVXLCDM]+`), p(oe, { default: "" })], {
|
|
1042
|
+
value: (e, t) => ({
|
|
1043
|
+
position: t.position(),
|
|
1044
|
+
text: t.text(),
|
|
1045
|
+
value: ne(e[0])
|
|
1046
|
+
})
|
|
1047
|
+
})
|
|
1048
|
+
), Mt = r(
|
|
1049
|
+
i("dix", { flags: "i", value: 10 }),
|
|
1050
|
+
i("onze?", { flags: "i", value: 11 }),
|
|
1051
|
+
i("douze?", { flags: "i", value: 12 }),
|
|
1052
|
+
i("treize?", { flags: "i", value: 13 }),
|
|
1053
|
+
i("quatorze?", { flags: "i", value: 14 }),
|
|
1054
|
+
i("quinze?", { flags: "i", value: 15 }),
|
|
1055
|
+
i("seize?", { flags: "i", value: 16 })
|
|
1056
|
+
), _t = r(
|
|
1057
|
+
i("vingt", { flags: "i", value: 20 }),
|
|
1058
|
+
i("trente?", { flags: "i", value: 30 }),
|
|
1059
|
+
i("quarante?", { flags: "i", value: 40 }),
|
|
1060
|
+
i("cinquante?", { flags: "i", value: 50 }),
|
|
1061
|
+
i("soixante?", { flags: "i", value: 60 }),
|
|
1062
|
+
i("septante?", { flags: "i", value: 70 }),
|
|
1063
|
+
i("quatre-vingt", { flags: "i", value: 80 }),
|
|
1064
|
+
i("huitante?", { flags: "i", value: 80 }),
|
|
1065
|
+
i("octante?", { flags: "i", value: 80 }),
|
|
1066
|
+
i("nonante?", { flags: "i", value: 90 })
|
|
1067
|
+
), Se = r(
|
|
1068
|
+
i("une?", { flags: "i", value: 1 }),
|
|
1069
|
+
i("deux", { flags: "i", value: 2 }),
|
|
1070
|
+
i("trois", { flags: "i", value: 3 }),
|
|
1071
|
+
i("quatre?", { flags: "i", value: 4 }),
|
|
1072
|
+
i("cinqu?", { flags: "i", value: 5 }),
|
|
1073
|
+
i("six", { flags: "i", value: 6 }),
|
|
1074
|
+
i("sept", { flags: "i", value: 7 }),
|
|
1075
|
+
i("huit", { flags: "i", value: 8 }),
|
|
1076
|
+
i("neu[fv]", { flags: "i", value: 9 })
|
|
1077
|
+
), ze = l(
|
|
1078
|
+
[
|
|
1079
|
+
b(
|
|
1080
|
+
"centaines",
|
|
1081
|
+
p(
|
|
1082
|
+
[
|
|
1083
|
+
b(
|
|
1084
|
+
"centaine",
|
|
1085
|
+
p([Se, xe], {
|
|
1086
|
+
default: 0,
|
|
1087
|
+
value: (e) => e[0]
|
|
1088
|
+
})
|
|
1089
|
+
),
|
|
1090
|
+
i("cent-", { flags: "i", value: 1 })
|
|
1091
|
+
],
|
|
1092
|
+
{
|
|
1093
|
+
default: 0,
|
|
1094
|
+
value: (e, { variables: t }) => 100 * t.centaine
|
|
1095
|
+
}
|
|
1096
|
+
)
|
|
1097
|
+
),
|
|
1098
|
+
b(
|
|
1099
|
+
"dizaines",
|
|
1100
|
+
p(_t, { default: 0 })
|
|
1101
|
+
),
|
|
1102
|
+
p(i("-(et-)?", { flags: "i" }), { default: "" }),
|
|
1103
|
+
b("dix", p(Mt, { default: 0 })),
|
|
1104
|
+
p(xe, { default: "" }),
|
|
1105
|
+
b("unite", p(Se, { default: 0 }))
|
|
1106
|
+
],
|
|
1107
|
+
{
|
|
1108
|
+
value: (e, { variables: t }) => t.centaines + t.dizaines + t.dix + t.unite
|
|
1109
|
+
}
|
|
1110
|
+
), He = r(
|
|
1111
|
+
i("premi(er|ère)", { flags: "i", value: 1 }),
|
|
1112
|
+
i("seconde?", { flags: "i", value: 2 }),
|
|
1113
|
+
l([ze, i("ième", { flags: "i" })], {
|
|
1114
|
+
value: (e) => e[0]
|
|
1115
|
+
})
|
|
1116
|
+
), Ft = r(
|
|
1117
|
+
qt,
|
|
1118
|
+
He
|
|
1119
|
+
), le = O(
|
|
1120
|
+
r(
|
|
1121
|
+
// Mustt be first:
|
|
1122
|
+
i("quinquagies", { flags: "i", value: 50 }),
|
|
1123
|
+
i("sexagies", { flags: "i", value: 60 }),
|
|
1124
|
+
i("septuagies", { flags: "i", value: 70 }),
|
|
1125
|
+
i("octogies", { flags: "i", value: 80 }),
|
|
1126
|
+
l(
|
|
1127
|
+
[
|
|
1128
|
+
b(
|
|
1129
|
+
"unites",
|
|
1130
|
+
p(
|
|
1131
|
+
r(
|
|
1132
|
+
i("unde?", { flags: "i", value: -1 }),
|
|
1133
|
+
i("duode?", { flags: "i", value: -2 }),
|
|
1134
|
+
i("un", { flags: "i", value: 1 }),
|
|
1135
|
+
i("duo", { flags: "i", value: 2 }),
|
|
1136
|
+
i("ter", { flags: "i", value: 3 }),
|
|
1137
|
+
i("quater", { flags: "i", value: 4 }),
|
|
1138
|
+
i("quin", { flags: "i", value: 5 }),
|
|
1139
|
+
i("sept", { flags: "i", value: 7 }),
|
|
1140
|
+
i("sex?", { flags: "i", value: 6 }),
|
|
1141
|
+
i("octo", { flags: "i", value: 8 }),
|
|
1142
|
+
i("novo", { flags: "i", value: 9 })
|
|
1143
|
+
),
|
|
1144
|
+
{ default: 0 }
|
|
1145
|
+
)
|
|
1146
|
+
),
|
|
1147
|
+
b(
|
|
1148
|
+
"dizaines",
|
|
1149
|
+
r(
|
|
1150
|
+
i("decies", { flags: "i", value: 10 }),
|
|
1151
|
+
i("v[ei]cies", { flags: "i", value: 20 }),
|
|
1152
|
+
i("tr[ei]cies", { flags: "i", value: 30 }),
|
|
1153
|
+
i("quadragies", { flags: "i", value: 40 }),
|
|
1154
|
+
i("quinquagies", { flags: "i", value: 50 }),
|
|
1155
|
+
i("sexagies", { flags: "i", value: 60 }),
|
|
1156
|
+
i("septuagies", { flags: "i", value: 70 }),
|
|
1157
|
+
i("o?ctogies", { flags: "i", value: 80 }),
|
|
1158
|
+
i("nonagies", { flags: "i", value: 90 })
|
|
1159
|
+
)
|
|
1160
|
+
)
|
|
1161
|
+
],
|
|
1162
|
+
{
|
|
1163
|
+
value: (e, { variables: t }) => t.dizaines + t.unites
|
|
1164
|
+
}
|
|
1165
|
+
),
|
|
1166
|
+
// Must be last:
|
|
1167
|
+
i("semel", { flags: "i", value: 1 }),
|
|
1168
|
+
i("bis", { flags: "i", value: 2 }),
|
|
1169
|
+
i("ter", { flags: "i", value: 3 }),
|
|
1170
|
+
i("quater", { flags: "i", value: 4 }),
|
|
1171
|
+
i("quinquies", { flags: "i", value: 5 }),
|
|
1172
|
+
i("sexies", { flags: "i", value: 6 }),
|
|
1173
|
+
i("septies", { flags: "i", value: 7 }),
|
|
1174
|
+
i("octies", { flags: "i", value: 8 }),
|
|
1175
|
+
i("no[nv]ies", { flags: "i", value: 9 }),
|
|
1176
|
+
i("undecies", { flags: "i", value: 11 }),
|
|
1177
|
+
i("duodecies", { flags: "i", value: 12 })
|
|
1178
|
+
),
|
|
1179
|
+
{
|
|
1180
|
+
value: (e, t) => ({
|
|
1181
|
+
position: t.position(),
|
|
1182
|
+
text: t.text().toLowerCase(),
|
|
1183
|
+
value: e
|
|
1184
|
+
})
|
|
1185
|
+
}
|
|
1186
|
+
), Ve = i("(aux|des|les)( |(?=dite?s ))", {
|
|
1187
|
+
flags: "i"
|
|
1188
|
+
}), We = r(
|
|
1189
|
+
i("(au|du|le)( |(?=dit ))", { flags: "i" }),
|
|
1190
|
+
i("([àa] )?la( |(?=dite ))", { flags: "i" }),
|
|
1191
|
+
i("([àa] )?l'", { flags: "i" })
|
|
1192
|
+
), Je = l(
|
|
1193
|
+
[
|
|
1194
|
+
r(
|
|
1195
|
+
i(" de (?=ce(tte)?s )", { flags: "i" }),
|
|
1196
|
+
i(" des( |(?=dite?s ))", { flags: "i" })
|
|
1197
|
+
)
|
|
1198
|
+
],
|
|
1199
|
+
{ value: "des" }
|
|
1200
|
+
), re = O(
|
|
1201
|
+
r(
|
|
1202
|
+
i(" de (?=ce(tte|t)? )", { flags: "i" }),
|
|
1203
|
+
i(" de l'", { flags: "i" }),
|
|
1204
|
+
i(" de la( |(?=dite ))", { flags: "i" }),
|
|
1205
|
+
i(" du( |(?=dit ))", { flags: "i" })
|
|
1206
|
+
),
|
|
1207
|
+
{ value: "de" }
|
|
1208
|
+
), me = i("dite?s ", { flags: "i", value: !0 }), ue = i("dite? ", { flags: "i", value: !0 }), W = r(
|
|
1209
|
+
i("derni(er|ère)s", {
|
|
1210
|
+
flags: "i",
|
|
1211
|
+
value: (e, t) => ({
|
|
1212
|
+
index: -1,
|
|
1213
|
+
num: t.text()
|
|
1214
|
+
})
|
|
1215
|
+
}),
|
|
1216
|
+
i("mêmes", {
|
|
1217
|
+
flags: "i",
|
|
1218
|
+
value: { relative: 0 }
|
|
1219
|
+
}),
|
|
1220
|
+
i("premi(er|ère)s", {
|
|
1221
|
+
flags: "i",
|
|
1222
|
+
value: (e, t) => ({
|
|
1223
|
+
index: 1,
|
|
1224
|
+
num: t.text()
|
|
1225
|
+
})
|
|
1226
|
+
}),
|
|
1227
|
+
i("présente?s", {
|
|
1228
|
+
flags: "i",
|
|
1229
|
+
value: { relative: 0 }
|
|
1230
|
+
}),
|
|
1231
|
+
i("suivante?s", {
|
|
1232
|
+
flags: "i",
|
|
1233
|
+
value: { relative: "+∞" }
|
|
1234
|
+
})
|
|
1235
|
+
), J = r(
|
|
1236
|
+
i("antépénultième", {
|
|
1237
|
+
flags: "i",
|
|
1238
|
+
value: (e, t) => ({
|
|
1239
|
+
index: -3,
|
|
1240
|
+
num: t.text()
|
|
1241
|
+
})
|
|
1242
|
+
}),
|
|
1243
|
+
i("avant-derni(er|ère)", {
|
|
1244
|
+
flags: "i",
|
|
1245
|
+
value: (e, t) => ({
|
|
1246
|
+
index: -2,
|
|
1247
|
+
num: t.text()
|
|
1248
|
+
})
|
|
1249
|
+
}),
|
|
1250
|
+
i("derni(er|ère)", {
|
|
1251
|
+
flags: "i",
|
|
1252
|
+
value: (e, t) => ({
|
|
1253
|
+
index: -1,
|
|
1254
|
+
num: t.text()
|
|
1255
|
+
})
|
|
1256
|
+
}),
|
|
1257
|
+
i("même", {
|
|
1258
|
+
flags: "i",
|
|
1259
|
+
value: { relative: 0 }
|
|
1260
|
+
}),
|
|
1261
|
+
i("pénultième", {
|
|
1262
|
+
flags: "i",
|
|
1263
|
+
value: (e, t) => ({
|
|
1264
|
+
index: -2,
|
|
1265
|
+
num: t.text()
|
|
1266
|
+
})
|
|
1267
|
+
}),
|
|
1268
|
+
i("précédente?", {
|
|
1269
|
+
flags: "i",
|
|
1270
|
+
value: { relative: -1 }
|
|
1271
|
+
}),
|
|
1272
|
+
i("premi(er|ère)", {
|
|
1273
|
+
flags: "i",
|
|
1274
|
+
value: (e, t) => ({
|
|
1275
|
+
index: 1,
|
|
1276
|
+
num: t.text()
|
|
1277
|
+
})
|
|
1278
|
+
}),
|
|
1279
|
+
i("présente?", {
|
|
1280
|
+
flags: "i",
|
|
1281
|
+
value: { relative: 0 }
|
|
1282
|
+
}),
|
|
1283
|
+
i("suivante?", {
|
|
1284
|
+
flags: "i",
|
|
1285
|
+
value: { relative: 1 }
|
|
1286
|
+
})
|
|
1287
|
+
), Ie = i("ci ?- ?(après|avant|dessous|dessus)", {
|
|
1288
|
+
flags: "i",
|
|
1289
|
+
value: (e) => `ci-${e[1]}`
|
|
1290
|
+
}), ge = l([T, Ie], {
|
|
1291
|
+
value: (e) => e[1]
|
|
1292
|
+
}), De = i(" précitée?", {
|
|
1293
|
+
flags: "i"
|
|
1294
|
+
}), Ye = r(
|
|
1295
|
+
Ie,
|
|
1296
|
+
W
|
|
1297
|
+
), he = l(
|
|
1298
|
+
[
|
|
1299
|
+
p(
|
|
1300
|
+
i("ces ", {
|
|
1301
|
+
flags: "i"
|
|
1302
|
+
}),
|
|
1303
|
+
{ default: "" }
|
|
1304
|
+
),
|
|
1305
|
+
W
|
|
1306
|
+
],
|
|
1307
|
+
{ value: (e) => e[1] }
|
|
1308
|
+
), Ut = r(
|
|
1309
|
+
Ie,
|
|
1310
|
+
J
|
|
1311
|
+
), Le = l(
|
|
1312
|
+
[
|
|
1313
|
+
p(
|
|
1314
|
+
i("ce(tte|t)? ", {
|
|
1315
|
+
flags: "i"
|
|
1316
|
+
}),
|
|
1317
|
+
{ default: "" }
|
|
1318
|
+
),
|
|
1319
|
+
J
|
|
1320
|
+
],
|
|
1321
|
+
{ value: (e) => e[1] }
|
|
1322
|
+
), M = r(
|
|
1323
|
+
l(
|
|
1324
|
+
[
|
|
1325
|
+
T,
|
|
1326
|
+
b(
|
|
1327
|
+
"etOu",
|
|
1328
|
+
r(
|
|
1329
|
+
i("et", { flags: "i" }),
|
|
1330
|
+
i("ou", { flags: "i" })
|
|
1331
|
+
)
|
|
1332
|
+
),
|
|
1333
|
+
T
|
|
1334
|
+
],
|
|
1335
|
+
{ value: (e, { variables: t }) => t.etOu }
|
|
1336
|
+
),
|
|
1337
|
+
l(
|
|
1338
|
+
[
|
|
1339
|
+
Gt,
|
|
1340
|
+
p(
|
|
1341
|
+
[
|
|
1342
|
+
b(
|
|
1343
|
+
"etOu",
|
|
1344
|
+
r(
|
|
1345
|
+
i("et", { flags: "i" }),
|
|
1346
|
+
i("ou", { flags: "i" })
|
|
1347
|
+
)
|
|
1348
|
+
),
|
|
1349
|
+
T
|
|
1350
|
+
],
|
|
1351
|
+
{ default: "" }
|
|
1352
|
+
)
|
|
1353
|
+
],
|
|
1354
|
+
{ value: (e, { variables: t }) => t.etOu ?? "," }
|
|
1355
|
+
)
|
|
1356
|
+
), Bt = l(
|
|
1357
|
+
[S, i("à l'exception ", { flags: "i" })],
|
|
1358
|
+
{ value: "sauf" }
|
|
1359
|
+
), Y = i(" à ", { flags: "i", value: "à" }), Ze = r(
|
|
1360
|
+
i("alinéa", { flags: "i", value: "alinéa" }),
|
|
1361
|
+
i("phrase", { flags: "i", value: "phrase" })
|
|
1362
|
+
), jt = l(
|
|
1363
|
+
[Ze, i("s", { flags: "i" })],
|
|
1364
|
+
{ value: (e) => e[0] }
|
|
1365
|
+
), kt = l(
|
|
1366
|
+
[
|
|
1367
|
+
r(
|
|
1368
|
+
O(wt, {
|
|
1369
|
+
value: (e, t) => ({
|
|
1370
|
+
position: t.position(),
|
|
1371
|
+
text: t.text(),
|
|
1372
|
+
value: e
|
|
1373
|
+
})
|
|
1374
|
+
}),
|
|
1375
|
+
O(Ot, {
|
|
1376
|
+
value: (e, t) => ({
|
|
1377
|
+
position: t.position(),
|
|
1378
|
+
text: e,
|
|
1379
|
+
value: e.charCodeAt(0) - 97 + 1
|
|
1380
|
+
})
|
|
1381
|
+
}),
|
|
1382
|
+
l([fe, i("[°o]?", { flags: "i" })], {
|
|
1383
|
+
value: (e, t) => ({
|
|
1384
|
+
position: t.position(),
|
|
1385
|
+
text: t.text(),
|
|
1386
|
+
value: e[0]
|
|
1387
|
+
})
|
|
1388
|
+
})
|
|
1389
|
+
),
|
|
1390
|
+
p([T, le], { default: null }),
|
|
1391
|
+
Xt
|
|
1392
|
+
],
|
|
1393
|
+
{
|
|
1394
|
+
value: (e, t) => {
|
|
1395
|
+
const n = e[0], a = e[1]?.[1];
|
|
1396
|
+
return {
|
|
1397
|
+
index: n.value + (a === void 0 ? 0 : a.value / 1e3),
|
|
1398
|
+
num: `${n.text}${a === void 0 ? "" : ` ${a.text}`}`,
|
|
1399
|
+
position: t.position(),
|
|
1400
|
+
type: "item"
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
), Qe = l(
|
|
1405
|
+
[
|
|
1406
|
+
r(
|
|
1407
|
+
O(He, {
|
|
1408
|
+
value: (e) => ({ index: e })
|
|
1409
|
+
}),
|
|
1410
|
+
O(J, {
|
|
1411
|
+
value: (e) => e
|
|
1412
|
+
})
|
|
1413
|
+
),
|
|
1414
|
+
T,
|
|
1415
|
+
Ze
|
|
1416
|
+
],
|
|
1417
|
+
{
|
|
1418
|
+
value: (e, t) => ({
|
|
1419
|
+
...e[0],
|
|
1420
|
+
position: t.position(),
|
|
1421
|
+
type: e[2]
|
|
1422
|
+
})
|
|
1423
|
+
}
|
|
1424
|
+
), te = r(Qe, kt), j = l(
|
|
1425
|
+
[
|
|
1426
|
+
ze,
|
|
1427
|
+
T,
|
|
1428
|
+
O(W, {
|
|
1429
|
+
value: (e) => e
|
|
1430
|
+
}),
|
|
1431
|
+
T,
|
|
1432
|
+
jt
|
|
1433
|
+
],
|
|
1434
|
+
{
|
|
1435
|
+
value: (e, t) => ({
|
|
1436
|
+
count: e[0],
|
|
1437
|
+
first: {
|
|
1438
|
+
...e[2],
|
|
1439
|
+
type: e[4]
|
|
1440
|
+
},
|
|
1441
|
+
position: t.position(),
|
|
1442
|
+
type: "counted-interval"
|
|
1443
|
+
})
|
|
1444
|
+
}
|
|
1445
|
+
), zt = l(
|
|
1446
|
+
[
|
|
1447
|
+
j,
|
|
1448
|
+
G([
|
|
1449
|
+
r(M, Y),
|
|
1450
|
+
r(Qe, j)
|
|
1451
|
+
])
|
|
1452
|
+
],
|
|
1453
|
+
{
|
|
1454
|
+
value: (e, t) => $(
|
|
1455
|
+
e[0],
|
|
1456
|
+
e[1],
|
|
1457
|
+
t.position()
|
|
1458
|
+
)
|
|
1459
|
+
}
|
|
1460
|
+
), Ce = l(
|
|
1461
|
+
[
|
|
1462
|
+
r(te, j),
|
|
1463
|
+
G([
|
|
1464
|
+
r(M, Y),
|
|
1465
|
+
r(te, j)
|
|
1466
|
+
])
|
|
1467
|
+
],
|
|
1468
|
+
{
|
|
1469
|
+
value: (e, t) => $(
|
|
1470
|
+
e[0],
|
|
1471
|
+
e[1],
|
|
1472
|
+
t.position()
|
|
1473
|
+
)
|
|
1474
|
+
}
|
|
1475
|
+
), Ht = l(
|
|
1476
|
+
[
|
|
1477
|
+
r(te, j),
|
|
1478
|
+
G(
|
|
1479
|
+
[
|
|
1480
|
+
r(M, Y),
|
|
1481
|
+
r(te, j)
|
|
1482
|
+
],
|
|
1483
|
+
{ min: 1 }
|
|
1484
|
+
)
|
|
1485
|
+
],
|
|
1486
|
+
{
|
|
1487
|
+
value: (e, t) => $(
|
|
1488
|
+
e[0],
|
|
1489
|
+
e[1],
|
|
1490
|
+
t.position()
|
|
1491
|
+
)
|
|
1492
|
+
}
|
|
1493
|
+
), Ke = r(
|
|
1494
|
+
zt,
|
|
1495
|
+
Ht
|
|
1496
|
+
), et = l(
|
|
1497
|
+
[
|
|
1498
|
+
T,
|
|
1499
|
+
i(String.raw`\(`),
|
|
1500
|
+
pe,
|
|
1501
|
+
Ce,
|
|
1502
|
+
pe,
|
|
1503
|
+
i(String.raw`\)`)
|
|
1504
|
+
],
|
|
1505
|
+
{ value: (e) => e[3] }
|
|
1506
|
+
), tt = r(
|
|
1507
|
+
l([re, Ce], { value: (e) => e[1] }),
|
|
1508
|
+
l([Je, Ke], { value: (e) => e[1] }),
|
|
1509
|
+
et
|
|
1510
|
+
), it = l(
|
|
1511
|
+
[
|
|
1512
|
+
p(ue, { default: null }),
|
|
1513
|
+
Ce,
|
|
1514
|
+
G(tt)
|
|
1515
|
+
],
|
|
1516
|
+
{
|
|
1517
|
+
value: (e, t) => se(
|
|
1518
|
+
e[1],
|
|
1519
|
+
e[2],
|
|
1520
|
+
t.position()
|
|
1521
|
+
)
|
|
1522
|
+
}
|
|
1523
|
+
), nt = l(
|
|
1524
|
+
[
|
|
1525
|
+
p(me, { default: null }),
|
|
1526
|
+
p(
|
|
1527
|
+
l([he, T], {
|
|
1528
|
+
value: (e) => e[0]
|
|
1529
|
+
}),
|
|
1530
|
+
{ default: null }
|
|
1531
|
+
),
|
|
1532
|
+
Ke,
|
|
1533
|
+
G(tt)
|
|
1534
|
+
],
|
|
1535
|
+
{
|
|
1536
|
+
value: (e, t) => se(
|
|
1537
|
+
e[2],
|
|
1538
|
+
e[3],
|
|
1539
|
+
t.position()
|
|
1540
|
+
)
|
|
1541
|
+
}
|
|
1542
|
+
), at = l([We, it], {
|
|
1543
|
+
value: (e, t) => ({
|
|
1544
|
+
...e[1],
|
|
1545
|
+
position: t.position()
|
|
1546
|
+
})
|
|
1547
|
+
}), st = l([Ve, nt], {
|
|
1548
|
+
value: (e, t) => ({
|
|
1549
|
+
...e[1],
|
|
1550
|
+
position: t.position()
|
|
1551
|
+
})
|
|
1552
|
+
}), Vt = l(
|
|
1553
|
+
[
|
|
1554
|
+
nt,
|
|
1555
|
+
G([M, r(st, at)])
|
|
1556
|
+
],
|
|
1557
|
+
{
|
|
1558
|
+
value: (e, t) => $(
|
|
1559
|
+
e[0],
|
|
1560
|
+
e[1],
|
|
1561
|
+
t.position()
|
|
1562
|
+
)
|
|
1563
|
+
}
|
|
1564
|
+
), Wt = l(
|
|
1565
|
+
[
|
|
1566
|
+
it,
|
|
1567
|
+
G([M, r(st, at)])
|
|
1568
|
+
],
|
|
1569
|
+
{
|
|
1570
|
+
value: (e, t) => $(
|
|
1571
|
+
e[0],
|
|
1572
|
+
e[1],
|
|
1573
|
+
t.position()
|
|
1574
|
+
)
|
|
1575
|
+
}
|
|
1576
|
+
), ot = r(
|
|
1577
|
+
i("annexe", { flags: "i", value: "annexe" }),
|
|
1578
|
+
i("exécution", { flags: "i", value: "exécution" }),
|
|
1579
|
+
i("liminaire", { flags: "i", value: "liminaire" }),
|
|
1580
|
+
i("préambule", { flags: "i", value: "préambule" }),
|
|
1581
|
+
i("préliminaire", { flags: "i", value: "préliminaire" }),
|
|
1582
|
+
i("unique", { flags: "i", value: "unique" })
|
|
1583
|
+
), lt = l(
|
|
1584
|
+
[
|
|
1585
|
+
i(String.raw`\*?\*?`),
|
|
1586
|
+
p(
|
|
1587
|
+
[
|
|
1588
|
+
r(
|
|
1589
|
+
[i(String.raw`L\.?O`, { value: "LO" }), i(String.raw`\*?`)],
|
|
1590
|
+
i(String.raw`([ARDL]|LO)\*?`)
|
|
1591
|
+
),
|
|
1592
|
+
i(String.raw`\*?\*?`),
|
|
1593
|
+
i(String.raw`\.?\ ?`, { value: "" })
|
|
1594
|
+
],
|
|
1595
|
+
{ default: "" }
|
|
1596
|
+
)
|
|
1597
|
+
],
|
|
1598
|
+
{ value: (e, t) => t.textFromResults(e) }
|
|
1599
|
+
), Jt = r(
|
|
1600
|
+
l(
|
|
1601
|
+
[
|
|
1602
|
+
lt,
|
|
1603
|
+
i(String.raw`\d+`),
|
|
1604
|
+
p(i("(ème|e?r?)", { value: "" }), { default: "" }),
|
|
1605
|
+
G([
|
|
1606
|
+
r(i(" ?- ?"), i(String.raw` ?\.`), T),
|
|
1607
|
+
r(
|
|
1608
|
+
[
|
|
1609
|
+
i(String.raw`[\dA-Z]+`),
|
|
1610
|
+
p(i("(ème|e?r?)", { value: "" }), { default: "" })
|
|
1611
|
+
],
|
|
1612
|
+
O(le, {
|
|
1613
|
+
value: (e) => e.text
|
|
1614
|
+
})
|
|
1615
|
+
)
|
|
1616
|
+
])
|
|
1617
|
+
],
|
|
1618
|
+
{ value: (e, t) => t.textFromResults(e) }
|
|
1619
|
+
),
|
|
1620
|
+
ot
|
|
1621
|
+
), Yt = r(
|
|
1622
|
+
l(
|
|
1623
|
+
[
|
|
1624
|
+
lt,
|
|
1625
|
+
i(String.raw`\d+`),
|
|
1626
|
+
p(i("(ème|e?r?)", { value: "" }), { default: "" }),
|
|
1627
|
+
G([
|
|
1628
|
+
r(i("-"), i(String.raw` ?\.`), T),
|
|
1629
|
+
r(
|
|
1630
|
+
[
|
|
1631
|
+
i(String.raw`[\dA-Z]+`),
|
|
1632
|
+
p(i("(ème|e?r?)", { value: "" }), { default: "" })
|
|
1633
|
+
],
|
|
1634
|
+
O(le, {
|
|
1635
|
+
value: (e) => e.text
|
|
1636
|
+
})
|
|
1637
|
+
)
|
|
1638
|
+
])
|
|
1639
|
+
],
|
|
1640
|
+
{ value: (e, t) => t.textFromResults(e) }
|
|
1641
|
+
),
|
|
1642
|
+
ot
|
|
1643
|
+
), sn = l(
|
|
1644
|
+
[
|
|
1645
|
+
l(
|
|
1646
|
+
[i(String.raw`^art\. `, { flags: "im" }), Yt],
|
|
1647
|
+
{
|
|
1648
|
+
value: (e, t) => ({
|
|
1649
|
+
definition: !0,
|
|
1650
|
+
num: e[1],
|
|
1651
|
+
position: t.position(),
|
|
1652
|
+
type: "article"
|
|
1653
|
+
})
|
|
1654
|
+
}
|
|
1655
|
+
),
|
|
1656
|
+
i(String.raw`\.? ?- ?`)
|
|
1657
|
+
],
|
|
1658
|
+
{
|
|
1659
|
+
value: (e) => e[0]
|
|
1660
|
+
}
|
|
1661
|
+
), ie = r(
|
|
1662
|
+
l(
|
|
1663
|
+
[
|
|
1664
|
+
l([Jt, p(ge, { default: null })], {
|
|
1665
|
+
value: (e, t) => ({
|
|
1666
|
+
...e[1] ? { localizationAdverb: e[1] } : {},
|
|
1667
|
+
num: e[0],
|
|
1668
|
+
position: t.position(),
|
|
1669
|
+
type: "article"
|
|
1670
|
+
})
|
|
1671
|
+
}),
|
|
1672
|
+
p(et, { default: null })
|
|
1673
|
+
],
|
|
1674
|
+
{
|
|
1675
|
+
value: (e, t) => {
|
|
1676
|
+
const n = e[0], a = e[1];
|
|
1677
|
+
return a === null ? n : {
|
|
1678
|
+
child: a,
|
|
1679
|
+
parent: n,
|
|
1680
|
+
position: t.position(),
|
|
1681
|
+
type: "parent-enfant"
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
),
|
|
1686
|
+
O(J, {
|
|
1687
|
+
value: (e, t) => ({
|
|
1688
|
+
...e,
|
|
1689
|
+
position: t.position(),
|
|
1690
|
+
type: "article"
|
|
1691
|
+
})
|
|
1692
|
+
})
|
|
1693
|
+
), Zt = O(W, {
|
|
1694
|
+
value: (e, t) => ({
|
|
1695
|
+
...e,
|
|
1696
|
+
position: t.position(),
|
|
1697
|
+
type: "article"
|
|
1698
|
+
})
|
|
1699
|
+
}), Qt = l(
|
|
1700
|
+
[
|
|
1701
|
+
ie,
|
|
1702
|
+
G(
|
|
1703
|
+
[
|
|
1704
|
+
r(M, Y),
|
|
1705
|
+
r(Zt, ie)
|
|
1706
|
+
],
|
|
1707
|
+
{ min: 1 }
|
|
1708
|
+
)
|
|
1709
|
+
],
|
|
1710
|
+
{
|
|
1711
|
+
value: (e, t) => $(
|
|
1712
|
+
e[0],
|
|
1713
|
+
e[1],
|
|
1714
|
+
t.position()
|
|
1715
|
+
)
|
|
1716
|
+
}
|
|
1717
|
+
), Ae = r(
|
|
1718
|
+
Qt,
|
|
1719
|
+
O(Ye, {
|
|
1720
|
+
value: (e, t) => ({
|
|
1721
|
+
...e,
|
|
1722
|
+
position: t.position(),
|
|
1723
|
+
type: "article"
|
|
1724
|
+
})
|
|
1725
|
+
})
|
|
1726
|
+
), Kt = r(
|
|
1727
|
+
l(
|
|
1728
|
+
[
|
|
1729
|
+
he,
|
|
1730
|
+
T,
|
|
1731
|
+
i("articles", { flags: "i" }),
|
|
1732
|
+
p([T, Ae], { default: [] })
|
|
1733
|
+
],
|
|
1734
|
+
{
|
|
1735
|
+
value: (e, t) => {
|
|
1736
|
+
const n = e[3][1] ?? {
|
|
1737
|
+
position: t.position(),
|
|
1738
|
+
type: "article"
|
|
1739
|
+
};
|
|
1740
|
+
for (const a of C(n))
|
|
1741
|
+
a.type === "incomplete-header" && (a.type = "article"), a.index === void 0 && a.relative === void 0 && Object.assign(a, e[0]);
|
|
1742
|
+
return { ...n, position: t.position() };
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
),
|
|
1746
|
+
l([i("articles", { flags: "i" }), T, Ae], {
|
|
1747
|
+
value: (e, t) => ({
|
|
1748
|
+
...e[2],
|
|
1749
|
+
position: t.position()
|
|
1750
|
+
})
|
|
1751
|
+
})
|
|
1752
|
+
), ei = l(
|
|
1753
|
+
[p(me, { default: !1 }), Kt],
|
|
1754
|
+
{
|
|
1755
|
+
value: (e, t) => {
|
|
1756
|
+
const n = e[1];
|
|
1757
|
+
if (e[0])
|
|
1758
|
+
for (const a of C(
|
|
1759
|
+
n
|
|
1760
|
+
))
|
|
1761
|
+
a.ofTheSaid = !0;
|
|
1762
|
+
if (t.currentText !== void 0)
|
|
1763
|
+
for (const a of C(
|
|
1764
|
+
n
|
|
1765
|
+
))
|
|
1766
|
+
a.implicitText === void 0 && (a.implicitText = t.currentText);
|
|
1767
|
+
return delete t.currentArticle, {
|
|
1768
|
+
...n,
|
|
1769
|
+
position: t.position()
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
), ti = r(
|
|
1774
|
+
l(
|
|
1775
|
+
[
|
|
1776
|
+
Le,
|
|
1777
|
+
T,
|
|
1778
|
+
i("article", { flags: "i" }),
|
|
1779
|
+
p([T, ie], { default: [] })
|
|
1780
|
+
],
|
|
1781
|
+
{
|
|
1782
|
+
value: (e, t) => {
|
|
1783
|
+
const n = e[3][1] ?? {
|
|
1784
|
+
position: t.position(),
|
|
1785
|
+
type: "article"
|
|
1786
|
+
};
|
|
1787
|
+
for (const a of C(n))
|
|
1788
|
+
a.type === "incomplete-header" && (a.type = "article"), a.index === void 0 && a.relative === void 0 && Object.assign(a, e[0]);
|
|
1789
|
+
return { ...n, position: t.position() };
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
l([i("article", { flags: "i" }), T, ie], {
|
|
1794
|
+
value: (e, t) => ({
|
|
1795
|
+
...e[2],
|
|
1796
|
+
position: t.position()
|
|
1797
|
+
})
|
|
1798
|
+
})
|
|
1799
|
+
), ii = l(
|
|
1800
|
+
[p(ue, { default: null }), ti],
|
|
1801
|
+
{
|
|
1802
|
+
value: (e, t) => {
|
|
1803
|
+
const n = e[1];
|
|
1804
|
+
if (e[0])
|
|
1805
|
+
for (const o of C(
|
|
1806
|
+
n
|
|
1807
|
+
))
|
|
1808
|
+
o.ofTheSaid = !0;
|
|
1809
|
+
if (t.currentText !== void 0)
|
|
1810
|
+
for (const o of C(
|
|
1811
|
+
n
|
|
1812
|
+
))
|
|
1813
|
+
o.implicitText === void 0 && (o.implicitText = t.currentText);
|
|
1814
|
+
const a = {
|
|
1815
|
+
...n,
|
|
1816
|
+
position: t.position()
|
|
1817
|
+
};
|
|
1818
|
+
return t.currentArticle = a.type === "parent-enfant" ? a.parent : a, a;
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
), ni = i(String.raw`[12]\d{3}`), ai = r(
|
|
1822
|
+
i("1er", { flags: "i", value: "01" }),
|
|
1823
|
+
i(String.raw`([12]\d|3[01])`, { value: (e) => e[0] }),
|
|
1824
|
+
i(String.raw`\d`, { value: (e) => "0" + e[0] })
|
|
1825
|
+
), si = r(
|
|
1826
|
+
i("janvier", { flags: "i", value: "01" }),
|
|
1827
|
+
i("février", { flags: "i", value: "02" }),
|
|
1828
|
+
i("mars", { flags: "i", value: "03" }),
|
|
1829
|
+
i("avril", { flags: "i", value: "04" }),
|
|
1830
|
+
i("mai", { flags: "i", value: "05" }),
|
|
1831
|
+
i("juin", { flags: "i", value: "06" }),
|
|
1832
|
+
i("juillet", { flags: "i", value: "07" }),
|
|
1833
|
+
i("août", { flags: "i", value: "08" }),
|
|
1834
|
+
i("septembre", { flags: "i", value: "09" }),
|
|
1835
|
+
i("octobre", { flags: "i", value: "10" }),
|
|
1836
|
+
i("novembre", { flags: "i", value: "11" }),
|
|
1837
|
+
i("décembre", { flags: "i", value: "12" })
|
|
1838
|
+
), oi = l(
|
|
1839
|
+
[
|
|
1840
|
+
b("jour", ai),
|
|
1841
|
+
T,
|
|
1842
|
+
b("mois", si),
|
|
1843
|
+
T,
|
|
1844
|
+
b("annee", ni)
|
|
1845
|
+
],
|
|
1846
|
+
{
|
|
1847
|
+
value: (e, { variables: t }) => `${t.annee}-${t.mois}-${t.jour}`
|
|
1848
|
+
}
|
|
1849
|
+
), Oe = l([i("du ", { flags: "i" }), oi], {
|
|
1850
|
+
value: (e) => e[1]
|
|
1851
|
+
}), rt = l([T, Oe], {
|
|
1852
|
+
value: (e) => e[1]
|
|
1853
|
+
}), V = r(
|
|
1854
|
+
i("chapitre", { flags: "i", value: "chapitre" }),
|
|
1855
|
+
i("livre(?! des procédures fiscales)", { flags: "i", value: "livre" }),
|
|
1856
|
+
i("paragraphe", { flags: "i", value: "paragraphe" }),
|
|
1857
|
+
i("partie", { flags: "i", value: "partie" }),
|
|
1858
|
+
i("section", { flags: "i", value: "section" }),
|
|
1859
|
+
i("sous-paragraphe", { flags: "i", value: "sous-paragraphe" }),
|
|
1860
|
+
i("sous-section", { flags: "i", value: "sous-section" }),
|
|
1861
|
+
i("sous-sous-paragraphe", { flags: "i", value: "sous-sous-paragraphe" }),
|
|
1862
|
+
i("sous-titre", { flags: "i", value: "sous-titre" }),
|
|
1863
|
+
i("titre", { flags: "i", value: "titre" })
|
|
1864
|
+
), Ne = l(
|
|
1865
|
+
[V, i("s", { flags: "i" })],
|
|
1866
|
+
{ value: (e) => e[0] }
|
|
1867
|
+
), li = r(
|
|
1868
|
+
i("arrêtés", { flags: "i" }),
|
|
1869
|
+
i("législative", { flags: "i" }),
|
|
1870
|
+
l(
|
|
1871
|
+
[
|
|
1872
|
+
i("réglementaire( ancienne)? ", { flags: "i" }),
|
|
1873
|
+
p(
|
|
1874
|
+
[
|
|
1875
|
+
i(" [-:] ", { flags: "i" }),
|
|
1876
|
+
r(i("arrêtés", { flags: "i" }), [
|
|
1877
|
+
i("décrets", { flags: "i" }),
|
|
1878
|
+
r(
|
|
1879
|
+
i(" en Conseil d'[ÉE]tat", {
|
|
1880
|
+
flags: "i",
|
|
1881
|
+
value: " en Conseil d'État"
|
|
1882
|
+
}),
|
|
1883
|
+
i(" simples", { flags: "i" })
|
|
1884
|
+
)
|
|
1885
|
+
])
|
|
1886
|
+
],
|
|
1887
|
+
{ default: "" }
|
|
1888
|
+
)
|
|
1889
|
+
],
|
|
1890
|
+
{ value: (e, t) => t.textFromResults(e) }
|
|
1891
|
+
)
|
|
1892
|
+
), ut = l(
|
|
1893
|
+
[
|
|
1894
|
+
r($t, Pt),
|
|
1895
|
+
p([T, le], { default: null })
|
|
1896
|
+
],
|
|
1897
|
+
{
|
|
1898
|
+
value: (e) => {
|
|
1899
|
+
const t = e[0], n = e[1]?.[1];
|
|
1900
|
+
return {
|
|
1901
|
+
index: t.value + (n === void 0 ? 0 : n.value / 1e3),
|
|
1902
|
+
num: `${t.text}${n === void 0 ? "" : ` ${n.text}`}`
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
), on = l(
|
|
1907
|
+
[
|
|
1908
|
+
i("^", { flags: "m" }),
|
|
1909
|
+
V,
|
|
1910
|
+
T,
|
|
1911
|
+
ut,
|
|
1912
|
+
i("$", { flags: "m" })
|
|
1913
|
+
],
|
|
1914
|
+
{
|
|
1915
|
+
value: (e, t) => ({
|
|
1916
|
+
definition: !0,
|
|
1917
|
+
...e[3],
|
|
1918
|
+
position: t.position(),
|
|
1919
|
+
type: e[1]
|
|
1920
|
+
})
|
|
1921
|
+
}
|
|
1922
|
+
), Ee = r(
|
|
1923
|
+
l([ut, p(ge, { default: "" })], {
|
|
1924
|
+
value: (e, t) => ({
|
|
1925
|
+
...e[0],
|
|
1926
|
+
...e[1] ? { localizationAdverb: e[1] } : {},
|
|
1927
|
+
position: t.position(),
|
|
1928
|
+
type: "incomplete-header"
|
|
1929
|
+
})
|
|
1930
|
+
}),
|
|
1931
|
+
l([li, p(ge, { default: "" })], {
|
|
1932
|
+
value: (e, t) => ({
|
|
1933
|
+
...e[1] ? { localizationAdverb: e[1] } : {},
|
|
1934
|
+
num: e[0],
|
|
1935
|
+
position: t.position(),
|
|
1936
|
+
type: "incomplete-header"
|
|
1937
|
+
})
|
|
1938
|
+
}),
|
|
1939
|
+
O(J, {
|
|
1940
|
+
value: (e, t) => ({
|
|
1941
|
+
...e,
|
|
1942
|
+
position: t.position(),
|
|
1943
|
+
type: "incomplete-header"
|
|
1944
|
+
})
|
|
1945
|
+
})
|
|
1946
|
+
), Re = r(
|
|
1947
|
+
Ee,
|
|
1948
|
+
O(Ut, {
|
|
1949
|
+
value: (e, t) => ({
|
|
1950
|
+
...e,
|
|
1951
|
+
position: t.position(),
|
|
1952
|
+
type: "incomplete-header"
|
|
1953
|
+
})
|
|
1954
|
+
})
|
|
1955
|
+
), ri = r(
|
|
1956
|
+
l(
|
|
1957
|
+
[
|
|
1958
|
+
Le,
|
|
1959
|
+
T,
|
|
1960
|
+
V,
|
|
1961
|
+
p([T, Re], { default: [] })
|
|
1962
|
+
],
|
|
1963
|
+
{
|
|
1964
|
+
value: (e, t) => {
|
|
1965
|
+
const n = e[3][1] ?? {
|
|
1966
|
+
position: t.position(),
|
|
1967
|
+
type: e[2]
|
|
1968
|
+
};
|
|
1969
|
+
for (const a of C(
|
|
1970
|
+
n
|
|
1971
|
+
))
|
|
1972
|
+
a.type = e[2], a.index === void 0 && a.relative === void 0 && Object.assign(a, e[0]);
|
|
1973
|
+
return { ...n, position: t.position() };
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
),
|
|
1977
|
+
l([Ft, T, V], {
|
|
1978
|
+
value: (e, t) => ({
|
|
1979
|
+
index: e[0],
|
|
1980
|
+
position: t.position(),
|
|
1981
|
+
type: e[2]
|
|
1982
|
+
})
|
|
1983
|
+
}),
|
|
1984
|
+
l([V, T, Re], {
|
|
1985
|
+
value: (e, t) => {
|
|
1986
|
+
const n = e[2];
|
|
1987
|
+
for (const a of C(
|
|
1988
|
+
n
|
|
1989
|
+
))
|
|
1990
|
+
a.type = e[0];
|
|
1991
|
+
return {
|
|
1992
|
+
...n,
|
|
1993
|
+
position: t.position()
|
|
1994
|
+
};
|
|
1995
|
+
}
|
|
1996
|
+
})
|
|
1997
|
+
), ui = l(
|
|
1998
|
+
[p(ue, { default: !1 }), ri],
|
|
1999
|
+
{
|
|
2000
|
+
value: (e, t) => {
|
|
2001
|
+
const n = e[1];
|
|
2002
|
+
if (e[0])
|
|
2003
|
+
for (const a of C(
|
|
2004
|
+
n
|
|
2005
|
+
))
|
|
2006
|
+
a.ofTheSaid = !0;
|
|
2007
|
+
return {
|
|
2008
|
+
...n,
|
|
2009
|
+
position: t.position()
|
|
2010
|
+
};
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
), di = l(
|
|
2014
|
+
[
|
|
2015
|
+
Ee,
|
|
2016
|
+
G([
|
|
2017
|
+
r(M, Y),
|
|
2018
|
+
r(
|
|
2019
|
+
l([W], {
|
|
2020
|
+
value: (e, t) => ({
|
|
2021
|
+
...e[0],
|
|
2022
|
+
position: t.position(),
|
|
2023
|
+
type: "incomplete-header"
|
|
2024
|
+
})
|
|
2025
|
+
}),
|
|
2026
|
+
Ee
|
|
2027
|
+
)
|
|
2028
|
+
])
|
|
2029
|
+
],
|
|
2030
|
+
{
|
|
2031
|
+
value: (e, t) => $(
|
|
2032
|
+
e[0],
|
|
2033
|
+
e[1],
|
|
2034
|
+
t.position()
|
|
2035
|
+
)
|
|
2036
|
+
}
|
|
2037
|
+
), Pe = r(
|
|
2038
|
+
di,
|
|
2039
|
+
O(Ye, {
|
|
2040
|
+
value: (e, t) => ({
|
|
2041
|
+
...e,
|
|
2042
|
+
position: t.position(),
|
|
2043
|
+
type: "incomplete-header"
|
|
2044
|
+
})
|
|
2045
|
+
})
|
|
2046
|
+
), ci = r(
|
|
2047
|
+
l(
|
|
2048
|
+
[
|
|
2049
|
+
he,
|
|
2050
|
+
T,
|
|
2051
|
+
Ne,
|
|
2052
|
+
p([T, Pe], { default: [] })
|
|
2053
|
+
],
|
|
2054
|
+
{
|
|
2055
|
+
value: (e, t) => {
|
|
2056
|
+
const n = e[3][1] ?? {
|
|
2057
|
+
position: t.position(),
|
|
2058
|
+
type: e[2]
|
|
2059
|
+
};
|
|
2060
|
+
for (const a of C(
|
|
2061
|
+
n
|
|
2062
|
+
))
|
|
2063
|
+
a.type = e[2], a.index === void 0 && a.relative === void 0 && Object.assign(a, e[0]);
|
|
2064
|
+
return { ...n, position: t.position() };
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
),
|
|
2068
|
+
l([Ne, T, Pe], {
|
|
2069
|
+
value: (e, t) => {
|
|
2070
|
+
const n = e[2];
|
|
2071
|
+
for (const a of C(
|
|
2072
|
+
n
|
|
2073
|
+
))
|
|
2074
|
+
a.type = e[0];
|
|
2075
|
+
return {
|
|
2076
|
+
...n,
|
|
2077
|
+
position: t.position()
|
|
2078
|
+
};
|
|
2079
|
+
}
|
|
2080
|
+
})
|
|
2081
|
+
), pi = l(
|
|
2082
|
+
[p(me, { default: !1 }), ci],
|
|
2083
|
+
{
|
|
2084
|
+
value: (e, t) => {
|
|
2085
|
+
const n = e[1];
|
|
2086
|
+
if (e[0])
|
|
2087
|
+
for (const a of C(
|
|
2088
|
+
n
|
|
2089
|
+
))
|
|
2090
|
+
a.ofTheSaid = !0;
|
|
2091
|
+
return {
|
|
2092
|
+
...n,
|
|
2093
|
+
position: t.position()
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
), fi = { LEGITEXT000006069574: { nature: "CODE", title: "Code général des impôts, annexe III" }, LEGITEXT000006072026: { nature: "CODE", title: "Code monétaire et financier" }, LEGITEXT000006074069: { nature: "CODE", title: "Code de l'action sociale et des familles" }, LEGITEXT000006071646: { nature: "CODE", title: "Code du blé" }, LEGITEXT000005634379: { nature: "CODE", title: "Code de commerce" }, LEGITEXT000006074234: { nature: "CODE", title: "Code de l'aviation civile" }, LEGITEXT000006072360: { nature: "CODE", title: "Code de déontologie vétérinaire" }, LEGITEXT000006072665: { nature: "CODE", title: "Code de la santé publique" }, LEGITEXT000006074237: { nature: "CODE", title: "Code du domaine public fluvial et de la navigation intérieure" }, LEGITEXT000006069565: { nature: "CODE", title: "Code de la consommation" }, LEGITEXT000025244092: { nature: "CODE", title: "Code forestier (nouveau)" }, LEGITEXT000006074068: { nature: "CODE", title: "Code des pensions militaires d'invalidité et des victimes de guerre" }, LEGITEXT000006069472: { nature: "CODE", title: "Code de la consommation des boissons et des mesures contre l'alcoolisme applicable dans la collectivité territoriale de Mayotte" }, LEGITEXT000006069583: { nature: "CODE", title: "Livre des procédures fiscales" }, LEGITEXT000006070208: { nature: "CODE", title: "Code du domaine de l'Etat" }, LEGITEXT000023086525: { nature: "CODE", title: "Code des transports" }, LEGITEXT000006070239: { nature: "CODE", title: "Code électoral" }, LEGITEXT000006071367: { nature: "CODE", title: "Code rural et de la pêche maritime" }, LEGITEXT000006070721: { nature: "CODE", title: "Code civil" }, LEGITEXT000037701019: { nature: "CODE", title: "Code de la commande publique" }, LEGITEXT000006070302: { nature: "CODE", title: "Code des pensions civiles et militaires de retraite" }, LEGITEXT000006069441: { nature: "CODE", title: "Code de commerce (ancien)" }, LEGITEXT000006074510: { nature: "CODE", title: "Code de déontologie des professionnels de l'expertise comptable" }, LEGITEXT000006070933: { nature: "CODE", title: "Code de justice administrative" }, LEGITEXT000006073422: { nature: "CODE", title: "Code des caisses d'épargne" }, LEGITEXT000006071154: { nature: "CODE", title: "Code de procédure pénale" }, LEGITEXT000006075115: { nature: "CODE", title: "Code des débits de boissons et des mesures contre l'alcoolisme" }, LEGITEXT000006069564: { nature: "CODE", title: "Code des marchés publics (édition 2001)" }, LEGITEXT000006070162: { nature: "CODE", title: "Code des communes" }, LEGITEXT000006071007: { nature: "CODE", title: "Code de la légion d'honneur et de la médaille militaire" }, LEGITEXT000006070666: { nature: "CODE", title: "Code des instruments monétaires et des médailles" }, LEGITEXT000006070716: { nature: "CODE", title: "Code de procédure civile" }, LEGITEXT000025024948: { nature: "CODE", title: "Code des procédures civiles d'exécution" }, LEGITEXT000044416551: { nature: "CODE", title: "Code général de la fonction publique" }, LEGITEXT000006069568: { nature: "CODE", title: "Code général des impôts, annexe I" }, LEGITEXT000006071103: { nature: "CODE", title: "Code de déontologie de la profession de commissaire aux comptes" }, LEGITEXT000006070633: { nature: "CODE", title: "Code général des collectivités territoriales" }, LEGITEXT000006071071: { nature: "CODE", title: "Code de déontologie de la police nationale" }, LEGITEXT000006071344: { nature: "CODE", title: "Code des tribunaux administratifs et des cours administratives d'appel" }, LEGITEXT000006074096: { nature: "CODE", title: "Code de la construction et de l'habitation" }, LEGITEXT000044595989: { nature: "CODE", title: "Code des impositions sur les biens et services" }, LEGITEXT000006074236: { nature: "CODE", title: "Code du patrimoine" }, LEGITEXT000006070249: { nature: "CODE", title: "Code des juridictions financières" }, LEGITEXT000006069562: { nature: "CODE", title: "Code des marchés publics (édition 1964)" }, LEGITEXT000006071657: { nature: "CODE", title: "Code du vin" }, LEGITEXT000006069569: { nature: "CODE", title: "Code général des impôts, annexe II" }, LEGITEXT000006070882: { nature: "CODE", title: "Code de l'industrie cinématographique" }, LEGITEXT000006072635: { nature: "CODE", title: "Code de déontologie des sages-femmes" }, LEGITEXT000006071335: { nature: "CODE", title: "Code du service national" }, LEGITEXT000006070159: { nature: "CODE", title: "Code de déontologie des agents de police municipale" }, LEGITEXT000006070719: { nature: "CODE", title: "Code pénal" }, LEGITEXT000006074232: { nature: "CODE", title: "Code de déontologie des architectes" }, LEGITEXT000025503132: { nature: "CODE", title: "Code de la sécurité intérieure" }, LEGITEXT000006072052: { nature: "CODE", title: "Code du travail applicable à Mayotte" }, LEGITEXT000023983208: { nature: "CODE", title: "Code de l'énergie" }, LEGITEXT000006074947: { nature: "CODE", title: "Code de la route (ancien)" }, LEGITEXT000006071785: { nature: "CODE", title: "Code minier" }, LEGITEXT000006074066: { nature: "CODE", title: "Code des pensions de retraite des marins français du commerce, de pêche ou de plaisance" }, LEGITEXT000006072050: { nature: "CODE", title: "Code du travail" }, LEGITEXT000006074235: { nature: "CODE", title: "Code du domaine de l'Etat et des collectivités publiques applicable à la collectivité territoriale de Mayotte" }, LEGITEXT000006070158: { nature: "CODE", title: "Code de l'entrée et du séjour des étrangers et du droit d'asile" }, LEGITEXT000006074228: { nature: "CODE", title: "Code de la route" }, LEGITEXT000031366350: { nature: "CODE", title: "Code des relations entre le public et l'administration" }, LEGITEXT000006073984: { nature: "CODE", title: "Code des assurances" }, LEGITEXT000006070299: { nature: "CODE", title: "Code général de la propriété des personnes publiques" }, LEGITEXT000006071645: { nature: "CODE", title: "Code des douanes de Mayotte" }, LEGITEXT000006070300: { nature: "CODE", title: "Code des communes de la Nouvelle-Calédonie" }, LEGITEXT000006071164: { nature: "CODE", title: "Code de l'organisation judiciaire" }, LEGITEXT000006071014: { nature: "CODE", title: "Code de l'enseignement technique" }, LEGITEXT000006071360: { nature: "CODE", title: "Code de justice militaire (nouveau)" }, LEGITEXT000006073189: { nature: "CODE", title: "Code de la sécurité sociale" }, LEGITEXT000006074075: { nature: "CODE", title: "Code de l'urbanisme" }, LEGITEXT000006074224: { nature: "CODE", title: "Code de l'expropriation pour cause d'utilité publique" }, LEGITEXT000006072051: { nature: "CODE", title: "Code du travail maritime" }, LEGITEXT000006070987: { nature: "CODE", title: "Code des postes et des communications électroniques" }, LEGITEXT000005627819: { nature: "CODE", title: "Code des marchés publics (édition 2006)" }, LEGITEXT000006071318: { nature: "CODE", title: "Code du sport" }, LEGITEXT000006074220: { nature: "CODE", title: "Code de l'environnement" }, LEGITEXT000006075116: { nature: "CODE", title: "Code de l'artisanat" }, LEGITEXT000020908868: { nature: "CODE", title: "Code du cinéma et de l'image animée" }, LEGITEXT000006070884: { nature: "CODE", title: "Code de justice militaire" }, LEGITEXT000006070667: { nature: "CODE", title: "Code de la voirie routière" }, LEGITEXT000006071307: { nature: "CODE", title: "Code de la défense" }, LEGITEXT000006072637: { nature: "CODE", title: "Code de la famille et de l'aide sociale" }, LEGITEXT000006074233: { nature: "CODE", title: "Code des ports maritimes" }, LEGITEXT000006074067: { nature: "CODE", title: "Code de la mutualité" }, LEGITEXT000006074073: { nature: "CODE", title: "Code du tourisme" }, LEGITEXT000006072636: { nature: "CODE", title: "Code de déontologie des chirurgiens-dentistes" }, LEGITEXT000023501962: { nature: "CODE", title: "Code minier (nouveau)" }, LEGITEXT000006071188: { nature: "CODE", title: "Code disciplinaire et pénal de la marine marchande" }, LEGITEXT000006071191: { nature: "CODE", title: "Code de l'éducation" }, LEGITEXT000006071570: { nature: "CODE", title: "Code des douanes" }, LEGITEXT000006071366: { nature: "CODE", title: "Code rural (ancien)" }, LEGITEXT000045476241: { nature: "CODE", title: "Code pénitentiaire" }, LEGITEXT000006071189: { nature: "CODE", title: "Code de la nationalité française" }, LEGITEXT000006071737: { nature: "CODE", title: "Code de l'Office national interprofessionnel du blé" }, LEGITEXT000006072634: { nature: "CODE", title: "Code de déontologie médicale" }, LEGITEXT000006069414: { nature: "CODE", title: "Code de la propriété intellectuelle" }, LEGITEXT000006069576: { nature: "CODE", title: "Code général des impôts, annexe IV" }, LEGITEXT000006069577: { nature: "CODE", title: "Code général des impôts" }, LEGITEXT000006071190: { nature: "CODE", title: "Code de la recherche" }, LEGITEXT000039086952: { nature: "CODE", title: "Code de la justice pénale des mineurs" }, LEGITEXT000006071029: { nature: "CODE", title: "Code pénal (ancien)" }, LEGITEXT000006072666: { nature: "CODE", title: "Code des marchés publics (édition 2004)" }, LEGITEXT000006070680: { nature: "CODE", title: "Code de procédure civile" }, LEGITEXT000006072664: { nature: "CODE", title: "Code de déontologie des médecins" }, LEGITEXT000006071556: { nature: "CODE", title: "Code forestier de Mayotte" }, LEGITEXT000006071514: { nature: "CODE", title: "Code forestier" }, JORFTEXT000000571356: { nature: "CONSTITUTION", title: "Constitution du 4 octobre 1958" }, JORFTEXT000000868390: { nature: "CONSTITUTION", title: "Constitution du 27 octobre 1946" }, LEGITEXT000006071195: { nature: "CONSTITUTION", title: "Constitution du 4 novembre 1848" } }, gi = { code: { général: { des: { impôts: { annexe: { 1: { cid: "LEGITEXT000006069568" }, 2: { cid: "LEGITEXT000006069569" }, 3: { cid: "LEGITEXT000006069574" }, 4: { cid: "LEGITEXT000006069576" } }, cid: "LEGITEXT000006069577" }, collectivités: { territoriales: { cid: "LEGITEXT000006070633" } } }, de: { la: { fonction: { publique: { cid: "LEGITEXT000044416551" } }, propriété: { des: { personnes: { publiques: { cid: "LEGITEXT000006070299" } } } } } } }, monétaire: { et: { financier: { cid: "LEGITEXT000006072026" } } }, de: { "l'action": { sociale: { et: { des: { familles: { cid: "LEGITEXT000006074069" } } } } }, commerce: { cid: "LEGITEXT000005634379", ancien: { cid: "LEGITEXT000006069441" } }, "l'aviation": { civile: { cid: "LEGITEXT000006074234" } }, déontologie: { vétérinaire: { cid: "LEGITEXT000006072360" }, des: { professionnels: { de: { "l'expertise": { comptable: { cid: "LEGITEXT000006074510" } } } }, "sages-femmes": { cid: "LEGITEXT000006072635" }, agents: { de: { police: { municipale: { cid: "LEGITEXT000006070159" } } } }, architectes: { cid: "LEGITEXT000006074232" }, "chirurgiens-dentistes": { cid: "LEGITEXT000006072636" }, médecins: { cid: "LEGITEXT000006072664" } }, de: { la: { profession: { de: { commissaire: { aux: { comptes: { cid: "LEGITEXT000006071103" } } } } }, police: { nationale: { cid: "LEGITEXT000006071071" } } } }, médicale: { cid: "LEGITEXT000006072634" } }, la: { santé: { publique: { cid: "LEGITEXT000006072665" } }, consommation: { cid: "LEGITEXT000006069565", des: { boissons: { et: { des: { mesures: { contre: { "l'alcoolisme": { applicable: { dans: { la: { collectivité: { territoriale: { de: { mayotte: { cid: "LEGITEXT000006069472" } } } } } } } } } } } } } } }, commande: { publique: { cid: "LEGITEXT000037701019" } }, légion: { "d'honneur": { de: { la: { médaille: { militaire: { et: { de: { "l'ordre": { national: { du: { mérite: { cid: "LEGITEXT000006071007" } } } } } } } } } }, et: { de: { la: { médaille: { militaire: { cid: "LEGITEXT000006071007" } } } } } } }, construction: { et: { de: { "l'habitation": { cid: "LEGITEXT000006074096" } } } }, sécurité: { intérieure: { cid: "LEGITEXT000025503132" }, sociale: { cid: "LEGITEXT000006073189" } }, route: { ancien: { cid: "LEGITEXT000006074947" }, cid: "LEGITEXT000006074228" }, voirie: { routière: { cid: "LEGITEXT000006070667" } }, défense: { cid: "LEGITEXT000006071307" }, famille: { et: { de: { "l'aide": { sociale: { cid: "LEGITEXT000006072637" } } } } }, mutualité: { cid: "LEGITEXT000006074067" }, nationalité: { française: { cid: "LEGITEXT000006071189" } }, propriété: { intellectuelle: { cid: "LEGITEXT000006069414" } }, recherche: { cid: "LEGITEXT000006071190" }, justice: { pénale: { des: { mineurs: { cid: "LEGITEXT000039086952" } } } } }, justice: { administrative: { cid: "LEGITEXT000006070933" }, militaire: { nouveau: { cid: "LEGITEXT000006071360" }, cid: "LEGITEXT000006070884" } }, procédure: { pénale: { cid: "LEGITEXT000006071154" }, civile: { cid: ["LEGITEXT000006070716", "LEGITEXT000006070680"] } }, "l'industrie": { cinématographique: { cid: "LEGITEXT000006070882" } }, "l'énergie": { cid: "LEGITEXT000023983208" }, "l'entrée": { et: { du: { séjour: { des: { étrangers: { et: { du: { droit: { "d'asile": { cid: "LEGITEXT000006070158" } } } } } } } } } }, "l'organisation": { judiciaire: { cid: "LEGITEXT000006071164" } }, "l'enseignement": { technique: { cid: "LEGITEXT000006071014" } }, "l'urbanisme": { cid: "LEGITEXT000006074075" }, "l'expropriation": { pour: { cause: { "d'utilité": { publique: { cid: "LEGITEXT000006074224" } } } } }, "l'environnement": { cid: "LEGITEXT000006074220" }, "l'artisanat": { cid: "LEGITEXT000006075116" }, "l'éducation": { cid: "LEGITEXT000006071191" }, "l'office": { national: { interprofessionnel: { du: { blé: { cid: "LEGITEXT000006071737" } } } } } }, du: { blé: { cid: "LEGITEXT000006071646" }, domaine: { public: { fluvial: { et: { de: { la: { navigation: { intérieure: { cid: "LEGITEXT000006074237" } } } } } } }, de: { "l'etat": { cid: "LEGITEXT000006070208", et: { des: { collectivités: { publiques: { applicable: { à: { la: { collectivité: { territoriale: { de: { mayotte: { cid: "LEGITEXT000006074235" } } } } } } } } } } } } } }, patrimoine: { cid: "LEGITEXT000006074236" }, vin: { cid: "LEGITEXT000006071657" }, service: { national: { cid: "LEGITEXT000006071335" } }, travail: { applicable: { à: { mayotte: { cid: "LEGITEXT000006072052" } } }, cid: "LEGITEXT000006072050", maritime: { cid: "LEGITEXT000006072051" } }, sport: { cid: "LEGITEXT000006071318" }, cinéma: { et: { de: { "l'image": { animée: { cid: "LEGITEXT000020908868" } } } } }, tourisme: { cid: "LEGITEXT000006074073" } }, forestier: { nouveau: { cid: "LEGITEXT000025244092" }, de: { mayotte: { cid: "LEGITEXT000006071556" } }, cid: "LEGITEXT000006071514" }, des: { pensions: { militaires: { "d'invalidité": { et: { des: { victimes: { de: { la: { guerre: { cid: "LEGITEXT000006074068" } }, guerre: { cid: "LEGITEXT000006074068" } } } } } } }, civiles: { et: { militaires: { de: { retraite: { cid: "LEGITEXT000006070302" } } } } }, de: { retraite: { des: { marins: { français: { du: { commerce: { de: { pêche: { ou: { de: { plaisance: { cid: "LEGITEXT000006074066" } } } } } } } } } } } } }, transports: { cid: "LEGITEXT000023086525" }, caisses: { "d'épargne": { cid: "LEGITEXT000006073422" } }, débits: { de: { boissons: { et: { des: { mesures: { contre: { "l'alcoolisme": { cid: "LEGITEXT000006075115" } } } } } } } }, marchés: { publics: { édition: { 1964: { cid: "LEGITEXT000006069562" }, 2001: { cid: "LEGITEXT000006069564" }, 2004: { cid: "LEGITEXT000006072666" }, 2006: { cid: "LEGITEXT000005627819" } } } }, communes: { cid: "LEGITEXT000006070162", de: { la: { "nouvelle-calédonie": { cid: "LEGITEXT000006070300" } } } }, instruments: { monétaires: { et: { des: { médailles: { cid: "LEGITEXT000006070666" } } } } }, procédures: { civiles: { "d'exécution": { cid: "LEGITEXT000025024948" } } }, tribunaux: { administratifs: { et: { des: { cours: { administratives: { "d'appel": { cid: "LEGITEXT000006071344" } } } } } } }, impositions: { sur: { les: { biens: { et: { services: { cid: "LEGITEXT000044595989" } } } } } }, juridictions: { financières: { cid: "LEGITEXT000006070249" } }, relations: { entre: { le: { public: { et: { "l'administration": { cid: "LEGITEXT000031366350" } } } } } }, assurances: { cid: "LEGITEXT000006073984" }, douanes: { de: { mayotte: { cid: "LEGITEXT000006071645" } }, cid: "LEGITEXT000006071570" }, postes: { et: { des: { communications: { électroniques: { cid: "LEGITEXT000006070987" } } } } }, ports: { maritimes: { cid: "LEGITEXT000006074233" } } }, électoral: { cid: "LEGITEXT000006070239" }, rural: { nouveau: { cid: "LEGITEXT000006071367" }, et: { de: { la: { pêche: { maritime: { cid: "LEGITEXT000006071367" } } } } }, ancien: { cid: "LEGITEXT000006071366" } }, civil: { cid: "LEGITEXT000006070721" }, pénal: { cid: "LEGITEXT000006070719", ancien: { cid: "LEGITEXT000006071029" } }, minier: { cid: "LEGITEXT000006071785", nouveau: { cid: "LEGITEXT000023501962" } }, disciplinaire: { et: { pénal: { de: { la: { marine: { marchande: { cid: "LEGITEXT000006071188" } } } } } } }, pénitentiaire: { cid: "LEGITEXT000045476241" } }, livre: { des: { procédures: { fiscales: { cid: "LEGITEXT000006069583" } } } }, constitution: { cid: "JORFTEXT000000571356" } }, Ei = {}, Ti = { CONSTITUTION: { "1958-10-04": ["JORFTEXT000000571356"], "1946-10-27": ["JORFTEXT000000868390"], "1848-11-04": ["LEGITEXT000006071195"] } }, vi = {}, Z = {
|
|
2098
|
+
textInfosByCid: fi,
|
|
2099
|
+
textCidByOtherTitleWordsTree: gi,
|
|
2100
|
+
textCidByStandardTitleWordsTree: Ei,
|
|
2101
|
+
textsCidsByNatureAndDate: Ti,
|
|
2102
|
+
textsCidsByNatureAndNum: vi
|
|
2103
|
+
}, ce = Z.textInfosByCid ?? {}, mi = Z.textCidByOtherTitleWordsTree ?? {}, Ii = Z.textCidByStandardTitleWordsTree ?? {}, hi = Z.textsCidsByNatureAndDate ?? {}, Li = Z.textsCidsByNatureAndNum ?? {}, dt = O(
|
|
2104
|
+
r(
|
|
2105
|
+
i("arrêté", { flags: "i", value: "ARRETE" }),
|
|
2106
|
+
i("circulaire", { flags: "i", value: "CIRCULAIRE" }),
|
|
2107
|
+
// JORFTEXT000000702211 Code professionnel local du 26 juillet 1900 pour l'Alsace et la Moselle
|
|
2108
|
+
i("code professionnel local", { flags: "i", value: "LOI" }),
|
|
2109
|
+
i("code", { flags: "i", value: "CODE" }),
|
|
2110
|
+
i("Constitution", { value: "CONSTITUTION" }),
|
|
2111
|
+
i("décret-loi", { flags: "i", value: "DECRET_LOI" }),
|
|
2112
|
+
i("décret", { flags: "i", value: "DECRET" }),
|
|
2113
|
+
i("loi constitutionnelle", {
|
|
2114
|
+
flags: "i",
|
|
2115
|
+
value: "LOI_CONSTIT"
|
|
2116
|
+
}),
|
|
2117
|
+
i("loi d'orientation quinquennale", { flags: "i", value: "LOI" }),
|
|
2118
|
+
i("loi d'orientation", { flags: "i", value: "LOI" }),
|
|
2119
|
+
i("loi de programme", { flags: "i", value: "LOI" }),
|
|
2120
|
+
i("loi locale", { flags: "i", value: "LOI" }),
|
|
2121
|
+
i("loi organique", { flags: "i", value: "LOI_ORGANIQUE" }),
|
|
2122
|
+
i("loi quinquennale", { flags: "i", value: "LOI" }),
|
|
2123
|
+
i("loi", { flags: "i", value: "LOI" }),
|
|
2124
|
+
i("ordonnance (du Roi|locale|ministérielle|royale)", {
|
|
2125
|
+
flags: "i",
|
|
2126
|
+
value: "ORDONNANCE"
|
|
2127
|
+
}),
|
|
2128
|
+
i("ordonnance", { flags: "i", value: "ORDONNANCE" })
|
|
2129
|
+
),
|
|
2130
|
+
{
|
|
2131
|
+
value: (e) => ({
|
|
2132
|
+
nature: e,
|
|
2133
|
+
type: "texte"
|
|
2134
|
+
})
|
|
2135
|
+
}
|
|
2136
|
+
), Ci = l(
|
|
2137
|
+
[Be, i(String.raw`\d+(-\d+)?`)],
|
|
2138
|
+
{
|
|
2139
|
+
value: (e) => e[1]
|
|
2140
|
+
}
|
|
2141
|
+
), qe = r(
|
|
2142
|
+
l([Ci, p(rt, { default: "" })], {
|
|
2143
|
+
value: (e) => e[1] ? { date: e[1], num: e[0] } : { num: e[0] }
|
|
2144
|
+
}),
|
|
2145
|
+
O(Oe, {
|
|
2146
|
+
value: (e) => ({ date: e })
|
|
2147
|
+
})
|
|
2148
|
+
);
|
|
2149
|
+
i(
|
|
2150
|
+
"décision( du Conseil constitutionnel)? (?<numero>[-/0-9A-Z]+ (QPC|DC|AN|D|ELEC|FNR|I|LOM|LP|L|ORGA|PDR|REF|SEN|AUTR|AR16))",
|
|
2151
|
+
{
|
|
2152
|
+
flags: "i",
|
|
2153
|
+
value: (e, t) => ({
|
|
2154
|
+
num: e.groups.numero,
|
|
2155
|
+
position: t.position(),
|
|
2156
|
+
type: "décision du Conseil constitutionnel"
|
|
2157
|
+
})
|
|
2158
|
+
}
|
|
2159
|
+
);
|
|
2160
|
+
const Oi = p(
|
|
2161
|
+
r(
|
|
2162
|
+
i(" de la République française", { flags: "i" }),
|
|
2163
|
+
i(" du pays", { flags: "i" })
|
|
2164
|
+
),
|
|
2165
|
+
{ default: null }
|
|
2166
|
+
), we = r(
|
|
2167
|
+
l(
|
|
2168
|
+
[
|
|
2169
|
+
dt,
|
|
2170
|
+
Oi,
|
|
2171
|
+
p([T, qe], {
|
|
2172
|
+
default: null,
|
|
2173
|
+
value: (e) => e[1]
|
|
2174
|
+
}),
|
|
2175
|
+
p(
|
|
2176
|
+
[
|
|
2177
|
+
T,
|
|
2178
|
+
ye(Ii)
|
|
2179
|
+
],
|
|
2180
|
+
{
|
|
2181
|
+
default: null,
|
|
2182
|
+
value: (e) => e[1]
|
|
2183
|
+
}
|
|
2184
|
+
),
|
|
2185
|
+
p(
|
|
2186
|
+
[
|
|
2187
|
+
i(String.raw` ?\( ?`),
|
|
2188
|
+
qe,
|
|
2189
|
+
i(String.raw` ?\)`)
|
|
2190
|
+
],
|
|
2191
|
+
{
|
|
2192
|
+
default: null,
|
|
2193
|
+
value: (e) => e[1]
|
|
2194
|
+
}
|
|
2195
|
+
),
|
|
2196
|
+
p(De, { default: "" })
|
|
2197
|
+
],
|
|
2198
|
+
{
|
|
2199
|
+
value: (e) => {
|
|
2200
|
+
const { nature: t, type: n } = e[0], { date: a, num: o } = e[2] ?? e[4] ?? {}, { cid: s } = e[3] ?? {};
|
|
2201
|
+
if (s === void 0 && a === void 0 && o === void 0)
|
|
2202
|
+
return;
|
|
2203
|
+
let u = /* @__PURE__ */ new Set();
|
|
2204
|
+
if (a !== void 0) {
|
|
2205
|
+
const c = hi[t]?.[a];
|
|
2206
|
+
c !== void 0 && (u = u.size === 0 ? new Set(c) : u.intersection(new Set(c)));
|
|
2207
|
+
}
|
|
2208
|
+
if (o !== void 0) {
|
|
2209
|
+
const c = Li[t]?.[o];
|
|
2210
|
+
c !== void 0 && (u = u.size === 0 ? new Set(c) : u.intersection(new Set(c)));
|
|
2211
|
+
}
|
|
2212
|
+
if (s !== void 0) {
|
|
2213
|
+
const c = Array.isArray(s) ? s : [s];
|
|
2214
|
+
u = u.size === 0 ? new Set(c) : u.intersection(
|
|
2215
|
+
new Set(
|
|
2216
|
+
c.filter((g) => ce[g].nature === t)
|
|
2217
|
+
)
|
|
2218
|
+
);
|
|
2219
|
+
}
|
|
2220
|
+
const f = u.size === 1 ? u.values().next().value : void 0, d = f === void 0 ? void 0 : ce[f];
|
|
2221
|
+
return Object.fromEntries(
|
|
2222
|
+
Object.entries({
|
|
2223
|
+
cid: f,
|
|
2224
|
+
date: a,
|
|
2225
|
+
nature: t ?? d?.nature,
|
|
2226
|
+
num: o,
|
|
2227
|
+
title: d?.title,
|
|
2228
|
+
type: n
|
|
2229
|
+
}).filter(([, c]) => c !== void 0)
|
|
2230
|
+
);
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
),
|
|
2234
|
+
l(
|
|
2235
|
+
[
|
|
2236
|
+
ye(mi),
|
|
2237
|
+
p(De, { default: "" })
|
|
2238
|
+
],
|
|
2239
|
+
{
|
|
2240
|
+
value: (e) => {
|
|
2241
|
+
const { cid: t } = e[0], n = typeof t == "string" ? ce[t] : void 0;
|
|
2242
|
+
return Object.fromEntries(
|
|
2243
|
+
Object.entries({
|
|
2244
|
+
cid: t,
|
|
2245
|
+
...n ?? {},
|
|
2246
|
+
type: "texte"
|
|
2247
|
+
}).filter(([, a]) => a !== void 0)
|
|
2248
|
+
);
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
)
|
|
2252
|
+
), Xi = l(
|
|
2253
|
+
[
|
|
2254
|
+
fe,
|
|
2255
|
+
i("/"),
|
|
2256
|
+
fe,
|
|
2257
|
+
p(i(" ?/ ?(CEE?)", { value: (e) => e[1] }), {
|
|
2258
|
+
default: ""
|
|
2259
|
+
})
|
|
2260
|
+
],
|
|
2261
|
+
{
|
|
2262
|
+
value: (e) => `${e[0]}/${e[2]}${e[3] ? `/${e[3]}` : ""}`
|
|
2263
|
+
}
|
|
2264
|
+
), Gi = l(
|
|
2265
|
+
[p(Be, { default: "" }), Xi],
|
|
2266
|
+
{ value: (e) => e[1] }
|
|
2267
|
+
), yi = r(
|
|
2268
|
+
l([Gi, p(rt, { default: "" })], {
|
|
2269
|
+
value: (e) => e[1] ? { date: e[1], num: e[0] } : { num: e[0] }
|
|
2270
|
+
}),
|
|
2271
|
+
O(Oe, {
|
|
2272
|
+
value: (e) => ({ date: e })
|
|
2273
|
+
})
|
|
2274
|
+
), ct = l(
|
|
2275
|
+
[
|
|
2276
|
+
r(
|
|
2277
|
+
i("directive", { flags: "i", value: "DIRECTIVE_EURO" }),
|
|
2278
|
+
i("règlement", { flags: "i", value: "REGLEMENTEUROPEEN" })
|
|
2279
|
+
),
|
|
2280
|
+
p(i(String.raw` \(UE\)`, { flags: "i" }), { default: "" })
|
|
2281
|
+
],
|
|
2282
|
+
{
|
|
2283
|
+
value: (e) => ({
|
|
2284
|
+
nature: e[0],
|
|
2285
|
+
legislation: "UE",
|
|
2286
|
+
type: "texte"
|
|
2287
|
+
})
|
|
2288
|
+
}
|
|
2289
|
+
), $e = l(
|
|
2290
|
+
[ct, T, yi],
|
|
2291
|
+
{
|
|
2292
|
+
value: (e) => ({
|
|
2293
|
+
...e[2],
|
|
2294
|
+
...e[0]
|
|
2295
|
+
})
|
|
2296
|
+
}
|
|
2297
|
+
), Me = i("convention", {
|
|
2298
|
+
flags: "i",
|
|
2299
|
+
value: {
|
|
2300
|
+
nature: "CONVENTION",
|
|
2301
|
+
legislation: "international",
|
|
2302
|
+
type: "texte"
|
|
2303
|
+
}
|
|
2304
|
+
}), xi = l(
|
|
2305
|
+
[
|
|
2306
|
+
p(ue, { default: !1 }),
|
|
2307
|
+
r(
|
|
2308
|
+
l(
|
|
2309
|
+
[
|
|
2310
|
+
Le,
|
|
2311
|
+
T,
|
|
2312
|
+
r(
|
|
2313
|
+
we,
|
|
2314
|
+
$e,
|
|
2315
|
+
Me,
|
|
2316
|
+
dt,
|
|
2317
|
+
ct
|
|
2318
|
+
)
|
|
2319
|
+
],
|
|
2320
|
+
{
|
|
2321
|
+
value: (e) => ({
|
|
2322
|
+
...e[2],
|
|
2323
|
+
...e[0] === void 0 ? {} : e[0]
|
|
2324
|
+
})
|
|
2325
|
+
}
|
|
2326
|
+
),
|
|
2327
|
+
we,
|
|
2328
|
+
$e,
|
|
2329
|
+
Me
|
|
2330
|
+
)
|
|
2331
|
+
],
|
|
2332
|
+
{
|
|
2333
|
+
value: (e, t) => {
|
|
2334
|
+
const n = {
|
|
2335
|
+
...e[1],
|
|
2336
|
+
...e[0] ? { ofTheSaid: !0 } : {},
|
|
2337
|
+
position: t.position()
|
|
2338
|
+
};
|
|
2339
|
+
return t.currentText = n, n;
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
), bi = r(ei, pi), Te = r(ii, ui, xi), pt = l(
|
|
2343
|
+
[
|
|
2344
|
+
bi,
|
|
2345
|
+
G(
|
|
2346
|
+
l([re, Te], {
|
|
2347
|
+
value: (e) => e[1]
|
|
2348
|
+
})
|
|
2349
|
+
)
|
|
2350
|
+
],
|
|
2351
|
+
{
|
|
2352
|
+
value: (e, t) => se(
|
|
2353
|
+
e[0],
|
|
2354
|
+
e[1],
|
|
2355
|
+
t.position()
|
|
2356
|
+
)
|
|
2357
|
+
}
|
|
2358
|
+
), ft = l(
|
|
2359
|
+
[
|
|
2360
|
+
Te,
|
|
2361
|
+
G(
|
|
2362
|
+
l([re, Te], {
|
|
2363
|
+
value: (e) => e[1]
|
|
2364
|
+
})
|
|
2365
|
+
)
|
|
2366
|
+
],
|
|
2367
|
+
{
|
|
2368
|
+
value: (e, t) => se(
|
|
2369
|
+
e[0],
|
|
2370
|
+
e[1],
|
|
2371
|
+
t.position()
|
|
2372
|
+
)
|
|
2373
|
+
}
|
|
2374
|
+
), Si = l(
|
|
2375
|
+
[Je, pt],
|
|
2376
|
+
{ value: (e) => e[1] }
|
|
2377
|
+
), Di = l(
|
|
2378
|
+
[re, ft],
|
|
2379
|
+
{ value: (e) => e[1] }
|
|
2380
|
+
), gt = r(
|
|
2381
|
+
Di,
|
|
2382
|
+
Si
|
|
2383
|
+
), Ai = r(
|
|
2384
|
+
l(
|
|
2385
|
+
[Vt, p(gt, { default: null })],
|
|
2386
|
+
{
|
|
2387
|
+
value: (e) => {
|
|
2388
|
+
const t = e[0], n = e[1];
|
|
2389
|
+
return n === null ? t : D(n, t);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
),
|
|
2393
|
+
pt
|
|
2394
|
+
), Ni = r(
|
|
2395
|
+
l(
|
|
2396
|
+
[Wt, p(gt, { default: null })],
|
|
2397
|
+
{
|
|
2398
|
+
value: (e) => {
|
|
2399
|
+
const t = e[0], n = e[1];
|
|
2400
|
+
return n === null ? t : D(n, t);
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
),
|
|
2404
|
+
ft
|
|
2405
|
+
), Ri = l(
|
|
2406
|
+
[
|
|
2407
|
+
l(
|
|
2408
|
+
[
|
|
2409
|
+
Ve,
|
|
2410
|
+
Ai,
|
|
2411
|
+
p(
|
|
2412
|
+
[
|
|
2413
|
+
p(i(" modifiée?s", { flags: "i" }), { default: "" }),
|
|
2414
|
+
i(" susvisée?s", { flags: "i" })
|
|
2415
|
+
],
|
|
2416
|
+
{ default: "" }
|
|
2417
|
+
)
|
|
2418
|
+
// optional(regExp(String.raw` \([^)]+\)`, {flags: "i"}), { default: "" }),
|
|
2419
|
+
],
|
|
2420
|
+
{
|
|
2421
|
+
value: (e, t) => ({
|
|
2422
|
+
...e[1],
|
|
2423
|
+
position: t.position()
|
|
2424
|
+
})
|
|
2425
|
+
}
|
|
2426
|
+
),
|
|
2427
|
+
p(je, { default: null })
|
|
2428
|
+
],
|
|
2429
|
+
{
|
|
2430
|
+
value: (e, t) => e[1] === null ? e[0] : {
|
|
2431
|
+
action: e[1],
|
|
2432
|
+
position: t.position(),
|
|
2433
|
+
reference: e[0],
|
|
2434
|
+
type: "reference_et_action"
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
), Pi = l(
|
|
2438
|
+
[
|
|
2439
|
+
l(
|
|
2440
|
+
[
|
|
2441
|
+
We,
|
|
2442
|
+
Ni,
|
|
2443
|
+
p(
|
|
2444
|
+
[
|
|
2445
|
+
p(i(" modifiée?", { flags: "i" }), { default: "" }),
|
|
2446
|
+
i(" susvisée?", { flags: "i" })
|
|
2447
|
+
],
|
|
2448
|
+
{ default: "" }
|
|
2449
|
+
),
|
|
2450
|
+
// optional(regExp(String.raw` \([^)]+\)`, { flags: "i" }), {
|
|
2451
|
+
// default: "",
|
|
2452
|
+
// }),
|
|
2453
|
+
p(i(String.raw`, ?qui devient [^,]+ ","`, { flags: "i" }), {
|
|
2454
|
+
default: ""
|
|
2455
|
+
})
|
|
2456
|
+
],
|
|
2457
|
+
{
|
|
2458
|
+
value: (e, t) => ({
|
|
2459
|
+
...e[1],
|
|
2460
|
+
position: t.position()
|
|
2461
|
+
})
|
|
2462
|
+
}
|
|
2463
|
+
),
|
|
2464
|
+
p(je, { default: null })
|
|
2465
|
+
],
|
|
2466
|
+
{
|
|
2467
|
+
value: (e, t) => e[1] === null ? e[0] : {
|
|
2468
|
+
action: e[1],
|
|
2469
|
+
position: t.position(),
|
|
2470
|
+
reference: e[0],
|
|
2471
|
+
type: "reference_et_action"
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
), _e = r(
|
|
2475
|
+
Pi,
|
|
2476
|
+
Ri
|
|
2477
|
+
), ln = l(
|
|
2478
|
+
[
|
|
2479
|
+
_e,
|
|
2480
|
+
G([
|
|
2481
|
+
r(Bt, M),
|
|
2482
|
+
_e
|
|
2483
|
+
])
|
|
2484
|
+
],
|
|
2485
|
+
{
|
|
2486
|
+
value: (e, t) => $(
|
|
2487
|
+
e[0],
|
|
2488
|
+
e[1],
|
|
2489
|
+
t.position()
|
|
2490
|
+
)
|
|
2491
|
+
}
|
|
2492
|
+
), ve = /^<\/?(!DOCTYPE|\?XML|[A-Z][A-Z0-9]*)/i;
|
|
2493
|
+
function qi(e, t) {
|
|
2494
|
+
return (n) => {
|
|
2495
|
+
const a = [];
|
|
2496
|
+
let o = n;
|
|
2497
|
+
for (const s of t) {
|
|
2498
|
+
const u = s(o);
|
|
2499
|
+
(u.transformations !== void 0 || u.sourceMap.length !== 0) && (a.push(u), o = u.output);
|
|
2500
|
+
}
|
|
2501
|
+
return { input: n, output: o, title: e, transformations: a };
|
|
2502
|
+
};
|
|
2503
|
+
}
|
|
2504
|
+
function* Xe(e) {
|
|
2505
|
+
if (e.transformations === void 0)
|
|
2506
|
+
yield e;
|
|
19
2507
|
else
|
|
20
|
-
for (const
|
|
21
|
-
yield*
|
|
2508
|
+
for (const t of e.transformations)
|
|
2509
|
+
yield* Xe(t);
|
|
22
2510
|
}
|
|
23
|
-
function*
|
|
24
|
-
const
|
|
25
|
-
|
|
2511
|
+
function* wi(e) {
|
|
2512
|
+
const t = [
|
|
2513
|
+
...Xe(e)
|
|
26
2514
|
].reverse();
|
|
27
|
-
let
|
|
2515
|
+
let n = {
|
|
28
2516
|
position: { start: 0, stop: 0 }
|
|
29
2517
|
};
|
|
30
|
-
const
|
|
31
|
-
(
|
|
32
|
-
const
|
|
33
|
-
|
|
2518
|
+
const a = t.map(
|
|
2519
|
+
(s) => {
|
|
2520
|
+
const u = $i(
|
|
2521
|
+
s
|
|
34
2522
|
);
|
|
35
|
-
return
|
|
2523
|
+
return u.next(n), u;
|
|
36
2524
|
}
|
|
37
2525
|
);
|
|
38
|
-
let
|
|
39
|
-
for (;
|
|
40
|
-
|
|
41
|
-
position:
|
|
2526
|
+
let o = yield n;
|
|
2527
|
+
for (; o !== void 0; ) {
|
|
2528
|
+
n = {
|
|
2529
|
+
position: o
|
|
42
2530
|
};
|
|
43
|
-
for (const
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
2531
|
+
for (const s of a) {
|
|
2532
|
+
const u = s.next(n);
|
|
2533
|
+
if (u.done)
|
|
46
2534
|
return;
|
|
47
|
-
|
|
2535
|
+
n = u.value;
|
|
48
2536
|
}
|
|
49
|
-
|
|
2537
|
+
o = yield n;
|
|
50
2538
|
}
|
|
51
|
-
for (const
|
|
52
|
-
|
|
2539
|
+
for (const s of a)
|
|
2540
|
+
s.next(void 0);
|
|
53
2541
|
}
|
|
54
|
-
function*
|
|
55
|
-
let
|
|
2542
|
+
function* $i(e) {
|
|
2543
|
+
let t, n = "looking_for_start_segment", a = yield {
|
|
56
2544
|
position: { start: 0, stop: 0 }
|
|
57
2545
|
};
|
|
58
|
-
const
|
|
2546
|
+
const o = [
|
|
59
2547
|
{ inputIndex: 0, inputLength: 0, outputIndex: 0, outputLength: 0 },
|
|
60
|
-
...
|
|
2548
|
+
...e.sourceMap,
|
|
61
2549
|
{
|
|
62
2550
|
inputIndex: Number.MAX_SAFE_INTEGER,
|
|
63
2551
|
inputLength: 0,
|
|
@@ -65,35 +2553,35 @@ function* y(u) {
|
|
|
65
2553
|
outputLength: 0
|
|
66
2554
|
}
|
|
67
2555
|
];
|
|
68
|
-
for (const [
|
|
69
|
-
for (let
|
|
70
|
-
if (
|
|
2556
|
+
for (const [s, u] of o.entries())
|
|
2557
|
+
for (let f = !1; !f; ) {
|
|
2558
|
+
if (a === void 0)
|
|
71
2559
|
return;
|
|
72
|
-
let { position:
|
|
73
|
-
switch (
|
|
2560
|
+
let { position: d } = a, c, g, m, E;
|
|
2561
|
+
switch (n) {
|
|
74
2562
|
case "looking_for_start_segment": {
|
|
75
|
-
const
|
|
76
|
-
|
|
2563
|
+
const X = o[s + 1];
|
|
2564
|
+
X !== void 0 && X.outputIndex + X.outputLength <= d.start ? f = !0 : (t = s, n = "looking_for_stop_segment");
|
|
77
2565
|
break;
|
|
78
2566
|
}
|
|
79
2567
|
case "looking_for_stop_segment": {
|
|
80
|
-
if (
|
|
81
|
-
|
|
2568
|
+
if (u.outputIndex < d.stop)
|
|
2569
|
+
f = !0;
|
|
82
2570
|
else {
|
|
83
|
-
const
|
|
84
|
-
let
|
|
85
|
-
for (let
|
|
86
|
-
|
|
87
|
-
for (let
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
if (
|
|
91
|
-
let
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
2571
|
+
const X = o[t], P = s, I = u;
|
|
2572
|
+
let h = d.start < X.outputIndex + X.outputLength ? t : t + 1, v = d.stop > I.outputIndex ? P : P - 1;
|
|
2573
|
+
for (let U = !0; U; ) {
|
|
2574
|
+
U = !1, c = void 0, g = void 0, m = void 0, E = void 0;
|
|
2575
|
+
for (let Q = h; Q <= v; Q++) {
|
|
2576
|
+
const _ = o[Q].matchingSegmentIndex;
|
|
2577
|
+
if (_ !== void 0) {
|
|
2578
|
+
if (_ + 1 < h) {
|
|
2579
|
+
let k = !1;
|
|
2580
|
+
const N = o[_ + 1];
|
|
2581
|
+
if (N.openingTag !== void 0 && N.outputIndex + N.outputLength < d.start) {
|
|
2582
|
+
const z = N.openingTag.match(ve);
|
|
2583
|
+
if (z !== null) {
|
|
2584
|
+
const q = z[1], K = q.toUpperCase();
|
|
97
2585
|
[
|
|
98
2586
|
"B",
|
|
99
2587
|
"EM",
|
|
@@ -102,24 +2590,24 @@ function* y(u) {
|
|
|
102
2590
|
"STRONG",
|
|
103
2591
|
"SUB",
|
|
104
2592
|
"SUP"
|
|
105
|
-
].includes(
|
|
2593
|
+
].includes(K) && (m = `${m ?? ""}</${q}>`, c = `${N.openingTag}${c ?? ""}`, k = !0);
|
|
106
2594
|
}
|
|
107
2595
|
}
|
|
108
|
-
if (!
|
|
109
|
-
|
|
110
|
-
start:
|
|
111
|
-
stop:
|
|
112
|
-
},
|
|
2596
|
+
if (!k) {
|
|
2597
|
+
c = void 0, m = void 0, h = _ + 1, d = {
|
|
2598
|
+
start: o[h].outputIndex,
|
|
2599
|
+
stop: d.stop
|
|
2600
|
+
}, U = !0;
|
|
113
2601
|
break;
|
|
114
2602
|
}
|
|
115
2603
|
}
|
|
116
|
-
if (
|
|
117
|
-
let
|
|
118
|
-
const
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
const
|
|
2604
|
+
if (_ + 1 > v) {
|
|
2605
|
+
let k = !1;
|
|
2606
|
+
const N = o[Q], z = o[_ + 1];
|
|
2607
|
+
if (N.openingTag !== void 0 && d.stop < z.outputIndex) {
|
|
2608
|
+
const q = N.openingTag.match(ve);
|
|
2609
|
+
if (q !== null) {
|
|
2610
|
+
const K = q[1], Tt = K.toUpperCase();
|
|
123
2611
|
[
|
|
124
2612
|
"B",
|
|
125
2613
|
"EM",
|
|
@@ -128,72 +2616,72 @@ function* y(u) {
|
|
|
128
2616
|
"STRONG",
|
|
129
2617
|
"SUB",
|
|
130
2618
|
"SUP"
|
|
131
|
-
].includes(
|
|
2619
|
+
].includes(Tt) && (g = `${g ?? ""}</${K}>`, E = `${N.openingTag}${E ?? ""}`, k = !0);
|
|
132
2620
|
}
|
|
133
2621
|
}
|
|
134
|
-
if (!
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
start:
|
|
139
|
-
stop:
|
|
140
|
-
},
|
|
2622
|
+
if (!k) {
|
|
2623
|
+
g = void 0, E = void 0, v = _ + 1;
|
|
2624
|
+
const q = o[v];
|
|
2625
|
+
d = {
|
|
2626
|
+
start: d.start,
|
|
2627
|
+
stop: q.outputIndex + q.outputLength
|
|
2628
|
+
}, U = !0;
|
|
141
2629
|
break;
|
|
142
2630
|
}
|
|
143
2631
|
}
|
|
144
2632
|
}
|
|
145
2633
|
}
|
|
146
2634
|
}
|
|
147
|
-
const
|
|
148
|
-
|
|
2635
|
+
const L = o[h - 1], A = L.inputIndex + L.inputLength + d.start - (L.outputIndex + L.outputLength), x = o[v], Et = x.inputIndex + x.inputLength + d.stop - (x.outputIndex + x.outputLength);
|
|
2636
|
+
a = yield Object.fromEntries(
|
|
149
2637
|
Object.entries({
|
|
150
|
-
innerPrefix: `${
|
|
151
|
-
innerSuffix: `${
|
|
152
|
-
outerPrefix: `${
|
|
153
|
-
outerSuffix: `${
|
|
2638
|
+
innerPrefix: `${c ?? ""}${a.innerPrefix ?? ""}` || void 0,
|
|
2639
|
+
innerSuffix: `${a.innerSuffix ?? ""}${g ?? ""}` || void 0,
|
|
2640
|
+
outerPrefix: `${a.outerPrefix ?? ""}${m ?? ""}` || void 0,
|
|
2641
|
+
outerSuffix: `${E ?? ""}${a.outerSuffix ?? ""}` || void 0,
|
|
154
2642
|
position: {
|
|
155
|
-
start:
|
|
156
|
-
stop:
|
|
2643
|
+
start: A,
|
|
2644
|
+
stop: Et
|
|
157
2645
|
}
|
|
158
|
-
}).filter(([,
|
|
159
|
-
),
|
|
2646
|
+
}).filter(([, U]) => U !== void 0)
|
|
2647
|
+
), n = "looking_for_start_segment";
|
|
160
2648
|
}
|
|
161
2649
|
break;
|
|
162
2650
|
}
|
|
163
2651
|
default:
|
|
164
|
-
|
|
2652
|
+
ae(
|
|
165
2653
|
"iterOriginalMergedPositionsFromTransformedUsingTransformationLeaf.state",
|
|
166
|
-
|
|
2654
|
+
n
|
|
167
2655
|
);
|
|
168
2656
|
}
|
|
169
2657
|
}
|
|
170
2658
|
}
|
|
171
|
-
function
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
2659
|
+
function rn(e, t) {
|
|
2660
|
+
const n = wi(e);
|
|
2661
|
+
return n.next({ start: 0, stop: 0 }), t.map((a) => {
|
|
2662
|
+
const o = n.next(a);
|
|
2663
|
+
if (o.done)
|
|
176
2664
|
throw new Error(
|
|
177
|
-
`Reverse transformation of position failed: ${
|
|
2665
|
+
`Reverse transformation of position failed: ${a}`
|
|
178
2666
|
);
|
|
179
|
-
return
|
|
2667
|
+
return o.value;
|
|
180
2668
|
});
|
|
181
2669
|
}
|
|
182
|
-
function
|
|
183
|
-
for (const { sourceMap:
|
|
184
|
-
|
|
2670
|
+
function un(e, t) {
|
|
2671
|
+
for (const { sourceMap: n } of [
|
|
2672
|
+
...Xe(e)
|
|
185
2673
|
].reverse())
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
2674
|
+
t = Mi(
|
|
2675
|
+
n,
|
|
2676
|
+
t
|
|
189
2677
|
);
|
|
190
|
-
return
|
|
2678
|
+
return t;
|
|
191
2679
|
}
|
|
192
|
-
function
|
|
193
|
-
const
|
|
194
|
-
|
|
2680
|
+
function Mi(e, t) {
|
|
2681
|
+
const n = [];
|
|
2682
|
+
e = [
|
|
195
2683
|
{ inputIndex: 0, inputLength: 0, outputIndex: 0, outputLength: 0 },
|
|
196
|
-
...
|
|
2684
|
+
...e,
|
|
197
2685
|
{
|
|
198
2686
|
inputIndex: Number.MAX_SAFE_INTEGER,
|
|
199
2687
|
inputLength: 0,
|
|
@@ -201,57 +2689,57 @@ function b(u, n) {
|
|
|
201
2689
|
outputLength: 0
|
|
202
2690
|
}
|
|
203
2691
|
];
|
|
204
|
-
let
|
|
205
|
-
for (const
|
|
206
|
-
let { start:
|
|
207
|
-
const { stop:
|
|
208
|
-
|
|
209
|
-
for (;
|
|
210
|
-
let
|
|
211
|
-
const
|
|
212
|
-
let
|
|
213
|
-
for (
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
for (let
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
start:
|
|
224
|
-
stop:
|
|
225
|
-
}),
|
|
226
|
-
for (let
|
|
227
|
-
|
|
228
|
-
continue
|
|
2692
|
+
let a = 0, o = e[a];
|
|
2693
|
+
for (const s of t) {
|
|
2694
|
+
let { start: u } = s;
|
|
2695
|
+
const { stop: f } = s;
|
|
2696
|
+
e: for (let d = !1; !d; ) {
|
|
2697
|
+
for (; o.outputIndex + o.outputLength <= u; a++, o = e[a]) ;
|
|
2698
|
+
let c = a;
|
|
2699
|
+
const g = e[c - 1];
|
|
2700
|
+
let m = g.inputIndex + g.inputLength + u - (g.outputIndex + g.outputLength), E;
|
|
2701
|
+
for (E = c - 1; e[E + 1].outputIndex < f; E++) ;
|
|
2702
|
+
const X = e[E];
|
|
2703
|
+
let P = X.inputIndex + X.inputLength + f - (X.outputIndex + X.outputLength);
|
|
2704
|
+
for (let I = c; I <= E; I++) {
|
|
2705
|
+
const h = e[I], v = h.matchingSegmentIndex;
|
|
2706
|
+
if (v !== void 0) {
|
|
2707
|
+
if (v + 1 < c) {
|
|
2708
|
+
const L = e[v + 1];
|
|
2709
|
+
if (L.outputIndex < u) {
|
|
2710
|
+
h.inputIndex > m && n.push({
|
|
2711
|
+
start: m,
|
|
2712
|
+
stop: h.inputIndex
|
|
2713
|
+
}), u = h.outputIndex + h.outputLength;
|
|
2714
|
+
for (let A = I, x = h; x.outputIndex + x.outputLength === u; A++, x = e[A])
|
|
2715
|
+
a = A;
|
|
2716
|
+
continue e;
|
|
229
2717
|
}
|
|
230
|
-
|
|
231
|
-
} else if (
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
234
|
-
|
|
235
|
-
start:
|
|
236
|
-
stop:
|
|
237
|
-
}),
|
|
238
|
-
for (let
|
|
239
|
-
|
|
240
|
-
continue
|
|
2718
|
+
c = v + 1, m = L.inputIndex;
|
|
2719
|
+
} else if (v + 1 > E) {
|
|
2720
|
+
const L = e[v + 1];
|
|
2721
|
+
if (L.outputIndex + L.outputLength > f) {
|
|
2722
|
+
h.inputIndex > m && n.push({
|
|
2723
|
+
start: m,
|
|
2724
|
+
stop: h.inputIndex
|
|
2725
|
+
}), u = h.outputIndex + h.outputLength;
|
|
2726
|
+
for (let A = I, x = h; x.outputIndex + x.outputLength === u; A++, x = e[A])
|
|
2727
|
+
a = A;
|
|
2728
|
+
continue e;
|
|
241
2729
|
}
|
|
242
|
-
|
|
2730
|
+
E = v + 1, P = L.inputIndex + L.inputLength;
|
|
243
2731
|
}
|
|
244
2732
|
}
|
|
245
2733
|
}
|
|
246
|
-
|
|
247
|
-
start:
|
|
248
|
-
stop:
|
|
249
|
-
}),
|
|
2734
|
+
n.push({
|
|
2735
|
+
start: m,
|
|
2736
|
+
stop: P
|
|
2737
|
+
}), d = !0;
|
|
250
2738
|
}
|
|
251
2739
|
}
|
|
252
|
-
return
|
|
2740
|
+
return n;
|
|
253
2741
|
}
|
|
254
|
-
const
|
|
2742
|
+
const _i = {
|
|
255
2743
|
amp: "&",
|
|
256
2744
|
apos: "'",
|
|
257
2745
|
asymp: "≈",
|
|
@@ -269,38 +2757,38 @@ const B = {
|
|
|
269
2757
|
reg: "®",
|
|
270
2758
|
trade: "™"
|
|
271
2759
|
};
|
|
272
|
-
function
|
|
273
|
-
removeAWithHref:
|
|
2760
|
+
function Fi({
|
|
2761
|
+
removeAWithHref: e
|
|
274
2762
|
} = {}) {
|
|
275
|
-
return (
|
|
276
|
-
let
|
|
277
|
-
const
|
|
278
|
-
for (;
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
return
|
|
282
|
-
input:
|
|
283
|
-
output:
|
|
284
|
-
sourceMap:
|
|
285
|
-
title:
|
|
2763
|
+
return (t) => {
|
|
2764
|
+
let n = 0, a = 0, o = [], s = [];
|
|
2765
|
+
const u = [], f = "Conversion des éléments HTML en texte";
|
|
2766
|
+
for (; n < t.length; ) {
|
|
2767
|
+
const d = t.indexOf("<", n);
|
|
2768
|
+
if (d === -1)
|
|
2769
|
+
return o.push(t.slice(n).replace(/[\n\r]/g, " ")), {
|
|
2770
|
+
input: t,
|
|
2771
|
+
output: o.join(""),
|
|
2772
|
+
sourceMap: s,
|
|
2773
|
+
title: f
|
|
286
2774
|
};
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
-
return
|
|
290
|
-
input:
|
|
291
|
-
output:
|
|
292
|
-
sourceMap:
|
|
293
|
-
title:
|
|
2775
|
+
const c = t.indexOf(">", d);
|
|
2776
|
+
if (c === -1)
|
|
2777
|
+
return o.push(t.slice(n).replace(/[\n\r]/g, " ")), {
|
|
2778
|
+
input: t,
|
|
2779
|
+
output: o.join(""),
|
|
2780
|
+
sourceMap: s,
|
|
2781
|
+
title: f
|
|
294
2782
|
};
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
),
|
|
2783
|
+
const g = t.slice(d, c + 1), m = g.startsWith("</"), E = g.length, X = g.match(ve);
|
|
2784
|
+
if (X === null) {
|
|
2785
|
+
o.push(
|
|
2786
|
+
t.slice(n, c + 1).replace(/[\n\r]/g, " ")
|
|
2787
|
+
), n = c + 1;
|
|
300
2788
|
continue;
|
|
301
2789
|
}
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
2790
|
+
const I = X[1].toUpperCase();
|
|
2791
|
+
if (g.endsWith("/>") || [
|
|
304
2792
|
"!DOCTYPE",
|
|
305
2793
|
"?XML",
|
|
306
2794
|
"AREA",
|
|
@@ -317,100 +2805,100 @@ function k({
|
|
|
317
2805
|
"SOURCE",
|
|
318
2806
|
"TRACK",
|
|
319
2807
|
"WBR"
|
|
320
|
-
].includes(
|
|
321
|
-
if (
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
),
|
|
325
|
-
inputIndex:
|
|
326
|
-
inputLength:
|
|
327
|
-
outputIndex:
|
|
2808
|
+
].includes(I))
|
|
2809
|
+
if (m)
|
|
2810
|
+
d > n && o.push(
|
|
2811
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2812
|
+
), s.push({
|
|
2813
|
+
inputIndex: d,
|
|
2814
|
+
inputLength: E,
|
|
2815
|
+
outputIndex: d + a,
|
|
328
2816
|
outputLength: 0
|
|
329
|
-
}),
|
|
330
|
-
else if (["BR", "HR"].includes(
|
|
331
|
-
|
|
332
|
-
|
|
2817
|
+
}), a -= E;
|
|
2818
|
+
else if (["BR", "HR"].includes(I)) {
|
|
2819
|
+
d > n && o.push(
|
|
2820
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
333
2821
|
);
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
`),
|
|
337
|
-
inputIndex:
|
|
338
|
-
inputLength:
|
|
339
|
-
openingTag:
|
|
340
|
-
outputIndex:
|
|
2822
|
+
const v = c + 1 - d;
|
|
2823
|
+
o.push(`
|
|
2824
|
+
`), s.push({
|
|
2825
|
+
inputIndex: d,
|
|
2826
|
+
inputLength: v,
|
|
2827
|
+
openingTag: g,
|
|
2828
|
+
outputIndex: d + a,
|
|
341
2829
|
outputLength: 1
|
|
342
|
-
}),
|
|
343
|
-
} else ["!DOCTYPE", "?XML", "COL", "IMG", "INPUT"].includes(
|
|
344
|
-
|
|
345
|
-
),
|
|
346
|
-
inputIndex:
|
|
347
|
-
inputLength:
|
|
348
|
-
openingTag:
|
|
349
|
-
outputIndex:
|
|
2830
|
+
}), a += 1 - v;
|
|
2831
|
+
} else ["!DOCTYPE", "?XML", "COL", "IMG", "INPUT"].includes(I) ? (d > n && o.push(
|
|
2832
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2833
|
+
), s.push({
|
|
2834
|
+
inputIndex: d,
|
|
2835
|
+
inputLength: E,
|
|
2836
|
+
openingTag: g,
|
|
2837
|
+
outputIndex: d + a,
|
|
350
2838
|
outputLength: 0
|
|
351
|
-
}),
|
|
352
|
-
|
|
2839
|
+
}), a -= E) : o.push(
|
|
2840
|
+
t.slice(n, c + 1).replace(/[\n\r]/g, " ")
|
|
353
2841
|
);
|
|
354
|
-
else if (
|
|
355
|
-
const
|
|
356
|
-
if (
|
|
357
|
-
switch (
|
|
2842
|
+
else if (m) {
|
|
2843
|
+
const v = u.at(-1);
|
|
2844
|
+
if (I === v?.name)
|
|
2845
|
+
switch (u.pop(), v.action) {
|
|
358
2846
|
case void 0: {
|
|
359
|
-
|
|
360
|
-
|
|
2847
|
+
o.push(
|
|
2848
|
+
t.slice(n, c + 1).replace(/[\n\r]/g, " ")
|
|
361
2849
|
);
|
|
362
2850
|
break;
|
|
363
2851
|
}
|
|
364
2852
|
case "ignore": {
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
inputIndex:
|
|
369
|
-
inputLength:
|
|
370
|
-
outputIndex:
|
|
2853
|
+
o = v.outputFragments, a = v.outputOffset, s = v.sourceMap;
|
|
2854
|
+
const L = c + 1 - v.inputIndex;
|
|
2855
|
+
s.push({
|
|
2856
|
+
inputIndex: v.inputIndex,
|
|
2857
|
+
inputLength: L,
|
|
2858
|
+
outputIndex: v.inputIndex + a,
|
|
371
2859
|
outputLength: 0
|
|
372
|
-
}),
|
|
2860
|
+
}), a = a - L;
|
|
373
2861
|
break;
|
|
374
2862
|
}
|
|
375
2863
|
case "keep_content": {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
),
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
inputIndex:
|
|
382
|
-
inputLength:
|
|
383
|
-
matchingSegmentIndex:
|
|
384
|
-
outputIndex:
|
|
385
|
-
outputLength:
|
|
386
|
-
}),
|
|
2864
|
+
o.push(
|
|
2865
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2866
|
+
), v.closingTagReplacement.length !== 0 && o.push(v.closingTagReplacement);
|
|
2867
|
+
const L = c + 1 - d;
|
|
2868
|
+
s[v.openingSegmentIndex].matchingSegmentIndex = s.length, s.push({
|
|
2869
|
+
inputIndex: d,
|
|
2870
|
+
inputLength: L,
|
|
2871
|
+
matchingSegmentIndex: v.openingSegmentIndex,
|
|
2872
|
+
outputIndex: d + a,
|
|
2873
|
+
outputLength: v.closingTagReplacement.length
|
|
2874
|
+
}), a += v.closingTagReplacement.length - L;
|
|
387
2875
|
break;
|
|
388
2876
|
}
|
|
389
2877
|
default:
|
|
390
|
-
|
|
2878
|
+
ae("TagInfos.action", v);
|
|
391
2879
|
}
|
|
392
2880
|
else
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
),
|
|
396
|
-
inputIndex:
|
|
397
|
-
inputLength:
|
|
398
|
-
outputIndex:
|
|
2881
|
+
d > n && o.push(
|
|
2882
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2883
|
+
), s.push({
|
|
2884
|
+
inputIndex: d,
|
|
2885
|
+
inputLength: E,
|
|
2886
|
+
outputIndex: d + a,
|
|
399
2887
|
outputLength: 0
|
|
400
|
-
}),
|
|
401
|
-
} else if (["COLGROUP", "HEAD", "SCRIPT", "STYLE"].includes(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
),
|
|
2888
|
+
}), a -= E;
|
|
2889
|
+
} else if (["COLGROUP", "HEAD", "SCRIPT", "STYLE"].includes(I) || e && I === "A" && / href=/i.test(g))
|
|
2890
|
+
d > n && o.push(
|
|
2891
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2892
|
+
), u.push({
|
|
405
2893
|
action: "ignore",
|
|
406
|
-
inputIndex:
|
|
407
|
-
name:
|
|
2894
|
+
inputIndex: d,
|
|
2895
|
+
name: I,
|
|
408
2896
|
// Backup outputFragments, outputOffset & sourceMap, because
|
|
409
2897
|
// every changes made inside ignored element will be ignored.
|
|
410
|
-
outputFragments:
|
|
411
|
-
outputOffset:
|
|
412
|
-
sourceMap:
|
|
413
|
-
}),
|
|
2898
|
+
outputFragments: o,
|
|
2899
|
+
outputOffset: a,
|
|
2900
|
+
sourceMap: s
|
|
2901
|
+
}), o = [], s = [];
|
|
414
2902
|
else if ([
|
|
415
2903
|
"A",
|
|
416
2904
|
// When removeAWithHref is false or no href
|
|
@@ -430,22 +2918,22 @@ function k({
|
|
|
430
2918
|
"THEAD",
|
|
431
2919
|
"TR",
|
|
432
2920
|
"UL"
|
|
433
|
-
].includes(
|
|
434
|
-
|
|
435
|
-
|
|
2921
|
+
].includes(I)) {
|
|
2922
|
+
d > n && o.push(
|
|
2923
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
436
2924
|
);
|
|
437
|
-
const
|
|
438
|
-
|
|
439
|
-
inputIndex:
|
|
440
|
-
inputLength:
|
|
441
|
-
openingTag:
|
|
442
|
-
outputIndex:
|
|
2925
|
+
const v = s.length;
|
|
2926
|
+
s.push({
|
|
2927
|
+
inputIndex: d,
|
|
2928
|
+
inputLength: E,
|
|
2929
|
+
openingTag: g,
|
|
2930
|
+
outputIndex: d + a,
|
|
443
2931
|
outputLength: 0
|
|
444
|
-
}),
|
|
2932
|
+
}), a -= E, u.push({
|
|
445
2933
|
action: "keep_content",
|
|
446
2934
|
closingTagReplacement: "",
|
|
447
|
-
name:
|
|
448
|
-
openingSegmentIndex:
|
|
2935
|
+
name: I,
|
|
2936
|
+
openingSegmentIndex: v
|
|
449
2937
|
});
|
|
450
2938
|
} else if ([
|
|
451
2939
|
"CAPTION",
|
|
@@ -463,115 +2951,115 @@ function k({
|
|
|
463
2951
|
"P",
|
|
464
2952
|
"TD",
|
|
465
2953
|
"TH"
|
|
466
|
-
].includes(
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
),
|
|
2954
|
+
].includes(I)) {
|
|
2955
|
+
d > n && o.push(
|
|
2956
|
+
t.slice(n, d).replace(/[\n\r]/g, " ")
|
|
2957
|
+
), o.push(`
|
|
470
2958
|
`);
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
inputIndex:
|
|
474
|
-
inputLength:
|
|
475
|
-
openingTag:
|
|
476
|
-
outputIndex:
|
|
2959
|
+
const v = s.length;
|
|
2960
|
+
s.push({
|
|
2961
|
+
inputIndex: d,
|
|
2962
|
+
inputLength: E,
|
|
2963
|
+
openingTag: g,
|
|
2964
|
+
outputIndex: d + a,
|
|
477
2965
|
outputLength: 1
|
|
478
|
-
}),
|
|
2966
|
+
}), a += 1 - E, u.push({
|
|
479
2967
|
action: "keep_content",
|
|
480
2968
|
closingTagReplacement: `
|
|
481
2969
|
`,
|
|
482
|
-
name:
|
|
483
|
-
openingSegmentIndex:
|
|
2970
|
+
name: I,
|
|
2971
|
+
openingSegmentIndex: v
|
|
484
2972
|
});
|
|
485
2973
|
} else
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
),
|
|
489
|
-
name:
|
|
2974
|
+
o.push(
|
|
2975
|
+
t.slice(n, c + 1).replace(/[\n\r]/g, " ")
|
|
2976
|
+
), u.push({
|
|
2977
|
+
name: I
|
|
490
2978
|
});
|
|
491
|
-
|
|
2979
|
+
n = c + 1;
|
|
492
2980
|
}
|
|
493
2981
|
return {
|
|
494
|
-
input:
|
|
495
|
-
output:
|
|
496
|
-
sourceMap:
|
|
497
|
-
title:
|
|
2982
|
+
input: t,
|
|
2983
|
+
output: o.join(""),
|
|
2984
|
+
sourceMap: s,
|
|
2985
|
+
title: f
|
|
498
2986
|
};
|
|
499
2987
|
};
|
|
500
2988
|
}
|
|
501
|
-
function
|
|
502
|
-
let
|
|
503
|
-
const
|
|
2989
|
+
function Ui(e) {
|
|
2990
|
+
let t = 0;
|
|
2991
|
+
const n = [], a = e.replace(
|
|
504
2992
|
/&(amp|apos|asymp|copy|deg|euro|gt|lt|mdash|nbsp|ndash|ne|pound|quot|reg|trade);/gi,
|
|
505
|
-
(
|
|
506
|
-
const
|
|
507
|
-
return
|
|
508
|
-
inputIndex:
|
|
509
|
-
inputLength:
|
|
510
|
-
outputIndex:
|
|
511
|
-
outputLength:
|
|
512
|
-
}),
|
|
2993
|
+
(o, s, u) => {
|
|
2994
|
+
const f = _i[s.toLowerCase()];
|
|
2995
|
+
return n.push({
|
|
2996
|
+
inputIndex: u,
|
|
2997
|
+
inputLength: o.length,
|
|
2998
|
+
outputIndex: u + t,
|
|
2999
|
+
outputLength: f.length
|
|
3000
|
+
}), t += f.length - o.length, f;
|
|
513
3001
|
}
|
|
514
3002
|
);
|
|
515
3003
|
return {
|
|
516
|
-
input:
|
|
517
|
-
output:
|
|
518
|
-
sourceMap:
|
|
3004
|
+
input: e,
|
|
3005
|
+
output: a,
|
|
3006
|
+
sourceMap: n,
|
|
519
3007
|
title: "Décodage des entités HTML nommées"
|
|
520
3008
|
};
|
|
521
3009
|
}
|
|
522
|
-
function
|
|
523
|
-
let
|
|
524
|
-
const
|
|
3010
|
+
function Bi(e) {
|
|
3011
|
+
let t = 0;
|
|
3012
|
+
const n = [], a = e.replace(
|
|
525
3013
|
/&#(?:(\d+)|x([0-9A-F]+));/gi,
|
|
526
|
-
(
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
),
|
|
531
|
-
return
|
|
532
|
-
inputIndex:
|
|
533
|
-
inputLength:
|
|
534
|
-
outputIndex:
|
|
535
|
-
outputLength:
|
|
536
|
-
}),
|
|
3014
|
+
(o, s, u, f) => {
|
|
3015
|
+
const d = parseInt(
|
|
3016
|
+
s ?? u,
|
|
3017
|
+
s === void 0 ? 16 : 10
|
|
3018
|
+
), c = String.fromCharCode(d);
|
|
3019
|
+
return n.push({
|
|
3020
|
+
inputIndex: f,
|
|
3021
|
+
inputLength: o.length,
|
|
3022
|
+
outputIndex: f + t,
|
|
3023
|
+
outputLength: c.length
|
|
3024
|
+
}), t += c.length - o.length, c;
|
|
537
3025
|
}
|
|
538
3026
|
);
|
|
539
3027
|
return {
|
|
540
|
-
input:
|
|
541
|
-
output:
|
|
542
|
-
sourceMap:
|
|
3028
|
+
input: e,
|
|
3029
|
+
output: a,
|
|
3030
|
+
sourceMap: n,
|
|
543
3031
|
title: "Décodage des entités HTML numériques"
|
|
544
3032
|
};
|
|
545
3033
|
}
|
|
546
|
-
function
|
|
547
|
-
return (
|
|
548
|
-
const
|
|
549
|
-
const
|
|
550
|
-
let
|
|
551
|
-
for (const [
|
|
552
|
-
|
|
553
|
-
return
|
|
554
|
-
inputIndex:
|
|
555
|
-
inputLength:
|
|
3034
|
+
function ji(e, t) {
|
|
3035
|
+
return (n) => {
|
|
3036
|
+
const a = [], o = n.replaceAll(e, (u, ...f) => {
|
|
3037
|
+
const d = f.at(-2);
|
|
3038
|
+
let c = t;
|
|
3039
|
+
for (const [g, m] of f.slice(0, -2).entries())
|
|
3040
|
+
c = c.replaceAll(`$${g + 1}`, m);
|
|
3041
|
+
return a.push({
|
|
3042
|
+
inputIndex: d,
|
|
3043
|
+
inputLength: u.length,
|
|
556
3044
|
// Note: `outputIndex` is added below.
|
|
557
|
-
outputLength:
|
|
558
|
-
}),
|
|
3045
|
+
outputLength: c.length
|
|
3046
|
+
}), c;
|
|
559
3047
|
});
|
|
560
|
-
let
|
|
561
|
-
for (const
|
|
562
|
-
|
|
3048
|
+
let s = 0;
|
|
3049
|
+
for (const u of a)
|
|
3050
|
+
u.outputIndex = u.inputIndex + s, s += u.outputLength - u.inputLength;
|
|
563
3051
|
return {
|
|
564
|
-
input:
|
|
565
|
-
output:
|
|
566
|
-
sourceMap:
|
|
567
|
-
title: `Remplacement de ${
|
|
3052
|
+
input: n,
|
|
3053
|
+
output: o,
|
|
3054
|
+
sourceMap: a,
|
|
3055
|
+
title: `Remplacement de ${e} par ${JSON.stringify(t)}`
|
|
568
3056
|
};
|
|
569
3057
|
};
|
|
570
3058
|
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
let
|
|
574
|
-
for (const [
|
|
3059
|
+
function ki(e) {
|
|
3060
|
+
const t = [];
|
|
3061
|
+
let n = e;
|
|
3062
|
+
for (const [a, o] of [
|
|
575
3063
|
// Note: The most englobing patterns must be first.
|
|
576
3064
|
// Remove HTML comment.
|
|
577
3065
|
[/<!--.*?-->/gs, ""],
|
|
@@ -581,6 +3069,9 @@ function X(u) {
|
|
|
581
3069
|
[/<style.*?>.*?<\/style>/gis, ""],
|
|
582
3070
|
// Ensure that there is always a space after "n°".
|
|
583
3071
|
[/(\sn°)([^\s])/gi, "$1 $2"],
|
|
3072
|
+
// \u200E: left-to-right mark
|
|
3073
|
+
// \u200E: right-to-left mark
|
|
3074
|
+
[/[\u200E\u200F]/g, ""],
|
|
584
3075
|
// Remove Sénat "pastillage":
|
|
585
3076
|
// - \uF04B-\uF054 are circled numbers 0-9.
|
|
586
3077
|
// - \uF031-\uF039 are left-half circled numbers 1-9.
|
|
@@ -588,32 +3079,32 @@ function X(u) {
|
|
|
588
3079
|
// - \uF061-\uF06A are right-half circled numbers 0-9.
|
|
589
3080
|
[/[\uF031-\uF039\uF041-\uF054\uF061-\uF06A]/g, ""]
|
|
590
3081
|
]) {
|
|
591
|
-
const
|
|
592
|
-
|
|
3082
|
+
const s = ji(a, o)(n);
|
|
3083
|
+
s.sourceMap.length !== 0 && (t.push(s), n = s.output);
|
|
593
3084
|
}
|
|
594
3085
|
return {
|
|
595
|
-
input:
|
|
596
|
-
output:
|
|
3086
|
+
input: e,
|
|
3087
|
+
output: n,
|
|
597
3088
|
title: "Suppression des commentaires, scripts et styles HTML et nettoyage d'expressions",
|
|
598
|
-
transformations:
|
|
3089
|
+
transformations: t
|
|
599
3090
|
};
|
|
600
3091
|
}
|
|
601
|
-
function
|
|
602
|
-
removeAWithHref:
|
|
3092
|
+
function dn({
|
|
3093
|
+
removeAWithHref: e
|
|
603
3094
|
} = {}) {
|
|
604
|
-
return (
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
])(
|
|
3095
|
+
return (t) => qi("Simplification du HTML", [
|
|
3096
|
+
Ui,
|
|
3097
|
+
Bi,
|
|
3098
|
+
ki,
|
|
3099
|
+
Hi,
|
|
3100
|
+
Fi({ removeAWithHref: e }),
|
|
3101
|
+
zi
|
|
3102
|
+
])(t);
|
|
612
3103
|
}
|
|
613
|
-
function
|
|
614
|
-
const
|
|
615
|
-
let
|
|
616
|
-
for (const [
|
|
3104
|
+
function zi(e) {
|
|
3105
|
+
const t = [];
|
|
3106
|
+
let n = e;
|
|
3107
|
+
for (const [a, o, s] of [
|
|
617
3108
|
["Remplacement des espaces multiples par une espace unique", / +/g, " "],
|
|
618
3109
|
["Suppression d'une espace en début de ligne", /^ /gm, ""],
|
|
619
3110
|
["Suppression d'une espace en fin de ligne", / $/gm, ""],
|
|
@@ -626,41 +3117,41 @@ function Y(u) {
|
|
|
626
3117
|
["Suppression d'un saut de ligne en début de texte", /^\n/g, ""],
|
|
627
3118
|
["Suppression d'un saut de ligne en fin de texte", /\n$/g, ""]
|
|
628
3119
|
]) {
|
|
629
|
-
let
|
|
630
|
-
const
|
|
631
|
-
const
|
|
632
|
-
let
|
|
633
|
-
for (const [
|
|
634
|
-
|
|
635
|
-
return
|
|
636
|
-
inputIndex:
|
|
637
|
-
inputLength:
|
|
638
|
-
outputIndex:
|
|
639
|
-
outputLength:
|
|
640
|
-
}),
|
|
3120
|
+
let u = 0;
|
|
3121
|
+
const f = [], d = n.replaceAll(o, (c, ...g) => {
|
|
3122
|
+
const m = g.at(-2);
|
|
3123
|
+
let E = s;
|
|
3124
|
+
for (const [X, P] of g.slice(0, -2).entries())
|
|
3125
|
+
E = E.replaceAll(`$${X + 1}`, P);
|
|
3126
|
+
return f.push({
|
|
3127
|
+
inputIndex: m,
|
|
3128
|
+
inputLength: c.length,
|
|
3129
|
+
outputIndex: m + u,
|
|
3130
|
+
outputLength: E.length
|
|
3131
|
+
}), u += E.length - c.length, E;
|
|
641
3132
|
});
|
|
642
|
-
|
|
643
|
-
input:
|
|
644
|
-
output:
|
|
645
|
-
sourceMap:
|
|
646
|
-
title:
|
|
647
|
-
}),
|
|
3133
|
+
f.length !== 0 && (t.push({
|
|
3134
|
+
input: n,
|
|
3135
|
+
output: d,
|
|
3136
|
+
sourceMap: f,
|
|
3137
|
+
title: a
|
|
3138
|
+
}), n = d);
|
|
648
3139
|
}
|
|
649
3140
|
return {
|
|
650
|
-
input:
|
|
651
|
-
output:
|
|
3141
|
+
input: e,
|
|
3142
|
+
output: n,
|
|
652
3143
|
title: "Simplification du texte",
|
|
653
|
-
transformations:
|
|
3144
|
+
transformations: t
|
|
654
3145
|
};
|
|
655
3146
|
}
|
|
656
|
-
function
|
|
657
|
-
const
|
|
658
|
-
let
|
|
659
|
-
for (const [
|
|
3147
|
+
function Hi(e) {
|
|
3148
|
+
const t = [];
|
|
3149
|
+
let n = e;
|
|
3150
|
+
for (const [o, s] of [
|
|
660
3151
|
// Replace U+00A0 (no-break space) and tab with a normal space.
|
|
661
3152
|
[/[ \t]/g, " "],
|
|
662
|
-
// Replace three non-ASCII dashes (U+2010, U+2011 et U+
|
|
663
|
-
[/[
|
|
3153
|
+
// Replace three non-ASCII dashes (U+2010, U+2011, U+2013 et U+00B7) with a minus sign.
|
|
3154
|
+
[/[‐‑–·]/g, "-"],
|
|
664
3155
|
// Replace non-ASCII apostrophe.
|
|
665
3156
|
[/’/g, "'"],
|
|
666
3157
|
// Replace İ (I with a point) with normal I.
|
|
@@ -669,39 +3160,144 @@ function j(u) {
|
|
|
669
3160
|
// But Légifrance uses a classic I…
|
|
670
3161
|
["İ", "I"]
|
|
671
3162
|
])
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
inputIndex:
|
|
3163
|
+
n = n.replaceAll(o, (u, ...f) => {
|
|
3164
|
+
const d = f.at(-2), c = {
|
|
3165
|
+
inputIndex: d,
|
|
675
3166
|
inputLength: 1,
|
|
676
|
-
outputIndex:
|
|
3167
|
+
outputIndex: d,
|
|
677
3168
|
// Note: `outputIndex` is added below.
|
|
678
3169
|
outputLength: 1
|
|
679
|
-
},
|
|
680
|
-
(
|
|
3170
|
+
}, g = t.findIndex(
|
|
3171
|
+
(m) => m.inputIndex > d
|
|
681
3172
|
);
|
|
682
|
-
return
|
|
3173
|
+
return g === -1 ? t.push(c) : t.splice(g, 0, c), s;
|
|
683
3174
|
});
|
|
684
|
-
let
|
|
685
|
-
for (const
|
|
686
|
-
|
|
3175
|
+
let a = 0;
|
|
3176
|
+
for (const o of t)
|
|
3177
|
+
o.outputIndex = o.inputIndex + a, a += o.outputLength - o.inputLength;
|
|
687
3178
|
return {
|
|
688
|
-
input:
|
|
689
|
-
output:
|
|
690
|
-
sourceMap:
|
|
3179
|
+
input: e,
|
|
3180
|
+
output: n,
|
|
3181
|
+
sourceMap: t,
|
|
691
3182
|
title: "Simplification des caractères unicodes"
|
|
692
3183
|
};
|
|
693
3184
|
}
|
|
3185
|
+
function cn(e, t = !1) {
|
|
3186
|
+
if (e === void 0)
|
|
3187
|
+
return;
|
|
3188
|
+
const n = t ? /[&"<]/g : /[&<]/g;
|
|
3189
|
+
n.lastIndex = 0;
|
|
3190
|
+
let a = "", o = 0;
|
|
3191
|
+
for (; n.test(e); ) {
|
|
3192
|
+
const s = n.lastIndex - 1, u = e[s];
|
|
3193
|
+
a += e.substring(o, s) + (u === "&" ? "&" : u === '"' ? """ : "<"), o = s + 1;
|
|
3194
|
+
}
|
|
3195
|
+
return a + e.substring(o);
|
|
3196
|
+
}
|
|
694
3197
|
export {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
D as
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
3198
|
+
Ct as TextParserContext,
|
|
3199
|
+
je as action,
|
|
3200
|
+
D as addChildLeftToLastChild,
|
|
3201
|
+
qt as adjectifNumeralOrdinalCourt,
|
|
3202
|
+
le as adverbeMultiplicatifLatin,
|
|
3203
|
+
Ie as adverbeRelatif,
|
|
3204
|
+
r as alternatives,
|
|
3205
|
+
ii as article,
|
|
3206
|
+
ei as articles,
|
|
3207
|
+
at as auPortion,
|
|
3208
|
+
st as auxPortions,
|
|
3209
|
+
l as chain,
|
|
3210
|
+
qi as chainTransformers,
|
|
3211
|
+
F as citation,
|
|
3212
|
+
yt as citationLigne,
|
|
3213
|
+
xt as citationSimple,
|
|
3214
|
+
Qi as compoundReferencesSeparators,
|
|
3215
|
+
O as convert,
|
|
3216
|
+
Fi as convertHtmlElementsToText,
|
|
3217
|
+
$ as createEnumerationOrBoundedInterval,
|
|
3218
|
+
se as createParentChildTreeFromReferences,
|
|
3219
|
+
oi as date,
|
|
3220
|
+
Ui as decodeNamedHtmlEntities,
|
|
3221
|
+
Bi as decodeNumericHtmlEntities,
|
|
3222
|
+
sn as definitionArticle,
|
|
3223
|
+
on as definitionDivision,
|
|
3224
|
+
ie as designationArticle,
|
|
3225
|
+
Ee as designationDivision,
|
|
3226
|
+
me as ditPluriel,
|
|
3227
|
+
ue as ditSingulier,
|
|
3228
|
+
ui as division,
|
|
3229
|
+
At as divisionTypes,
|
|
3230
|
+
pi as divisions,
|
|
3231
|
+
Oe as duDate,
|
|
3232
|
+
cn as escapeHtml,
|
|
3233
|
+
T as espace,
|
|
3234
|
+
ge as espaceAdverbeRelatif,
|
|
3235
|
+
bt as europeanLawNatures,
|
|
3236
|
+
Vi as formatLongDate,
|
|
3237
|
+
St as frenchLawNatures,
|
|
3238
|
+
yi as identificationTexteEuropeen,
|
|
3239
|
+
Dt as internationalLawNatures,
|
|
3240
|
+
Ve as introPluriel,
|
|
3241
|
+
We as introSingulier,
|
|
3242
|
+
Rt as isTextAstAtomicReference,
|
|
3243
|
+
tn as isTextAstDivision,
|
|
3244
|
+
nn as isTextAstPortion,
|
|
3245
|
+
C as iterAtomicFirstParentReferences,
|
|
3246
|
+
B as iterAtomicOrParentChildReferences,
|
|
3247
|
+
y as iterAtomicReferences,
|
|
3248
|
+
Wi as iterCardinalNumeralFormsFromNumber,
|
|
3249
|
+
w as iterIncludedReferences,
|
|
3250
|
+
Ji as iterLatinMultiplicativeAdverbsFromNumber,
|
|
3251
|
+
Yi as iterOrdinalNumeralFormsFromNumber,
|
|
3252
|
+
wi as iterOriginalMergedPositionsFromTransformed,
|
|
3253
|
+
Ki as lawNatures,
|
|
3254
|
+
Ot as lettreAsciiMinuscule,
|
|
3255
|
+
Je as liaisonPluriel,
|
|
3256
|
+
re as liaisonSingulier,
|
|
3257
|
+
Qt as listeArticles,
|
|
3258
|
+
en as localizationAdverbs,
|
|
3259
|
+
V as natureDivisionSingulier,
|
|
3260
|
+
Jt as nomArticle,
|
|
3261
|
+
ot as nomSpecialArticle,
|
|
3262
|
+
Pt as nombreAsTextAstNumber,
|
|
3263
|
+
fe as nombreCardinal,
|
|
3264
|
+
wt as nombreRomainCardinal,
|
|
3265
|
+
an as nombreRomainOrdinal,
|
|
3266
|
+
$t as nombreRomainOu0iAsTextAstNumber,
|
|
3267
|
+
Xt as nonLettre,
|
|
3268
|
+
ne as numberFromRomanNumeral,
|
|
3269
|
+
Be as numero,
|
|
3270
|
+
ut as numeroDivision,
|
|
3271
|
+
qe as numeroEtOuDateTexteFrancais,
|
|
3272
|
+
kt as numeroPortion,
|
|
3273
|
+
Gi as numeroTexteEuropeen,
|
|
3274
|
+
Ci as numeroTexteFrancais,
|
|
3275
|
+
p as optional,
|
|
3276
|
+
Lt as ordinalNumeralFromNumber,
|
|
3277
|
+
rn as originalMergedPositionsFromTransformed,
|
|
3278
|
+
un as originalSplitPositionsFromTransformed,
|
|
3279
|
+
Zi as parseText,
|
|
3280
|
+
Nt as portionTypes,
|
|
3281
|
+
nt as portions,
|
|
3282
|
+
ln as reference,
|
|
3283
|
+
i as regExp,
|
|
3284
|
+
he as relatifPlurielPrepose,
|
|
3285
|
+
Le as relatifSingulierPrepose,
|
|
3286
|
+
G as repeat,
|
|
3287
|
+
ji as replacePattern,
|
|
3288
|
+
ki as replacePatterns,
|
|
3289
|
+
Fe as romanNumeralFromNumber,
|
|
3290
|
+
dn as simplifyHtml,
|
|
3291
|
+
zi as simplifyText,
|
|
3292
|
+
Hi as simplifyUnicodeCharacters,
|
|
3293
|
+
xi as texte,
|
|
3294
|
+
$e as texteEuropeen,
|
|
3295
|
+
we as texteFrancais,
|
|
3296
|
+
Me as texteInternational,
|
|
3297
|
+
Qe as unePortion,
|
|
3298
|
+
ft as uniteBasePreciseeSingulier,
|
|
3299
|
+
Te as uniteBaseSingulier,
|
|
3300
|
+
b as variable,
|
|
3301
|
+
S as virguleOuEspace,
|
|
3302
|
+
ye as wordsTree
|
|
707
3303
|
};
|