@softwarefactory-project/re-ansi 0.7.1 → 0.7.2

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/src/Ansi.res.js CHANGED
@@ -1,299 +1,494 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
- 'use strict';
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
- var Belt_List = require("rescript/lib/js/belt_List.js");
5
- var Js_string = require("rescript/lib/js/js_string.js");
6
- var Core__List = require("@rescript/core/src/Core__List.res.js");
7
- var Caml_option = require("rescript/lib/js/caml_option.js");
8
- var Core__Option = require("@rescript/core/src/Core__Option.res.js");
9
- var JsxRuntime = require("react/jsx-runtime");
4
+ // node_modules/rescript/lib/es6/caml_option.js
5
+ function some(x) {
6
+ if (x === void 0) {
7
+ return {
8
+ BS_PRIVATE_NESTED_SOME_NONE: 0
9
+ };
10
+ } else if (x !== null && x.BS_PRIVATE_NESTED_SOME_NONE !== void 0) {
11
+ return {
12
+ BS_PRIVATE_NESTED_SOME_NONE: x.BS_PRIVATE_NESTED_SOME_NONE + 1 | 0
13
+ };
14
+ } else {
15
+ return x;
16
+ }
17
+ }
18
+ __name(some, "some");
19
+ function nullable_to_opt(x) {
20
+ if (x == null) {
21
+ return;
22
+ } else {
23
+ return some(x);
24
+ }
25
+ }
26
+ __name(nullable_to_opt, "nullable_to_opt");
27
+ function valFromOption(x) {
28
+ if (!(x !== null && x.BS_PRIVATE_NESTED_SOME_NONE !== void 0)) {
29
+ return x;
30
+ }
31
+ var depth = x.BS_PRIVATE_NESTED_SOME_NONE;
32
+ if (depth === 0) {
33
+ return;
34
+ } else {
35
+ return {
36
+ BS_PRIVATE_NESTED_SOME_NONE: depth - 1 | 0
37
+ };
38
+ }
39
+ }
40
+ __name(valFromOption, "valFromOption");
41
+
42
+ // node_modules/rescript/lib/es6/js_string.js
43
+ function codePointAt(arg1, obj) {
44
+ return obj.codePointAt(arg1);
45
+ }
46
+ __name(codePointAt, "codePointAt");
47
+ function slice(from, to_, obj) {
48
+ return obj.slice(from, to_);
49
+ }
50
+ __name(slice, "slice");
51
+ function sliceToEnd(from, obj) {
52
+ return obj.slice(from);
53
+ }
54
+ __name(sliceToEnd, "sliceToEnd");
55
+
56
+ // node_modules/@rescript/core/src/Core__List.res.mjs
57
+ function add(xs, x) {
58
+ return {
59
+ hd: x,
60
+ tl: xs
61
+ };
62
+ }
63
+ __name(add, "add");
64
+ function copyAuxCont(_cellX, _prec) {
65
+ while (true) {
66
+ var prec = _prec;
67
+ var cellX = _cellX;
68
+ if (!cellX) {
69
+ return prec;
70
+ }
71
+ var next = {
72
+ hd: cellX.hd,
73
+ tl: (
74
+ /* [] */
75
+ 0
76
+ )
77
+ };
78
+ prec.tl = next;
79
+ _prec = next;
80
+ _cellX = cellX.tl;
81
+ continue;
82
+ }
83
+ ;
84
+ }
85
+ __name(copyAuxCont, "copyAuxCont");
86
+ function length(xs) {
87
+ var _x = xs;
88
+ var _acc = 0;
89
+ while (true) {
90
+ var acc = _acc;
91
+ var x = _x;
92
+ if (!x) {
93
+ return acc;
94
+ }
95
+ _acc = acc + 1 | 0;
96
+ _x = x.tl;
97
+ continue;
98
+ }
99
+ ;
100
+ }
101
+ __name(length, "length");
102
+ function fillAux(arr, _i, _x) {
103
+ while (true) {
104
+ var x = _x;
105
+ var i = _i;
106
+ if (!x) {
107
+ return;
108
+ }
109
+ arr[i] = x.hd;
110
+ _x = x.tl;
111
+ _i = i + 1 | 0;
112
+ continue;
113
+ }
114
+ ;
115
+ }
116
+ __name(fillAux, "fillAux");
117
+ function toArray(x) {
118
+ var len = length(x);
119
+ var arr = new Array(len);
120
+ fillAux(arr, 0, x);
121
+ return arr;
122
+ }
123
+ __name(toArray, "toArray");
124
+ function reverseConcat(_l1, _l2) {
125
+ while (true) {
126
+ var l2 = _l2;
127
+ var l1 = _l1;
128
+ if (!l1) {
129
+ return l2;
130
+ }
131
+ _l2 = {
132
+ hd: l1.hd,
133
+ tl: l2
134
+ };
135
+ _l1 = l1.tl;
136
+ continue;
137
+ }
138
+ ;
139
+ }
140
+ __name(reverseConcat, "reverseConcat");
141
+ function reverse(l) {
142
+ return reverseConcat(
143
+ l,
144
+ /* [] */
145
+ 0
146
+ );
147
+ }
148
+ __name(reverse, "reverse");
149
+ function flatAux(_prec, _xs) {
150
+ while (true) {
151
+ var xs = _xs;
152
+ var prec = _prec;
153
+ if (xs) {
154
+ _xs = xs.tl;
155
+ _prec = copyAuxCont(xs.hd, prec);
156
+ continue;
157
+ }
158
+ prec.tl = /* [] */
159
+ 0;
160
+ return;
161
+ }
162
+ ;
163
+ }
164
+ __name(flatAux, "flatAux");
165
+ function flat(_xs) {
166
+ while (true) {
167
+ var xs = _xs;
168
+ if (!xs) {
169
+ return (
170
+ /* [] */
171
+ 0
172
+ );
173
+ }
174
+ var match = xs.hd;
175
+ if (match) {
176
+ var cell = {
177
+ hd: match.hd,
178
+ tl: (
179
+ /* [] */
180
+ 0
181
+ )
182
+ };
183
+ flatAux(copyAuxCont(match.tl, cell), xs.tl);
184
+ return cell;
185
+ }
186
+ _xs = xs.tl;
187
+ continue;
188
+ }
189
+ ;
190
+ }
191
+ __name(flat, "flat");
192
+
193
+ // node_modules/@rescript/core/src/Core__Option.res.mjs
194
+ function flatMap(opt, f) {
195
+ if (opt !== void 0) {
196
+ return f(valFromOption(opt));
197
+ }
198
+ }
199
+ __name(flatMap, "flatMap");
200
+ function getOr(opt, $$default2) {
201
+ if (opt !== void 0) {
202
+ return valFromOption(opt);
203
+ } else {
204
+ return $$default2;
205
+ }
206
+ }
207
+ __name(getOr, "getOr");
10
208
 
