@leemour/cli-messaging 0.145.0 → 0.147.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES +34 -0
  3. package/dist/background/units.d.ts +1 -0
  4. package/dist/background/units.d.ts.map +1 -1
  5. package/dist/background/units.js +9 -0
  6. package/dist/background/units.js.map +1 -1
  7. package/dist/cli/bot/people.js +1 -1
  8. package/dist/cli/bot/people.js.map +1 -1
  9. package/dist/cli/index.d.ts +4 -1
  10. package/dist/cli/index.d.ts.map +1 -1
  11. package/dist/cli/index.js +4 -1
  12. package/dist/cli/index.js.map +1 -1
  13. package/dist/cli/messenger/backfill-command.d.ts.map +1 -1
  14. package/dist/cli/messenger/backfill-command.js +4 -0
  15. package/dist/cli/messenger/backfill-command.js.map +1 -1
  16. package/dist/cli/messenger/chats-members-command.d.ts.map +1 -1
  17. package/dist/cli/messenger/chats-members-command.js +35 -1
  18. package/dist/cli/messenger/chats-members-command.js.map +1 -1
  19. package/dist/cli/messenger/chats-stats-command.js +1 -1
  20. package/dist/cli/messenger/chats-stats-command.js.map +1 -1
  21. package/dist/cli/messenger/context.d.ts +2 -0
  22. package/dist/cli/messenger/context.d.ts.map +1 -1
  23. package/dist/cli/messenger/context.js.map +1 -1
  24. package/dist/cli/messenger/messages-search-command.d.ts.map +1 -1
  25. package/dist/cli/messenger/messages-search-command.js +3 -1
  26. package/dist/cli/messenger/messages-search-command.js.map +1 -1
  27. package/dist/cli/messenger/points.d.ts +2 -1
  28. package/dist/cli/messenger/points.d.ts.map +1 -1
  29. package/dist/cli/messenger/points.js +1 -0
  30. package/dist/cli/messenger/points.js.map +1 -1
  31. package/dist/cli/messenger/server-command.d.ts.map +1 -1
  32. package/dist/cli/messenger/server-command.js +18 -2
  33. package/dist/cli/messenger/server-command.js.map +1 -1
  34. package/dist/domain/models.d.ts +10 -0
  35. package/dist/domain/models.d.ts.map +1 -1
  36. package/dist/mcp/prompts.d.ts.map +1 -1
  37. package/dist/mcp/prompts.js +27 -8
  38. package/dist/mcp/prompts.js.map +1 -1
  39. package/dist/mcp/tools/chats.d.ts.map +1 -1
  40. package/dist/mcp/tools/chats.js +19 -1
  41. package/dist/mcp/tools/chats.js.map +1 -1
  42. package/dist/mcp/tools/inbox.d.ts +2 -0
  43. package/dist/mcp/tools/inbox.d.ts.map +1 -1
  44. package/dist/mcp/tools/inbox.js +27 -4
  45. package/dist/mcp/tools/inbox.js.map +1 -1
  46. package/dist/mcp/tools/review.d.ts.map +1 -1
  47. package/dist/mcp/tools/review.js +23 -2
  48. package/dist/mcp/tools/review.js.map +1 -1
  49. package/dist/replies/decide.d.ts +34 -0
  50. package/dist/replies/decide.d.ts.map +1 -0
  51. package/dist/replies/decide.js +109 -0
  52. package/dist/replies/decide.js.map +1 -0
  53. package/dist/replies/rules.d.ts +127 -0
  54. package/dist/replies/rules.d.ts.map +1 -0
  55. package/dist/replies/rules.js +119 -0
  56. package/dist/replies/rules.js.map +1 -0
  57. package/dist/replies/state.d.ts +36 -0
  58. package/dist/replies/state.d.ts.map +1 -0
  59. package/dist/replies/state.js +67 -0
  60. package/dist/replies/state.js.map +1 -0
  61. package/dist/search/search.d.ts.map +1 -1
  62. package/dist/search/search.js +4 -3
  63. package/dist/search/search.js.map +1 -1
  64. package/dist/search/snowball/LICENSE +29 -0
  65. package/dist/search/snowball/base-stemmer.js +445 -0
  66. package/dist/search/snowball/english-stemmer.js +775 -0
  67. package/dist/search/snowball/russian-stemmer.js +468 -0
  68. package/dist/search/snowball/spanish-stemmer.js +722 -0
  69. package/dist/search/stem.d.ts +35 -0
  70. package/dist/search/stem.d.ts.map +1 -0
  71. package/dist/search/stem.js +76 -0
  72. package/dist/search/stem.js.map +1 -0
  73. package/dist/services/archive.d.ts.map +1 -1
  74. package/dist/services/archive.js +4 -2
  75. package/dist/services/archive.js.map +1 -1
  76. package/dist/services/chat-stats.d.ts +3 -0
  77. package/dist/services/chat-stats.d.ts.map +1 -1
  78. package/dist/services/chat-stats.js +3 -0
  79. package/dist/services/chat-stats.js.map +1 -1
  80. package/dist/services/chats.d.ts +10 -0
  81. package/dist/services/chats.d.ts.map +1 -1
  82. package/dist/services/chats.js +61 -0
  83. package/dist/services/chats.js.map +1 -1
  84. package/dist/services/members-audit.d.ts +44 -0
  85. package/dist/services/members-audit.d.ts.map +1 -0
  86. package/dist/services/members-audit.js +111 -0
  87. package/dist/services/members-audit.js.map +1 -0
  88. package/dist/services/messages-search.d.ts +4 -2
  89. package/dist/services/messages-search.d.ts.map +1 -1
  90. package/dist/services/messages-search.js +13 -5
  91. package/dist/services/messages-search.js.map +1 -1
  92. package/dist/services/messages.js +1 -1
  93. package/dist/services/messages.js.map +1 -1
  94. package/dist/store/sqlite/completeness.d.ts +10 -1
  95. package/dist/store/sqlite/completeness.d.ts.map +1 -1
  96. package/dist/store/sqlite/completeness.js +15 -3
  97. package/dist/store/sqlite/completeness.js.map +1 -1
  98. package/dist/store/store.d.ts +2 -1
  99. package/dist/store/store.d.ts.map +1 -1
  100. package/dist/store/store.js +9 -2
  101. package/dist/store/store.js.map +1 -1
  102. package/package.json +2 -2
  103. package/parity.json +58 -0
