reviw 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/server.js +288 -272
- package/package.json +1 -1
package/dist/server/server.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { dirname as dirname$
|
|
3
|
-
import { spawnSync as spawnSync$
|
|
4
|
-
import { createHash as createHash$
|
|
5
|
-
import { createServer as createServer$
|
|
6
|
-
import { statSync as statSync$
|
|
7
|
-
import { tmpdir as tmpdir$
|
|
2
|
+
import { dirname as dirname$2143, join as join$2117, resolve as resolve$2162, extname as extname$2150, basename as basename$2160 } from "node:path";
|
|
3
|
+
import { spawnSync as spawnSync$2239, execSync as execSync$2206, spawn as spawn$2234 } from "node:child_process";
|
|
4
|
+
import { createHash as createHash$2188 } from "node:crypto";
|
|
5
|
+
import { createServer as createServer$2167 } from "node:http";
|
|
6
|
+
import { statSync as statSync$2257, unwatchFile as unwatchFile$2193, readdirSync as readdirSync$2219, existsSync as existsSync$2126, rmSync as rmSync$2228, mkdtempSync as mkdtempSync$2209, appendFileSync as appendFileSync$2124, createReadStream as createReadStream$2261, writeFileSync as writeFileSync$2121, unlinkSync as unlinkSync$2128, readFileSync as readFileSync$2131, watchFile as watchFile$2295, mkdirSync as mkdirSync$2136 } from "node:fs";
|
|
7
|
+
import { tmpdir as tmpdir$2114, homedir as homedir$2133 } from "node:os";
|
|
8
8
|
class $PanicError extends Error {}
|
|
9
9
|
function $panic() {
|
|
10
10
|
throw new $PanicError();
|
|
@@ -214,6 +214,7 @@ function _M0TP36kazuph5reviw4core12ReviewResult(param0, param1, param2, param3,
|
|
|
214
214
|
this.decision = param6;
|
|
215
215
|
this.action = param7;
|
|
216
216
|
}
|
|
217
|
+
const _M0FP36kazuph5reviw6server21json__strip__decision = (s) => { try { const o = JSON.parse(s); delete o.decision; delete o.action; return JSON.stringify(o); } catch(e) { return s; } };
|
|
217
218
|
const _M0FP36kazuph5reviw6server12set__timeout = (cb, ms) => setTimeout(cb, ms);
|
|
218
219
|
const _M0FP36kazuph5reviw6server15js__stdio__pipe = () => ({ stdio: "pipe" });
|
|
219
220
|
const _M0FP36kazuph5reviw6server15try__call__bool = (fn) => { try { return fn(); } catch(e) { return false; } };
|
|
@@ -314,140 +315,143 @@ function _M0TP36kazuph5reviw6server13ServerContext(param0, param1, param2, param
|
|
|
314
315
|
this.finished = param9;
|
|
315
316
|
}
|
|
316
317
|
const _M0FP092moonbitlang_2fcore_2fbuiltin_2fStringBuilder_24as_24_40moonbitlang_2fcore_2fbuiltin_2eLogger = { method_0: _M0IPB13StringBuilderPB6Logger13write__string, method_1: _M0IP016_24default__implPB6Logger16write__substringGRPB13StringBuilderE, method_2: _M0IPB13StringBuilderPB6Logger11write__view, method_3: _M0IPB13StringBuilderPB6Logger11write__char };
|
|
317
|
-
const
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
const
|
|
321
|
-
const
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
const
|
|
325
|
-
const
|
|
326
|
-
const
|
|
327
|
-
const
|
|
328
|
-
const
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
const
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
const
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const
|
|
350
|
-
const
|
|
351
|
-
const
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
const
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
const
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
const
|
|
369
|
-
const
|
|
370
|
-
const
|
|
371
|
-
const
|
|
372
|
-
const
|
|
373
|
-
const
|
|
374
|
-
const
|
|
375
|
-
const
|
|
376
|
-
const
|
|
377
|
-
const
|
|
378
|
-
const
|
|
379
|
-
const
|
|
380
|
-
const
|
|
381
|
-
const
|
|
382
|
-
const
|
|
383
|
-
const
|
|
384
|
-
const
|
|
385
|
-
const
|
|
386
|
-
const
|
|
387
|
-
const
|
|
388
|
-
const
|
|
389
|
-
const
|
|
390
|
-
const
|
|
391
|
-
const
|
|
392
|
-
const
|
|
393
|
-
const
|
|
394
|
-
const
|
|
395
|
-
const
|
|
396
|
-
const
|
|
397
|
-
const
|
|
398
|
-
const
|
|
399
|
-
const
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
const
|
|
405
|
-
const
|
|
406
|
-
const
|
|
407
|
-
const
|
|
408
|
-
const
|
|
409
|
-
const
|
|
410
|
-
const
|
|
411
|
-
const
|
|
412
|
-
const
|
|
413
|
-
const
|
|
414
|
-
const
|
|
415
|
-
const
|
|
416
|
-
const
|
|
417
|
-
const
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
const
|
|
421
|
-
const
|
|
422
|
-
const
|
|
423
|
-
const
|
|
424
|
-
const
|
|
425
|
-
const
|
|
426
|
-
const
|
|
427
|
-
const
|
|
428
|
-
const
|
|
429
|
-
const
|
|
430
|
-
const
|
|
431
|
-
const
|
|
432
|
-
const
|
|
433
|
-
const
|
|
434
|
-
const
|
|
318
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS559 = ":";
|
|
319
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS560 = "#";
|
|
320
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS561 = "'";
|
|
321
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS562 = "\"";
|
|
322
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS563 = "\n";
|
|
323
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS564 = "[";
|
|
324
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS565 = "]";
|
|
325
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS566 = "{";
|
|
326
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS567 = "}";
|
|
327
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS568 = ",";
|
|
328
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS569 = "&";
|
|
329
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS570 = "*";
|
|
330
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS571 = "!";
|
|
331
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS572 = "|";
|
|
332
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS573 = ">";
|
|
333
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS574 = "%";
|
|
334
|
+
const _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS575 = "@";
|
|
335
|
+
const _M0FP36kazuph5reviw4core16split__to__linesN7_2abindS650 = "\n";
|
|
336
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS673 = "- ";
|
|
337
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS674 = " -";
|
|
338
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS675 = " ";
|
|
339
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS676 = " ";
|
|
340
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS678 = "- ";
|
|
341
|
+
const _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS679 = " ";
|
|
342
|
+
const _M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS683 = "- ";
|
|
343
|
+
const _M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS684 = " ";
|
|
344
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS703 = "<details";
|
|
345
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS704 = "<div";
|
|
346
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS705 = "<section";
|
|
347
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS706 = "<article";
|
|
348
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS707 = "<aside";
|
|
349
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS708 = "<nav";
|
|
350
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS709 = "<header";
|
|
351
|
+
const _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS710 = "<footer";
|
|
352
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS712 = "#";
|
|
353
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS713 = "```";
|
|
354
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS714 = ">";
|
|
355
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS715 = "- ";
|
|
356
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS716 = "* ";
|
|
357
|
+
const _M0FP36kazuph5reviw4core16is__block__startN7_2abindS717 = "<";
|
|
358
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS718 = "graph ";
|
|
359
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS719 = "flowchart ";
|
|
360
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS720 = "sequenceDiagram";
|
|
361
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS721 = "classDiagram";
|
|
362
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS722 = "stateDiagram";
|
|
363
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS723 = "erDiagram";
|
|
364
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS724 = "journey";
|
|
365
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS725 = "gantt";
|
|
366
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS726 = "pie";
|
|
367
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS727 = "gitGraph";
|
|
368
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS728 = "mindmap";
|
|
369
|
+
const _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS729 = "timeline";
|
|
370
|
+
const _M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS730 = "|";
|
|
371
|
+
const _M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS731 = "-";
|
|
372
|
+
const _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS753 = "|";
|
|
373
|
+
const _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS754 = "|";
|
|
374
|
+
const _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS755 = "|";
|
|
375
|
+
const _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS752 = "|";
|
|
376
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS756 = ".mp4";
|
|
377
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS757 = ".webm";
|
|
378
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS758 = ".mov";
|
|
379
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS759 = ".avi";
|
|
380
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS760 = ".mkv";
|
|
381
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS761 = ".m4v";
|
|
382
|
+
const _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS762 = ".ogv";
|
|
383
|
+
const _M0FP36kazuph5reviw4core14render__inlineN7_2abindS768 = "javascript:";
|
|
384
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS781 = "expression(";
|
|
385
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS782 = "url(";
|
|
386
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS783 = "-moz-binding";
|
|
387
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS784 = "behavior:";
|
|
388
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS785 = "behaviour:";
|
|
389
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS786 = "javascript:";
|
|
390
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS787 = "vbscript:";
|
|
391
|
+
const _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS788 = "@import";
|
|
392
|
+
const _M0FP36kazuph5reviw4core24is__event__handler__attrN7_2abindS789 = "on";
|
|
393
|
+
const _M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS790 = "javascript:";
|
|
394
|
+
const _M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS791 = "data:text/html";
|
|
395
|
+
const _M0FP36kazuph5reviw4core14sanitize__htmlN7_2abindS807 = ">";
|
|
396
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS809 = "<";
|
|
397
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS811 = "<summary>";
|
|
398
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS812 = "</details>";
|
|
399
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS814 = "</details>";
|
|
400
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS815 = "<details";
|
|
401
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS819 = "#";
|
|
402
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS820 = "```";
|
|
403
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS822 = "```";
|
|
404
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS823 = ">";
|
|
405
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS825 = ">";
|
|
406
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS830 = "- ";
|
|
407
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS831 = "* ";
|
|
408
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS836 = "- ";
|
|
409
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS837 = "* ";
|
|
410
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS833 = "[ ] ";
|
|
411
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS834 = "[x] ";
|
|
412
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS835 = "[X] ";
|
|
413
|
+
const _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS848 = "|";
|
|
414
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS976 = "@@ ";
|
|
415
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS978 = "@@ ";
|
|
416
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS979 = "diff ";
|
|
417
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS980 = "--- ";
|
|
418
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS981 = "+";
|
|
419
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS982 = "-";
|
|
420
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS983 = " ";
|
|
421
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS984 = "diff ";
|
|
422
|
+
const _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS985 = "--- ";
|
|
423
|
+
const _M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS987 = "a/";
|
|
424
|
+
const _M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS988 = "b/";
|
|
425
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS990 = "diff --git ";
|
|
426
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS992 = "new file mode";
|
|
427
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS993 = "deleted file mode";
|
|
428
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS994 = "Binary files";
|
|
429
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS995 = "index ";
|
|
430
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS996 = "--- ";
|
|
431
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS997 = "+++ ";
|
|
432
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS998 = "--- ";
|
|
433
|
+
const _M0FP36kazuph5reviw4core11parse__diffN7_2abindS999 = "+++ ";
|
|
434
|
+
const _M0FP36kazuph5reviw4core27from__string_2econstr_2f660 = 0;
|
|
435
|
+
const _M0FP36kazuph5reviw4core27from__string_2econstr_2f661 = 1;
|
|
436
|
+
const _M0FP36kazuph5reviw4core27from__string_2econstr_2f662 = 2;
|
|
437
|
+
const _M0FP36kazuph5reviw4core27from__string_2econstr_2f664 = 0;
|
|
438
|
+
const _M0FP36kazuph5reviw4core27from__string_2econstr_2f665 = 1;
|
|
435
439
|
const _M0FP36kazuph5reviw6server15active__servers = [];
|
|
436
440
|
const _M0FP36kazuph5reviw6server12all__results = [];
|
|
437
|
-
const
|
|
438
|
-
const
|
|
439
|
-
const
|
|
440
|
-
const
|
|
441
|
-
const
|
|
442
|
-
const
|
|
443
|
-
const
|
|
444
|
-
const
|
|
445
|
-
const
|
|
446
|
-
const
|
|
447
|
-
const
|
|
448
|
-
const _M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS569 = "true";
|
|
441
|
+
const _M0FP36kazuph5reviw6server12print__usageN5usageS419 = "Usage: reviw <file...> [options]\n\nOptions:\n --port <n> Base port (default: 4989)\n --host <addr> Bind address (default: 127.0.0.1, use 0.0.0.0 for remote)\n --no-open Don't open browser\n -e, --encoding <enc> Force encoding (e.g. shift-jis, euc-jp)\n -h, --help Show help\n -v, --version Show version\n\nSupported formats: CSV, TSV, Markdown, Diff, Plain text\nPipe stdin for diff: git diff | reviw";
|
|
442
|
+
const _M0FP36kazuph5reviw6server12detect__modeN7_2abindS462 = ".";
|
|
443
|
+
const _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS526 = "..";
|
|
444
|
+
const _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS530 = "scene_";
|
|
445
|
+
const _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS531 = ".jpg";
|
|
446
|
+
const _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS566 = "/";
|
|
447
|
+
const _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS564 = "..";
|
|
448
|
+
const _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS565 = "video/";
|
|
449
|
+
const _M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS568 = "/";
|
|
450
|
+
const _M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS567 = "..";
|
|
451
|
+
const _M0FP36kazuph5reviw6server15handle__requestN7_2abindS569 = "/video-timeline?";
|
|
449
452
|
const _M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS570 = "true";
|
|
450
|
-
const
|
|
453
|
+
const _M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS571 = "true";
|
|
454
|
+
const _M0FP017____moonbit__mainN7_2abindS590 = "-";
|
|
451
455
|
const _M0FP36kazuph5reviw6server15expected__count = _M0MPC13ref3Ref3newGiE(0);
|
|
452
456
|
const _M0FP36kazuph5reviw6server18encoding__override = _M0MPC13ref3Ref3newGsE("");
|
|
453
457
|
const _M0FPB33brute__force__find_2econstr_2f228 = 0;
|
|
@@ -2021,38 +2025,38 @@ function _M0MPC13ref3Ref3newGsE(x) {
|
|
|
2021
2025
|
function _M0MPC13ref3Ref3newGiE(x) {
|
|
2022
2026
|
return new _M0TPC13ref3RefGiE(x);
|
|
2023
2027
|
}
|
|
2024
|
-
function _M0IP36kazuph5reviw4core8FileModePB2Eq5equal(
|
|
2025
|
-
switch (
|
|
2028
|
+
function _M0IP36kazuph5reviw4core8FileModePB2Eq5equal(_x_441, _x_442) {
|
|
2029
|
+
switch (_x_441) {
|
|
2026
2030
|
case 0: {
|
|
2027
|
-
if (
|
|
2031
|
+
if (_x_442 === 0) {
|
|
2028
2032
|
return true;
|
|
2029
2033
|
} else {
|
|
2030
2034
|
return false;
|
|
2031
2035
|
}
|
|
2032
2036
|
}
|
|
2033
2037
|
case 1: {
|
|
2034
|
-
if (
|
|
2038
|
+
if (_x_442 === 1) {
|
|
2035
2039
|
return true;
|
|
2036
2040
|
} else {
|
|
2037
2041
|
return false;
|
|
2038
2042
|
}
|
|
2039
2043
|
}
|
|
2040
2044
|
case 2: {
|
|
2041
|
-
if (
|
|
2045
|
+
if (_x_442 === 2) {
|
|
2042
2046
|
return true;
|
|
2043
2047
|
} else {
|
|
2044
2048
|
return false;
|
|
2045
2049
|
}
|
|
2046
2050
|
}
|
|
2047
2051
|
case 3: {
|
|
2048
|
-
if (
|
|
2052
|
+
if (_x_442 === 3) {
|
|
2049
2053
|
return true;
|
|
2050
2054
|
} else {
|
|
2051
2055
|
return false;
|
|
2052
2056
|
}
|
|
2053
2057
|
}
|
|
2054
2058
|
default: {
|
|
2055
|
-
if (
|
|
2059
|
+
if (_x_442 === 4) {
|
|
2056
2060
|
return true;
|
|
2057
2061
|
} else {
|
|
2058
2062
|
return false;
|
|
@@ -2061,7 +2065,7 @@ function _M0IP36kazuph5reviw4core8FileModePB2Eq5equal(_x_439, _x_440) {
|
|
|
2061
2065
|
}
|
|
2062
2066
|
}
|
|
2063
2067
|
function _M0FP36kazuph5reviw4core20yaml__escape__string(s) {
|
|
2064
|
-
const needs_quote = _M0MPC16string6String8contains(s, new _M0TPC16string10StringView(
|
|
2068
|
+
const needs_quote = _M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS559, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS559.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS560, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS560.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS561, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS561.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS562, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS562.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS563, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS563.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS564, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS564.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS565, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS565.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS566, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS566.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS567, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS567.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS568, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS568.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS569, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS569.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS570, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS570.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS571, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS571.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS572, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS572.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS573, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS573.length)) || (_M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS574, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS574.length)) || _M0MPC16string6String8contains(s, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS575, 0, _M0FP36kazuph5reviw4core20yaml__escape__stringN7_2abindS575.length)))))))))))))))));
|
|
2065
2069
|
if (needs_quote) {
|
|
2066
2070
|
const buf = _M0MPB13StringBuilder11new_2einner(0);
|
|
2067
2071
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 39);
|
|
@@ -2130,9 +2134,15 @@ function _M0MP36kazuph5reviw4core14ReviewDecision10to__string(self) {
|
|
|
2130
2134
|
}
|
|
2131
2135
|
function _M0FP36kazuph5reviw4core16review__to__yaml(result) {
|
|
2132
2136
|
const buf = _M0MPB13StringBuilder11new_2einner(0);
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2137
|
+
const _bind = result.action;
|
|
2138
|
+
if (_bind === undefined) {
|
|
2139
|
+
} else {
|
|
2140
|
+
const _Some = _bind;
|
|
2141
|
+
const _a = _Some;
|
|
2142
|
+
_M0IPB13StringBuilderPB6Logger13write__string(buf, "action: ");
|
|
2143
|
+
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core12ReviewAction10to__string(_a));
|
|
2144
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
2145
|
+
}
|
|
2136
2146
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "file: ");
|
|
2137
2147
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core20yaml__escape__string(result.file));
|
|
2138
2148
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
@@ -2140,13 +2150,13 @@ function _M0FP36kazuph5reviw4core16review__to__yaml(result) {
|
|
|
2140
2150
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core8FileMode10to__string(result.mode));
|
|
2141
2151
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
2142
2152
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "comments:\n");
|
|
2143
|
-
const _bind = result.comments;
|
|
2144
|
-
const _bind$
|
|
2153
|
+
const _bind$2 = result.comments;
|
|
2154
|
+
const _bind$3 = _bind$2.length;
|
|
2145
2155
|
let _tmp = 0;
|
|
2146
2156
|
while (true) {
|
|
2147
2157
|
const _ = _tmp;
|
|
2148
|
-
if (_ < _bind$
|
|
2149
|
-
const comment = _bind[_];
|
|
2158
|
+
if (_ < _bind$3) {
|
|
2159
|
+
const comment = _bind$2[_];
|
|
2150
2160
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " - row: ");
|
|
2151
2161
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MPC13int3Int18to__string_2einner(comment.row, 10));
|
|
2152
2162
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
@@ -2177,13 +2187,13 @@ function _M0FP36kazuph5reviw4core16review__to__yaml(result) {
|
|
|
2177
2187
|
}
|
|
2178
2188
|
if (result.mermaid_errors.length > 0) {
|
|
2179
2189
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "mermaid_errors:\n");
|
|
2180
|
-
const _bind$
|
|
2181
|
-
const _bind$
|
|
2190
|
+
const _bind$4 = result.mermaid_errors;
|
|
2191
|
+
const _bind$5 = _bind$4.length;
|
|
2182
2192
|
let _tmp$2 = 0;
|
|
2183
2193
|
while (true) {
|
|
2184
2194
|
const _ = _tmp$2;
|
|
2185
|
-
if (_ < _bind$
|
|
2186
|
-
const err = _bind$
|
|
2195
|
+
if (_ < _bind$5) {
|
|
2196
|
+
const err = _bind$4[_];
|
|
2187
2197
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " - line: ");
|
|
2188
2198
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MPC13int3Int18to__string_2einner(err.line, 10));
|
|
2189
2199
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
@@ -2197,10 +2207,10 @@ function _M0FP36kazuph5reviw4core16review__to__yaml(result) {
|
|
|
2197
2207
|
}
|
|
2198
2208
|
}
|
|
2199
2209
|
}
|
|
2200
|
-
const _bind$
|
|
2201
|
-
if (_bind$
|
|
2210
|
+
const _bind$4 = result.decision;
|
|
2211
|
+
if (_bind$4 === undefined) {
|
|
2202
2212
|
} else {
|
|
2203
|
-
const _Some = _bind$
|
|
2213
|
+
const _Some = _bind$4;
|
|
2204
2214
|
const _d = _Some;
|
|
2205
2215
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "decision: ");
|
|
2206
2216
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core14ReviewDecision10to__string(_d));
|
|
@@ -2213,15 +2223,21 @@ function _M0FP36kazuph5reviw4core17reviews__to__yaml(results) {
|
|
|
2213
2223
|
return _M0FP36kazuph5reviw4core16review__to__yaml(_M0MPC15array5Array2atGsE(results, 0));
|
|
2214
2224
|
} else {
|
|
2215
2225
|
const buf = _M0MPB13StringBuilder11new_2einner(0);
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2226
|
+
const _bind = _M0MPC15array5Array2atGsE(results, 0).action;
|
|
2227
|
+
if (_bind === undefined) {
|
|
2228
|
+
} else {
|
|
2229
|
+
const _Some = _bind;
|
|
2230
|
+
const _a = _Some;
|
|
2231
|
+
_M0IPB13StringBuilderPB6Logger13write__string(buf, "action: ");
|
|
2232
|
+
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core12ReviewAction10to__string(_a));
|
|
2233
|
+
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
2234
|
+
}
|
|
2219
2235
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "files:\n");
|
|
2220
|
-
const _bind = results.length;
|
|
2236
|
+
const _bind$2 = results.length;
|
|
2221
2237
|
let _tmp = 0;
|
|
2222
2238
|
while (true) {
|
|
2223
2239
|
const _ = _tmp;
|
|
2224
|
-
if (_ < _bind) {
|
|
2240
|
+
if (_ < _bind$2) {
|
|
2225
2241
|
const result = results[_];
|
|
2226
2242
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " - file: ");
|
|
2227
2243
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core20yaml__escape__string(result.file));
|
|
@@ -2230,13 +2246,13 @@ function _M0FP36kazuph5reviw4core17reviews__to__yaml(results) {
|
|
|
2230
2246
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core8FileMode10to__string(result.mode));
|
|
2231
2247
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
2232
2248
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " comments:\n");
|
|
2233
|
-
const _bind$
|
|
2234
|
-
const _bind$
|
|
2249
|
+
const _bind$3 = result.comments;
|
|
2250
|
+
const _bind$4 = _bind$3.length;
|
|
2235
2251
|
let _tmp$2 = 0;
|
|
2236
2252
|
while (true) {
|
|
2237
2253
|
const _$2 = _tmp$2;
|
|
2238
|
-
if (_$2 < _bind$
|
|
2239
|
-
const comment = _bind$
|
|
2254
|
+
if (_$2 < _bind$4) {
|
|
2255
|
+
const comment = _bind$3[_$2];
|
|
2240
2256
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " - row: ");
|
|
2241
2257
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MPC13int3Int18to__string_2einner(comment.row, 10));
|
|
2242
2258
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
@@ -2262,13 +2278,13 @@ function _M0FP36kazuph5reviw4core17reviews__to__yaml(results) {
|
|
|
2262
2278
|
}
|
|
2263
2279
|
if (result.mermaid_errors.length > 0) {
|
|
2264
2280
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " mermaid_errors:\n");
|
|
2265
|
-
const _bind$
|
|
2266
|
-
const _bind$
|
|
2281
|
+
const _bind$5 = result.mermaid_errors;
|
|
2282
|
+
const _bind$6 = _bind$5.length;
|
|
2267
2283
|
let _tmp$3 = 0;
|
|
2268
2284
|
while (true) {
|
|
2269
2285
|
const _$2 = _tmp$3;
|
|
2270
|
-
if (_$2 < _bind$
|
|
2271
|
-
const err = _bind$
|
|
2286
|
+
if (_$2 < _bind$6) {
|
|
2287
|
+
const err = _bind$5[_$2];
|
|
2272
2288
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " - line: ");
|
|
2273
2289
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MPC13int3Int18to__string_2einner(err.line, 10));
|
|
2274
2290
|
_M0IPB13StringBuilderPB6Logger11write__char(buf, 10);
|
|
@@ -2282,10 +2298,10 @@ function _M0FP36kazuph5reviw4core17reviews__to__yaml(results) {
|
|
|
2282
2298
|
}
|
|
2283
2299
|
}
|
|
2284
2300
|
}
|
|
2285
|
-
const _bind$
|
|
2286
|
-
if (_bind$
|
|
2301
|
+
const _bind$5 = result.decision;
|
|
2302
|
+
if (_bind$5 === undefined) {
|
|
2287
2303
|
} else {
|
|
2288
|
-
const _Some = _bind$
|
|
2304
|
+
const _Some = _bind$5;
|
|
2289
2305
|
const _d = _Some;
|
|
2290
2306
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, " decision: ");
|
|
2291
2307
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0MP36kazuph5reviw4core14ReviewDecision10to__string(_d));
|
|
@@ -2366,7 +2382,7 @@ function _M0FP36kazuph5reviw4core16parse__int__safe(s) {
|
|
|
2366
2382
|
}
|
|
2367
2383
|
function _M0FP36kazuph5reviw4core16split__to__lines(input) {
|
|
2368
2384
|
const result = [];
|
|
2369
|
-
const _it = _M0MPC16string6String5split(input, new _M0TPC16string10StringView(
|
|
2385
|
+
const _it = _M0MPC16string6String5split(input, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16split__to__linesN7_2abindS650, 0, _M0FP36kazuph5reviw4core16split__to__linesN7_2abindS650.length));
|
|
2370
2386
|
while (true) {
|
|
2371
2387
|
const _bind = _M0MPB4Iter4nextGRPC16string10StringViewE(_it);
|
|
2372
2388
|
if (_bind === undefined) {
|
|
@@ -2420,26 +2436,26 @@ function _M0MP36kazuph5reviw4core8FileMode15from__extension(ext) {
|
|
|
2420
2436
|
function _M0MP36kazuph5reviw4core12ReviewAction12from__string(s) {
|
|
2421
2437
|
switch (s) {
|
|
2422
2438
|
case "handoff": {
|
|
2423
|
-
return
|
|
2439
|
+
return _M0FP36kazuph5reviw4core27from__string_2econstr_2f660;
|
|
2424
2440
|
}
|
|
2425
2441
|
case "final_approve": {
|
|
2426
|
-
return
|
|
2442
|
+
return _M0FP36kazuph5reviw4core27from__string_2econstr_2f661;
|
|
2427
2443
|
}
|
|
2428
2444
|
case "final_request_changes": {
|
|
2429
|
-
return
|
|
2445
|
+
return _M0FP36kazuph5reviw4core27from__string_2econstr_2f662;
|
|
2430
2446
|
}
|
|
2431
2447
|
default: {
|
|
2432
|
-
return
|
|
2448
|
+
return undefined;
|
|
2433
2449
|
}
|
|
2434
2450
|
}
|
|
2435
2451
|
}
|
|
2436
2452
|
function _M0MP36kazuph5reviw4core14ReviewDecision12from__string(s) {
|
|
2437
2453
|
switch (s) {
|
|
2438
2454
|
case "approve": {
|
|
2439
|
-
return
|
|
2455
|
+
return _M0FP36kazuph5reviw4core27from__string_2econstr_2f664;
|
|
2440
2456
|
}
|
|
2441
2457
|
case "request_changes": {
|
|
2442
|
-
return
|
|
2458
|
+
return _M0FP36kazuph5reviw4core27from__string_2econstr_2f665;
|
|
2443
2459
|
}
|
|
2444
2460
|
default: {
|
|
2445
2461
|
return undefined;
|
|
@@ -2541,10 +2557,10 @@ function _M0FP36kazuph5reviw4core23parse__single__question(lines, start, end) {
|
|
|
2541
2557
|
if (i < end) {
|
|
2542
2558
|
const line = _M0MPC15array5Array2atGsE(lines, i);
|
|
2543
2559
|
const trimmed = _M0FP36kazuph5reviw4core4trim(line);
|
|
2544
|
-
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(
|
|
2560
|
+
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS673, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS673.length)) && _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS674, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS674.length))) {
|
|
2545
2561
|
break;
|
|
2546
2562
|
}
|
|
2547
|
-
if (trimmed.length === 0 || !_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
2563
|
+
if (trimmed.length === 0 || !_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS675, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS675.length)) && !_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS676, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS676.length))) {
|
|
2548
2564
|
break;
|
|
2549
2565
|
}
|
|
2550
2566
|
const content_colon = _M0FP36kazuph5reviw4core15index__of__char(trimmed, 58);
|
|
@@ -2569,7 +2585,7 @@ function _M0FP36kazuph5reviw4core23parse__single__question(lines, start, end) {
|
|
|
2569
2585
|
if (i < end) {
|
|
2570
2586
|
const opt_line = _M0MPC15array5Array2atGsE(lines, i);
|
|
2571
2587
|
const opt_trimmed = _M0FP36kazuph5reviw4core4trim(opt_line);
|
|
2572
|
-
if (_M0MPC16string6String11has__prefix(opt_trimmed, new _M0TPC16string10StringView(
|
|
2588
|
+
if (_M0MPC16string6String11has__prefix(opt_trimmed, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS678, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS678.length)) && _M0MPC16string6String11has__prefix(opt_line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS679, 0, _M0FP36kazuph5reviw4core23parse__single__questionN7_2abindS679.length))) {
|
|
2573
2589
|
_M0MPC15array5Array4pushGsE(options, _M0FP36kazuph5reviw4core4trim(_M0FP36kazuph5reviw4core11safe__slice(opt_trimmed, 2)));
|
|
2574
2590
|
i = i + 1 | 0;
|
|
2575
2591
|
} else {
|
|
@@ -2609,12 +2625,12 @@ function _M0FP36kazuph5reviw4core23parse__reviw__questions(lines, start, end) {
|
|
|
2609
2625
|
if (i < end) {
|
|
2610
2626
|
const item_line = _M0MPC15array5Array2atGsE(lines, i);
|
|
2611
2627
|
const trimmed = _M0FP36kazuph5reviw4core4trim(item_line);
|
|
2612
|
-
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(
|
|
2628
|
+
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS683, 0, _M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS683.length))) {
|
|
2613
2629
|
const q = _M0FP36kazuph5reviw4core23parse__single__question(lines, i, end);
|
|
2614
2630
|
_M0MPC15array5Array4pushGsE(questions, q._0);
|
|
2615
2631
|
i = q._1;
|
|
2616
2632
|
} else {
|
|
2617
|
-
if (trimmed.length === 0 || !_M0MPC16string6String11has__prefix(item_line, new _M0TPC16string10StringView(
|
|
2633
|
+
if (trimmed.length === 0 || !_M0MPC16string6String11has__prefix(item_line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS684, 0, _M0FP36kazuph5reviw4core23parse__reviw__questionsN7_2abindS684.length))) {
|
|
2618
2634
|
break;
|
|
2619
2635
|
} else {
|
|
2620
2636
|
i = i + 1 | 0;
|
|
@@ -2764,7 +2780,7 @@ function _M0FP36kazuph5reviw4core20is__horizontal__rule(line) {
|
|
|
2764
2780
|
}
|
|
2765
2781
|
function _M0FP36kazuph5reviw4core22is__html__block__start(line) {
|
|
2766
2782
|
const t = _M0FP36kazuph5reviw4core4trim(line);
|
|
2767
|
-
return _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(
|
|
2783
|
+
return _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS703, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS703.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS704, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS704.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS705, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS705.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS706, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS706.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS707, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS707.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS708, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS708.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS709, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS709.length)) || _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS710, 0, _M0FP36kazuph5reviw4core22is__html__block__startN7_2abindS710.length))))))));
|
|
2768
2784
|
}
|
|
2769
2785
|
function _M0FP36kazuph5reviw4core23is__ordered__list__item(line) {
|
|
2770
2786
|
const chars = _M0MPC16string6String9to__array(line);
|
|
@@ -2783,15 +2799,15 @@ function _M0FP36kazuph5reviw4core23is__ordered__list__item(line) {
|
|
|
2783
2799
|
return i < (chars.length - 1 | 0) && (_M0MPC15array5Array2atGcE(chars, i) === 46 && _M0MPC15array5Array2atGcE(chars, i + 1 | 0) === 32);
|
|
2784
2800
|
}
|
|
2785
2801
|
function _M0FP36kazuph5reviw4core16is__block__start(line) {
|
|
2786
|
-
return _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
2802
|
+
return _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS712, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS712.length)) || (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS713, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS713.length)) || (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS714, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS714.length)) || (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS715, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS715.length)) || (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS716, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS716.length)) || (_M0FP36kazuph5reviw4core23is__ordered__list__item(line) || (_M0FP36kazuph5reviw4core20is__horizontal__rule(line) || _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core16is__block__startN7_2abindS717, 0, _M0FP36kazuph5reviw4core16is__block__startN7_2abindS717.length)) && _M0FP36kazuph5reviw4core22is__html__block__start(line)))))));
|
|
2787
2803
|
}
|
|
2788
2804
|
function _M0FP36kazuph5reviw4core20is__mermaid__content(text) {
|
|
2789
2805
|
const t = _M0FP36kazuph5reviw4core4trim(text);
|
|
2790
|
-
return _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(
|
|
2806
|
+
return _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS718, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS718.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS719, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS719.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS720, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS720.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS721, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS721.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS722, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS722.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS723, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS723.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS724, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS724.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS725, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS725.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS726, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS726.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS727, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS727.length)) || (_M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS728, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS728.length)) || _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS729, 0, _M0FP36kazuph5reviw4core20is__mermaid__contentN7_2abindS729.length))))))))))));
|
|
2791
2807
|
}
|
|
2792
2808
|
function _M0FP36kazuph5reviw4core20is__table__separator(line) {
|
|
2793
2809
|
const t = _M0FP36kazuph5reviw4core4trim(line);
|
|
2794
|
-
if (!_M0MPC16string6String8contains(t, new _M0TPC16string10StringView(
|
|
2810
|
+
if (!_M0MPC16string6String8contains(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS730, 0, _M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS730.length)) || !_M0MPC16string6String8contains(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS731, 0, _M0FP36kazuph5reviw4core20is__table__separatorN7_2abindS731.length))) {
|
|
2795
2811
|
return false;
|
|
2796
2812
|
}
|
|
2797
2813
|
const chars = _M0MPC16string6String9to__array(t);
|
|
@@ -2846,8 +2862,8 @@ function _M0FP36kazuph5reviw4core18make__heading__key(text, counter) {
|
|
|
2846
2862
|
function _M0FP36kazuph5reviw4core17parse__table__row(line) {
|
|
2847
2863
|
const result = [];
|
|
2848
2864
|
const t = _M0FP36kazuph5reviw4core4trim(line);
|
|
2849
|
-
const inner = _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(
|
|
2850
|
-
const _it = _M0MPC16string6String5split(inner, new _M0TPC16string10StringView(
|
|
2865
|
+
const inner = _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS753, 0, _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS753.length)) && _M0MPC16string6String11has__suffix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS754, 0, _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS754.length)) ? _M0FP36kazuph5reviw4core18safe__slice__range(t, 1, t.length - 1 | 0) : _M0MPC16string6String11has__prefix(t, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS755, 0, _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS755.length)) ? _M0FP36kazuph5reviw4core11safe__slice(t, 1) : t;
|
|
2866
|
+
const _it = _M0MPC16string6String5split(inner, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS752, 0, _M0FP36kazuph5reviw4core17parse__table__rowN7_2abindS752.length));
|
|
2851
2867
|
while (true) {
|
|
2852
2868
|
const _bind = _M0MPB4Iter4nextGRPC16string10StringViewE(_it);
|
|
2853
2869
|
if (_bind === undefined) {
|
|
@@ -2863,7 +2879,7 @@ function _M0FP36kazuph5reviw4core17parse__table__row(line) {
|
|
|
2863
2879
|
}
|
|
2864
2880
|
function _M0FP36kazuph5reviw4core14is__video__url(url) {
|
|
2865
2881
|
const lower = _M0MPC16string6String9to__lower(url);
|
|
2866
|
-
return _M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(
|
|
2882
|
+
return _M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS756, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS756.length)) || (_M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS757, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS757.length)) || (_M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS758, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS758.length)) || (_M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS759, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS759.length)) || (_M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS760, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS760.length)) || (_M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS761, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS761.length)) || _M0MPC16string6String11has__suffix(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14is__video__urlN7_2abindS762, 0, _M0FP36kazuph5reviw4core14is__video__urlN7_2abindS762.length)))))));
|
|
2867
2883
|
}
|
|
2868
2884
|
function _M0FP36kazuph5reviw4core14render__inline(text) {
|
|
2869
2885
|
const chars = _M0MPC16string6String9to__array(text);
|
|
@@ -2962,7 +2978,7 @@ function _M0FP36kazuph5reviw4core14render__inline(text) {
|
|
|
2962
2978
|
const link_text = _M0FP36kazuph5reviw4core18safe__slice__range(text, text_start, text_end);
|
|
2963
2979
|
const link_url = _M0FP36kazuph5reviw4core18safe__slice__range(text, url_start, url_end);
|
|
2964
2980
|
const lower_url = _M0MPC16string6String9to__lower(link_url);
|
|
2965
|
-
if (_M0MPC16string6String11has__prefix(lower_url, new _M0TPC16string10StringView(
|
|
2981
|
+
if (_M0MPC16string6String11has__prefix(lower_url, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14render__inlineN7_2abindS768, 0, _M0FP36kazuph5reviw4core14render__inlineN7_2abindS768.length))) {
|
|
2966
2982
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core12escape__html(link_text));
|
|
2967
2983
|
} else {
|
|
2968
2984
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<a href=\"");
|
|
@@ -3159,18 +3175,18 @@ function _M0FP36kazuph5reviw4core17is__allowed__attr(name) {
|
|
|
3159
3175
|
}
|
|
3160
3176
|
function _M0FP36kazuph5reviw4core18is__dangerous__css(value) {
|
|
3161
3177
|
const lower = _M0MPC16string6String9to__lower(value);
|
|
3162
|
-
return _M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(
|
|
3178
|
+
return _M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS781, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS781.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS782, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS782.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS783, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS783.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS784, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS784.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS785, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS785.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS786, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS786.length)) || (_M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS787, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS787.length)) || _M0MPC16string6String8contains(lower, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS788, 0, _M0FP36kazuph5reviw4core18is__dangerous__cssN7_2abindS788.length))))))));
|
|
3163
3179
|
}
|
|
3164
3180
|
function _M0FP36kazuph5reviw4core24is__event__handler__attr(name) {
|
|
3165
|
-
return _M0MPC16string6String11has__prefix(name, new _M0TPC16string10StringView(
|
|
3181
|
+
return _M0MPC16string6String11has__prefix(name, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core24is__event__handler__attrN7_2abindS789, 0, _M0FP36kazuph5reviw4core24is__event__handler__attrN7_2abindS789.length));
|
|
3166
3182
|
}
|
|
3167
3183
|
function _M0FP36kazuph5reviw4core13is__safe__url(url) {
|
|
3168
3184
|
const lower = _M0MPC16string6String9to__lower(url);
|
|
3169
3185
|
const trimmed = _M0FP36kazuph5reviw4core4trim(lower);
|
|
3170
|
-
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(
|
|
3186
|
+
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS790, 0, _M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS790.length))) {
|
|
3171
3187
|
return false;
|
|
3172
3188
|
}
|
|
3173
|
-
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(
|
|
3189
|
+
if (_M0MPC16string6String11has__prefix(trimmed, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS791, 0, _M0FP36kazuph5reviw4core13is__safe__urlN7_2abindS791.length))) {
|
|
3174
3190
|
return false;
|
|
3175
3191
|
}
|
|
3176
3192
|
return true;
|
|
@@ -3509,7 +3525,7 @@ function _M0FP36kazuph5reviw4core14sanitize__html(input) {
|
|
|
3509
3525
|
if (!_M0FP36kazuph5reviw4core16is__allowed__tag(tag_name) && tag_name.length > 0) {
|
|
3510
3526
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<");
|
|
3511
3527
|
const tag_content = _M0FP36kazuph5reviw4core18safe__slice__range(input, tag_start + 1 | 0, tag_end);
|
|
3512
|
-
const trimmed_content = _M0MPC16string6String11has__suffix(tag_content, new _M0TPC16string10StringView(
|
|
3528
|
+
const trimmed_content = _M0MPC16string6String11has__suffix(tag_content, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14sanitize__htmlN7_2abindS807, 0, _M0FP36kazuph5reviw4core14sanitize__htmlN7_2abindS807.length)) ? _M0FP36kazuph5reviw4core18safe__slice__range(tag_content, 0, tag_content.length - 1 | 0) : tag_content;
|
|
3513
3529
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core12escape__html(trimmed_content));
|
|
3514
3530
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, ">");
|
|
3515
3531
|
i = tag_end;
|
|
@@ -3553,7 +3569,7 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3553
3569
|
i = i + 1 | 0;
|
|
3554
3570
|
continue;
|
|
3555
3571
|
}
|
|
3556
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
3572
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS809, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS809.length)) && _M0FP36kazuph5reviw4core22is__html__block__start(line)) {
|
|
3557
3573
|
const tag_name = _M0FP36kazuph5reviw4core24extract__html__tag__name(line);
|
|
3558
3574
|
if (tag_name === "details") {
|
|
3559
3575
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<details>\n");
|
|
@@ -3561,13 +3577,13 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3561
3577
|
while (true) {
|
|
3562
3578
|
if (i < len) {
|
|
3563
3579
|
const current = _M0FP36kazuph5reviw4core4trim(_M0MPC15array5Array2atGsE(lines, i));
|
|
3564
|
-
if (_M0MPC16string6String11has__prefix(current, new _M0TPC16string10StringView(
|
|
3580
|
+
if (_M0MPC16string6String11has__prefix(current, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS811, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS811.length))) {
|
|
3565
3581
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core14sanitize__html(_M0MPC15array5Array2atGsE(lines, i)));
|
|
3566
3582
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "\n");
|
|
3567
3583
|
i = i + 1 | 0;
|
|
3568
3584
|
break;
|
|
3569
3585
|
} else {
|
|
3570
|
-
if (_M0MPC16string6String11has__prefix(current, new _M0TPC16string10StringView(
|
|
3586
|
+
if (_M0MPC16string6String11has__prefix(current, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS812, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS812.length))) {
|
|
3571
3587
|
break;
|
|
3572
3588
|
}
|
|
3573
3589
|
}
|
|
@@ -3582,14 +3598,14 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3582
3598
|
while (true) {
|
|
3583
3599
|
if (i < len && depth > 0) {
|
|
3584
3600
|
const current = _M0MPC15array5Array2atGsE(lines, i);
|
|
3585
|
-
if (_M0MPC16string6String8contains(current, new _M0TPC16string10StringView(
|
|
3601
|
+
if (_M0MPC16string6String8contains(current, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS814, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS814.length))) {
|
|
3586
3602
|
depth = depth - 1 | 0;
|
|
3587
3603
|
if (depth === 0) {
|
|
3588
3604
|
i = i + 1 | 0;
|
|
3589
3605
|
break;
|
|
3590
3606
|
}
|
|
3591
3607
|
}
|
|
3592
|
-
if (_M0MPC16string6String8contains(current, new _M0TPC16string10StringView(
|
|
3608
|
+
if (_M0MPC16string6String8contains(current, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS815, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS815.length))) {
|
|
3593
3609
|
depth = depth + 1 | 0;
|
|
3594
3610
|
}
|
|
3595
3611
|
_M0MPC15array5Array4pushGsE(inner_lines, current);
|
|
@@ -3634,7 +3650,7 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3634
3650
|
}
|
|
3635
3651
|
continue;
|
|
3636
3652
|
}
|
|
3637
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
3653
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS819, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS819.length))) {
|
|
3638
3654
|
const level = _M0FP36kazuph5reviw4core21count__heading__level(line);
|
|
3639
3655
|
if (level >= 1 && level <= 6) {
|
|
3640
3656
|
const content = _M0FP36kazuph5reviw4core4trim(_M0FP36kazuph5reviw4core11safe__slice(line, level + 1 | 0));
|
|
@@ -3660,14 +3676,14 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3660
3676
|
i = i + 1 | 0;
|
|
3661
3677
|
continue;
|
|
3662
3678
|
}
|
|
3663
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
3679
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS820, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS820.length))) {
|
|
3664
3680
|
const lang = _M0FP36kazuph5reviw4core4trim(_M0FP36kazuph5reviw4core11safe__slice(line, 3));
|
|
3665
3681
|
const code_block_start_line = i + 1 | 0;
|
|
3666
3682
|
i = i + 1 | 0;
|
|
3667
3683
|
const code_buf = _M0MPB13StringBuilder11new_2einner(0);
|
|
3668
3684
|
let code_first = true;
|
|
3669
3685
|
while (true) {
|
|
3670
|
-
if (i < len && !_M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(
|
|
3686
|
+
if (i < len && !_M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS822, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS822.length))) {
|
|
3671
3687
|
if (!code_first) {
|
|
3672
3688
|
_M0IPB13StringBuilderPB6Logger13write__string(code_buf, "\n");
|
|
3673
3689
|
}
|
|
@@ -3709,10 +3725,10 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3709
3725
|
}
|
|
3710
3726
|
continue;
|
|
3711
3727
|
}
|
|
3712
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
3728
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS823, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS823.length))) {
|
|
3713
3729
|
const quote_lines = [];
|
|
3714
3730
|
while (true) {
|
|
3715
|
-
if (i < len && _M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(
|
|
3731
|
+
if (i < len && _M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS825, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS825.length))) {
|
|
3716
3732
|
const content = _M0FP36kazuph5reviw4core4trim(_M0FP36kazuph5reviw4core11safe__slice(_M0MPC15array5Array2atGsE(lines, i), 1));
|
|
3717
3733
|
_M0MPC15array5Array4pushGsE(quote_lines, content);
|
|
3718
3734
|
i = i + 1 | 0;
|
|
@@ -3740,16 +3756,16 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3740
3756
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "</blockquote>\n");
|
|
3741
3757
|
continue;
|
|
3742
3758
|
}
|
|
3743
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
3759
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS830, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS830.length)) || _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS831, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS831.length))) {
|
|
3744
3760
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<ul>\n");
|
|
3745
3761
|
while (true) {
|
|
3746
|
-
if (i < len && (_M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(
|
|
3762
|
+
if (i < len && (_M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS836, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS836.length)) || _M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS837, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS837.length)))) {
|
|
3747
3763
|
const item_text = _M0FP36kazuph5reviw4core11safe__slice(_M0MPC15array5Array2atGsE(lines, i), 2);
|
|
3748
|
-
if (_M0MPC16string6String11has__prefix(item_text, new _M0TPC16string10StringView(
|
|
3764
|
+
if (_M0MPC16string6String11has__prefix(item_text, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS833, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS833.length))) {
|
|
3749
3765
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<li class=\"task-list-item\"><input type=\"checkbox\" disabled /> ");
|
|
3750
3766
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core14render__inline(_M0FP36kazuph5reviw4core11safe__slice(item_text, 4)));
|
|
3751
3767
|
} else {
|
|
3752
|
-
if (_M0MPC16string6String11has__prefix(item_text, new _M0TPC16string10StringView(
|
|
3768
|
+
if (_M0MPC16string6String11has__prefix(item_text, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS834, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS834.length)) || _M0MPC16string6String11has__prefix(item_text, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS835, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS835.length))) {
|
|
3753
3769
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<li class=\"task-list-item\"><input type=\"checkbox\" checked disabled /> ");
|
|
3754
3770
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, _M0FP36kazuph5reviw4core14render__inline(_M0FP36kazuph5reviw4core11safe__slice(item_text, 4)));
|
|
3755
3771
|
} else {
|
|
@@ -3806,7 +3822,7 @@ function _M0FP36kazuph5reviw4core23render__markdown__lines(lines) {
|
|
|
3806
3822
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "</tr>\n</thead>\n<tbody>\n");
|
|
3807
3823
|
i = i + 2 | 0;
|
|
3808
3824
|
while (true) {
|
|
3809
|
-
if (i < len && _M0MPC16string6String8contains(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(
|
|
3825
|
+
if (i < len && _M0MPC16string6String8contains(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS848, 0, _M0FP36kazuph5reviw4core23render__markdown__linesN7_2abindS848.length))) {
|
|
3810
3826
|
const cells = _M0FP36kazuph5reviw4core17parse__table__row(_M0MPC15array5Array2atGsE(lines, i));
|
|
3811
3827
|
_M0IPB13StringBuilderPB6Logger13write__string(buf, "<tr>\n");
|
|
3812
3828
|
const _bind$2 = cells.length;
|
|
@@ -4987,23 +5003,23 @@ function _M0FP36kazuph5reviw4core14collect__hunks(lines, start, len) {
|
|
|
4987
5003
|
while (true) {
|
|
4988
5004
|
if (i < len) {
|
|
4989
5005
|
const line = _M0MPC15array5Array2atGsE(lines, i);
|
|
4990
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
5006
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS976, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS976.length))) {
|
|
4991
5007
|
const header = _M0FP36kazuph5reviw4core19parse__hunk__header(line);
|
|
4992
5008
|
const hunk_lines = [];
|
|
4993
5009
|
i = i + 1 | 0;
|
|
4994
5010
|
while (true) {
|
|
4995
5011
|
if (i < len) {
|
|
4996
5012
|
const l = _M0MPC15array5Array2atGsE(lines, i);
|
|
4997
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5013
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS978, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS978.length)) || (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS979, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS979.length)) || _M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS980, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS980.length)))) {
|
|
4998
5014
|
break;
|
|
4999
5015
|
}
|
|
5000
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5016
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS981, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS981.length))) {
|
|
5001
5017
|
_M0MPC15array5Array4pushGsE(hunk_lines, new _M0TP36kazuph5reviw4core8DiffLine(1, _M0FP36kazuph5reviw4core11safe__slice(l, 1)));
|
|
5002
5018
|
} else {
|
|
5003
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5019
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS982, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS982.length))) {
|
|
5004
5020
|
_M0MPC15array5Array4pushGsE(hunk_lines, new _M0TP36kazuph5reviw4core8DiffLine(2, _M0FP36kazuph5reviw4core11safe__slice(l, 1)));
|
|
5005
5021
|
} else {
|
|
5006
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5022
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS983, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS983.length))) {
|
|
5007
5023
|
_M0MPC15array5Array4pushGsE(hunk_lines, new _M0TP36kazuph5reviw4core8DiffLine(0, _M0FP36kazuph5reviw4core11safe__slice(l, 1)));
|
|
5008
5024
|
} else {
|
|
5009
5025
|
_M0MPC15array5Array4pushGsE(hunk_lines, new _M0TP36kazuph5reviw4core8DiffLine(0, l));
|
|
@@ -5018,7 +5034,7 @@ function _M0FP36kazuph5reviw4core14collect__hunks(lines, start, len) {
|
|
|
5018
5034
|
}
|
|
5019
5035
|
_M0MPC15array5Array4pushGsE(hunks, new _M0TP36kazuph5reviw4core8DiffHunk(header._0, header._1, header._2, header._3, header._4, hunk_lines));
|
|
5020
5036
|
} else {
|
|
5021
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
5037
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS984, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS984.length)) || _M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core14collect__hunksN7_2abindS985, 0, _M0FP36kazuph5reviw4core14collect__hunksN7_2abindS985.length))) {
|
|
5022
5038
|
break;
|
|
5023
5039
|
} else {
|
|
5024
5040
|
i = i + 1 | 0;
|
|
@@ -5058,7 +5074,7 @@ function _M0FP36kazuph5reviw4core19extract__git__paths(line) {
|
|
|
5058
5074
|
}
|
|
5059
5075
|
}
|
|
5060
5076
|
function _M0FP36kazuph5reviw4core19strip__diff__prefix(path) {
|
|
5061
|
-
return _M0MPC16string6String11has__prefix(path, new _M0TPC16string10StringView(
|
|
5077
|
+
return _M0MPC16string6String11has__prefix(path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS987, 0, _M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS987.length)) || _M0MPC16string6String11has__prefix(path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS988, 0, _M0FP36kazuph5reviw4core19strip__diff__prefixN7_2abindS988.length)) ? _M0FP36kazuph5reviw4core11safe__slice(path, 2) : path;
|
|
5062
5078
|
}
|
|
5063
5079
|
function _M0FP36kazuph5reviw4core11parse__diff(input) {
|
|
5064
5080
|
const files = [];
|
|
@@ -5068,7 +5084,7 @@ function _M0FP36kazuph5reviw4core11parse__diff(input) {
|
|
|
5068
5084
|
while (true) {
|
|
5069
5085
|
if (i < len) {
|
|
5070
5086
|
const line = _M0MPC15array5Array2atGsE(lines, i);
|
|
5071
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
5087
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS990, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS990.length))) {
|
|
5072
5088
|
const paths = _M0FP36kazuph5reviw4core19extract__git__paths(line);
|
|
5073
5089
|
let is_new = false;
|
|
5074
5090
|
let is_deleted = false;
|
|
@@ -5077,19 +5093,19 @@ function _M0FP36kazuph5reviw4core11parse__diff(input) {
|
|
|
5077
5093
|
while (true) {
|
|
5078
5094
|
if (i < len) {
|
|
5079
5095
|
const l = _M0MPC15array5Array2atGsE(lines, i);
|
|
5080
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5096
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS992, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS992.length))) {
|
|
5081
5097
|
is_new = true;
|
|
5082
5098
|
i = i + 1 | 0;
|
|
5083
5099
|
} else {
|
|
5084
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5100
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS993, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS993.length))) {
|
|
5085
5101
|
is_deleted = true;
|
|
5086
5102
|
i = i + 1 | 0;
|
|
5087
5103
|
} else {
|
|
5088
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5104
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS994, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS994.length))) {
|
|
5089
5105
|
is_binary = true;
|
|
5090
5106
|
i = i + 1 | 0;
|
|
5091
5107
|
} else {
|
|
5092
|
-
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(
|
|
5108
|
+
if (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS995, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS995.length)) || (_M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS996, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS996.length)) || _M0MPC16string6String11has__prefix(l, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS997, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS997.length)))) {
|
|
5093
5109
|
i = i + 1 | 0;
|
|
5094
5110
|
} else {
|
|
5095
5111
|
break;
|
|
@@ -5106,11 +5122,11 @@ function _M0FP36kazuph5reviw4core11parse__diff(input) {
|
|
|
5106
5122
|
i = result._1;
|
|
5107
5123
|
_M0MPC15array5Array4pushGsE(files, new _M0TP36kazuph5reviw4core8DiffFile(paths._0, paths._1, is_new, is_deleted, is_binary, result._0));
|
|
5108
5124
|
} else {
|
|
5109
|
-
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(
|
|
5125
|
+
if (_M0MPC16string6String11has__prefix(line, new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS998, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS998.length))) {
|
|
5110
5126
|
const old_path = _M0FP36kazuph5reviw4core19strip__diff__prefix(_M0FP36kazuph5reviw4core11safe__slice(line, 4));
|
|
5111
5127
|
let new_path = "";
|
|
5112
5128
|
i = i + 1 | 0;
|
|
5113
|
-
if (i < len && _M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(
|
|
5129
|
+
if (i < len && _M0MPC16string6String11has__prefix(_M0MPC15array5Array2atGsE(lines, i), new _M0TPC16string10StringView(_M0FP36kazuph5reviw4core11parse__diffN7_2abindS999, 0, _M0FP36kazuph5reviw4core11parse__diffN7_2abindS999.length))) {
|
|
5114
5130
|
new_path = _M0FP36kazuph5reviw4core19strip__diff__prefix(_M0FP36kazuph5reviw4core11safe__slice(_M0MPC15array5Array2atGsE(lines, i), 4));
|
|
5115
5131
|
i = i + 1 | 0;
|
|
5116
5132
|
}
|
|
@@ -5231,13 +5247,13 @@ function _M0FP36kazuph5reviw4core21csv__data__from__flat(flat) {
|
|
|
5231
5247
|
}
|
|
5232
5248
|
}
|
|
5233
5249
|
function _M0FP36kazuph5reviw6server10os__tmpdir() {
|
|
5234
|
-
return tmpdir$
|
|
5250
|
+
return tmpdir$2114();
|
|
5235
5251
|
}
|
|
5236
5252
|
function _M0FP36kazuph5reviw6server10path__join(_tmp, _tmp$2) {
|
|
5237
|
-
return join$
|
|
5253
|
+
return join$2117(_tmp, _tmp$2);
|
|
5238
5254
|
}
|
|
5239
5255
|
function _M0FP36kazuph5reviw6server17write__file__sync(_tmp, _tmp$2) {
|
|
5240
|
-
return writeFileSync$
|
|
5256
|
+
return writeFileSync$2121(_tmp, _tmp$2);
|
|
5241
5257
|
}
|
|
5242
5258
|
function _M0FP36kazuph5reviw6server19write__file__secure(path, data) {
|
|
5243
5259
|
_M0FP36kazuph5reviw6server15try__call__void(() => {
|
|
@@ -5252,7 +5268,7 @@ function _M0FP36kazuph5reviw6server15init__live__log() {
|
|
|
5252
5268
|
_M0FP36kazuph5reviw6server14console__error(`[REVIW_LIVE] ${path}`);
|
|
5253
5269
|
}
|
|
5254
5270
|
function _M0FP36kazuph5reviw6server22fs__append__file__sync(_tmp, _tmp$2) {
|
|
5255
|
-
return appendFileSync$
|
|
5271
|
+
return appendFileSync$2124(_tmp, _tmp$2);
|
|
5256
5272
|
}
|
|
5257
5273
|
function _M0FP36kazuph5reviw6server17append__live__log(json_line) {
|
|
5258
5274
|
if (_M0FP36kazuph5reviw6server15live__log__path.val.length > 0) {
|
|
@@ -5265,10 +5281,10 @@ function _M0FP36kazuph5reviw6server17append__live__log(json_line) {
|
|
|
5265
5281
|
}
|
|
5266
5282
|
}
|
|
5267
5283
|
function _M0FP36kazuph5reviw6server12exists__sync(_tmp) {
|
|
5268
|
-
return existsSync$
|
|
5284
|
+
return existsSync$2126(_tmp);
|
|
5269
5285
|
}
|
|
5270
5286
|
function _M0FP36kazuph5reviw6server12unlink__sync(_tmp) {
|
|
5271
|
-
return unlinkSync$
|
|
5287
|
+
return unlinkSync$2128(_tmp);
|
|
5272
5288
|
}
|
|
5273
5289
|
function _M0FP36kazuph5reviw6server18cleanup__live__log() {
|
|
5274
5290
|
if (_M0FP36kazuph5reviw6server15live__log__path.val.length > 0 && _M0FP36kazuph5reviw6server12exists__sync(_M0FP36kazuph5reviw6server15live__log__path.val)) {
|
|
@@ -5281,7 +5297,7 @@ function _M0FP36kazuph5reviw6server18cleanup__live__log() {
|
|
|
5281
5297
|
}
|
|
5282
5298
|
}
|
|
5283
5299
|
function _M0FP36kazuph5reviw6server16read__file__sync(_tmp, _tmp$2) {
|
|
5284
|
-
return readFileSync$
|
|
5300
|
+
return readFileSync$2131(_tmp, _tmp$2);
|
|
5285
5301
|
}
|
|
5286
5302
|
function _M0FP36kazuph5reviw6server12load__ui__js() {
|
|
5287
5303
|
if (_M0FP36kazuph5reviw6server13ui__js__cache.val.length > 0) {
|
|
@@ -5299,7 +5315,7 @@ function _M0FP36kazuph5reviw6server12load__ui__js() {
|
|
|
5299
5315
|
}
|
|
5300
5316
|
}
|
|
5301
5317
|
function _M0FP36kazuph5reviw6server11os__homedir() {
|
|
5302
|
-
return homedir$
|
|
5318
|
+
return homedir$2133();
|
|
5303
5319
|
}
|
|
5304
5320
|
function _M0FP36kazuph5reviw6server9lock__dir() {
|
|
5305
5321
|
const override_dir = _M0FP36kazuph5reviw6server13get__env__var("REVIW_LOCK_DIR");
|
|
@@ -5310,7 +5326,7 @@ function _M0FP36kazuph5reviw6server10lock__path(port) {
|
|
|
5310
5326
|
return _M0FP36kazuph5reviw6server10path__join(dir, `${_M0IP016_24default__implPB4Show10to__stringGiE(port)}.lock`);
|
|
5311
5327
|
}
|
|
5312
5328
|
function _M0FP36kazuph5reviw6server11mkdir__sync(_tmp, _tmp$2) {
|
|
5313
|
-
return mkdirSync$
|
|
5329
|
+
return mkdirSync$2136(_tmp, _tmp$2);
|
|
5314
5330
|
}
|
|
5315
5331
|
function _M0FP36kazuph5reviw6server17ensure__lock__dir() {
|
|
5316
5332
|
const dir = _M0FP36kazuph5reviw6server9lock__dir();
|
|
@@ -5379,7 +5395,7 @@ function _M0FP36kazuph5reviw6server21find__available__port(base) {
|
|
|
5379
5395
|
return base;
|
|
5380
5396
|
}
|
|
5381
5397
|
function _M0FP36kazuph5reviw6server13path__dirname(_tmp) {
|
|
5382
|
-
return dirname$
|
|
5398
|
+
return dirname$2143(_tmp);
|
|
5383
5399
|
}
|
|
5384
5400
|
function _M0FP36kazuph5reviw6server21get__package__version() {
|
|
5385
5401
|
let dir = _M0FP36kazuph5reviw6server16get__script__dir();
|
|
@@ -5425,17 +5441,17 @@ function _M0FP36kazuph5reviw6server11parse__port(s) {
|
|
|
5425
5441
|
return n === 0 ? 4989 : n;
|
|
5426
5442
|
}
|
|
5427
5443
|
function _M0FP36kazuph5reviw6server12print__usage() {
|
|
5428
|
-
_M0FP36kazuph5reviw6server12console__log(
|
|
5444
|
+
_M0FP36kazuph5reviw6server12console__log(_M0FP36kazuph5reviw6server12print__usageN5usageS419);
|
|
5429
5445
|
}
|
|
5430
5446
|
function _M0FP36kazuph5reviw6server17read__stdin__sync() {
|
|
5431
5447
|
return _M0FP36kazuph5reviw6server16read__file__sync("/dev/stdin", "utf-8");
|
|
5432
5448
|
}
|
|
5433
5449
|
function _M0FP36kazuph5reviw6server13path__extname(_tmp) {
|
|
5434
|
-
return extname$
|
|
5450
|
+
return extname$2150(_tmp);
|
|
5435
5451
|
}
|
|
5436
5452
|
function _M0FP36kazuph5reviw6server12detect__mode(file_path) {
|
|
5437
5453
|
const ext = _M0FP36kazuph5reviw6server13path__extname(file_path);
|
|
5438
|
-
const ext_lower = _M0MPC16string6String11has__prefix(ext, new _M0TPC16string10StringView(
|
|
5454
|
+
const ext_lower = _M0MPC16string6String11has__prefix(ext, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server12detect__modeN7_2abindS462, 0, _M0FP36kazuph5reviw6server12detect__modeN7_2abindS462.length)) ? _M0MPC16string6String9to__lower(_M0FP36kazuph5reviw4core11safe__slice(ext, 1)) : _M0MPC16string6String9to__lower(ext);
|
|
5439
5455
|
return _M0MP36kazuph5reviw4core8FileMode15from__extension(ext_lower);
|
|
5440
5456
|
}
|
|
5441
5457
|
function _M0FP36kazuph5reviw6server16detect__encoding(buf) {
|
|
@@ -5533,7 +5549,7 @@ function _M0FP36kazuph5reviw6server16detect__encoding(buf) {
|
|
|
5533
5549
|
return "utf-8";
|
|
5534
5550
|
}
|
|
5535
5551
|
function _M0FP36kazuph5reviw6server18read__file__buffer(_tmp) {
|
|
5536
|
-
return readFileSync$
|
|
5552
|
+
return readFileSync$2131(_tmp);
|
|
5537
5553
|
}
|
|
5538
5554
|
function _M0FP36kazuph5reviw6server12decode__file(path, override_enc) {
|
|
5539
5555
|
const buf = _M0FP36kazuph5reviw6server18read__file__buffer(path);
|
|
@@ -5575,13 +5591,13 @@ function _M0FP36kazuph5reviw6server22load__and__build__html(ctx) {
|
|
|
5575
5591
|
return _M0FP36kazuph5reviw4core16build__csv__html(data, ctx.filename, ctx.port);
|
|
5576
5592
|
}
|
|
5577
5593
|
function _M0FP36kazuph5reviw6server14path__basename(_tmp) {
|
|
5578
|
-
return basename$
|
|
5594
|
+
return basename$2160(_tmp);
|
|
5579
5595
|
}
|
|
5580
5596
|
function _M0FP36kazuph5reviw6server13path__resolve(_tmp) {
|
|
5581
|
-
return resolve$
|
|
5597
|
+
return resolve$2162(_tmp);
|
|
5582
5598
|
}
|
|
5583
5599
|
function _M0FP36kazuph5reviw6server25http__create__server__raw(_tmp) {
|
|
5584
|
-
return createServer$
|
|
5600
|
+
return createServer$2167(_tmp);
|
|
5585
5601
|
}
|
|
5586
5602
|
function _M0FP36kazuph5reviw6server14create__server(handler) {
|
|
5587
5603
|
return _M0FP36kazuph5reviw6server25http__create__server__raw(handler);
|
|
@@ -5720,7 +5736,7 @@ function _M0FP36kazuph5reviw6server22cancel__pending__close(ctx) {
|
|
|
5720
5736
|
}
|
|
5721
5737
|
}
|
|
5722
5738
|
function _M0FP36kazuph5reviw6server22write__file__sync__buf(_tmp, _tmp$2) {
|
|
5723
|
-
return writeFileSync$
|
|
5739
|
+
return writeFileSync$2121(_tmp, _tmp$2);
|
|
5724
5740
|
}
|
|
5725
5741
|
function _M0FP36kazuph5reviw6server16base64__to__file(data, dir, index) {
|
|
5726
5742
|
const ext = _M0FP36kazuph5reviw6server20extract__base64__ext(data);
|
|
@@ -5754,7 +5770,7 @@ function _M0FP36kazuph5reviw6server20ensure__history__dir() {
|
|
|
5754
5770
|
}
|
|
5755
5771
|
}
|
|
5756
5772
|
function _M0FP36kazuph5reviw6server20crypto__create__hash(_tmp) {
|
|
5757
|
-
return createHash$
|
|
5773
|
+
return createHash$2188(_tmp);
|
|
5758
5774
|
}
|
|
5759
5775
|
function _M0FP36kazuph5reviw6server14crypto__sha256(s) {
|
|
5760
5776
|
return _M0FP36kazuph5reviw6server27hash__update__digest__hex16(_M0FP36kazuph5reviw6server20crypto__create__hash("sha256"), s);
|
|
@@ -5808,7 +5824,7 @@ function _M0FP36kazuph5reviw6server13save__history(file_path, entry_json) {
|
|
|
5808
5824
|
_M0FP36kazuph5reviw6server11chmod__sync(hp, 384);
|
|
5809
5825
|
}
|
|
5810
5826
|
function _M0FP36kazuph5reviw6server13unwatch__file(_tmp) {
|
|
5811
|
-
return unwatchFile$
|
|
5827
|
+
return unwatchFile$2193(_tmp);
|
|
5812
5828
|
}
|
|
5813
5829
|
function _M0FP36kazuph5reviw6server14handle__submit(ctx, body) {
|
|
5814
5830
|
if (ctx.finished) {
|
|
@@ -5939,7 +5955,7 @@ function _M0FP36kazuph5reviw6server23schedule__close__submit(ctx, draft) {
|
|
|
5939
5955
|
return undefined;
|
|
5940
5956
|
}
|
|
5941
5957
|
_M0FP36kazuph5reviw6server22cancel__pending__close(ctx);
|
|
5942
|
-
const draft_body = draft.length > 0 ? draft : "{\"summary\":\"\",\"comments\":[]}";
|
|
5958
|
+
const draft_body = draft.length > 0 ? _M0FP36kazuph5reviw6server21json__strip__decision(draft) : "{\"summary\":\"\",\"comments\":[]}";
|
|
5943
5959
|
ctx.pending_close_timer = _M0FP36kazuph5reviw6server12set__timeout(() => {
|
|
5944
5960
|
ctx.pending_close_timer = _M0FP36kazuph5reviw6server8js__null();
|
|
5945
5961
|
let _tmp;
|
|
@@ -5953,7 +5969,7 @@ function _M0FP36kazuph5reviw6server23schedule__close__submit(ctx, draft) {
|
|
|
5953
5969
|
return undefined;
|
|
5954
5970
|
}
|
|
5955
5971
|
_M0FP36kazuph5reviw6server14handle__submit(ctx, draft_body);
|
|
5956
|
-
},
|
|
5972
|
+
}, 5000);
|
|
5957
5973
|
}
|
|
5958
5974
|
function _M0FP36kazuph5reviw6server22handle__session__close(ctx, body) {
|
|
5959
5975
|
if (ctx.finished) {
|
|
@@ -6022,7 +6038,7 @@ function _M0FP36kazuph5reviw6server21handle__session__open(ctx, body) {
|
|
|
6022
6038
|
_M0MPB3Map3setGssE(ctx.active_tab_instances, tab_id, instance_id);
|
|
6023
6039
|
}
|
|
6024
6040
|
function _M0FP36kazuph5reviw6server17child__exec__sync(_tmp, _tmp$2) {
|
|
6025
|
-
return execSync$
|
|
6041
|
+
return execSync$2206(_tmp, _tmp$2);
|
|
6026
6042
|
}
|
|
6027
6043
|
function _M0FP36kazuph5reviw6server15command__exists(cmd) {
|
|
6028
6044
|
return _M0FP36kazuph5reviw6server15try__call__bool(() => {
|
|
@@ -6031,7 +6047,7 @@ function _M0FP36kazuph5reviw6server15command__exists(cmd) {
|
|
|
6031
6047
|
});
|
|
6032
6048
|
}
|
|
6033
6049
|
function _M0FP36kazuph5reviw6server17fs__mkdtemp__sync(_tmp) {
|
|
6034
|
-
return mkdtempSync$
|
|
6050
|
+
return mkdtempSync$2209(_tmp);
|
|
6035
6051
|
}
|
|
6036
6052
|
function _M0FP36kazuph5reviw6server15make__temp__dir() {
|
|
6037
6053
|
return _M0FP36kazuph5reviw6server17fs__mkdtemp__sync(`${_M0FP36kazuph5reviw6server10os__tmpdir()}/reviw-`);
|
|
@@ -6040,13 +6056,13 @@ function _M0FP36kazuph5reviw6server18read__file__base64(path) {
|
|
|
6040
6056
|
return _M0FP36kazuph5reviw6server17try__call__string(() => _M0FP36kazuph5reviw6server15buf__to__base64(_M0FP36kazuph5reviw6server18read__file__buffer(path)), "");
|
|
6041
6057
|
}
|
|
6042
6058
|
function _M0FP36kazuph5reviw6server22fs__readdir__sync__raw(_tmp) {
|
|
6043
|
-
return readdirSync$
|
|
6059
|
+
return readdirSync$2219(_tmp);
|
|
6044
6060
|
}
|
|
6045
6061
|
function _M0FP36kazuph5reviw6server13readdir__sync(path) {
|
|
6046
6062
|
return _M0FP36kazuph5reviw6server24try__call__array__string(() => _M0FP36kazuph5reviw6server22fs__readdir__sync__raw(path));
|
|
6047
6063
|
}
|
|
6048
6064
|
function _M0FP36kazuph5reviw6server12fs__rm__sync(_tmp, _tmp$2) {
|
|
6049
|
-
return rmSync$
|
|
6065
|
+
return rmSync$2228(_tmp, _tmp$2);
|
|
6050
6066
|
}
|
|
6051
6067
|
function _M0FP36kazuph5reviw6server18rm__dir__recursive(path) {
|
|
6052
6068
|
_M0FP36kazuph5reviw6server15try__call__void(() => {
|
|
@@ -6054,13 +6070,13 @@ function _M0FP36kazuph5reviw6server18rm__dir__recursive(path) {
|
|
|
6054
6070
|
});
|
|
6055
6071
|
}
|
|
6056
6072
|
function _M0FP36kazuph5reviw6server12child__spawn(_tmp, _tmp$2, _tmp$3) {
|
|
6057
|
-
return spawn$
|
|
6073
|
+
return spawn$2234(_tmp, _tmp$2, _tmp$3);
|
|
6058
6074
|
}
|
|
6059
6075
|
function _M0FP36kazuph5reviw6server12spawn__async(cmd, args_json) {
|
|
6060
6076
|
return _M0FP36kazuph5reviw6server12child__spawn(cmd, _M0FP36kazuph5reviw6server15js__parse__json(args_json), _M0FP36kazuph5reviw6server21js__spawn__opts__pipe());
|
|
6061
6077
|
}
|
|
6062
6078
|
function _M0FP36kazuph5reviw6server18child__spawn__sync(_tmp, _tmp$2, _tmp$3) {
|
|
6063
|
-
return spawnSync$
|
|
6079
|
+
return spawnSync$2239(_tmp, _tmp$2, _tmp$3);
|
|
6064
6080
|
}
|
|
6065
6081
|
function _M0FP36kazuph5reviw6server19spawn__sync__stdout(cmd, args_json) {
|
|
6066
6082
|
return _M0FP36kazuph5reviw6server17try__call__string(() => _M0FP36kazuph5reviw6server15js__obj__stdout(_M0FP36kazuph5reviw6server18child__spawn__sync(cmd, _M0FP36kazuph5reviw6server15js__parse__json(args_json), _M0FP36kazuph5reviw6server27js__spawn__opts__utf8__pipe())), "");
|
|
@@ -6068,7 +6084,7 @@ function _M0FP36kazuph5reviw6server19spawn__sync__stdout(cmd, args_json) {
|
|
|
6068
6084
|
function _M0FP36kazuph5reviw6server23handle__video__timeline(ctx, url, res) {
|
|
6069
6085
|
const video_path = _M0FP36kazuph5reviw6server19parse__query__param(url, "path");
|
|
6070
6086
|
const scene_str = _M0FP36kazuph5reviw6server19parse__query__param(url, "scene");
|
|
6071
|
-
if (_M0MPC16string6String8contains(video_path, new _M0TPC16string10StringView(
|
|
6087
|
+
if (_M0MPC16string6String8contains(video_path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS526, 0, _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS526.length))) {
|
|
6072
6088
|
_M0FP36kazuph5reviw6server16res__write__head(res, 400, "text/plain");
|
|
6073
6089
|
_M0FP36kazuph5reviw6server8res__end(res, "Invalid path");
|
|
6074
6090
|
return undefined;
|
|
@@ -6113,7 +6129,7 @@ function _M0FP36kazuph5reviw6server23handle__video__timeline(ctx, url, res) {
|
|
|
6113
6129
|
const _ = _tmp;
|
|
6114
6130
|
if (_ < _bind) {
|
|
6115
6131
|
const file = files[_];
|
|
6116
|
-
if (_M0MPC16string6String11has__prefix(file, new _M0TPC16string10StringView(
|
|
6132
|
+
if (_M0MPC16string6String11has__prefix(file, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS530, 0, _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS530.length)) && _M0MPC16string6String11has__suffix(file, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS531, 0, _M0FP36kazuph5reviw6server23handle__video__timelineN7_2abindS531.length))) {
|
|
6117
6133
|
_M0MPC15array5Array4pushGsE(scene_files, file);
|
|
6118
6134
|
}
|
|
6119
6135
|
_tmp = _ + 1 | 0;
|
|
@@ -6274,13 +6290,13 @@ function _M0FP36kazuph5reviw6server9index__of(s, target) {
|
|
|
6274
6290
|
return -1;
|
|
6275
6291
|
}
|
|
6276
6292
|
function _M0FP36kazuph5reviw6server14fs__stat__sync(_tmp) {
|
|
6277
|
-
return statSync$
|
|
6293
|
+
return statSync$2257(_tmp);
|
|
6278
6294
|
}
|
|
6279
6295
|
function _M0FP36kazuph5reviw6server14is__file__sync(path) {
|
|
6280
6296
|
return _M0FP36kazuph5reviw6server18js__stat__is__file(_M0FP36kazuph5reviw6server14fs__stat__sync(path));
|
|
6281
6297
|
}
|
|
6282
6298
|
function _M0FP36kazuph5reviw6server30fs__create__read__stream__opts(_tmp, _tmp$2) {
|
|
6283
|
-
return createReadStream$
|
|
6299
|
+
return createReadStream$2261(_tmp, _tmp$2);
|
|
6284
6300
|
}
|
|
6285
6301
|
function _M0FP36kazuph5reviw6server17pipe__file__range(file_path, res, content_type, range_header) {
|
|
6286
6302
|
const stat = _M0FP36kazuph5reviw6server14fs__stat__sync(file_path);
|
|
@@ -6295,7 +6311,7 @@ function _M0FP36kazuph5reviw6server17pipe__file__range(file_path, res, content_t
|
|
|
6295
6311
|
_M0FP36kazuph5reviw6server8js__pipe(stream, res);
|
|
6296
6312
|
}
|
|
6297
6313
|
function _M0FP36kazuph5reviw6server24fs__create__read__stream(_tmp) {
|
|
6298
|
-
return createReadStream$
|
|
6314
|
+
return createReadStream$2261(_tmp);
|
|
6299
6315
|
}
|
|
6300
6316
|
function _M0FP36kazuph5reviw6server24pipe__file__to__response(file_path, res, content_type) {
|
|
6301
6317
|
const stat = _M0FP36kazuph5reviw6server14fs__stat__sync(file_path);
|
|
@@ -6308,8 +6324,8 @@ function _M0FP36kazuph5reviw6server24pipe__file__to__response(file_path, res, co
|
|
|
6308
6324
|
function _M0FP36kazuph5reviw6server19serve__static__file(ctx, url, req, res) {
|
|
6309
6325
|
const qmark = _M0FP36kazuph5reviw6server9index__of(url, 63);
|
|
6310
6326
|
const url_path = qmark >= 0 ? _M0FP36kazuph5reviw4core18safe__slice__range(url, 0, qmark) : url;
|
|
6311
|
-
const relative_path = _M0MPC16string6String11has__prefix(url_path, new _M0TPC16string10StringView(
|
|
6312
|
-
if (_M0MPC16string6String8contains(relative_path, new _M0TPC16string10StringView(
|
|
6327
|
+
const relative_path = _M0MPC16string6String11has__prefix(url_path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS566, 0, _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS566.length)) ? _M0FP36kazuph5reviw4core11safe__slice(url_path, 1) : url_path;
|
|
6328
|
+
if (_M0MPC16string6String8contains(relative_path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS564, 0, _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS564.length))) {
|
|
6313
6329
|
_M0FP36kazuph5reviw6server16res__write__head(res, 403, "text/plain");
|
|
6314
6330
|
_M0FP36kazuph5reviw6server8res__end(res, "Forbidden");
|
|
6315
6331
|
return undefined;
|
|
@@ -6326,7 +6342,7 @@ function _M0FP36kazuph5reviw6server19serve__static__file(ctx, url, req, res) {
|
|
|
6326
6342
|
if (_M0FP36kazuph5reviw6server12exists__sync(resolved_static) && _M0FP36kazuph5reviw6server14is__file__sync(resolved_static)) {
|
|
6327
6343
|
const ext = _M0MPC16string6String9to__lower(_M0FP36kazuph5reviw6server13path__extname(resolved_static));
|
|
6328
6344
|
const content_type = _M0FP36kazuph5reviw6server15get__mime__type(ext);
|
|
6329
|
-
const is_video = _M0MPC16string6String11has__prefix(content_type, new _M0TPC16string10StringView(
|
|
6345
|
+
const is_video = _M0MPC16string6String11has__prefix(content_type, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS565, 0, _M0FP36kazuph5reviw6server19serve__static__fileN7_2abindS565.length));
|
|
6330
6346
|
const range = _M0FP36kazuph5reviw6server18req__range__header(req);
|
|
6331
6347
|
if (is_video && range.length > 0) {
|
|
6332
6348
|
_M0FP36kazuph5reviw6server17pipe__file__range(resolved_static, res, content_type, range);
|
|
@@ -6344,8 +6360,8 @@ function _M0FP36kazuph5reviw6server19serve__static__file(ctx, url, req, res) {
|
|
|
6344
6360
|
function _M0FP36kazuph5reviw6server25serve__static__file__head(ctx, url, res) {
|
|
6345
6361
|
const qmark = _M0FP36kazuph5reviw6server9index__of(url, 63);
|
|
6346
6362
|
const url_path = qmark >= 0 ? _M0FP36kazuph5reviw4core18safe__slice__range(url, 0, qmark) : url;
|
|
6347
|
-
const relative_path = _M0MPC16string6String11has__prefix(url_path, new _M0TPC16string10StringView(
|
|
6348
|
-
if (_M0MPC16string6String8contains(relative_path, new _M0TPC16string10StringView(
|
|
6363
|
+
const relative_path = _M0MPC16string6String11has__prefix(url_path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS568, 0, _M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS568.length)) ? _M0FP36kazuph5reviw4core11safe__slice(url_path, 1) : url_path;
|
|
6364
|
+
if (_M0MPC16string6String8contains(relative_path, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS567, 0, _M0FP36kazuph5reviw6server25serve__static__file__headN7_2abindS567.length))) {
|
|
6349
6365
|
_M0FP36kazuph5reviw6server16res__write__head(res, 403, "text/plain");
|
|
6350
6366
|
_M0FP36kazuph5reviw6server8res__end(res, "");
|
|
6351
6367
|
return undefined;
|
|
@@ -6407,7 +6423,7 @@ function _M0FP36kazuph5reviw6server15handle__request(ctx, req, res) {
|
|
|
6407
6423
|
_M0FP36kazuph5reviw6server8res__end(res, history_json);
|
|
6408
6424
|
return;
|
|
6409
6425
|
} else {
|
|
6410
|
-
if (http_method === "GET" && _M0MPC16string6String11has__prefix(url, new _M0TPC16string10StringView(
|
|
6426
|
+
if (http_method === "GET" && _M0MPC16string6String11has__prefix(url, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server15handle__requestN7_2abindS569, 0, _M0FP36kazuph5reviw6server15handle__requestN7_2abindS569.length))) {
|
|
6411
6427
|
_M0FP36kazuph5reviw6server23handle__video__timeline(ctx, url, res);
|
|
6412
6428
|
return;
|
|
6413
6429
|
} else {
|
|
@@ -6505,13 +6521,13 @@ function _M0FP36kazuph5reviw6server28try__activate__existing__tab(url) {
|
|
|
6505
6521
|
}
|
|
6506
6522
|
const chrome_script = `set found to false\ntell application \"System Events\"\n if exists process \"Google Chrome\" then\n tell application \"Google Chrome\"\n set targetUrl to \"${url}\"\n repeat with w in windows\n set tabIndex to 1\n repeat with t in tabs of w\n if URL of t starts with targetUrl then\n set active tab index of w to tabIndex\n set index of w to 1\n activate\n set found to true\n exit repeat\n end if\n set tabIndex to tabIndex + 1\n end repeat\n if found then exit repeat\n end repeat\n end tell\n end if\nend tell\nfound`;
|
|
6507
6523
|
const chrome_result = _M0FP36kazuph5reviw6server19spawn__sync__result("osascript", `[\"-e\", ${_M0FP36kazuph5reviw6server19json__encode__value(chrome_script)}]`);
|
|
6508
|
-
if (_M0MPC16string6String8contains(chrome_result, new _M0TPC16string10StringView(
|
|
6524
|
+
if (_M0MPC16string6String8contains(chrome_result, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS570, 0, _M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS570.length))) {
|
|
6509
6525
|
_M0FP36kazuph5reviw6server12console__log(`Activated existing Chrome tab: ${url}`);
|
|
6510
6526
|
return true;
|
|
6511
6527
|
}
|
|
6512
6528
|
const safari_script = `set found to false\ntell application \"System Events\"\n if exists process \"Safari\" then\n tell application \"Safari\"\n set targetUrl to \"${url}\"\n repeat with w in windows\n repeat with t in tabs of w\n if URL of t starts with targetUrl then\n set current tab of w to t\n set index of w to 1\n activate\n set found to true\n exit repeat\n end if\n end repeat\n if found then exit repeat\n end repeat\n end tell\n end if\nend tell\nfound`;
|
|
6513
6529
|
const safari_result = _M0FP36kazuph5reviw6server19spawn__sync__result("osascript", `[\"-e\", ${_M0FP36kazuph5reviw6server19json__encode__value(safari_script)}]`);
|
|
6514
|
-
if (_M0MPC16string6String8contains(safari_result, new _M0TPC16string10StringView(
|
|
6530
|
+
if (_M0MPC16string6String8contains(safari_result, new _M0TPC16string10StringView(_M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS571, 0, _M0FP36kazuph5reviw6server28try__activate__existing__tabN7_2abindS571.length))) {
|
|
6515
6531
|
_M0FP36kazuph5reviw6server12console__log(`Activated existing Safari tab: ${url}`);
|
|
6516
6532
|
return true;
|
|
6517
6533
|
}
|
|
@@ -6589,7 +6605,7 @@ function _M0FP36kazuph5reviw6server19start__http__server(ctx, no_open) {
|
|
|
6589
6605
|
_M0FP36kazuph5reviw6server11try__listen(ctx, ctx.port, 0, no_open);
|
|
6590
6606
|
}
|
|
6591
6607
|
function _M0FP36kazuph5reviw6server11watch__file(_tmp, _tmp$2) {
|
|
6592
|
-
return watchFile$
|
|
6608
|
+
return watchFile$2295(_tmp, _tmp$2);
|
|
6593
6609
|
}
|
|
6594
6610
|
function _M0FP36kazuph5reviw6server19start__file__server(file_path, port, no_open) {
|
|
6595
6611
|
const resolved = _M0FP36kazuph5reviw6server13path__resolve(file_path);
|
|
@@ -6687,7 +6703,7 @@ function _M0FP36kazuph5reviw6server20start__stdin__server(content, port, no_open
|
|
|
6687
6703
|
_M0FP36kazuph5reviw6server18encoding__override.val = _M0MPC15array5Array2atGsE(args, i);
|
|
6688
6704
|
}
|
|
6689
6705
|
} else {
|
|
6690
|
-
if (!_M0MPC16string6String11has__prefix(arg, new _M0TPC16string10StringView(
|
|
6706
|
+
if (!_M0MPC16string6String11has__prefix(arg, new _M0TPC16string10StringView(_M0FP017____moonbit__mainN7_2abindS590, 0, _M0FP017____moonbit__mainN7_2abindS590.length))) {
|
|
6691
6707
|
_M0MPC15array5Array4pushGsE(files, arg);
|
|
6692
6708
|
}
|
|
6693
6709
|
}
|