209
+ // src/Ansi.res.mjs
210
+ import * as JsxRuntime from "react/jsx-runtime";
11
211
  function fourBitColors(code) {
12
212
  switch (code) {
13
- case 0 :
14
- return "black";
15
- case 1 :
16
- return "red";
17
- case 2 :
18
- return "green";
19
- case 3 :
20
- return "yellow";
21
- case 4 :
22
- return "blue";
23
- case 5 :
24
- return "magenta";
25
- case 6 :
26
- return "cyan";
27
- case 9 :
28
- return "initial";
29
- case 10 :
30
- return "grey";
31
- case 11 :
32
- return "#DA2647";
33
- case 12 :
34
- return "#87FF2A";
35
- case 13 :
36
- return "#FFF700";
37
- case 14 :
38
- return "#5DADEC";
39
- case 15 :
40
- return "#FF3399";
41
- case 16 :
42
- return "#8DD9CC";
43
- case 7 :
44
- case 17 :
45
- return "white";
213
+ case 0:
214
+ return "black";
215
+ case 1:
216
+ return "red";
217
+ case 2:
218
+ return "green";
219
+ case 3:
220
+ return "yellow";
221
+ case 4:
222
+ return "blue";
223
+ case 5:
224
+ return "magenta";
225
+ case 6:
226
+ return "cyan";
227
+ case 9:
228
+ return "initial";
229
+ case 10:
230
+ return "grey";
231
+ case 11:
232
+ return "#DA2647";
233
+ case 12:
234
+ return "#87FF2A";
235
+ case 13:
236
+ return "#FFF700";
237
+ case 14:
238
+ return "#5DADEC";
239
+ case 15:
240
+ return "#FF3399";
241
+ case 16:
242
+ return "#8DD9CC";
243
+ case 7:
244
+ case 17:
245
+ return "white";
46
246
  default:
47
247
  console.log("Unknown color value:", code);
48
- return ;
248
+ return;
49
249
  }
50
250
  }
51
-
251
+ __name(fourBitColors, "fourBitColors");
52
252
  function threeBitColors(code) {
53
253
  switch (code) {
54
- case 0 :
55
- return "grey";
56
- case 1 :
57
- return "red";
58
- case 2 :
59
- return "green";
60
- case 3 :
61
- return "yellow";
62
- case 4 :
63
- return "blue";
64
- case 5 :
65
- return "magenta";
66
- case 6 :
67
- return "cyan";
68
- case 7 :
69
- return "white";
254
+ case 0:
255
+ return "grey";
256
+ case 1:
257
+ return "red";
258
+ case 2:
259
+ return "green";
260
+ case 3:
261
+ return "yellow";
262
+ case 4:
263
+ return "blue";
264
+ case 5:
265
+ return "magenta";
266
+ case 6:
267
+ return "cyan";
268
+ case 7:
269
+ return "white";
70
270
  default:
71
271
  console.log("Unknown color value:", code);
72
- return ;
272
+ return;
73
273
  }
74
274
  }
75
-
275
+ __name(threeBitColors, "threeBitColors");
76
276
  function combine(css1, css2) {
77
277
  return Object.assign({}, css1, css2);
78
278
  }
79
-
279
+ __name(combine, "combine");
80
280
  function addWeight(fontWeight) {
81
281
  return {
82
- fontWeight: fontWeight
83
- };
282
+ fontWeight
283
+ };
84
284
  }
85
-
285
+ __name(addWeight, "addWeight");
86
286
  function addStyle(fontStyle) {
87
287
  return {
88
- fontStyle: fontStyle
89
- };
288
+ fontStyle
289
+ };
90
290
  }
91
-
291
+ __name(addStyle, "addStyle");
92
292
  function addDecoration(textDecoration) {
93
293
  return {
94
- textDecoration: textDecoration
95
- };
294
+ textDecoration
295
+ };
96
296
  }
97
-
297
+ __name(addDecoration, "addDecoration");
98
298
  function int_of_cp(c) {
99
299
  return c - 48 | 0;
100
300
  }
101
-
301
+ __name(int_of_cp, "int_of_cp");
102
302
  function getColorStyle(colorMode, colorValue) {
103
303
  switch (colorMode) {
104
- case 3 :
105
- return {
106
- TAG: "Foreground",
107
- _0: colorValue
108
- };
109
- case 0 :
110
- case 4 :
111
- return {
112
- TAG: "Background",
113
- _0: colorValue
114
- };
115
- case 9 :
116
- return {
117
- TAG: "BrightForeground",
118
- _0: colorValue
119
- };
304
+ case 3:
305
+ return {
306
+ TAG: "Foreground",
307
+ _0: colorValue
308
+ };
309
+ case 0:
310
+ case 4:
311
+ return {
312
+ TAG: "Background",
313
+ _0: colorValue
314
+ };
315
+ case 9:
316
+ return {
317
+ TAG: "BrightForeground",
318
+ _0: colorValue
319
+ };
120
320
  default:
121
-
122
321
  }
123
322
  console.log("Unknown color code:", colorMode, colorValue);
124
323
  }
125
-
324
+ __name(getColorStyle, "getColorStyle");
126
325
  function getColorStyleCss(color) {
127
326
  switch (color.TAG) {
128
- case "Foreground" :
129
- return Core__Option.flatMap(fourBitColors(color._0), (function (color) {
130
- return {
131
- color: color
132
- };
133
- }));
134
- case "BrightForeground" :
135
- return Core__Option.flatMap(threeBitColors(color._0), (function (color) {
136
- return {
137
- color: color,
138
- fontWeight: "bold"
139
- };
140
- }));
141
- case "Background" :
142
- return Core__Option.flatMap(fourBitColors(color._0), (function (background) {
143
- return {
144
- background: background
145
- };
146
- }));
147
-
327
+ case "Foreground":
328
+ return flatMap(fourBitColors(color._0), function(color2) {
329
+ return {
330
+ color: color2
331
+ };
332
+ });
333
+ case "BrightForeground":
334
+ return flatMap(threeBitColors(color._0), function(color2) {
335
+ return {
336
+ color: color2,
337
+ fontWeight: "bold"
338
+ };
339
+ });
340
+ case "Background":
341
+ return flatMap(fourBitColors(color._0), function(background) {
342
+ return {
343
+ background
344
+ };
345
+ });
148
346
  }
149
347
  }
150
-
348
+ __name(getColorStyleCss, "getColorStyleCss");
151
349
  function get(colorMode, colorValue) {
152
- return Core__Option.flatMap(getColorStyle(colorMode - 48 | 0, colorValue - 48 | 0), getColorStyleCss);
350
+ return flatMap(getColorStyle(colorMode - 48 | 0, colorValue - 48 | 0), getColorStyleCss);
153
351
  }