@@ -0,0 +1,775 @@
1
+ // Generated from english.sbl by Snowball 3.1.1 - https://snowballstem.org/
2
+
3
+ // deno-lint-ignore-file ban-unused-ignore no-constant-condition no-empty prefer-const
4
+
5
+ const a_0 = [
6
+ ["arsen", -1],
7
+ ["commun", -1],
8
+ ["emerg", -1],
9
+ ["gener", -1],
10
+ ["inter", -1],
11
+ ["later", -1],
12
+ ["organ", -1],
13
+ ["past", -1],
14
+ ["univers", -1]
15
+ ];
16
+
17
+ const a_1 = [
18
+ ["'", 1],
19
+ ["'s'", 1, 1],
20
+ ["'s", 1]
21
+ ];
22
+
23
+ const a_2 = [
24
+ ["ied", 2],
25
+ ["s", 3],
26
+ ["ies", 2, 1],
27
+ ["sses", 1, 2],
28
+ ["ss", -1, 3],
29
+ ["us", -1, 4]
30
+ ];
31
+
32
+ const a_3 = [
33
+ ["succ", 1],
34
+ ["proc", 1],
35
+ ["exc", 1]
36
+ ];
37
+
38
+ const a_4 = [
39
+ ["even", 2],
40
+ ["cann", 2],
41
+ ["inn", 2],
42
+ ["earr", 2],
43
+ ["herr", 2],
44
+ ["out", 2],
45
+ ["y", 1]
46
+ ];
47
+
48
+ const a_5 = [
49
+ ["", -1],
50
+ ["ed", 2, 1],
51
+ ["eed", 1, 1],
52
+ ["ing", 3, 3],
53
+ ["edly", 2, 4],
54
+ ["eedly", 1, 1],
55
+ ["ingly", 2, 6]
56
+ ];
57
+
58
+ const a_6 = [
59
+ ["", 3],
60
+ ["bb", 2, 1],
61
+ ["dd", 2, 2],
62
+ ["ff", 2, 3],
63
+ ["gg", 2, 4],
64
+ ["bl", 1, 5],
65
+ ["mm", 2, 6],
66
+ ["nn", 2, 7],
67
+ ["pp", 2, 8],
68
+ ["rr", 2, 9],
69
+ ["at", 1, 10],
70
+ ["tt", 2, 11],
71
+ ["iz", 1, 12]
72
+ ];
73
+
74
+ const a_7 = [
75
+ ["anci", 3],
76
+ ["enci", 2],
77
+ ["ogi", 14],
78
+ ["li", 16],
79
+ ["bli", 12, 1],
80
+ ["abli", 4, 1],
81
+ ["alli", 8, 3],
82
+ ["fulli", 9, 4],
83
+ ["lessli", 15, 5],
84
+ ["ousli", 10, 6],
85
+ ["entli", 5, 7],
86
+ ["aliti", 8],
87
+ ["biliti", 12],
88
+ ["iviti", 11],
89
+ ["tional", 1],
90
+ ["ational", 7, 1],
91
+ ["alism", 8],
92
+ ["ation", 7],
93
+ ["ization", 6, 1],
94
+ ["izer", 6],
95
+ ["ator", 7],
96
+ ["iveness", 11],
97
+ ["fulness", 9],
98
+ ["ousness", 10],
99
+ ["ogist", 13]
100
+ ];
101
+
102
+ const a_8 = [
103
+ ["icate", 4],
104
+ ["ative", 6],
105
+ ["alize", 3],
106
+ ["iciti", 4],
107
+ ["ical", 4],
108
+ ["tional", 1],
109
+ ["ational", 2, 1],
110
+ ["ful", 5],
111
+ ["ness", 5]
112
+ ];
113
+
114
+ const a_9 = [
115
+ ["ic", 1],
116
+ ["ance", 1],
117
+ ["ence", 1],
118
+ ["able", 1],
119
+ ["ible", 1],
120
+ ["ate", 1],
121
+ ["ive", 1],
122
+ ["ize", 1],
123
+ ["iti", 1],
124
+ ["al", 1],
125
+ ["ism", 1],
126
+ ["ion", 2],
127
+ ["er", 1],
128
+ ["ous", 1],
129
+ ["ant", 1],
130
+ ["ent", 1],
131
+ ["ment", 1, 1],
132
+ ["ement", 1, 1]
133
+ ];
134
+
135
+ const a_10 = [
136
+ ["e", 1],
137
+ ["l", 2]
138
+ ];
139
+
140
+ const a_11 = [
141
+ ["andes", -1],
142
+ ["atlas", -1],
143
+ ["bias", -1],
144
+ ["cosmos", -1],
145
+ ["early", 6],
146
+ ["gently", 4],
147
+ ["howe", -1],
148
+ ["idly", 3],
149
+ ["news", -1],
150
+ ["only", 7],
151
+ ["singly", 8],
152
+ ["skies", 2],
153
+ ["skis", 1],
154
+ ["sky", -1],
155
+ ["ugly", 5]
156
+ ];
157
+
158
+ const /** Array<string> */ as_11 = ["ski", "sky", "idl", "gentl", "ugli", "earli", "onli", "singl"];
159
+
160
+ const /** Array<number> */ g_aeo = [17, 64];
161
+
162
+ const /** Array<number> */ g_v = [17, 65, 16, 1];
163
+
164
+ const /** Array<number> */ g_v_WXY = [1, 17, 65, 208, 1];
165
+
166
+ const /** Array<number> */ g_valid_LI = [55, 141, 2];
167
+
168
+ import B from './base-stemmer.js'
169
+
170
+ export default class extends B {
171
+
172
+ #B_Y_found/** boolean */ = false;
173
+ #I_p2/** number */ = 0;
174
+ #I_p1/** number */ = 0;
175
+
176
+
177
+ /** @return {boolean} */
178
+ #r_prelude() {
179
+ this.#B_Y_found = false;
180
+ const /** number */ v_1 = this.c;
181
+ // deno-lint-ignore no-unused-labels
182
+ lab0: {
183
+ this.bra = this.c;
184
+ if (!(this.eq_s("'"))) break lab0;
185
+ this.ket = this.c;
186
+ this.slice_del();
187
+ }
188
+ this.c = v_1;
189
+ const /** number */ v_2 = this.c;
190
+ // deno-lint-ignore no-unused-labels
191
+ lab1: {
192
+ this.bra = this.c;
193
+ if (!(this.eq_s("y"))) break lab1;
194
+ this.ket = this.c;
195
+ this.slice_from("Y");
196
+ this.#B_Y_found = true;
197
+ }
198
+ this.c = v_2;
199
+ const /** number */ v_3 = this.c;
200
+ // deno-lint-ignore no-unused-labels
201
+ lab2: {
202
+ while (true) {
203
+ const /** number */ v_4 = this.c;
204
+ // deno-lint-ignore no-unused-labels
205
+ lab3: {
206
+ // deno-lint-ignore no-unused-labels
207
+ golab4: while (true)
208
+ {
209
+ const /** number */ v_5 = this.c;
210
+ // deno-lint-ignore no-unused-labels
211
+ lab5: {
212
+ if (!(this.in_grouping(g_v, 97, 121))) break lab5;
213
+ this.bra = this.c;
214
+ if (!(this.eq_s("y"))) break lab5;
215
+ this.ket = this.c;
216
+ this.c = v_5;
217
+ break golab4;
218
+ }
219
+ this.c = v_5;
220
+ if (this.c >= this.limit) break lab3;
221
+ this.c++;
222
+ }
223
+ this.slice_from("Y");
224
+ this.#B_Y_found = true;
225
+ continue;
226
+ }
227
+ this.c = v_4;
228
+ break;
229
+ }
230
+ }
231
+ this.c = v_3;
232
+ return true;
233
+ }
234
+
235
+ /** @return {boolean} */
236
+ #r_mark_regions() {
237
+ this.#I_p1 = this.limit;
238
+ this.#I_p2 = this.limit;
239
+ const /** number */ v_1 = this.c;
240
+ // deno-lint-ignore no-unused-labels
241
+ lab0: {
242
+ // deno-lint-ignore no-unused-labels
243
+ lab1: {
244
+ const /** number */ v_2 = this.c;
245
+ // deno-lint-ignore no-unused-labels
246
+ lab2: {
247
+ if (this.find_among(a_0) === 0) break lab2;
248
+ break lab1;
249
+ }
250
+ this.c = v_2;
251
+ if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
252
+ this.c++;
253
+ if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
254
+ this.c++;
255
+ }
256
+ this.#I_p1 = this.c;
257
+ if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
258
+ this.c++;
259
+ if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
260
+ this.c++;
261
+ this.#I_p2 = this.c;
262
+ }
263
+ this.c = v_1;
264
+ return true;
265
+ }
266
+
267
+ /** @return {boolean} */
268
+ #r_shortv() {
269
+ // deno-lint-ignore no-unused-labels
270
+ lab0: {
271
+ const /** number */ v_1 = this.limit - this.c;
272
+ // deno-lint-ignore no-unused-labels
273
+ lab1: {
274
+ if (!(this.out_grouping_b(g_v_WXY, 89, 121))) break lab1;
275
+ if (!(this.in_grouping_b(g_v, 97, 121))) break lab1;
276
+ if (!(this.out_grouping_b(g_v, 97, 121))) break lab1;
277
+ break lab0;
278
+ }
279
+ this.c = this.limit - v_1;
280
+ // deno-lint-ignore no-unused-labels
281
+ lab2: {
282
+ if (!(this.out_grouping_b(g_v, 97, 121))) break lab2;
283
+ if (!(this.in_grouping_b(g_v, 97, 121))) break lab2;
284
+ if (this.c > this.limit_backward) break lab2;
285
+ break lab0;
286
+ }
287
+ this.c = this.limit - v_1;
288
+ if (!(this.eq_s_b("past"))) return false;
289
+ }
290
+ return true;
291
+ }
292
+
293
+ /** @return {boolean} */
294
+ #r_R1() {
295
+ return this.#I_p1 <= this.c;
296
+ }
297
+
298
+ /** @return {boolean} */
299
+ #r_R2() {
300
+ return this.#I_p2 <= this.c;
301
+ }
302
+
303
+ /** @return {boolean} */
304
+ #r_Step_1a() {
305
+ let /** number */ a;
306
+ const /** number */ v_1 = this.limit - this.c;
307
+ // deno-lint-ignore no-unused-labels
308
+ lab0: {
309
+ this.ket = this.c;
310
+ if (this.find_among_b(a_1) === 0) {
311
+ this.c = this.limit - v_1;
312
+ break lab0;
313
+ }
314
+ this.bra = this.c;
315
+ this.slice_del();
316
+ }
317
+ this.ket = this.c;
318
+ a = this.find_among_b(a_2);
319
+ if (a === 0) return false;
320
+ this.bra = this.c;
321
+ switch (a) {
322
+ case 1: {
323
+ this.slice_from("ss");
324
+ break;
325
+ }
326
+ case 2: {
327
+ // deno-lint-ignore no-unused-labels
328
+ lab1: {
329
+ const /** number */ v_2 = this.limit - this.c;
330
+ // deno-lint-ignore no-unused-labels
331
+ lab2: {
332
+ if (this.c - 2 < this.limit_backward) break lab2;
333
+ this.c -= 2;
334
+ this.slice_from("i");
335
+ break lab1;
336
+ }
337
+ this.c = this.limit - v_2;
338
+ this.slice_from("ie");
339
+ }
340
+ break;
341
+ }
342
+ case 3: {
343
+ if (this.c <= this.limit_backward) return false;
344
+ this.c--;
345
+ if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
346
+ this.c--;
347
+ this.slice_del();
348
+ break;
349
+ }
350
+ }
351
+ return true;
352
+ }
353
+
354
+ /** @return {boolean} */
355
+ #r_Step_1b() {
356
+ let /** number */ a;
357
+ this.ket = this.c;
358
+ a = this.find_among_b(a_5);
359
+ this.bra = this.c;
360
+ // deno-lint-ignore no-unused-labels
361
+ lab0: {
362
+ const /** number */ v_1 = this.limit - this.c;
363
+ // deno-lint-ignore no-unused-labels
364
+ lab1: {
365
+ switch (a) {
366
+ case 1: {
367
+ const /** number */ v_2 = this.limit - this.c;
368
+ // deno-lint-ignore no-unused-labels
369
+ lab2: {
370
+ if (!this.#r_R1()) break lab2;
371
+ // deno-lint-ignore no-unused-labels
372
+ lab3: {
373
+ const /** number */ v_3 = this.limit - this.c;
374
+ // deno-lint-ignore no-unused-labels
375
+ lab4: {
376
+ if (this.find_among_b(a_3) === 0) break lab4;
377
+ if (this.c > this.limit_backward) break lab4;
378
+ break lab3;
379
+ }
380
+ this.c = this.limit - v_3;
381
+ this.slice_from("ee");
382
+ }
383
+ }
384
+ this.c = this.limit - v_2;
385
+ break;
386
+ }
387
+ case 2: {
388
+ break lab1;
389
+ }
390
+ case 3: {
391
+ a = this.find_among_b(a_4);
392
+ if (a === 0) break lab1;
393
+ switch (a) {
394
+ case 1: {
395
+ const /** number */ v_4 = this.limit - this.c;
396
+ if (!(this.out_grouping_b(g_v, 97, 121))) break lab1;
397
+ if (this.c > this.limit_backward) break lab1;
398
+ this.c = this.limit - v_4;
399
+ this.bra = this.c;
400
+ this.slice_from("ie");
401
+ break;
402
+ }
403
+ case 2: {
404
+ if (this.c > this.limit_backward) break lab1;
405
+ break;
406
+ }
407
+ }
408
+ break;
409
+ }
410
+ }
411
+ break lab0;
412
+ }
413
+ this.c = this.limit - v_1;
414
+ const /** number */ v_5 = this.limit - this.c;
415
+ if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
416
+ this.c--;
417
+ this.c = this.limit - v_5;
418
+ this.slice_del();
419
+ this.ket = this.c;
420
+ this.bra = this.c;
421
+ const /** number */ v_6 = this.limit - this.c;
422
+ a = this.find_among_b(a_6);
423
+ switch (a) {
424
+ case 1: {
425
+ this.slice_from("e");
426
+ return false;
427
+ }
428
+ case 2: {
429
+ {
430
+ const /** number */ v_7 = this.limit - this.c;
431
+ // deno-lint-ignore no-unused-labels
432
+ lab5: {
433
+ if (!(this.in_grouping_b(g_aeo, 97, 111))) break lab5;
434
+ if (this.c > this.limit_backward) break lab5;
435
+ return false;
436
+ }
437
+ this.c = this.limit - v_7;
438
+ }
439
+ break;
440
+ }
441
+ case 3: {
442
+ if (this.c !== this.#I_p1) return false;
443
+ const /** number */ v_8 = this.limit - this.c;
444
+ if (!this.#r_shortv()) return false;
445
+ this.c = this.limit - v_8;
446
+ this.slice_from("e");
447
+ return false;
448
+ }
449
+ }
450
+ this.c = this.limit - v_6;
451
+ this.ket = this.c;
452
+ if (this.c <= this.limit_backward) return false;
453
+ this.c--;
454
+ this.bra = this.c;
455
+ this.slice_del();
456
+ }
457
+ return true;
458
+ }
459
+
460
+ /** @return {boolean} */
461
+ #r_Step_1c() {
462
+ this.ket = this.c;
463
+ // deno-lint-ignore no-unused-labels
464
+ lab0: {
465
+ // deno-lint-ignore no-unused-labels
466
+ lab1: {
467
+ if (!(this.eq_s_b("y"))) break lab1;
468
+ break lab0;
469
+ }
470
+ if (!(this.eq_s_b("Y"))) return false;
471
+ }
472
+ this.bra = this.c;
473
+ if (!(this.out_grouping_b(g_v, 97, 121))) return false;
474
+ if (this.c <= this.limit_backward) return false;
475
+ this.slice_from("i");
476
+ return true;
477
+ }
478
+
479
+ /** @return {boolean} */
480
+ #r_Step_2() {
481
+ let /** number */ a;
482
+ this.ket = this.c;
483
+ a = this.find_among_b(a_7);
484
+ if (a === 0) return false;
485
+ this.bra = this.c;
486
+ if (!this.#r_R1()) return false;
487
+ switch (a) {
488
+ case 1: {
489
+ this.slice_from("tion");
490
+ break;
491
+ }
492
+ case 2: {
493
+ this.slice_from("ence");
494
+ break;
495
+ }
496
+ case 3: {
497
+ this.slice_from("ance");
498
+ break;
499
+ }
500
+ case 4: {
501
+ this.slice_from("able");
502
+ break;
503
+ }
504
+ case 5: {
505
+ this.slice_from("ent");
506
+ break;
507
+ }
508
+ case 6: {
509
+ this.slice_from("ize");
510
+ break;
511
+ }
512
+ case 7: {
513
+ this.slice_from("ate");
514
+ break;
515
+ }
516
+ case 8: {
517
+ this.slice_from("al");
518
+ break;
519
+ }
520
+ case 9: {
521
+ this.slice_from("ful");
522
+ break;
523
+ }
524
+ case 10: {
525
+ this.slice_from("ous");
526
+ break;
527
+ }
528
+ case 11: {
529
+ this.slice_from("ive");
530
+ break;
531
+ }
532
+ case 12: {
533
+ this.slice_from("ble");
534
+ break;
535
+ }
536
+ case 13: {
537
+ this.slice_from("og");
538
+ break;
539
+ }
540
+ case 14: {
541
+ if (!(this.eq_s_b("l"))) return false;
542
+ this.slice_from("og");
543
+ break;
544
+ }
545
+ case 15: {
546
+ this.slice_from("less");
547
+ break;
548
+ }
549
+ case 16: {
550
+ if (!(this.in_grouping_b(g_valid_LI, 99, 116))) return false;
551
+ this.slice_del();
552
+ break;
553
+ }
554
+ }
555
+ return true;
556
+ }
557
+
558
+ /** @return {boolean} */
559
+ #r_Step_3() {
560
+ let /** number */ a;
561
+ this.ket = this.c;
562
+ a = this.find_among_b(a_8);
563
+ if (a === 0) return false;
564
+ this.bra = this.c;
565
+ if (!this.#r_R1()) return false;
566
+ switch (a) {
567
+ case 1: {
568
+ this.slice_from("tion");
569
+ break;
570
+ }
571
+ case 2: {
572
+ this.slice_from("ate");
573
+ break;
574
+ }
575
+ case 3: {
576
+ this.slice_from("al");
577
+ break;
578
+ }
579
+ case 4: {
580
+ this.slice_from("ic");
581
+ break;
582
+ }
583
+ case 5: {
584
+ this.slice_del();
585
+ break;
586
+ }
587
+ case 6: {
588
+ if (!this.#r_R2()) return false;
589
+ this.slice_del();
590
+ break;
591
+ }
592
+ }
593
+ return true;
594
+ }
595
+
596
+ /** @return {boolean} */
597
+ #r_Step_4() {
598
+ let /** number */ a;
599
+ this.ket = this.c;
600
+ a = this.find_among_b(a_9);
601
+ if (a === 0) return false;
602
+ this.bra = this.c;
603
+ if (!this.#r_R2()) return false;
604
+ switch (a) {
605
+ case 1: {
606
+ this.slice_del();
607
+ break;
608
+ }
609
+ case 2: {
610
+ // deno-lint-ignore no-unused-labels
611
+ lab0: {
612
+ // deno-lint-ignore no-unused-labels
613
+ lab1: {
614
+ if (!(this.eq_s_b("s"))) break lab1;
615
+ break lab0;
616
+ }
617
+ if (!(this.eq_s_b("t"))) return false;
618
+ }
619
+ this.slice_del();
620
+ break;
621
+ }
622
+ }
623
+ return true;
624
+ }
625
+
626
+ /** @return {boolean} */
627
+ #r_Step_5() {
628
+ let /** number */ a;
629
+ this.ket = this.c;
630
+ a = this.find_among_b(a_10);
631
+ if (a === 0) return false;
632
+ this.bra = this.c;
633
+ switch (a) {
634
+ case 1: {
635
+ // deno-lint-ignore no-unused-labels
636
+ lab0: {
637
+ // deno-lint-ignore no-unused-labels
638
+ lab1: {
639
+ if (!this.#r_R2()) break lab1;
640
+ break lab0;
641
+ }
642
+ if (!this.#r_R1()) return false;
643
+ {
644
+ const /** number */ v_1 = this.limit - this.c;
645
+ // deno-lint-ignore no-unused-labels
646
+ lab2: {
647
+ if (!this.#r_shortv()) break lab2;
648
+ return false;
649
+ }
650
+ this.c = this.limit - v_1;
651
+ }
652
+ }
653
+ this.slice_del();
654
+ break;
655
+ }
656
+ case 2: {
657
+ if (!this.#r_R2()) return false;
658
+ if (!(this.eq_s_b("l"))) return false;
659
+ this.slice_del();
660
+ break;
661
+ }
662
+ }
663
+ return true;
664
+ }
665
+
666
+ /** @return {boolean} */
667
+ #r_exception1() {
668
+ let /** number */ a;
669
+ this.bra = this.c;
670
+ a = this.find_among(a_11);
671
+ if (a === 0) return false;
672
+ this.ket = this.c;
673
+ if (this.c < this.limit) return false;
674
+ if (a > 0) {
675
+ this.slice_from(as_11[a - 1]);
676
+ }
677
+ return true;
678
+ }
679
+
680
+ /** @return {boolean} */
681
+ #r_postlude() {
682
+ if (!this.#B_Y_found) return false;
683
+ while (true) {
684
+ const /** number */ v_1 = this.c;
685
+ // deno-lint-ignore no-unused-labels
686
+ lab0: {
687
+ // deno-lint-ignore no-unused-labels
688
+ golab1: while (true)
689
+ {
690
+ const /** number */ v_2 = this.c;
691
+ // deno-lint-ignore no-unused-labels
692
+ lab2: {
693
+ this.bra = this.c;
694
+ if (!(this.eq_s("Y"))) break lab2;
695
+ this.ket = this.c;
696
+ this.c = v_2;
697
+ break golab1;
698
+ }
699
+ this.c = v_2;
700
+ if (this.c >= this.limit) break lab0;
701
+ this.c++;
702
+ }
703
+ this.slice_from("y");
704
+ continue;
705
+ }
706
+ this.c = v_1;
707
+ break;
708
+ }
709
+ return true;
710
+ }
711
+
712
+ /** @return {boolean} */
713
+ #stem() {
714
+ // deno-lint-ignore no-unused-labels
715
+ lab0: {
716
+ const /** number */ v_1 = this.c;
717
+ // deno-lint-ignore no-unused-labels
718
+ lab1: {
719
+ if (!this.#r_exception1()) break lab1;
720
+ break lab0;
721
+ }
722
+ this.c = v_1;
723
+ // deno-lint-ignore no-unused-labels
724
+ lab2: {
725
+ // deno-lint-ignore no-unused-labels
726
+ lab3: {
727
+ if (this.c + 3 > this.limit) break lab3;
728
+ this.c += 3;
729
+ break lab2;
730
+ }
731
+ break lab0;
732
+ }
733
+ this.c = v_1;
734
+ this.#r_prelude();
735
+ this.#r_mark_regions();
736
+ this.limit_backward = this.c; this.c = this.limit;
737
+ const /** number */ v_2 = this.limit - this.c;
738
+ this.#r_Step_1a();
739
+ this.c = this.limit - v_2;
740
+ const /** number */ v_3 = this.limit - this.c;
741
+ this.#r_Step_1b();
742
+ this.c = this.limit - v_3;
743
+ const /** number */ v_4 = this.limit - this.c;
744
+ this.#r_Step_1c();
745
+ this.c = this.limit - v_4;
746
+ const /** number */ v_5 = this.limit - this.c;
747
+ this.#r_Step_2();
748
+ this.c = this.limit - v_5;
749
+ const /** number */ v_6 = this.limit - this.c;
750
+ this.#r_Step_3();
751
+ this.c = this.limit - v_6;
752
+ const /** number */ v_7 = this.limit - this.c;
753
+ this.#r_Step_4();
754
+ this.c = this.limit - v_7;
755
+ const /** number */ v_8 = this.limit - this.c;
756
+ this.#r_Step_5();
757
+ this.c = this.limit - v_8;
758
+ this.c = this.limit_backward;
759
+ const /** number */ v_9 = this.c;
760
+ this.#r_postlude();
761
+ this.c = v_9;
762
+ }
763
+ return true;
764
+ }
765
+
766
+ /**@return{string}*/
767
+ stem(/**string*/input) {
768
+ this.setCurrent(input);
769
+ this.#stem();
770
+ return this.getCurrent();
771
+ }
772
+
773
+ stemWord = this.stem;
774
+ }
775
+