154
-
352
+ __name(get, "get");
155
353
  var ColorCss = {
156
- getColorStyle: getColorStyle,
157
- getColorStyleCss: getColorStyleCss,
158
- get: get
354
+ getColorStyle,
355
+ getColorStyleCss,
356
+ get
159
357
  };
160
-
161
358
  function getFontStyle(fontMode) {
162
359
  switch (fontMode) {
163
- case 1 :
164
- return {
165
- TAG: "FontStyle",
166
- _0: addWeight("bold")
167
- };
168
- case 2 :
169
- return {
170
- TAG: "FontStyle",
171
- _0: addWeight("lighter")
172
- };
173
- case 3 :
174
- return {
175
- TAG: "FontStyle",
176
- _0: addStyle("italic")
177
- };
178
- case 4 :
179
- return {
180
- TAG: "FontStyle",
181
- _0: addDecoration("underline")
182
- };
183
- case 0 :
184
- case 7 :
185
- return "Regular";
186
- case 9 :
187
- return {
188
- TAG: "FontStyle",
189
- _0: addDecoration("line-through")
190
- };
360
+ case 1:
361
+ return {
362
+ TAG: "FontStyle",
363
+ _0: addWeight("bold")
364
+ };
365
+ case 2:
366
+ return {
367
+ TAG: "FontStyle",
368
+ _0: addWeight("lighter")
369
+ };
370
+ case 3:
371
+ return {
372
+ TAG: "FontStyle",
373
+ _0: addStyle("italic")
374
+ };
375
+ case 4:
376
+ return {
377
+ TAG: "FontStyle",
378
+ _0: addDecoration("underline")
379
+ };
380
+ case 0:
381
+ case 7:
382
+ return "Regular";
383
+ case 9:
384
+ return {
385
+ TAG: "FontStyle",
386
+ _0: addDecoration("line-through")
387
+ };
191
388
  default:
192
- return ;
389
+ return;
193
390
  }
194
391
  }
195
-
392
+ __name(getFontStyle, "getFontStyle");
196
393
  function getFontStyleCss(font) {
197
394
  if (typeof font !== "object") {
198
- return ;
395
+ return;
199
396
  } else {
200
397
  return font._0;
201
398
  }
202
399
  }
203
-
400
+ __name(getFontStyleCss, "getFontStyleCss");
204
401
  function get$1(fontMode) {
205
- return Core__Option.flatMap(getFontStyle(fontMode - 48 | 0), getFontStyleCss);
402
+ return flatMap(getFontStyle(fontMode - 48 | 0), getFontStyleCss);
206
403
  }
207
-
404
+ __name(get$1, "get$1");
208
405
  var FontCss = {
209
- getFontStyle: getFontStyle,
210
- getFontStyleCss: getFontStyleCss,
406
+ getFontStyle,
407
+ getFontStyleCss,
211
408
  get: get$1
212
409
  };
213
-
214
410
  var linkRe = new RegExp("^(http(s)?:\\/\\/[^\\s]+)");
215
-
216
411
  function get$2(txt) {
217
- return Core__Option.getOr(Core__Option.flatMap(Caml_option.nullable_to_opt(linkRe.exec(txt)), (function (res) {
218
- return Core__Option.flatMap(res[0], (function (url) {
219
- return [
220
- url.length,
221
- {
222
- TAG: "HRef",
223
- _0: url
224
- }
225
- ];
226
- }));
227
- })), [
228
- 1,
229
- undefined
230
- ]);
412
+ return getOr(flatMap(nullable_to_opt(linkRe.exec(txt)), function(res) {
413
+ return flatMap(res[0], function(url) {
414
+ return [
415
+ url.length,
416
+ {
417
+ TAG: "HRef",
418
+ _0: url
419
+ }
420
+ ];
421
+ });
422
+ }), [
423
+ 1,
424
+ void 0
425
+ ]);
231
426
  }
232
-
427
+ __name(get$2, "get$2");
233
428
  var HttpLink = {
234
- linkRe: linkRe,
429
+ linkRe,
235
430
  get: get$2
236
431
  };
237
-
238
432
  function parse(txt, pos) {
239
- var match = Js_string.codePointAt(pos, txt);
433
+ var match = codePointAt(pos, txt);
240
434
  var exit = 0;
241
- if (match === undefined) {
435
+ if (match === void 0) {
242
436
  return [
243
- 0,
244
- undefined
245
- ];
437
+ 0,
438
+ void 0
439
+ ];
246
440
  }
247
441
  if (match >= 14) {
248
442
  if (match !== 27) {
249
443
  if (match !== 104) {
250
444
  return [
251
- 0,
252
- undefined
253
- ];
445
+ 0,
446
+ void 0
447
+ ];
254
448
  } else {
255
- return get$2(Js_string.slice(pos, 512, txt));
449
+ return get$2(slice(pos, 512, txt));
256
450
  }
257
451
  }
258
452
  exit = 1;
259
453
  } else {
260
454
  if (match === 10) {
261
455
  return [
262
- 1,
263
- "CarriageReturn"
264
- ];
456
+ 1,
457
+ "CarriageReturn"
458
+ ];
265
459
  }
266
460
  if (match < 13) {
267
461
  return [
268
- 0,
269
- undefined
270
- ];
462
+ 0,
463
+ void 0
464
+ ];
271
465
  }
272
466
  exit = 1;
273
467
  }
274
468
  if (exit === 1) {
275
469
  var codePoints = [];
276
- var readCodePoints = function (_idx) {
277
- while(true) {
470
+ var readCodePoints = /* @__PURE__ */ __name(function(_idx) {
471
+ while (true) {
278
472
  var idx = _idx;
279
- var match = idx > 10;
280
- var match$1 = Js_string.codePointAt(pos + idx | 0, txt);
281
- if (match) {
282
- return ;
473
+ var match2 = idx > 10;
474
+ var match$110 = codePointAt(pos + idx | 0, txt);
475
+ if (match2) {
476
+ return;
283
477
  }
284
- if (match$1 === undefined) {
285
- return ;
478
+ if (match$110 === void 0) {
479
+ return;
286
480
  }
287
- if (match$1 === 109) {
288
- return ;
481
+ if (match$110 === 109) {
482
+ return;
289
483
  }
290
- codePoints.push(match$1);
484
+ codePoints.push(match$110);
291
485
  _idx = idx + 1 | 0;
292
- continue ;
293
- };
294
- };
486
+ continue;
487
+ }
488
+ ;
489
+ }, "readCodePoints");
295
490
  readCodePoints(1);
296
- var length = codePoints.length + 2 | 0;
491
+ var length2 = codePoints.length + 2 | 0;
297
492
  var exit$1 = 0;
298
493
  var colorMode;
299
494
  var colorValue;
@@ -309,611 +504,630 @@ function parse(txt, pos) {
309
504
  var xs$1;
310
505
  if (codePoints[0] === 10 && codePoints[1] === 27 && codePoints[2] === 91 && codePoints[3] === 49 && codePoints[4] === 65 && codePoints[5] === 27 && codePoints[6] === 91 && codePoints[7] === 74) {
311
506
  return [
312
- 9,
313
- "EraseLine"
314
- ];
507
+ 9,
508
+ "EraseLine"
509
+ ];
315
510
  }
316
511
  if (codePoints[0] === 91 && codePoints[2] === 75) {
317
512
  return [
318
- 4,
319
- "EraseLine"
320
- ];
513
+ 4,
514
+ "EraseLine"
515
+ ];
321
516
  }
322
517
  if (codePoints[0] === 91 && codePoints[1] === 75) {
323
518
  return [
324
- 3,
325
- "EraseLine"
326
- ];
519
+ 3,
520
+ "EraseLine"
521
+ ];
327
522
  }
328
523
  var len = codePoints.length;
329
524
  if (len >= 11) {
330
525
  return [
331
- 1,
332
- undefined
333
- ];
526
+ 1,
527
+ void 0
528
+ ];
334
529
  }
335
530
  switch (len) {
336
- case 1 :
337
- var match$1 = codePoints[0];
338
- if (match$1 !== 91) {
339
- return [
340
- 1,
341
- undefined
342
- ];
343
- } else {
344
- return [
345
- length,
346
- "Clear"
347
- ];
348
- }
349
- case 2 :
350
- var match$2 = codePoints[0];
351
- if (match$2 !== 91) {
352
- return [
353
- 1,
354
- undefined
355
- ];
356
- }
357
- var style$2 = codePoints[1];
358
- if (style$2 !== 48) {
359
- return [
360
- length,
361
- Core__Option.flatMap(get$1(style$2), (function (style) {
362
- return {
363
- TAG: "Style",
364
- _0: style
365
- };
366
- }))
367
- ];
368
- } else {
369
- return [
370
- length,
371
- "Clear"
372
- ];
373
- }
374
- case 3 :
375
- var match$3 = codePoints[0];
376
- if (match$3 !== 91) {
377
- return [
378
- 1,
379
- undefined
380
- ];
381
- }
382
- var colorMode$2 = codePoints[1];
383
- var exit$2 = 0;
384
- if (colorMode$2 !== 48) {
385
- exit$2 = 5;
386
- } else {
387
- var match$4 = codePoints[2];
388
- if (match$4 === 48) {
389
- return [
390
- length,
391
- "Clear"
392
- ];
393
- }
394
- exit$2 = 5;
395
- }
396
- if (exit$2 === 5) {
397
- var colorValue$2 = codePoints[2];
398
- colorMode = colorMode$2;
399
- colorValue = colorValue$2;
400
- xs = codePoints;
401
- exit$1 = 2;
402
- }
403
- break;
404
- case 4 :
405
- var match$5 = codePoints[0];
406
- if (match$5 !== 91) {
407
- return [
408
- 1,
409
- undefined
410
- ];
411
- }
412
- var match$6 = codePoints[1];
413
- if (match$6 !== 49) {
531
+ case 1:
532
+ var match$1 = codePoints[0];
533
+ if (match$1 !== 91) {
534
+ return [
535
+ 1,
536
+ void 0
537
+ ];
538
+ } else {
539
+ return [
540
+ length2,
541
+ "Clear"
542
+ ];
543
+ }
544
+ case 2:
545
+ var match$2 = codePoints[0];
546
+ if (match$2 !== 91) {
547
+ return [
548
+ 1,
549
+ void 0
550
+ ];
551
+ }
552
+ var style$2 = codePoints[1];
553
+ if (style$2 !== 48) {
554
+ return [
555
+ length2,
556
+ flatMap(get$1(style$2), function(style2) {
557
+ return {
558
+ TAG: "Style",
559
+ _0: style2
560
+ };
561
+ })
562
+ ];
563
+ } else {
564
+ return [
565
+ length2,
566
+ "Clear"
567
+ ];
568
+ }
569
+ case 3:
570
+ var match$3 = codePoints[0];
571
+ if (match$3 !== 91) {
572
+ return [
573
+ 1,
574
+ void 0
575
+ ];
576
+ }
577
+ var colorMode$2 = codePoints[1];
578
+ var exit$2 = 0;
579
+ if (colorMode$2 !== 48) {
580
+ exit$2 = 5;
581
+ } else {
582
+ var match$4 = codePoints[2];
583
+ if (match$4 === 48) {
414
584
  return [
415
- 1,
416
- undefined
417
- ];
585
+ length2,
586
+ "Clear"
587
+ ];
418
588
  }
419
- var colorMode$3 = codePoints[2];
420
- var colorValue$3 = codePoints[3];
421
- colorMode = colorMode$3;
422
- colorValue = colorValue$3;
589
+ exit$2 = 5;
590
+ }
591
+ if (exit$2 === 5) {
592
+ var colorValue$2 = codePoints[2];
593
+ colorMode = colorMode$2;
594
+ colorValue = colorValue$2;
423
595
  xs = codePoints;
424
596
  exit$1 = 2;
425
- break;
426
- case 5 :
427
- var match$7 = codePoints[0];
428
- if (match$7 !== 91) {
429
- return [
430
- 1,
431
- undefined
432
- ];
433
- }
434
- var colorMode$4 = codePoints[1];
435
- var colorValue$4 = codePoints[2];
436
- var match$8 = codePoints[3];
437
- if (match$8 !== 59) {
438
- if (colorValue$4 !== 59) {
439
- return [
440
- 1,
441
- undefined
442
- ];
443
- }
444
- var colorMode$5 = codePoints[3];
445
- var colorValue$5 = codePoints[4];
446
- colorMode$1 = colorMode$5;
447
- colorValue$1 = colorValue$5;
448
- style = colorMode$4;
449
- exit$1 = 3;
450
- } else {
451
- var style$3 = codePoints[4];
452
- colorMode$1 = colorMode$4;
453
- colorValue$1 = colorValue$4;
454
- style = style$3;
455
- exit$1 = 3;
456
- }
457
- break;
458
- case 6 :
459
- var match$9 = codePoints[0];
460
- if (match$9 !== 91) {
461
- return [
462
- 1,
463
- undefined
464
- ];
465
- }
466
- var match$10 = codePoints[1];
467
- if (match$10 !== 48) {
468
- return [
469
- 1,
470
- undefined
471
- ];
472
- }
473
- var style$4 = codePoints[2];
474
- var match$11 = codePoints[3];
475
- if (match$11 !== 59) {
597
+ }
598
+ break;
599
+ case 4:
600
+ var match$5 = codePoints[0];
601
+ if (match$5 !== 91) {
602
+ return [
603
+ 1,
604
+ void 0
605
+ ];
606
+ }
607
+ var match$6 = codePoints[1];
608
+ if (match$6 !== 49) {
609
+ return [
610
+ 1,
611
+ void 0
612
+ ];
613
+ }
614
+ var colorMode$3 = codePoints[2];
615
+ var colorValue$3 = codePoints[3];
616
+ colorMode = colorMode$3;
617
+ colorValue = colorValue$3;
618
+ xs = codePoints;
619
+ exit$1 = 2;
620
+ break;
621
+ case 5:
622
+ var match$7 = codePoints[0];
623
+ if (match$7 !== 91) {
624
+ return [
625
+ 1,
626
+ void 0
627
+ ];
628
+ }
629
+ var colorMode$4 = codePoints[1];
630
+ var colorValue$4 = codePoints[2];
631
+ var match$8 = codePoints[3];
632
+ if (match$8 !== 59) {
633
+ if (colorValue$4 !== 59) {
476
634
  return [
477
- 1,
478
- undefined
479
- ];
635
+ 1,
636
+ void 0
637
+ ];
480
638
  }
481
- var colorMode$6 = codePoints[4];
482
- var colorValue$6 = codePoints[5];
483
- colorMode$1 = colorMode$6;
484
- colorValue$1 = colorValue$6;
485
- style = style$4;
639
+ var colorMode$5 = codePoints[3];
640
+ var colorValue$5 = codePoints[4];
641
+ colorMode$1 = colorMode$5;
642
+ colorValue$1 = colorValue$5;
643
+ style = colorMode$4;
486
644
  exit$1 = 3;
487
- break;
488
- case 0 :
489
- case 7 :
645
+ } else {
646
+ var style$3 = codePoints[4];
647
+ colorMode$1 = colorMode$4;
648
+ colorValue$1 = colorValue$4;
649
+ style = style$3;
650
+ exit$1 = 3;
651
+ }
652
+ break;
653
+ case 6:
654
+ var match$9 = codePoints[0];
655
+ if (match$9 !== 91) {
490
656
  return [
491
- 1,
492
- undefined
493
- ];
494
- case 8 :
495
- var match$12 = codePoints[0];
496
- if (match$12 !== 91) {
497
- return [
498
- 1,
499
- undefined
500
- ];
501
- }
502
- var style$5 = codePoints[1];
503
- var match$13 = codePoints[2];
504
- if (match$13 !== 59) {
505
- return [
506
- 1,
507
- undefined
508
- ];
509
- }
510
- var cm1$1 = codePoints[3];
511
- var cv1$1 = codePoints[4];
512
- var match$14 = codePoints[5];
513
- if (match$14 !== 59) {
514
- return [
515
- 1,
516
- undefined
517
- ];
518
- }
519
- var cm2$1 = codePoints[6];
520
- var cv2$1 = codePoints[7];
521
- style$1 = style$5;
522
- cm1 = cm1$1;
523
- cv1 = cv1$1;
524
- cm2 = cm2$1;
525
- cv2 = cv2$1;
526
- xs$1 = codePoints;
527
- exit$1 = 4;
528
- break;
529
- case 9 :
530
- var match$15 = codePoints[0];
531
- if (match$15 !== 91) {
532
- return [
533
- 1,
534
- undefined
535
- ];
536
- }
537
- var style$6 = codePoints[1];
538
- var exit$3 = 0;
539
- if (style$6 !== 48) {
657
+ 1,
658
+ void 0
659
+ ];
660
+ }
661
+ var match$10 = codePoints[1];
662
+ if (match$10 !== 48) {
663
+ return [
664
+ 1,
665
+ void 0
666
+ ];
667
+ }
668
+ var style$4 = codePoints[2];
669
+ var match$11 = codePoints[3];
670
+ if (match$11 !== 59) {
671
+ return [
672
+ 1,
673
+ void 0
674
+ ];
675
+ }
676
+ var colorMode$6 = codePoints[4];
677
+ var colorValue$6 = codePoints[5];
678
+ colorMode$1 = colorMode$6;
679
+ colorValue$1 = colorValue$6;
680
+ style = style$4;
681
+ exit$1 = 3;
682
+ break;
683
+ case 0:
684
+ case 7:
685
+ return [
686
+ 1,
687
+ void 0
688
+ ];
689
+ case 8:
690
+ var match$12 = codePoints[0];
691
+ if (match$12 !== 91) {
692
+ return [
693
+ 1,
694
+ void 0
695
+ ];
696
+ }
697
+ var style$5 = codePoints[1];
698
+ var match$13 = codePoints[2];
699
+ if (match$13 !== 59) {
700
+ return [
701
+ 1,
702
+ void 0
703
+ ];
704
+ }
705
+ var cm1$1 = codePoints[3];
706
+ var cv1$1 = codePoints[4];
707
+ var match$14 = codePoints[5];
708
+ if (match$14 !== 59) {
709
+ return [
710
+ 1,
711
+ void 0
712
+ ];
713
+ }
714
+ var cm2$1 = codePoints[6];
715
+ var cv2$1 = codePoints[7];
716
+ style$1 = style$5;
717
+ cm1 = cm1$1;
718
+ cv1 = cv1$1;
719
+ cm2 = cm2$1;
720
+ cv2 = cv2$1;
721
+ xs$1 = codePoints;
722
+ exit$1 = 4;
723
+ break;
724
+ case 9:
725
+ var match$15 = codePoints[0];
726
+ if (match$15 !== 91) {
727
+ return [
728
+ 1,
729
+ void 0
730
+ ];
731
+ }
732
+ var style$6 = codePoints[1];
733
+ var exit$3 = 0;
734
+ if (style$6 !== 48) {
735
+ exit$3 = 5;
736
+ } else {
737
+ var style$7 = codePoints[2];
738
+ var match$16 = codePoints[3];
739
+ if (match$16 !== 59) {
540
740
  exit$3 = 5;
541
741
  } else {
542
- var style$7 = codePoints[2];
543
- var match$16 = codePoints[3];
544
- if (match$16 !== 59) {
742
+ var cm1$2 = codePoints[4];
743
+ var cv1$2 = codePoints[5];
744
+ var match$17 = codePoints[6];
745
+ if (match$17 !== 59) {
545
746
  exit$3 = 5;
546
747
  } else {
547
- var cm1$2 = codePoints[4];
548
- var cv1$2 = codePoints[5];
549
- var match$17 = codePoints[6];
550
- if (match$17 !== 59) {
551
- exit$3 = 5;
552
- } else {
553
- var cm2$2 = codePoints[7];
554
- var cv2$2 = codePoints[8];
555
- style$1 = style$7;
556
- cm1 = cm1$2;
557
- cv1 = cv1$2;
558
- cm2 = cm2$2;
559
- cv2 = cv2$2;
560
- xs$1 = codePoints;
561
- exit$1 = 4;
562
- }
748
+ var cm2$2 = codePoints[7];
749
+ var cv2$2 = codePoints[8];
750
+ style$1 = style$7;
751
+ cm1 = cm1$2;
752
+ cv1 = cv1$2;
753
+ cm2 = cm2$2;
754
+ cv2 = cv2$2;
755
+ xs$1 = codePoints;
756
+ exit$1 = 4;
563
757
  }
564
758
  }
565
- if (exit$3 === 5) {
566
- var match$18 = codePoints[2];
567
- if (match$18 !== 59) {
568
- return [
569
- 1,
570
- undefined
571
- ];
572
- }
573
- var cm1$3 = codePoints[3];
574
- var cv1$3 = codePoints[4];
575
- var match$19 = codePoints[5];
576
- if (match$19 !== 59) {
577
- return [
578
- 1,
579
- undefined
580
- ];
581
- }
582
- var match$20 = codePoints[6];
583
- if (match$20 !== 49) {
584
- return [
585
- 1,
586
- undefined
587
- ];
588
- }
589
- var cm2$3 = codePoints[7];
590
- var cv2$3 = codePoints[8];
591
- style$1 = style$6;
592
- cm1 = cm1$3;
593
- cv1 = cv1$3;
594
- cm2 = cm2$3;
595
- cv2 = cv2$3;
596
- xs$1 = codePoints;
597
- exit$1 = 4;
598
- }
599
- break;
600
- case 10 :
601
- var match$21 = codePoints[0];
602
- if (match$21 !== 91) {
603
- return [
604
- 1,
605
- undefined
606
- ];
607
- }
608
- var match$22 = codePoints[1];
609
- if (match$22 !== 48) {
610
- return [
611
- 1,
612
- undefined
613
- ];
614
- }
615
- var style$8 = codePoints[2];
616
- var match$23 = codePoints[3];
617
- if (match$23 !== 59) {
759
+ }
760
+ if (exit$3 === 5) {
761
+ var match$18 = codePoints[2];
762
+ if (match$18 !== 59) {
618
763
  return [
619
- 1,
620
- undefined
621
- ];
764
+ 1,
765
+ void 0
766
+ ];
622
767
  }
623
- var cm1$4 = codePoints[4];
624
- var cv1$4 = codePoints[5];
625
- var match$24 = codePoints[6];
626
- if (match$24 !== 59) {
768
+ var cm1$3 = codePoints[3];
769
+ var cv1$3 = codePoints[4];
770
+ var match$19 = codePoints[5];
771
+ if (match$19 !== 59) {
627
772
  return [
628
- 1,
629
- undefined
630
- ];
773
+ 1,
774
+ void 0
775
+ ];
631
776
  }
632
- var match$25 = codePoints[7];
633
- if (match$25 !== 49) {
777
+ var match$20 = codePoints[6];
778
+ if (match$20 !== 49) {
634
779
  return [
635
- 1,
636
- undefined
637
- ];
780
+ 1,
781
+ void 0
782
+ ];
638
783
  }
639
- var cm2$4 = codePoints[8];
640
- var cv2$4 = codePoints[9];
641
- style$1 = style$8;
642
- cm1 = cm1$4;
643
- cv1 = cv1$4;
644
- cm2 = cm2$4;
645
- cv2 = cv2$4;
784
+ var cm2$3 = codePoints[7];
785
+ var cv2$3 = codePoints[8];
786
+ style$1 = style$6;
787
+ cm1 = cm1$3;
788
+ cv1 = cv1$3;
789
+ cm2 = cm2$3;
790
+ cv2 = cv2$3;
646
791
  xs$1 = codePoints;
647
792
  exit$1 = 4;
648
- break;
649
-
650
- }
651
- switch (exit$1) {
652
- case 2 :
793
+ }
794
+ break;
795
+ case 10:
796
+ var match$21 = codePoints[0];
797
+ if (match$21 !== 91) {
653
798
  return [
654
- length,
655
- Core__Option.flatMap(get(colorMode, colorValue + (
656
- xs.length === 4 ? 10 : 0
657
- ) | 0), (function (colorCss) {
658
- return {
659
- TAG: "Style",
660
- _0: colorCss
661
- };
662
- }))
663
- ];
664
- case 3 :
799
+ 1,
800
+ void 0
801
+ ];
802
+ }
803
+ var match$22 = codePoints[1];
804
+ if (match$22 !== 48) {
805
+ return [
806
+ 1,
807
+ void 0
808
+ ];
809
+ }
810
+ var style$8 = codePoints[2];
811
+ var match$23 = codePoints[3];
812
+ if (match$23 !== 59) {
665
813
  return [
666
- length,
667
- Core__Option.flatMap(get(colorMode$1, colorValue$1), (function (colorCss) {
668
- var fontCss = get$1(style);
669
- if (fontCss !== undefined) {
670
- return {
671
- TAG: "Style",
672
- _0: Object.assign({}, colorCss, fontCss)
673
- };
674
- } else {
675
- return {
676
- TAG: "Style",
677
- _0: colorCss
678
- };
679
- }
680
- }))
681
- ];
682
- case 4 :
814
+ 1,
815
+ void 0
816
+ ];
817
+ }
818
+ var cm1$4 = codePoints[4];
819
+ var cv1$4 = codePoints[5];
820
+ var match$24 = codePoints[6];
821
+ if (match$24 !== 59) {
822
+ return [
823
+ 1,
824
+ void 0
825
+ ];
826
+ }
827
+ var match$25 = codePoints[7];
828
+ if (match$25 !== 49) {
683
829
  return [
684
- length,
685
- Core__Option.flatMap(get(cm1, cv1), (function (colorCss1) {
686
- return Core__Option.flatMap(get(cm2, cv2 + (
687
- xs$1.length === 9 ? 10 : 0
688
- ) | 0), (function (colorCss2) {
689
- var css = Object.assign({}, colorCss1, colorCss2);
690
- var fontCss = get$1(style$1);
691
- if (fontCss !== undefined) {
692
- return {
693
- TAG: "Style",
694
- _0: Object.assign({}, css, fontCss)
695
- };
696
- } else {
697
- return {
698
- TAG: "Style",
699
- _0: css
700
- };
701
- }
702
- }));
703
- }))
704
- ];
705
-
830
+ 1,
831
+ void 0
832
+ ];
833
+ }
834
+ var cm2$4 = codePoints[8];
835
+ var cv2$4 = codePoints[9];
836
+ style$1 = style$8;
837
+ cm1 = cm1$4;
838
+ cv1 = cv1$4;
839
+ cm2 = cm2$4;
840
+ cv2 = cv2$4;
841
+ xs$1 = codePoints;
842
+ exit$1 = 4;
843
+ break;
844
+ }
845
+ switch (exit$1) {
846
+ case 2:
847
+ return [
848
+ length2,
849
+ flatMap(get(colorMode, colorValue + (xs.length === 4 ? 10 : 0) | 0), function(colorCss) {
850
+ return {
851
+ TAG: "Style",
852
+ _0: colorCss
853
+ };
854
+ })
855
+ ];
856
+ case 3:
857
+ return [
858
+ length2,
859
+ flatMap(get(colorMode$1, colorValue$1), function(colorCss) {
860
+ var fontCss = get$1(style);
861
+ if (fontCss !== void 0) {
862
+ return {
863
+ TAG: "Style",
864
+ _0: Object.assign({}, colorCss, fontCss)
865
+ };
866
+ } else {
867
+ return {
868
+ TAG: "Style",
869
+ _0: colorCss
870
+ };
871
+ }
872
+ })
873
+ ];
874
+ case 4:
875
+ return [
876
+ length2,
877
+ flatMap(get(cm1, cv1), function(colorCss1) {
878
+ return flatMap(get(cm2, cv2 + (xs$1.length === 9 ? 10 : 0) | 0), function(colorCss2) {
879
+ var css = Object.assign({}, colorCss1, colorCss2);
880
+ var fontCss = get$1(style$1);
881
+ if (fontCss !== void 0) {
882
+ return {
883
+ TAG: "Style",
884
+ _0: Object.assign({}, css, fontCss)
885
+ };
886
+ } else {
887
+ return {
888
+ TAG: "Style",
889
+ _0: css
890
+ };
891
+ }
892
+ });
893
+ })
894
+ ];
706
895
  }
707
896
  }
708
-
709
897
  }
710
-
898
+ __name(parse, "parse");
711
899
  var AnsiCode = {
712
- fourBitColors: fourBitColors,
713
- threeBitColors: threeBitColors,
714
- combine: combine,
715
- addWeight: addWeight,
716
- addStyle: addStyle,
717
- addDecoration: addDecoration,
718
- int_of_cp: int_of_cp,
719
- ColorCss: ColorCss,
720
- FontCss: FontCss,
721
- HttpLink: HttpLink,
722
- parse: parse
900
+ fourBitColors,
901
+ threeBitColors,
902
+ combine,
903
+ addWeight,
904
+ addStyle,
905
+ addDecoration,
906
+ int_of_cp,
907
+ ColorCss,
908
+ FontCss,
909
+ HttpLink,
910
+ parse
723
911
  };
724
-
725
912
  function text(txt, from, to_) {
726
913
  return {
727
- TAG: "Text",
728
- _0: Js_string.slice(from, to_, txt)
729
- };
914
+ TAG: "Text",
915
+ _0: slice(from, to_, txt)
916
+ };
730
917
  }
731
-
732
- function parse$1(txt, length, pos) {
733
- var go = function (_pos, _prev) {
734
- while(true) {
918
+ __name(text, "text");
919
+ function parse$1(txt, length2, pos) {
920
+ var go = /* @__PURE__ */ __name(function(_pos, _prev) {
921
+ while (true) {
735
922
  var prev = _prev;
736
- var pos = _pos;
737
- var match = pos === length;
738
- var match$1 = parse(txt, pos);
923
+ var pos2 = _pos;
924
+ var match = pos2 === length2;
925
+ var match$1 = parse(txt, pos2);
739
926
  if (match) {
740
927
  return [
741
- pos,
742
- {
743
- hd: text(txt, prev, pos),
744
- tl: /* [] */0
745
- }
746
- ];
928
+ pos2,
929
+ {
930
+ hd: text(txt, prev, pos2),
931
+ tl: (
932
+ /* [] */
933
+ 0
934
+ )
935
+ }
936
+ ];
747
937
  }
748
938
  var code = match$1[1];
749
- if (code !== undefined) {
750
- var prevElem = text(txt, prev, pos);
751
- var pos$1 = pos + match$1[0] | 0;
939
+ if (code !== void 0) {
940
+ var prevElem = text(txt, prev, pos2);
941
+ var pos$1 = pos2 + match$1[0] | 0;
752
942
  if (typeof code !== "object") {
753
943
  switch (code) {
754
- case "Clear" :
755
- return [
756
- pos$1,
757
- {
758
- hd: prevElem,
759
- tl: /* [] */0
760
- }
761
- ];
762
- case "EraseLine" :
763
- _prev = pos$1;
764
- _pos = pos$1;
765
- continue ;
766
- case "CarriageReturn" :
767
- return [
768
- pos$1,
769
- {
770
- hd: prevElem,
771
- tl: {
772
- hd: "LineBreak",
773
- tl: /* [] */0
774
- }
775
- }
776
- ];
777
-
944
+ case "Clear":
945
+ return [
946
+ pos$1,
947
+ {
948
+ hd: prevElem,
949
+ tl: (
950
+ /* [] */
951
+ 0
952
+ )
953
+ }
954
+ ];
955
+ case "EraseLine":
956
+ _prev = pos$1;
957
+ _pos = pos$1;
958
+ continue;
959
+ case "CarriageReturn":
960
+ return [
961
+ pos$1,
962
+ {
963
+ hd: prevElem,
964
+ tl: {
965
+ hd: "LineBreak",
966
+ tl: (
967
+ /* [] */
968
+ 0
969
+ )
970
+ }
971
+ }
972
+ ];
778
973
  }
779
974
  } else {
780
975
  if (code.TAG === "HRef") {
781
976
  return [
782
- pos$1,
783
- {
784
- hd: prevElem,
785
- tl: {
786
- hd: {
787
- TAG: "Link",
788
- _0: code._0
789
- },
790
- tl: /* [] */0
791
- }
792
- }
793
- ];
977
+ pos$1,
978
+ {
979
+ hd: prevElem,
980
+ tl: {
981
+ hd: {
982
+ TAG: "Link",
983
+ _0: code._0
984
+ },
985
+ tl: (
986
+ /* [] */
987
+ 0
988
+ )
989
+ }
990
+ }
991
+ ];
794
992
  }
795
993
  var match$2 = go(pos$1, pos$1);
796
994
  var styled = match$2[1];
797
- if (styled !== undefined) {
995
+ if (styled !== void 0) {
798
996
  return [
799
- match$2[0],
800
- {
801
- hd: prevElem,
802
- tl: {
803
- hd: {
804
- TAG: "DocStyle",
805
- _0: code._0,
806
- _1: styled
807
- },
808
- tl: /* [] */0
809
- }
810
- }
811
- ];
997
+ match$2[0],
998
+ {
999
+ hd: prevElem,
1000
+ tl: {
1001
+ hd: {
1002
+ TAG: "DocStyle",
1003
+ _0: code._0,
1004
+ _1: styled
1005
+ },
1006
+ tl: (
1007
+ /* [] */
1008
+ 0
1009
+ )
1010
+ }
1011
+ }
1012
+ ];
812
1013
  } else {
813
1014
  return [
814
- pos$1,
815
- undefined
816
- ];
1015
+ pos$1,
1016
+ void 0
1017
+ ];
817
1018
  }
818
1019
  }
819
1020
  } else {
820
- _pos = pos + 1 | 0;
821
- continue ;
1021
+ _pos = pos2 + 1 | 0;
1022
+ continue;
822
1023
  }
823
- };
824
- };
1024
+ }
1025
+ ;
1026
+ }, "go");
825
1027
  return go(pos, pos);
826
1028
  }
827
-
1029
+ __name(parse$1, "parse$1");
828
1030
  var $$Document = {
829
- text: text,
1031
+ text,
830
1032
  parse: parse$1
831
1033
  };
832
-
833
1034
  function parse$2(txt) {
834
- var go = function (_txt, _acc) {
835
- while(true) {
1035
+ var go = /* @__PURE__ */ __name(function(_txt, _acc) {
1036
+ while (true) {
836
1037
  var acc = _acc;
837
- var txt = _txt;
838
- var length = txt.length;
839
- var match = parse$1(txt, length, 0);
1038
+ var txt2 = _txt;
1039
+ var length2 = txt2.length;
1040
+ var match = parse$1(txt2, length2, 0);
840
1041
  var doc = match[1];
841
1042
  var pos = match[0];
842
- if (doc === undefined) {
1043
+ if (doc === void 0) {
843
1044
  return acc;
844
1045
  }
845
- if (pos === length) {
846
- return Core__List.add(acc, doc);
1046
+ if (pos === length2) {
1047
+ return add(acc, doc);
847
1048
  }
848
- _acc = Core__List.add(acc, doc);
849
- _txt = Js_string.sliceToEnd(pos, txt);
850
- continue ;
851
- };
852
- };
853
- return Belt_List.flatten(Belt_List.reverse(go(txt, /* [] */0)));
1049
+ _acc = add(acc, doc);
1050
+ _txt = sliceToEnd(pos, txt2);
1051
+ continue;
1052
+ }
1053
+ ;
1054
+ }, "go");
1055
+ return flat(reverse(go(
1056
+ txt,
1057
+ /* [] */
1058
+ 0
1059
+ )));
854
1060
  }
855
-
1061
+ __name(parse$2, "parse$2");
856
1062
  function render(doc) {
857
- var go = function (_xs, _idx, _acc) {
858
- while(true) {
1063
+ var go = /* @__PURE__ */ __name(function(_xs, _idx, _acc) {
1064
+ while (true) {
859
1065
  var acc = _acc;
860
1066
  var idx = _idx;
861
1067
  var xs = _xs;
862
1068
  if (!xs) {
863
- return Core__List.toArray(Core__List.reverse(acc));
1069
+ return toArray(reverse(acc));
864
1070
  }
865
1071
  var txt = xs.hd;
866
1072
  if (typeof txt !== "object") {
867
- _acc = Core__List.add(acc, JsxRuntime.jsx("br", {}, String(idx)));
1073
+ _acc = add(acc, JsxRuntime.jsx("br", {}, String(idx)));
868
1074
  _idx = idx + 1 | 0;
869
1075
  _xs = xs.tl;
870
- continue ;
1076
+ continue;
871
1077
  }
872
1078
  switch (txt.TAG) {
873
- case "Text" :
874
- _acc = Core__List.add(acc, txt._0);
875
- _idx = idx + 1 | 0;
876
- _xs = xs.tl;
877
- continue ;
878
- case "Link" :
879
- var href = txt._0;
880
- _acc = Core__List.add(acc, JsxRuntime.jsx("a", {
881
- children: href,
882
- href: href
883
- }, String(idx)));
884
- _idx = idx + 1 | 0;
885
- _xs = xs.tl;
886
- continue ;
887
- case "DocStyle" :
888
- _acc = Core__List.add(acc, JsxRuntime.jsx("span", {
889
- children: go(txt._1, 0, /* [] */0),
890
- style: txt._0
891
- }, String(idx)));
892
- _idx = idx + 1 | 0;
893
- _xs = xs.tl;
894
- continue ;
895
-
1079
+ case "Text":
1080
+ _acc = add(acc, txt._0);
1081
+ _idx = idx + 1 | 0;
1082
+ _xs = xs.tl;
1083
+ continue;
1084
+ case "Link":
1085
+ var href = txt._0;
1086
+ _acc = add(acc, JsxRuntime.jsx("a", {
1087
+ children: href,
1088
+ href
1089
+ }, String(idx)));
1090
+ _idx = idx + 1 | 0;
1091
+ _xs = xs.tl;
1092
+ continue;
1093
+ case "DocStyle":
1094
+ _acc = add(acc, JsxRuntime.jsx("span", {
1095
+ children: go(
1096
+ txt._1,
1097
+ 0,
1098
+ /* [] */
1099
+ 0
1100
+ ),
1101
+ style: txt._0
1102
+ }, String(idx)));
1103
+ _idx = idx + 1 | 0;
1104
+ _xs = xs.tl;
1105
+ continue;
896
1106
  }
897
- };
898
- };
899
- return go(doc, 0, /* [] */0);
1107
+ }
1108
+ ;
1109
+ }, "go");
1110
+ return go(
1111
+ doc,
1112
+ 0,
1113
+ /* [] */
1114
+ 0
1115
+ );
900
1116
  }
901
-
1117
+ __name(render, "render");
902
1118
  function Ansi(props) {
903
1119
  return JsxRuntime.jsx("div", {
904
- children: render(parse$2(props.log))
905
- });
1120
+ children: render(parse$2(props.log))
1121
+ });
906
1122
  }
907
-
1123
+ __name(Ansi, "Ansi");
908
1124
  var make = Ansi;
909
-
910
1125
  var $$default = Ansi;
911
-
912
- exports.AnsiCode = AnsiCode;
913
- exports.$$Document = $$Document;
914
- exports.parse = parse$2;
915
- exports.render = render;
916
- exports.make = make;
917
- exports.default = $$default;
918
- exports.__esModule = true;
919
- /* linkRe Not a pure module */
1126
+ export {
1127
+ $$Document,
1128
+ AnsiCode,
1129
+ $$default as default,
1130
+ make,
1131
+ parse$2 as parse,
1132
+ render
1133
+ };