summaryrefslogtreecommitdiff
path: root/index_files/commandline_data/commandline_frame.js
blob: 85877cb866749c1678393f2bc4d03581dbf25894 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./node_modules/atob/browser-atob.js":
/*!*******************************************!*\
  !*** ./node_modules/atob/browser-atob.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* module decorator */ module = __webpack_require__.nmd(module);
(function (w) {
  "use strict";

  function findBest(atobNative) {
    // normal window
    if ('function' === typeof atobNative) { return atobNative; }


    // browserify (web worker)
    if ('function' === typeof Buffer) {
      return function atobBrowserify(a) {
        //!! Deliberately using an API that's deprecated in node.js because
        //!! this file is for browsers and we expect them to cope with it.
        //!! Discussion: github.com/node-browser-compat/atob/pull/9
        return new Buffer(a, 'base64').toString('binary');
      };
    }

    // ios web worker with base64js
    if ('object' === typeof w.base64js) {
      // bufferToBinaryString
      // https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
      return function atobWebWorker_iOS(a) {
        var buf = w.base64js.b64ToByteArray(a);
        return Array.prototype.map.call(buf, function (ch) {
          return String.fromCharCode(ch);
        }).join('');
      };
    }

		return function () {
			// ios web worker without base64js
			throw new Error("You're probably in an old browser or an iOS webworker." +
				" It might help to include beatgammit's base64-js.");
    };
  }

  var atobBest = findBest(w.atob);
  w.atob = atobBest;

  if (( true) && module && module.exports) {
    module.exports = atobBest;
  }
}(window));


/***/ }),

/***/ "./node_modules/css/index.js":
/*!***********************************!*\
  !*** ./node_modules/css/index.js ***!
  \***********************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

exports.parse = __webpack_require__(/*! ./lib/parse */ "./node_modules/css/lib/parse/index.js");
exports.stringify = __webpack_require__(/*! ./lib/stringify */ "./node_modules/css/lib/stringify/index.js");


/***/ }),

/***/ "./node_modules/css/lib/parse/index.js":
/*!*********************************************!*\
  !*** ./node_modules/css/lib/parse/index.js ***!
  \*********************************************/
/***/ ((module) => {

// http://www.w3.org/TR/CSS21/grammar.html
// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g

module.exports = function(css, options){
  options = options || {};

  /**
   * Positional.
   */

  var lineno = 1;
  var column = 1;

  /**
   * Update lineno and column based on `str`.
   */

  function updatePosition(str) {
    var lines = str.match(/\n/g);
    if (lines) lineno += lines.length;
    var i = str.lastIndexOf('\n');
    column = ~i ? str.length - i : column + str.length;
  }

  /**
   * Mark position and patch `node.position`.
   */

  function position() {
    var start = { line: lineno, column: column };
    return function(node){
      node.position = new Position(start);
      whitespace();
      return node;
    };
  }

  /**
   * Store position information for a node
   */

  function Position(start) {
    this.start = start;
    this.end = { line: lineno, column: column };
    this.source = options.source;
  }

  /**
   * Non-enumerable source string
   */

  Position.prototype.content = css;

  /**
   * Error `msg`.
   */

  var errorsList = [];

  function error(msg) {
    var err = new Error(options.source + ':' + lineno + ':' + column + ': ' + msg);
    err.reason = msg;
    err.filename = options.source;
    err.line = lineno;
    err.column = column;
    err.source = css;

    if (options.silent) {
      errorsList.push(err);
    } else {
      throw err;
    }
  }

  /**
   * Parse stylesheet.
   */

  function stylesheet() {
    var rulesList = rules();

    return {
      type: 'stylesheet',
      stylesheet: {
        source: options.source,
        rules: rulesList,
        parsingErrors: errorsList
      }
    };
  }

  /**
   * Opening brace.
   */

  function open() {
    return match(/^{\s*/);
  }

  /**
   * Closing brace.
   */

  function close() {
    return match(/^}/);
  }

  /**
   * Parse ruleset.
   */

  function rules() {
    var node;
    var rules = [];
    whitespace();
    comments(rules);
    while (css.length && css.charAt(0) != '}' && (node = atrule() || rule())) {
      if (node !== false) {
        rules.push(node);
        comments(rules);
      }
    }
    return rules;
  }

  /**
   * Match `re` and return captures.
   */

  function match(re) {
    var m = re.exec(css);
    if (!m) return;
    var str = m[0];
    updatePosition(str);
    css = css.slice(str.length);
    return m;
  }

  /**
   * Parse whitespace.
   */

  function whitespace() {
    match(/^\s*/);
  }

  /**
   * Parse comments;
   */

  function comments(rules) {
    var c;
    rules = rules || [];
    while (c = comment()) {
      if (c !== false) {
        rules.push(c);
      }
    }
    return rules;
  }

  /**
   * Parse comment.
   */

  function comment() {
    var pos = position();
    if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;

    var i = 2;
    while ("" != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;
    i += 2;

    if ("" === css.charAt(i-1)) {
      return error('End of comment missing');
    }

    var str = css.slice(2, i - 2);
    column += 2;
    updatePosition(str);
    css = css.slice(i);
    column += 2;

    return pos({
      type: 'comment',
      comment: str
    });
  }

  /**
   * Parse selector.
   */

  function selector() {
    var m = match(/^([^{]+)/);
    if (!m) return;
    /* @fix Remove all comments from selectors
     * http://ostermiller.org/findcomment.html */
    return trim(m[0])
      .replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, '')
      .replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(m) {
        return m.replace(/,/g, '\u200C');
      })
      .split(/\s*(?![^(]*\)),\s*/)
      .map(function(s) {
        return s.replace(/\u200C/g, ',');
      });
  }

  /**
   * Parse declaration.
   */

  function declaration() {
    var pos = position();

    // prop
    var prop = match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
    if (!prop) return;
    prop = trim(prop[0]);

    // :
    if (!match(/^:\s*/)) return error("property missing ':'");

    // val
    var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);

    var ret = pos({
      type: 'declaration',
      property: prop.replace(commentre, ''),
      value: val ? trim(val[0]).replace(commentre, '') : ''
    });

    // ;
    match(/^[;\s]*/);

    return ret;
  }

  /**
   * Parse declarations.
   */

  function declarations() {
    var decls = [];

    if (!open()) return error("missing '{'");
    comments(decls);

    // declarations
    var decl;
    while (decl = declaration()) {
      if (decl !== false) {
        decls.push(decl);
        comments(decls);
      }
    }

    if (!close()) return error("missing '}'");
    return decls;
  }

  /**
   * Parse keyframe.
   */

  function keyframe() {
    var m;
    var vals = [];
    var pos = position();

    while (m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) {
      vals.push(m[1]);
      match(/^,\s*/);
    }

    if (!vals.length) return;

    return pos({
      type: 'keyframe',
      values: vals,
      declarations: declarations()
    });
  }

  /**
   * Parse keyframes.
   */

  function atkeyframes() {
    var pos = position();
    var m = match(/^@([-\w]+)?keyframes\s*/);

    if (!m) return;
    var vendor = m[1];

    // identifier
    var m = match(/^([-\w]+)\s*/);
    if (!m) return error("@keyframes missing name");
    var name = m[1];

    if (!open()) return error("@keyframes missing '{'");

    var frame;
    var frames = comments();
    while (frame = keyframe()) {
      frames.push(frame);
      frames = frames.concat(comments());
    }

    if (!close()) return error("@keyframes missing '}'");

    return pos({
      type: 'keyframes',
      name: name,
      vendor: vendor,
      keyframes: frames
    });
  }

  /**
   * Parse supports.
   */

  function atsupports() {
    var pos = position();
    var m = match(/^@supports *([^{]+)/);

    if (!m) return;
    var supports = trim(m[1]);

    if (!open()) return error("@supports missing '{'");

    var style = comments().concat(rules());

    if (!close()) return error("@supports missing '}'");

    return pos({
      type: 'supports',
      supports: supports,
      rules: style
    });
  }

  /**
   * Parse host.
   */

  function athost() {
    var pos = position();
    var m = match(/^@host\s*/);

    if (!m) return;

    if (!open()) return error("@host missing '{'");

    var style = comments().concat(rules());

    if (!close()) return error("@host missing '}'");

    return pos({
      type: 'host',
      rules: style
    });
  }

  /**
   * Parse media.
   */

  function atmedia() {
    var pos = position();
    var m = match(/^@media *([^{]+)/);

    if (!m) return;
    var media = trim(m[1]);

    if (!open()) return error("@media missing '{'");

    var style = comments().concat(rules());

    if (!close()) return error("@media missing '}'");

    return pos({
      type: 'media',
      media: media,
      rules: style
    });
  }


  /**
   * Parse custom-media.
   */

  function atcustommedia() {
    var pos = position();
    var m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
    if (!m) return;

    return pos({
      type: 'custom-media',
      name: trim(m[1]),
      media: trim(m[2])
    });
  }

  /**
   * Parse paged media.
   */

  function atpage() {
    var pos = position();
    var m = match(/^@page */);
    if (!m) return;

    var sel = selector() || [];

    if (!open()) return error("@page missing '{'");
    var decls = comments();

    // declarations
    var decl;
    while (decl = declaration()) {
      decls.push(decl);
      decls = decls.concat(comments());
    }

    if (!close()) return error("@page missing '}'");

    return pos({
      type: 'page',
      selectors: sel,
      declarations: decls
    });
  }

  /**
   * Parse document.
   */

  function atdocument() {
    var pos = position();
    var m = match(/^@([-\w]+)?document *([^{]+)/);
    if (!m) return;

    var vendor = trim(m[1]);
    var doc = trim(m[2]);

    if (!open()) return error("@document missing '{'");

    var style = comments().concat(rules());

    if (!close()) return error("@document missing '}'");

    return pos({
      type: 'document',
      document: doc,
      vendor: vendor,
      rules: style
    });
  }

  /**
   * Parse font-face.
   */

  function atfontface() {
    var pos = position();
    var m = match(/^@font-face\s*/);
    if (!m) return;

    if (!open()) return error("@font-face missing '{'");
    var decls = comments();

    // declarations
    var decl;
    while (decl = declaration()) {
      decls.push(decl);
      decls = decls.concat(comments());
    }

    if (!close()) return error("@font-face missing '}'");

    return pos({
      type: 'font-face',
      declarations: decls
    });
  }

  /**
   * Parse import
   */

  var atimport = _compileAtrule('import');

  /**
   * Parse charset
   */

  var atcharset = _compileAtrule('charset');

  /**
   * Parse namespace
   */

  var atnamespace = _compileAtrule('namespace');

  /**
   * Parse non-block at-rules
   */


  function _compileAtrule(name) {
    var re = new RegExp('^@' + name + '\\s*([^;]+);');
    return function() {
      var pos = position();
      var m = match(re);
      if (!m) return;
      var ret = { type: name };
      ret[name] = m[1].trim();
      return pos(ret);
    }
  }

  /**
   * Parse at rule.
   */

  function atrule() {
    if (css[0] != '@') return;

    return atkeyframes()
      || atmedia()
      || atcustommedia()
      || atsupports()
      || atimport()
      || atcharset()
      || atnamespace()
      || atdocument()
      || atpage()
      || athost()
      || atfontface();
  }

  /**
   * Parse rule.
   */

  function rule() {
    var pos = position();
    var sel = selector();

    if (!sel) return error('selector missing');
    comments();

    return pos({
      type: 'rule',
      selectors: sel,
      declarations: declarations()
    });
  }

  return addParent(stylesheet());
};

/**
 * Trim `str`.
 */

function trim(str) {
  return str ? str.replace(/^\s+|\s+$/g, '') : '';
}

/**
 * Adds non-enumerable parent node reference to each node.
 */

function addParent(obj, parent) {
  var isNode = obj && typeof obj.type === 'string';
  var childParent = isNode ? obj : parent;

  for (var k in obj) {
    var value = obj[k];
    if (Array.isArray(value)) {
      value.forEach(function(v) { addParent(v, childParent); });
    } else if (value && typeof value === 'object') {
      addParent(value, childParent);
    }
  }

  if (isNode) {
    Object.defineProperty(obj, 'parent', {
      configurable: true,
      writable: true,
      enumerable: false,
      value: parent || null
    });
  }

  return obj;
}


/***/ }),

/***/ "./node_modules/css/lib/stringify/compiler.js":
/*!****************************************************!*\
  !*** ./node_modules/css/lib/stringify/compiler.js ***!
  \****************************************************/
/***/ ((module) => {


/**
 * Expose `Compiler`.
 */

module.exports = Compiler;

/**
 * Initialize a compiler.
 *
 * @param {Type} name
 * @return {Type}
 * @api public
 */

function Compiler(opts) {
  this.options = opts || {};
}

/**
 * Emit `str`
 */

Compiler.prototype.emit = function(str) {
  return str;
};

/**
 * Visit `node`.
 */

Compiler.prototype.visit = function(node){
  return this[node.type](node);
};

/**
 * Map visit over array of `nodes`, optionally using a `delim`
 */

Compiler.prototype.mapVisit = function(nodes, delim){
  var buf = '';
  delim = delim || '';

  for (var i = 0, length = nodes.length; i < length; i++) {
    buf += this.visit(nodes[i]);
    if (delim && i < length - 1) buf += this.emit(delim);
  }

  return buf;
};


/***/ }),

/***/ "./node_modules/css/lib/stringify/compress.js":
/*!****************************************************!*\
  !*** ./node_modules/css/lib/stringify/compress.js ***!
  \****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


/**
 * Module dependencies.
 */

var Base = __webpack_require__(/*! ./compiler */ "./node_modules/css/lib/stringify/compiler.js");
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");

/**
 * Expose compiler.
 */

module.exports = Compiler;

/**
 * Initialize a new `Compiler`.
 */

function Compiler(options) {
  Base.call(this, options);
}

/**
 * Inherit from `Base.prototype`.
 */

inherits(Compiler, Base);

/**
 * Compile `node`.
 */

Compiler.prototype.compile = function(node){
  return node.stylesheet
    .rules.map(this.visit, this)
    .join('');
};

/**
 * Visit comment node.
 */

Compiler.prototype.comment = function(node){
  return this.emit('', node.position);
};

/**
 * Visit import node.
 */

Compiler.prototype.import = function(node){
  return this.emit('@import ' + node.import + ';', node.position);
};

/**
 * Visit media node.
 */

Compiler.prototype.media = function(node){
  return this.emit('@media ' + node.media, node.position)
    + this.emit('{')
    + this.mapVisit(node.rules)
    + this.emit('}');
};

/**
 * Visit document node.
 */

Compiler.prototype.document = function(node){
  var doc = '@' + (node.vendor || '') + 'document ' + node.document;

  return this.emit(doc, node.position)
    + this.emit('{')
    + this.mapVisit(node.rules)
    + this.emit('}');
};

/**
 * Visit charset node.
 */

Compiler.prototype.charset = function(node){
  return this.emit('@charset ' + node.charset + ';', node.position);
};

/**
 * Visit namespace node.
 */

Compiler.prototype.namespace = function(node){
  return this.emit('@namespace ' + node.namespace + ';', node.position);
};

/**
 * Visit supports node.
 */

Compiler.prototype.supports = function(node){
  return this.emit('@supports ' + node.supports, node.position)
    + this.emit('{')
    + this.mapVisit(node.rules)
    + this.emit('}');
};

/**
 * Visit keyframes node.
 */

Compiler.prototype.keyframes = function(node){
  return this.emit('@'
    + (node.vendor || '')
    + 'keyframes '
    + node.name, node.position)
    + this.emit('{')
    + this.mapVisit(node.keyframes)
    + this.emit('}');
};

/**
 * Visit keyframe node.
 */

Compiler.prototype.keyframe = function(node){
  var decls = node.declarations;

  return this.emit(node.values.join(','), node.position)
    + this.emit('{')
    + this.mapVisit(decls)
    + this.emit('}');
};

/**
 * Visit page node.
 */

Compiler.prototype.page = function(node){
  var sel = node.selectors.length
    ? node.selectors.join(', ')
    : '';

  return this.emit('@page ' + sel, node.position)
    + this.emit('{')
    + this.mapVisit(node.declarations)
    + this.emit('}');
};

/**
 * Visit font-face node.
 */

Compiler.prototype['font-face'] = function(node){
  return this.emit('@font-face', node.position)
    + this.emit('{')
    + this.mapVisit(node.declarations)
    + this.emit('}');
};

/**
 * Visit host node.
 */

Compiler.prototype.host = function(node){
  return this.emit('@host', node.position)
    + this.emit('{')
    + this.mapVisit(node.rules)
    + this.emit('}');
};

/**
 * Visit custom-media node.
 */

Compiler.prototype['custom-media'] = function(node){
  return this.emit('@custom-media ' + node.name + ' ' + node.media + ';', node.position);
};

/**
 * Visit rule node.
 */

Compiler.prototype.rule = function(node){
  var decls = node.declarations;
  if (!decls.length) return '';

  return this.emit(node.selectors.join(','), node.position)
    + this.emit('{')
    + this.mapVisit(decls)
    + this.emit('}');
};

/**
 * Visit declaration node.
 */

Compiler.prototype.declaration = function(node){
  return this.emit(node.property + ':' + node.value, node.position) + this.emit(';');
};



/***/ }),

/***/ "./node_modules/css/lib/stringify/identity.js":
/*!****************************************************!*\
  !*** ./node_modules/css/lib/stringify/identity.js ***!
  \****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


/**
 * Module dependencies.
 */

var Base = __webpack_require__(/*! ./compiler */ "./node_modules/css/lib/stringify/compiler.js");
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");

/**
 * Expose compiler.
 */

module.exports = Compiler;

/**
 * Initialize a new `Compiler`.
 */

function Compiler(options) {
  options = options || {};
  Base.call(this, options);
  this.indentation = options.indent;
}

/**
 * Inherit from `Base.prototype`.
 */

inherits(Compiler, Base);

/**
 * Compile `node`.
 */

Compiler.prototype.compile = function(node){
  return this.stylesheet(node);
};

/**
 * Visit stylesheet node.
 */

Compiler.prototype.stylesheet = function(node){
  return this.mapVisit(node.stylesheet.rules, '\n\n');
};

/**
 * Visit comment node.
 */

Compiler.prototype.comment = function(node){
  return this.emit(this.indent() + '/*' + node.comment + '*/', node.position);
};

/**
 * Visit import node.
 */

Compiler.prototype.import = function(node){
  return this.emit('@import ' + node.import + ';', node.position);
};

/**
 * Visit media node.
 */

Compiler.prototype.media = function(node){
  return this.emit('@media ' + node.media, node.position)
    + this.emit(
        ' {\n'
        + this.indent(1))
    + this.mapVisit(node.rules, '\n\n')
    + this.emit(
        this.indent(-1)
        + '\n}');
};

/**
 * Visit document node.
 */

Compiler.prototype.document = function(node){
  var doc = '@' + (node.vendor || '') + 'document ' + node.document;

  return this.emit(doc, node.position)
    + this.emit(
        ' '
      + ' {\n'
      + this.indent(1))
    + this.mapVisit(node.rules, '\n\n')
    + this.emit(
        this.indent(-1)
        + '\n}');
};

/**
 * Visit charset node.
 */

Compiler.prototype.charset = function(node){
  return this.emit('@charset ' + node.charset + ';', node.position);
};

/**
 * Visit namespace node.
 */

Compiler.prototype.namespace = function(node){
  return this.emit('@namespace ' + node.namespace + ';', node.position);
};

/**
 * Visit supports node.
 */

Compiler.prototype.supports = function(node){
  return this.emit('@supports ' + node.supports, node.position)
    + this.emit(
      ' {\n'
      + this.indent(1))
    + this.mapVisit(node.rules, '\n\n')
    + this.emit(
        this.indent(-1)
        + '\n}');
};

/**
 * Visit keyframes node.
 */

Compiler.prototype.keyframes = function(node){
  return this.emit('@' + (node.vendor || '') + 'keyframes ' + node.name, node.position)
    + this.emit(
      ' {\n'
      + this.indent(1))
    + this.mapVisit(node.keyframes, '\n')
    + this.emit(
        this.indent(-1)
        + '}');
};

/**
 * Visit keyframe node.
 */

Compiler.prototype.keyframe = function(node){
  var decls = node.declarations;

  return this.emit(this.indent())
    + this.emit(node.values.join(', '), node.position)
    + this.emit(
      ' {\n'
      + this.indent(1))
    + this.mapVisit(decls, '\n')
    + this.emit(
      this.indent(-1)
      + '\n'
      + this.indent() + '}\n');
};

/**
 * Visit page node.
 */

Compiler.prototype.page = function(node){
  var sel = node.selectors.length
    ? node.selectors.join(', ') + ' '
    : '';

  return this.emit('@page ' + sel, node.position)
    + this.emit('{\n')
    + this.emit(this.indent(1))
    + this.mapVisit(node.declarations, '\n')
    + this.emit(this.indent(-1))
    + this.emit('\n}');
};

/**
 * Visit font-face node.
 */

Compiler.prototype['font-face'] = function(node){
  return this.emit('@font-face ', node.position)
    + this.emit('{\n')
    + this.emit(this.indent(1))
    + this.mapVisit(node.declarations, '\n')
    + this.emit(this.indent(-1))
    + this.emit('\n}');
};

/**
 * Visit host node.
 */

Compiler.prototype.host = function(node){
  return this.emit('@host', node.position)
    + this.emit(
        ' {\n'
        + this.indent(1))
    + this.mapVisit(node.rules, '\n\n')
    + this.emit(
        this.indent(-1)
        + '\n}');
};

/**
 * Visit custom-media node.
 */

Compiler.prototype['custom-media'] = function(node){
  return this.emit('@custom-media ' + node.name + ' ' + node.media + ';', node.position);
};

/**
 * Visit rule node.
 */

Compiler.prototype.rule = function(node){
  var indent = this.indent();
  var decls = node.declarations;
  if (!decls.length) return '';

  return this.emit(node.selectors.map(function(s){ return indent + s }).join(',\n'), node.position)
    + this.emit(' {\n')
    + this.emit(this.indent(1))
    + this.mapVisit(decls, '\n')
    + this.emit(this.indent(-1))
    + this.emit('\n' + this.indent() + '}');
};

/**
 * Visit declaration node.
 */

Compiler.prototype.declaration = function(node){
  return this.emit(this.indent())
    + this.emit(node.property + ': ' + node.value, node.position)
    + this.emit(';');
};

/**
 * Increase, decrease or return current indentation.
 */

Compiler.prototype.indent = function(level) {
  this.level = this.level || 1;

  if (null != level) {
    this.level += level;
    return '';
  }

  return Array(this.level).join(this.indentation || '  ');
};


/***/ }),

/***/ "./node_modules/css/lib/stringify/index.js":
/*!*************************************************!*\
  !*** ./node_modules/css/lib/stringify/index.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


/**
 * Module dependencies.
 */

var Compressed = __webpack_require__(/*! ./compress */ "./node_modules/css/lib/stringify/compress.js");
var Identity = __webpack_require__(/*! ./identity */ "./node_modules/css/lib/stringify/identity.js");

/**
 * Stringfy the given AST `node`.
 *
 * Options:
 *
 *  - `compress` space-optimized output
 *  - `sourcemap` return an object with `.code` and `.map`
 *
 * @param {Object} node
 * @param {Object} [options]
 * @return {String}
 * @api public
 */

module.exports = function(node, options){
  options = options || {};

  var compiler = options.compress
    ? new Compressed(options)
    : new Identity(options);

  // source maps
  if (options.sourcemap) {
    var sourcemaps = __webpack_require__(/*! ./source-map-support */ "./node_modules/css/lib/stringify/source-map-support.js");
    sourcemaps(compiler);

    var code = compiler.compile(node);
    compiler.applySourceMaps();

    var map = options.sourcemap === 'generator'
      ? compiler.map
      : compiler.map.toJSON();

    return { code: code, map: map };
  }

  var code = compiler.compile(node);
  return code;
};


/***/ }),

/***/ "./node_modules/css/lib/stringify/source-map-support.js":
/*!**************************************************************!*\
  !*** ./node_modules/css/lib/stringify/source-map-support.js ***!
  \**************************************************************/
/***/ ((module, exports, __webpack_require__) => {


/**
 * Module dependencies.
 */

var SourceMap = __webpack_require__(/*! source-map */ "./node_modules/source-map/source-map.js").SourceMapGenerator;
var SourceMapConsumer = __webpack_require__(/*! source-map */ "./node_modules/source-map/source-map.js").SourceMapConsumer;
var sourceMapResolve = __webpack_require__(/*! source-map-resolve */ "./node_modules/source-map-resolve/index.js");
var fs = __webpack_require__(/*! fs */ "?b867");
var path = __webpack_require__(/*! path */ "?cdbe");

/**
 * Expose `mixin()`.
 */

module.exports = mixin;

/**
 * Ensure Windows-style paths are formatted properly
 */

const makeFriendlyPath = function(aPath) {
  return path.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath;
}

/**
 * Mixin source map support into `compiler`.
 *
 * @param {Compiler} compiler
 * @api public
 */

function mixin(compiler) {
  compiler._comment = compiler.comment;
  compiler.map = new SourceMap();
  compiler.position = { line: 1, column: 1 };
  compiler.files = {};
  for (var k in exports) compiler[k] = exports[k];
}

/**
 * Update position.
 *
 * @param {String} str
 * @api private
 */

exports.updatePosition = function(str) {
  var lines = str.match(/\n/g);
  if (lines) this.position.line += lines.length;
  var i = str.lastIndexOf('\n');
  this.position.column = ~i ? str.length - i : this.position.column + str.length;
};

/**
 * Emit `str`.
 *
 * @param {String} str
 * @param {Object} [pos]
 * @return {String}
 * @api private
 */

exports.emit = function(str, pos) {
  if (pos) {
    var sourceFile = makeFriendlyPath(pos.source || 'source.css');

    this.map.addMapping({
      source: sourceFile,
      generated: {
        line: this.position.line,
        column: Math.max(this.position.column - 1, 0)
      },
      original: {
        line: pos.start.line,
        column: pos.start.column - 1
      }
    });

    this.addFile(sourceFile, pos);
  }

  this.updatePosition(str);

  return str;
};

/**
 * Adds a file to the source map output if it has not already been added
 * @param {String} file
 * @param {Object} pos
 */

exports.addFile = function(file, pos) {
  if (typeof pos.content !== 'string') return;
  if (Object.prototype.hasOwnProperty.call(this.files, file)) return;

  this.files[file] = pos.content;
};

/**
 * Applies any original source maps to the output and embeds the source file
 * contents in the source map.
 */

exports.applySourceMaps = function() {
  Object.keys(this.files).forEach(function(file) {
    var content = this.files[file];
    this.map.setSourceContent(file, content);

    if (this.options.inputSourcemaps !== false) {
      var originalMap = sourceMapResolve.resolveSync(
        content, file, fs.readFileSync);
      if (originalMap) {
        var map = new SourceMapConsumer(originalMap.map);
        var relativeTo = originalMap.sourcesRelativeTo;
        this.map.applySourceMap(map, file, makeFriendlyPath(path.dirname(relativeTo)));
      }
    }
  }, this);
};

/**
 * Process comments, drops sourceMap comments.
 * @param {Object} node
 */

exports.comment = function(node) {
  if (/^# sourceMappingURL=/.test(node.comment))
    return this.emit('', node.position);
  else
    return this._comment(node);
};


/***/ }),

/***/ "./node_modules/decode-uri-component/index.js":
/*!****************************************************!*\
  !*** ./node_modules/decode-uri-component/index.js ***!
  \****************************************************/
/***/ ((module) => {

"use strict";

var token = '%[a-f0-9]{2}';
var singleMatcher = new RegExp(token, 'gi');
var multiMatcher = new RegExp('(' + token + ')+', 'gi');

function decodeComponents(components, split) {
	try {
		// Try to decode the entire string first
		return decodeURIComponent(components.join(''));
	} catch (err) {
		// Do nothing
	}

	if (components.length === 1) {
		return components;
	}

	split = split || 1;

	// Split the array in 2 parts
	var left = components.slice(0, split);
	var right = components.slice(split);

	return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
}

function decode(input) {
	try {
		return decodeURIComponent(input);
	} catch (err) {
		var tokens = input.match(singleMatcher);

		for (var i = 1; i < tokens.length; i++) {
			input = decodeComponents(tokens, i).join('');

			tokens = input.match(singleMatcher);
		}

		return input;
	}
}

function customDecodeURIComponent(input) {
	// Keep track of all the replacements and prefill the map with the `BOM`
	var replaceMap = {
		'%FE%FF': '\uFFFD\uFFFD',
		'%FF%FE': '\uFFFD\uFFFD'
	};

	var match = multiMatcher.exec(input);
	while (match) {
		try {
			// Decode as big chunks as possible
			replaceMap[match[0]] = decodeURIComponent(match[0]);
		} catch (err) {
			var result = decode(match[0]);

			if (result !== match[0]) {
				replaceMap[match[0]] = result;
			}
		}

		match = multiMatcher.exec(input);
	}

	// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
	replaceMap['%C2'] = '\uFFFD';

	var entries = Object.keys(replaceMap);

	for (var i = 0; i < entries.length; i++) {
		// Replace all decoded components
		var key = entries[i];
		input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
	}

	return input;
}

module.exports = function (encodedURI) {
	if (typeof encodedURI !== 'string') {
		throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
	}

	try {
		encodedURI = encodedURI.replace(/\+/g, ' ');

		// Try the built in decoder first
		return decodeURIComponent(encodedURI);
	} catch (err) {
		// Fallback to a more advanced decoder
		return customDecodeURIComponent(encodedURI);
	}
};


/***/ }),

/***/ "./node_modules/fuse.js/dist/fuse.esm.js":
/*!***********************************************!*\
  !*** ./node_modules/fuse.js/dist/fuse.esm.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
 * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io)
 *
 * Copyright (c) 2021 Kiro Risk (http://kiro.me)
 * All Rights Reserved. Apache Software License 2.0
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 */

function isArray(value) {
  return !Array.isArray
    ? getTag(value) === '[object Array]'
    : Array.isArray(value)
}

// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js
const INFINITY = 1 / 0;
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value
  }
  let result = value + '';
  return result == '0' && 1 / value == -INFINITY ? '-0' : result
}

function toString(value) {
  return value == null ? '' : baseToString(value)
}

function isString(value) {
  return typeof value === 'string'
}

function isNumber(value) {
  return typeof value === 'number'
}

// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js
function isBoolean(value) {
  return (
    value === true ||
    value === false ||
    (isObjectLike(value) && getTag(value) == '[object Boolean]')
  )
}

function isObject(value) {
  return typeof value === 'object'
}

// Checks if `value` is object-like.
function isObjectLike(value) {
  return isObject(value) && value !== null
}

function isDefined(value) {
  return value !== undefined && value !== null
}

function isBlank(value) {
  return !value.trim().length
}

// Gets the `toStringTag` of `value`.
// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js
function getTag(value) {
  return value == null
    ? value === undefined
      ? '[object Undefined]'
      : '[object Null]'
    : Object.prototype.toString.call(value)
}

const EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';

const INCORRECT_INDEX_TYPE = "Incorrect 'index' type";

const LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>
  `Invalid value for key ${key}`;

const PATTERN_LENGTH_TOO_LARGE = (max) =>
  `Pattern length exceeds max of ${max}.`;

const MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;

const INVALID_KEY_WEIGHT_VALUE = (key) =>
  `Property 'weight' in key '${key}' must be a positive integer`;

const hasOwn = Object.prototype.hasOwnProperty;

class KeyStore {
  constructor(keys) {
    this._keys = [];
    this._keyMap = {};

    let totalWeight = 0;

    keys.forEach((key) => {
      let obj = createKey(key);

      totalWeight += obj.weight;

      this._keys.push(obj);
      this._keyMap[obj.id] = obj;

      totalWeight += obj.weight;
    });

    // Normalize weights so that their sum is equal to 1
    this._keys.forEach((key) => {
      key.weight /= totalWeight;
    });
  }
  get(keyId) {
    return this._keyMap[keyId]
  }
  keys() {
    return this._keys
  }
  toJSON() {
    return JSON.stringify(this._keys)
  }
}

function createKey(key) {
  let path = null;
  let id = null;
  let src = null;
  let weight = 1;

  if (isString(key) || isArray(key)) {
    src = key;
    path = createKeyPath(key);
    id = createKeyId(key);
  } else {
    if (!hasOwn.call(key, 'name')) {
      throw new Error(MISSING_KEY_PROPERTY('name'))
    }

    const name = key.name;
    src = name;

    if (hasOwn.call(key, 'weight')) {
      weight = key.weight;

      if (weight <= 0) {
        throw new Error(INVALID_KEY_WEIGHT_VALUE(name))
      }
    }

    path = createKeyPath(name);
    id = createKeyId(name);
  }

  return { path, id, weight, src }
}

function createKeyPath(key) {
  return isArray(key) ? key : key.split('.')
}

function createKeyId(key) {
  return isArray(key) ? key.join('.') : key
}

function get(obj, path) {
  let list = [];
  let arr = false;

  const deepGet = (obj, path, index) => {
    if (!isDefined(obj)) {
      return
    }
    if (!path[index]) {
      // If there's no path left, we've arrived at the object we care about.
      list.push(obj);
    } else {
      let key = path[index];

      const value = obj[key];

      if (!isDefined(value)) {
        return
      }

      // If we're at the last value in the path, and if it's a string/number/bool,
      // add it to the list
      if (
        index === path.length - 1 &&
        (isString(value) || isNumber(value) || isBoolean(value))
      ) {
        list.push(toString(value));
      } else if (isArray(value)) {
        arr = true;
        // Search each item in the array.
        for (let i = 0, len = value.length; i < len; i += 1) {
          deepGet(value[i], path, index + 1);
        }
      } else if (path.length) {
        // An object. Recurse further.
        deepGet(value, path, index + 1);
      }
    }
  };

  // Backwards compatibility (since path used to be a string)
  deepGet(obj, isString(path) ? path.split('.') : path, 0);

  return arr ? list : list[0]
}

const MatchOptions = {
  // Whether the matches should be included in the result set. When `true`, each record in the result
  // set will include the indices of the matched characters.
  // These can consequently be used for highlighting purposes.
  includeMatches: false,
  // When `true`, the matching function will continue to the end of a search pattern even if
  // a perfect match has already been located in the string.
  findAllMatches: false,
  // Minimum number of characters that must be matched before a result is considered a match
  minMatchCharLength: 1
};

const BasicOptions = {
  // When `true`, the algorithm continues searching to the end of the input even if a perfect
  // match is found before the end of the same input.
  isCaseSensitive: false,
  // When true, the matching function will continue to the end of a search pattern even if
  includeScore: false,
  // List of properties that will be searched. This also supports nested properties.
  keys: [],
  // Whether to sort the result list, by score
  shouldSort: true,
  // Default sort function: sort by ascending score, ascending index
  sortFn: (a, b) =>
    a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1
};

const FuzzyOptions = {
  // Approximately where in the text is the pattern expected to be found?
  location: 0,
  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
  // (of both letters and location), a threshold of '1.0' would match anything.
  threshold: 0.6,
  // Determines how close the match must be to the fuzzy location (specified above).
  // An exact letter match which is 'distance' characters away from the fuzzy location
  // would score as a complete mismatch. A distance of '0' requires the match be at
  // the exact location specified, a threshold of '1000' would require a perfect match
  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
  distance: 100
};

const AdvancedOptions = {
  // When `true`, it enables the use of unix-like search commands
  useExtendedSearch: false,
  // The get function to use when fetching an object's properties.
  // The default will search nested paths *ie foo.bar.baz*
  getFn: get,
  // When `true`, search will ignore `location` and `distance`, so it won't matter
  // where in the string the pattern appears.
  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
  ignoreLocation: false,
  // When `true`, the calculation for the relevance score (used for sorting) will
  // ignore the field-length norm.
  // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
  ignoreFieldNorm: false
};

var Config = {
  ...BasicOptions,
  ...MatchOptions,
  ...FuzzyOptions,
  ...AdvancedOptions
};

const SPACE = /[^ ]+/g;

// Field-length norm: the shorter the field, the higher the weight.
// Set to 3 decimals to reduce index size.
function norm(mantissa = 3) {
  const cache = new Map();
  const m = Math.pow(10, mantissa);

  return {
    get(value) {
      const numTokens = value.match(SPACE).length;

      if (cache.has(numTokens)) {
        return cache.get(numTokens)
      }

      const norm = 1 / Math.sqrt(numTokens);

      // In place of `toFixed(mantissa)`, for faster computation
      const n = parseFloat(Math.round(norm * m) / m);

      cache.set(numTokens, n);

      return n
    },
    clear() {
      cache.clear();
    }
  }
}

class FuseIndex {
  constructor({ getFn = Config.getFn } = {}) {
    this.norm = norm(3);
    this.getFn = getFn;
    this.isCreated = false;

    this.setIndexRecords();
  }
  setSources(docs = []) {
    this.docs = docs;
  }
  setIndexRecords(records = []) {
    this.records = records;
  }
  setKeys(keys = []) {
    this.keys = keys;
    this._keysMap = {};
    keys.forEach((key, idx) => {
      this._keysMap[key.id] = idx;
    });
  }
  create() {
    if (this.isCreated || !this.docs.length) {
      return
    }

    this.isCreated = true;

    // List is Array<String>
    if (isString(this.docs[0])) {
      this.docs.forEach((doc, docIndex) => {
        this._addString(doc, docIndex);
      });
    } else {
      // List is Array<Object>
      this.docs.forEach((doc, docIndex) => {
        this._addObject(doc, docIndex);
      });
    }

    this.norm.clear();
  }
  // Adds a doc to the end of the index
  add(doc) {
    const idx = this.size();

    if (isString(doc)) {
      this._addString(doc, idx);
    } else {
      this._addObject(doc, idx);
    }
  }
  // Removes the doc at the specified index of the index
  removeAt(idx) {
    this.records.splice(idx, 1);

    // Change ref index of every subsquent doc
    for (let i = idx, len = this.size(); i < len; i += 1) {
      this.records[i].i -= 1;
    }
  }
  getValueForItemAtKeyId(item, keyId) {
    return item[this._keysMap[keyId]]
  }
  size() {
    return this.records.length
  }
  _addString(doc, docIndex) {
    if (!isDefined(doc) || isBlank(doc)) {
      return
    }

    let record = {
      v: doc,
      i: docIndex,
      n: this.norm.get(doc)
    };

    this.records.push(record);
  }
  _addObject(doc, docIndex) {
    let record = { i: docIndex, $: {} };

    // Iterate over every key (i.e, path), and fetch the value at that key
    this.keys.forEach((key, keyIndex) => {
      // console.log(key)
      let value = this.getFn(doc, key.path);

      if (!isDefined(value)) {
        return
      }

      if (isArray(value)) {
        let subRecords = [];
        const stack = [{ nestedArrIndex: -1, value }];

        while (stack.length) {
          const { nestedArrIndex, value } = stack.pop();

          if (!isDefined(value)) {
            continue
          }

          if (isString(value) && !isBlank(value)) {
            let subRecord = {
              v: value,
              i: nestedArrIndex,
              n: this.norm.get(value)
            };

            subRecords.push(subRecord);
          } else if (isArray(value)) {
            value.forEach((item, k) => {
              stack.push({
                nestedArrIndex: k,
                value: item
              });
            });
          }
        }
        record.$[keyIndex] = subRecords;
      } else if (!isBlank(value)) {
        let subRecord = {
          v: value,
          n: this.norm.get(value)
        };

        record.$[keyIndex] = subRecord;
      }
    });

    this.records.push(record);
  }
  toJSON() {
    return {
      keys: this.keys,
      records: this.records
    }
  }
}

function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
  const myIndex = new FuseIndex({ getFn });
  myIndex.setKeys(keys.map(createKey));
  myIndex.setSources(docs);
  myIndex.create();
  return myIndex
}

function parseIndex(data, { getFn = Config.getFn } = {}) {
  const { keys, records } = data;
  const myIndex = new FuseIndex({ getFn });
  myIndex.setKeys(keys);
  myIndex.setIndexRecords(records);
  return myIndex
}

function computeScore(
  pattern,
  {
    errors = 0,
    currentLocation = 0,
    expectedLocation = 0,
    distance = Config.distance,
    ignoreLocation = Config.ignoreLocation
  } = {}
) {
  const accuracy = errors / pattern.length;

  if (ignoreLocation) {
    return accuracy
  }

  const proximity = Math.abs(expectedLocation - currentLocation);

  if (!distance) {
    // Dodge divide by zero error.
    return proximity ? 1.0 : accuracy
  }

  return accuracy + proximity / distance
}

function convertMaskToIndices(
  matchmask = [],
  minMatchCharLength = Config.minMatchCharLength
) {
  let indices = [];
  let start = -1;
  let end = -1;
  let i = 0;

  for (let len = matchmask.length; i < len; i += 1) {
    let match = matchmask[i];
    if (match && start === -1) {
      start = i;
    } else if (!match && start !== -1) {
      end = i - 1;
      if (end - start + 1 >= minMatchCharLength) {
        indices.push([start, end]);
      }
      start = -1;
    }
  }

  // (i-1 - start) + 1 => i - start
  if (matchmask[i - 1] && i - start >= minMatchCharLength) {
    indices.push([start, i - 1]);
  }

  return indices
}

// Machine word size
const MAX_BITS = 32;

function search(
  text,
  pattern,
  patternAlphabet,
  {
    location = Config.location,
    distance = Config.distance,
    threshold = Config.threshold,
    findAllMatches = Config.findAllMatches,
    minMatchCharLength = Config.minMatchCharLength,
    includeMatches = Config.includeMatches,
    ignoreLocation = Config.ignoreLocation
  } = {}
) {
  if (pattern.length > MAX_BITS) {
    throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))
  }

  const patternLen = pattern.length;
  // Set starting location at beginning text and initialize the alphabet.
  const textLen = text.length;
  // Handle the case when location > text.length
  const expectedLocation = Math.max(0, Math.min(location, textLen));
  // Highest score beyond which we give up.
  let currentThreshold = threshold;
  // Is there a nearby exact match? (speedup)
  let bestLocation = expectedLocation;

  // Performance: only computer matches when the minMatchCharLength > 1
  // OR if `includeMatches` is true.
  const computeMatches = minMatchCharLength > 1 || includeMatches;
  // A mask of the matches, used for building the indices
  const matchMask = computeMatches ? Array(textLen) : [];

  let index;

  // Get all exact matches, here for speed up
  while ((index = text.indexOf(pattern, bestLocation)) > -1) {
    let score = computeScore(pattern, {
      currentLocation: index,
      expectedLocation,
      distance,
      ignoreLocation
    });

    currentThreshold = Math.min(score, currentThreshold);
    bestLocation = index + patternLen;

    if (computeMatches) {
      let i = 0;
      while (i < patternLen) {
        matchMask[index + i] = 1;
        i += 1;
      }
    }
  }

  // Reset the best location
  bestLocation = -1;

  let lastBitArr = [];
  let finalScore = 1;
  let binMax = patternLen + textLen;

  const mask = 1 << (patternLen - 1);

  for (let i = 0; i < patternLen; i += 1) {
    // Scan for the best match; each iteration allows for one more error.
    // Run a binary search to determine how far from the match location we can stray
    // at this error level.
    let binMin = 0;
    let binMid = binMax;

    while (binMin < binMid) {
      const score = computeScore(pattern, {
        errors: i,
        currentLocation: expectedLocation + binMid,
        expectedLocation,
        distance,
        ignoreLocation
      });

      if (score <= currentThreshold) {
        binMin = binMid;
      } else {
        binMax = binMid;
      }

      binMid = Math.floor((binMax - binMin) / 2 + binMin);
    }

    // Use the result from this iteration as the maximum for the next.
    binMax = binMid;

    let start = Math.max(1, expectedLocation - binMid + 1);
    let finish = findAllMatches
      ? textLen
      : Math.min(expectedLocation + binMid, textLen) + patternLen;

    // Initialize the bit array
    let bitArr = Array(finish + 2);

    bitArr[finish + 1] = (1 << i) - 1;

    for (let j = finish; j >= start; j -= 1) {
      let currentLocation = j - 1;
      let charMatch = patternAlphabet[text.charAt(currentLocation)];

      if (computeMatches) {
        // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)
        matchMask[currentLocation] = +!!charMatch;
      }

      // First pass: exact match
      bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;

      // Subsequent passes: fuzzy match
      if (i) {
        bitArr[j] |=
          ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];
      }

      if (bitArr[j] & mask) {
        finalScore = computeScore(pattern, {
          errors: i,
          currentLocation,
          expectedLocation,
          distance,
          ignoreLocation
        });

        // This match will almost certainly be better than any existing match.
        // But check anyway.
        if (finalScore <= currentThreshold) {
          // Indeed it is
          currentThreshold = finalScore;
          bestLocation = currentLocation;

          // Already passed `loc`, downhill from here on in.
          if (bestLocation <= expectedLocation) {
            break
          }

          // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.
          start = Math.max(1, 2 * expectedLocation - bestLocation);
        }
      }
    }

    // No hope for a (better) match at greater error levels.
    const score = computeScore(pattern, {
      errors: i + 1,
      currentLocation: expectedLocation,
      expectedLocation,
      distance,
      ignoreLocation
    });

    if (score > currentThreshold) {
      break
    }

    lastBitArr = bitArr;
  }

  const result = {
    isMatch: bestLocation >= 0,
    // Count exact matches (those with a score of 0) to be "almost" exact
    score: Math.max(0.001, finalScore)
  };

  if (computeMatches) {
    const indices = convertMaskToIndices(matchMask, minMatchCharLength);
    if (!indices.length) {
      result.isMatch = false;
    } else if (includeMatches) {
      result.indices = indices;
    }
  }

  return result
}

function createPatternAlphabet(pattern) {
  let mask = {};

  for (let i = 0, len = pattern.length; i < len; i += 1) {
    const char = pattern.charAt(i);
    mask[char] = (mask[char] || 0) | (1 << (len - i - 1));
  }

  return mask
}

class BitapSearch {
  constructor(
    pattern,
    {
      location = Config.location,
      threshold = Config.threshold,
      distance = Config.distance,
      includeMatches = Config.includeMatches,
      findAllMatches = Config.findAllMatches,
      minMatchCharLength = Config.minMatchCharLength,
      isCaseSensitive = Config.isCaseSensitive,
      ignoreLocation = Config.ignoreLocation
    } = {}
  ) {
    this.options = {
      location,
      threshold,
      distance,
      includeMatches,
      findAllMatches,
      minMatchCharLength,
      isCaseSensitive,
      ignoreLocation
    };

    this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();

    this.chunks = [];

    if (!this.pattern.length) {
      return
    }

    const addChunk = (pattern, startIndex) => {
      this.chunks.push({
        pattern,
        alphabet: createPatternAlphabet(pattern),
        startIndex
      });
    };

    const len = this.pattern.length;

    if (len > MAX_BITS) {
      let i = 0;
      const remainder = len % MAX_BITS;
      const end = len - remainder;

      while (i < end) {
        addChunk(this.pattern.substr(i, MAX_BITS), i);
        i += MAX_BITS;
      }

      if (remainder) {
        const startIndex = len - MAX_BITS;
        addChunk(this.pattern.substr(startIndex), startIndex);
      }
    } else {
      addChunk(this.pattern, 0);
    }
  }

  searchIn(text) {
    const { isCaseSensitive, includeMatches } = this.options;

    if (!isCaseSensitive) {
      text = text.toLowerCase();
    }

    // Exact match
    if (this.pattern === text) {
      let result = {
        isMatch: true,
        score: 0
      };

      if (includeMatches) {
        result.indices = [[0, text.length - 1]];
      }

      return result
    }

    // Otherwise, use Bitap algorithm
    const {
      location,
      distance,
      threshold,
      findAllMatches,
      minMatchCharLength,
      ignoreLocation
    } = this.options;

    let allIndices = [];
    let totalScore = 0;
    let hasMatches = false;

    this.chunks.forEach(({ pattern, alphabet, startIndex }) => {
      const { isMatch, score, indices } = search(text, pattern, alphabet, {
        location: location + startIndex,
        distance,
        threshold,
        findAllMatches,
        minMatchCharLength,
        includeMatches,
        ignoreLocation
      });

      if (isMatch) {
        hasMatches = true;
      }

      totalScore += score;

      if (isMatch && indices) {
        allIndices = [...allIndices, ...indices];
      }
    });

    let result = {
      isMatch: hasMatches,
      score: hasMatches ? totalScore / this.chunks.length : 1
    };

    if (hasMatches && includeMatches) {
      result.indices = allIndices;
    }

    return result
  }
}

class BaseMatch {
  constructor(pattern) {
    this.pattern = pattern;
  }
  static isMultiMatch(pattern) {
    return getMatch(pattern, this.multiRegex)
  }
  static isSingleMatch(pattern) {
    return getMatch(pattern, this.singleRegex)
  }
  search(/*text*/) {}
}

function getMatch(pattern, exp) {
  const matches = pattern.match(exp);
  return matches ? matches[1] : null
}

// Token: 'file

class ExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'exact'
  }
  static get multiRegex() {
    return /^="(.*)"$/
  }
  static get singleRegex() {
    return /^=(.*)$/
  }
  search(text) {
    const isMatch = text === this.pattern;

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [0, this.pattern.length - 1]
    }
  }
}

// Token: !fire

class InverseExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'inverse-exact'
  }
  static get multiRegex() {
    return /^!"(.*)"$/
  }
  static get singleRegex() {
    return /^!(.*)$/
  }
  search(text) {
    const index = text.indexOf(this.pattern);
    const isMatch = index === -1;

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [0, text.length - 1]
    }
  }
}

// Token: ^file

class PrefixExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'prefix-exact'
  }
  static get multiRegex() {
    return /^\^"(.*)"$/
  }
  static get singleRegex() {
    return /^\^(.*)$/
  }
  search(text) {
    const isMatch = text.startsWith(this.pattern);

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [0, this.pattern.length - 1]
    }
  }
}

// Token: !^fire

class InversePrefixExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'inverse-prefix-exact'
  }
  static get multiRegex() {
    return /^!\^"(.*)"$/
  }
  static get singleRegex() {
    return /^!\^(.*)$/
  }
  search(text) {
    const isMatch = !text.startsWith(this.pattern);

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [0, text.length - 1]
    }
  }
}

// Token: .file$

class SuffixExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'suffix-exact'
  }
  static get multiRegex() {
    return /^"(.*)"\$$/
  }
  static get singleRegex() {
    return /^(.*)\$$/
  }
  search(text) {
    const isMatch = text.endsWith(this.pattern);

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [text.length - this.pattern.length, text.length - 1]
    }
  }
}

// Token: !.file$

class InverseSuffixExactMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'inverse-suffix-exact'
  }
  static get multiRegex() {
    return /^!"(.*)"\$$/
  }
  static get singleRegex() {
    return /^!(.*)\$$/
  }
  search(text) {
    const isMatch = !text.endsWith(this.pattern);
    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices: [0, text.length - 1]
    }
  }
}

class FuzzyMatch extends BaseMatch {
  constructor(
    pattern,
    {
      location = Config.location,
      threshold = Config.threshold,
      distance = Config.distance,
      includeMatches = Config.includeMatches,
      findAllMatches = Config.findAllMatches,
      minMatchCharLength = Config.minMatchCharLength,
      isCaseSensitive = Config.isCaseSensitive,
      ignoreLocation = Config.ignoreLocation
    } = {}
  ) {
    super(pattern);
    this._bitapSearch = new BitapSearch(pattern, {
      location,
      threshold,
      distance,
      includeMatches,
      findAllMatches,
      minMatchCharLength,
      isCaseSensitive,
      ignoreLocation
    });
  }
  static get type() {
    return 'fuzzy'
  }
  static get multiRegex() {
    return /^"(.*)"$/
  }
  static get singleRegex() {
    return /^(.*)$/
  }
  search(text) {
    return this._bitapSearch.searchIn(text)
  }
}

// Token: 'file

class IncludeMatch extends BaseMatch {
  constructor(pattern) {
    super(pattern);
  }
  static get type() {
    return 'include'
  }
  static get multiRegex() {
    return /^'"(.*)"$/
  }
  static get singleRegex() {
    return /^'(.*)$/
  }
  search(text) {
    let location = 0;
    let index;

    const indices = [];
    const patternLen = this.pattern.length;

    // Get all exact matches
    while ((index = text.indexOf(this.pattern, location)) > -1) {
      location = index + patternLen;
      indices.push([index, location - 1]);
    }

    const isMatch = !!indices.length;

    return {
      isMatch,
      score: isMatch ? 0 : 1,
      indices
    }
  }
}

// ❗Order is important. DO NOT CHANGE.
const searchers = [
  ExactMatch,
  IncludeMatch,
  PrefixExactMatch,
  InversePrefixExactMatch,
  InverseSuffixExactMatch,
  SuffixExactMatch,
  InverseExactMatch,
  FuzzyMatch
];

const searchersLen = searchers.length;

// Regex to split by spaces, but keep anything in quotes together
const SPACE_RE = / +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;
const OR_TOKEN = '|';

// Return a 2D array representation of the query, for simpler parsing.
// Example:
// "^core go$ | rb$ | py$ xy$" => [["^core", "go$"], ["rb$"], ["py$", "xy$"]]
function parseQuery(pattern, options = {}) {
  return pattern.split(OR_TOKEN).map((item) => {
    let query = item
      .trim()
      .split(SPACE_RE)
      .filter((item) => item && !!item.trim());

    let results = [];
    for (let i = 0, len = query.length; i < len; i += 1) {
      const queryItem = query[i];

      // 1. Handle multiple query match (i.e, once that are quoted, like `"hello world"`)
      let found = false;
      let idx = -1;
      while (!found && ++idx < searchersLen) {
        const searcher = searchers[idx];
        let token = searcher.isMultiMatch(queryItem);
        if (token) {
          results.push(new searcher(token, options));
          found = true;
        }
      }

      if (found) {
        continue
      }

      // 2. Handle single query matches (i.e, once that are *not* quoted)
      idx = -1;
      while (++idx < searchersLen) {
        const searcher = searchers[idx];
        let token = searcher.isSingleMatch(queryItem);
        if (token) {
          results.push(new searcher(token, options));
          break
        }
      }
    }

    return results
  })
}

// These extended matchers can return an array of matches, as opposed
// to a singl match
const MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);

/**
 * Command-like searching
 * ======================
 *
 * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,
 * search in a given text.
 *
 * Search syntax:
 *
 * | Token       | Match type                 | Description                            |
 * | ----------- | -------------------------- | -------------------------------------- |
 * | `jscript`   | fuzzy-match                | Items that fuzzy match `jscript`       |
 * | `=scheme`   | exact-match                | Items that are `scheme`                |
 * | `'python`   | include-match              | Items that include `python`            |
 * | `!ruby`     | inverse-exact-match        | Items that do not include `ruby`       |
 * | `^java`     | prefix-exact-match         | Items that start with `java`           |
 * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |
 * | `.js$`      | suffix-exact-match         | Items that end with `.js`              |
 * | `!.go$`     | inverse-suffix-exact-match | Items that do not end with `.go`       |
 *
 * A single pipe character acts as an OR operator. For example, the following
 * query matches entries that start with `core` and end with either`go`, `rb`,
 * or`py`.
 *
 * ```
 * ^core go$ | rb$ | py$
 * ```
 */
class ExtendedSearch {
  constructor(
    pattern,
    {
      isCaseSensitive = Config.isCaseSensitive,
      includeMatches = Config.includeMatches,
      minMatchCharLength = Config.minMatchCharLength,
      ignoreLocation = Config.ignoreLocation,
      findAllMatches = Config.findAllMatches,
      location = Config.location,
      threshold = Config.threshold,
      distance = Config.distance
    } = {}
  ) {
    this.query = null;
    this.options = {
      isCaseSensitive,
      includeMatches,
      minMatchCharLength,
      findAllMatches,
      ignoreLocation,
      location,
      threshold,
      distance
    };

    this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();
    this.query = parseQuery(this.pattern, this.options);
  }

  static condition(_, options) {
    return options.useExtendedSearch
  }

  searchIn(text) {
    const query = this.query;

    if (!query) {
      return {
        isMatch: false,
        score: 1
      }
    }

    const { includeMatches, isCaseSensitive } = this.options;

    text = isCaseSensitive ? text : text.toLowerCase();

    let numMatches = 0;
    let allIndices = [];
    let totalScore = 0;

    // ORs
    for (let i = 0, qLen = query.length; i < qLen; i += 1) {
      const searchers = query[i];

      // Reset indices
      allIndices.length = 0;
      numMatches = 0;

      // ANDs
      for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {
        const searcher = searchers[j];
        const { isMatch, indices, score } = searcher.search(text);

        if (isMatch) {
          numMatches += 1;
          totalScore += score;
          if (includeMatches) {
            const type = searcher.constructor.type;
            if (MultiMatchSet.has(type)) {
              allIndices = [...allIndices, ...indices];
            } else {
              allIndices.push(indices);
            }
          }
        } else {
          totalScore = 0;
          numMatches = 0;
          allIndices.length = 0;
          break
        }
      }

      // OR condition, so if TRUE, return
      if (numMatches) {
        let result = {
          isMatch: true,
          score: totalScore / numMatches
        };

        if (includeMatches) {
          result.indices = allIndices;
        }

        return result
      }
    }

    // Nothing was matched
    return {
      isMatch: false,
      score: 1
    }
  }
}

const registeredSearchers = [];

function register(...args) {
  registeredSearchers.push(...args);
}

function createSearcher(pattern, options) {
  for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {
    let searcherClass = registeredSearchers[i];
    if (searcherClass.condition(pattern, options)) {
      return new searcherClass(pattern, options)
    }
  }

  return new BitapSearch(pattern, options)
}

const LogicalOperator = {
  AND: '$and',
  OR: '$or'
};

const KeyType = {
  PATH: '$path',
  PATTERN: '$val'
};

const isExpression = (query) =>
  !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);

const isPath = (query) => !!query[KeyType.PATH];

const isLeaf = (query) =>
  !isArray(query) && isObject(query) && !isExpression(query);

const convertToExplicit = (query) => ({
  [LogicalOperator.AND]: Object.keys(query).map((key) => ({
    [key]: query[key]
  }))
});

// When `auto` is `true`, the parse function will infer and initialize and add
// the appropriate `Searcher` instance
function parse(query, options, { auto = true } = {}) {
  const next = (query) => {
    let keys = Object.keys(query);

    const isQueryPath = isPath(query);

    if (!isQueryPath && keys.length > 1 && !isExpression(query)) {
      return next(convertToExplicit(query))
    }

    if (isLeaf(query)) {
      const key = isQueryPath ? query[KeyType.PATH] : keys[0];

      const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];

      if (!isString(pattern)) {
        throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))
      }

      const obj = {
        keyId: createKeyId(key),
        pattern
      };

      if (auto) {
        obj.searcher = createSearcher(pattern, options);
      }

      return obj
    }

    let node = {
      children: [],
      operator: keys[0]
    };

    keys.forEach((key) => {
      const value = query[key];

      if (isArray(value)) {
        value.forEach((item) => {
          node.children.push(next(item));
        });
      }
    });

    return node
  };

  if (!isExpression(query)) {
    query = convertToExplicit(query);
  }

  return next(query)
}

// Practical scoring function
function computeScore$1(
  results,
  { ignoreFieldNorm = Config.ignoreFieldNorm }
) {
  results.forEach((result) => {
    let totalScore = 1;

    result.matches.forEach(({ key, norm, score }) => {
      const weight = key ? key.weight : null;

      totalScore *= Math.pow(
        score === 0 && weight ? Number.EPSILON : score,
        (weight || 1) * (ignoreFieldNorm ? 1 : norm)
      );
    });

    result.score = totalScore;
  });
}

function transformMatches(result, data) {
  const matches = result.matches;
  data.matches = [];

  if (!isDefined(matches)) {
    return
  }

  matches.forEach((match) => {
    if (!isDefined(match.indices) || !match.indices.length) {
      return
    }

    const { indices, value } = match;

    let obj = {
      indices,
      value
    };

    if (match.key) {
      obj.key = match.key.src;
    }

    if (match.idx > -1) {
      obj.refIndex = match.idx;
    }

    data.matches.push(obj);
  });
}

function transformScore(result, data) {
  data.score = result.score;
}

function format(
  results,
  docs,
  {
    includeMatches = Config.includeMatches,
    includeScore = Config.includeScore
  } = {}
) {
  const transformers = [];

  if (includeMatches) transformers.push(transformMatches);
  if (includeScore) transformers.push(transformScore);

  return results.map((result) => {
    const { idx } = result;

    const data = {
      item: docs[idx],
      refIndex: idx
    };

    if (transformers.length) {
      transformers.forEach((transformer) => {
        transformer(result, data);
      });
    }

    return data
  })
}

class Fuse {
  constructor(docs, options = {}, index) {
    this.options = { ...Config, ...options };

    if (
      this.options.useExtendedSearch &&
      !true
    ) {
      throw new Error(EXTENDED_SEARCH_UNAVAILABLE)
    }

    this._keyStore = new KeyStore(this.options.keys);

    this.setCollection(docs, index);
  }

  setCollection(docs, index) {
    this._docs = docs;

    if (index && !(index instanceof FuseIndex)) {
      throw new Error(INCORRECT_INDEX_TYPE)
    }

    this._myIndex =
      index ||
      createIndex(this.options.keys, this._docs, {
        getFn: this.options.getFn
      });
  }

  add(doc) {
    if (!isDefined(doc)) {
      return
    }

    this._docs.push(doc);
    this._myIndex.add(doc);
  }

  remove(predicate = (/* doc, idx */) => false) {
    const results = [];

    for (let i = 0, len = this._docs.length; i < len; i += 1) {
      const doc = this._docs[i];
      if (predicate(doc, i)) {
        this.removeAt(i);
        i -= 1;
        len -= 1;

        results.push(doc);
      }
    }

    return results
  }

  removeAt(idx) {
    this._docs.splice(idx, 1);
    this._myIndex.removeAt(idx);
  }

  getIndex() {
    return this._myIndex
  }

  search(query, { limit = -1 } = {}) {
    const {
      includeMatches,
      includeScore,
      shouldSort,
      sortFn,
      ignoreFieldNorm
    } = this.options;

    let results = isString(query)
      ? isString(this._docs[0])
        ? this._searchStringList(query)
        : this._searchObjectList(query)
      : this._searchLogical(query);

    computeScore$1(results, { ignoreFieldNorm });

    if (shouldSort) {
      results.sort(sortFn);
    }

    if (isNumber(limit) && limit > -1) {
      results = results.slice(0, limit);
    }

    return format(results, this._docs, {
      includeMatches,
      includeScore
    })
  }

  _searchStringList(query) {
    const searcher = createSearcher(query, this.options);
    const { records } = this._myIndex;
    const results = [];

    // Iterate over every string in the index
    records.forEach(({ v: text, i: idx, n: norm }) => {
      if (!isDefined(text)) {
        return
      }

      const { isMatch, score, indices } = searcher.searchIn(text);

      if (isMatch) {
        results.push({
          item: text,
          idx,
          matches: [{ score, value: text, norm, indices }]
        });
      }
    });

    return results
  }

  _searchLogical(query) {

    const expression = parse(query, this.options);

    const evaluate = (node, item, idx) => {
      if (!node.children) {
        const { keyId, searcher } = node;

        const matches = this._findMatches({
          key: this._keyStore.get(keyId),
          value: this._myIndex.getValueForItemAtKeyId(item, keyId),
          searcher
        });

        if (matches && matches.length) {
          return [
            {
              idx,
              item,
              matches
            }
          ]
        }

        return []
      }

      /*eslint indent: [2, 2, {"SwitchCase": 1}]*/
      switch (node.operator) {
        case LogicalOperator.AND: {
          const res = [];
          for (let i = 0, len = node.children.length; i < len; i += 1) {
            const child = node.children[i];
            const result = evaluate(child, item, idx);
            if (result.length) {
              res.push(...result);
            } else {
              return []
            }
          }
          return res
        }
        case LogicalOperator.OR: {
          const res = [];
          for (let i = 0, len = node.children.length; i < len; i += 1) {
            const child = node.children[i];
            const result = evaluate(child, item, idx);
            if (result.length) {
              res.push(...result);
              break
            }
          }
          return res
        }
      }
    };

    const records = this._myIndex.records;
    const resultMap = {};
    const results = [];

    records.forEach(({ $: item, i: idx }) => {
      if (isDefined(item)) {
        let expResults = evaluate(expression, item, idx);

        if (expResults.length) {
          // Dedupe when adding
          if (!resultMap[idx]) {
            resultMap[idx] = { idx, item, matches: [] };
            results.push(resultMap[idx]);
          }
          expResults.forEach(({ matches }) => {
            resultMap[idx].matches.push(...matches);
          });
        }
      }
    });

    return results
  }

  _searchObjectList(query) {
    const searcher = createSearcher(query, this.options);
    const { keys, records } = this._myIndex;
    const results = [];

    // List is Array<Object>
    records.forEach(({ $: item, i: idx }) => {
      if (!isDefined(item)) {
        return
      }

      let matches = [];

      // Iterate over every key (i.e, path), and fetch the value at that key
      keys.forEach((key, keyIndex) => {
        matches.push(
          ...this._findMatches({
            key,
            value: item[keyIndex],
            searcher
          })
        );
      });

      if (matches.length) {
        results.push({
          idx,
          item,
          matches
        });
      }
    });

    return results
  }
  _findMatches({ key, value, searcher }) {
    if (!isDefined(value)) {
      return []
    }

    let matches = [];

    if (isArray(value)) {
      value.forEach(({ v: text, i: idx, n: norm }) => {
        if (!isDefined(text)) {
          return
        }

        const { isMatch, score, indices } = searcher.searchIn(text);

        if (isMatch) {
          matches.push({
            score,
            key,
            value: text,
            idx,
            norm,
            indices
          });
        }
      });
    } else {
      const { v: text, n: norm } = value;

      const { isMatch, score, indices } = searcher.searchIn(text);

      if (isMatch) {
        matches.push({ score, key, value: text, norm, indices });
      }
    }

    return matches
  }
}

Fuse.version = '6.4.6';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;

{
  Fuse.parseQuery = parse;
}

{
  register(ExtendedSearch);
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Fuse);


/***/ }),

/***/ "./node_modules/inherits/inherits_browser.js":
/*!***************************************************!*\
  !*** ./node_modules/inherits/inherits_browser.js ***!
  \***************************************************/
/***/ ((module) => {

if (typeof Object.create === 'function') {
  // implementation from standard node.js 'util' module
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor
      ctor.prototype = Object.create(superCtor.prototype, {
        constructor: {
          value: ctor,
          enumerable: false,
          writable: true,
          configurable: true
        }
      })
    }
  };
} else {
  // old school shim for old browsers
  module.exports = function inherits(ctor, superCtor) {
    if (superCtor) {
      ctor.super_ = superCtor
      var TempCtor = function () {}
      TempCtor.prototype = superCtor.prototype
      ctor.prototype = new TempCtor()
      ctor.prototype.constructor = ctor
    }
  }
}


/***/ }),

/***/ "./node_modules/nearley/lib/nearley.js":
/*!*********************************************!*\
  !*** ./node_modules/nearley/lib/nearley.js ***!
  \*********************************************/
/***/ (function(module) {

(function(root, factory) {
    if ( true && module.exports) {
        module.exports = factory();
    } else {
        root.nearley = factory();
    }
}(this, function() {

    function Rule(name, symbols, postprocess) {
        this.id = ++Rule.highestId;
        this.name = name;
        this.symbols = symbols;        // a list of literal | regex class | nonterminal
        this.postprocess = postprocess;
        return this;
    }
    Rule.highestId = 0;

    Rule.prototype.toString = function(withCursorAt) {
        var symbolSequence = (typeof withCursorAt === "undefined")
                             ? this.symbols.map(getSymbolShortDisplay).join(' ')
                             : (   this.symbols.slice(0, withCursorAt).map(getSymbolShortDisplay).join(' ')
                                 + " ● "
                                 + this.symbols.slice(withCursorAt).map(getSymbolShortDisplay).join(' ')     );
        return this.name + " → " + symbolSequence;
    }


    // a State is a rule at a position from a given starting point in the input stream (reference)
    function State(rule, dot, reference, wantedBy) {
        this.rule = rule;
        this.dot = dot;
        this.reference = reference;
        this.data = [];
        this.wantedBy = wantedBy;
        this.isComplete = this.dot === rule.symbols.length;
    }

    State.prototype.toString = function() {
        return "{" + this.rule.toString(this.dot) + "}, from: " + (this.reference || 0);
    };

    State.prototype.nextState = function(child) {
        var state = new State(this.rule, this.dot + 1, this.reference, this.wantedBy);
        state.left = this;
        state.right = child;
        if (state.isComplete) {
            state.data = state.build();
            // Having right set here will prevent the right state and its children
            // form being garbage collected
            state.right = undefined;
        }
        return state;
    };

    State.prototype.build = function() {
        var children = [];
        var node = this;
        do {
            children.push(node.right.data);
            node = node.left;
        } while (node.left);
        children.reverse();
        return children;
    };

    State.prototype.finish = function() {
        if (this.rule.postprocess) {
            this.data = this.rule.postprocess(this.data, this.reference, Parser.fail);
        }
    };


    function Column(grammar, index) {
        this.grammar = grammar;
        this.index = index;
        this.states = [];
        this.wants = {}; // states indexed by the non-terminal they expect
        this.scannable = []; // list of states that expect a token
        this.completed = {}; // states that are nullable
    }


    Column.prototype.process = function(nextColumn) {
        var states = this.states;
        var wants = this.wants;
        var completed = this.completed;

        for (var w = 0; w < states.length; w++) { // nb. we push() during iteration
            var state = states[w];

            if (state.isComplete) {
                state.finish();
                if (state.data !== Parser.fail) {
                    // complete
                    var wantedBy = state.wantedBy;
                    for (var i = wantedBy.length; i--; ) { // this line is hot
                        var left = wantedBy[i];
                        this.complete(left, state);
                    }

                    // special-case nullables
                    if (state.reference === this.index) {
                        // make sure future predictors of this rule get completed.
                        var exp = state.rule.name;
                        (this.completed[exp] = this.completed[exp] || []).push(state);
                    }
                }

            } else {
                // queue scannable states
                var exp = state.rule.symbols[state.dot];
                if (typeof exp !== 'string') {
                    this.scannable.push(state);
                    continue;
                }

                // predict
                if (wants[exp]) {
                    wants[exp].push(state);

                    if (completed.hasOwnProperty(exp)) {
                        var nulls = completed[exp];
                        for (var i = 0; i < nulls.length; i++) {
                            var right = nulls[i];
                            this.complete(state, right);
                        }
                    }
                } else {
                    wants[exp] = [state];
                    this.predict(exp);
                }
            }
        }
    }

    Column.prototype.predict = function(exp) {
        var rules = this.grammar.byName[exp] || [];

        for (var i = 0; i < rules.length; i++) {
            var r = rules[i];
            var wantedBy = this.wants[exp];
            var s = new State(r, 0, this.index, wantedBy);
            this.states.push(s);
        }
    }

    Column.prototype.complete = function(left, right) {
        var copy = left.nextState(right);
        this.states.push(copy);
    }


    function Grammar(rules, start) {
        this.rules = rules;
        this.start = start || this.rules[0].name;
        var byName = this.byName = {};
        this.rules.forEach(function(rule) {
            if (!byName.hasOwnProperty(rule.name)) {
                byName[rule.name] = [];
            }
            byName[rule.name].push(rule);
        });
    }

    // So we can allow passing (rules, start) directly to Parser for backwards compatibility
    Grammar.fromCompiled = function(rules, start) {
        var lexer = rules.Lexer;
        if (rules.ParserStart) {
          start = rules.ParserStart;
          rules = rules.ParserRules;
        }
        var rules = rules.map(function (r) { return (new Rule(r.name, r.symbols, r.postprocess)); });
        var g = new Grammar(rules, start);
        g.lexer = lexer; // nb. storing lexer on Grammar is iffy, but unavoidable
        return g;
    }


    function StreamLexer() {
      this.reset("");
    }

    StreamLexer.prototype.reset = function(data, state) {
        this.buffer = data;
        this.index = 0;
        this.line = state ? state.line : 1;
        this.lastLineBreak = state ? -state.col : 0;
    }

    StreamLexer.prototype.next = function() {
        if (this.index < this.buffer.length) {
            var ch = this.buffer[this.index++];
            if (ch === '\n') {
              this.line += 1;
              this.lastLineBreak = this.index;
            }
            return {value: ch};
        }
    }

    StreamLexer.prototype.save = function() {
      return {
        line: this.line,
        col: this.index - this.lastLineBreak,
      }
    }

    StreamLexer.prototype.formatError = function(token, message) {
        // nb. this gets called after consuming the offending token,
        // so the culprit is index-1
        var buffer = this.buffer;
        if (typeof buffer === 'string') {
            var lines = buffer
                .split("\n")
                .slice(
                    Math.max(0, this.line - 5), 
                    this.line
                );

            var nextLineBreak = buffer.indexOf('\n', this.index);
            if (nextLineBreak === -1) nextLineBreak = buffer.length;
            var col = this.index - this.lastLineBreak;
            var lastLineDigits = String(this.line).length;
            message += " at line " + this.line + " col " + col + ":\n\n";
            message += lines
                .map(function(line, i) {
                    return pad(this.line - lines.length + i + 1, lastLineDigits) + " " + line;
                }, this)
                .join("\n");
            message += "\n" + pad("", lastLineDigits + col) + "^\n";
            return message;
        } else {
            return message + " at index " + (this.index - 1);
        }

        function pad(n, length) {
            var s = String(n);
            return Array(length - s.length + 1).join(" ") + s;
        }
    }

    function Parser(rules, start, options) {
        if (rules instanceof Grammar) {
            var grammar = rules;
            var options = start;
        } else {
            var grammar = Grammar.fromCompiled(rules, start);
        }
        this.grammar = grammar;

        // Read options
        this.options = {
            keepHistory: false,
            lexer: grammar.lexer || new StreamLexer,
        };
        for (var key in (options || {})) {
            this.options[key] = options[key];
        }

        // Setup lexer
        this.lexer = this.options.lexer;
        this.lexerState = undefined;

        // Setup a table
        var column = new Column(grammar, 0);
        var table = this.table = [column];

        // I could be expecting anything.
        column.wants[grammar.start] = [];
        column.predict(grammar.start);
        // TODO what if start rule is nullable?
        column.process();
        this.current = 0; // token index
    }

    // create a reserved token for indicating a parse fail
    Parser.fail = {};

    Parser.prototype.feed = function(chunk) {
        var lexer = this.lexer;
        lexer.reset(chunk, this.lexerState);

        var token;
        while (true) {
            try {
                token = lexer.next();
                if (!token) {
                    break;
                }
            } catch (e) {
                // Create the next column so that the error reporter
                // can display the correctly predicted states.
                var nextColumn = new Column(this.grammar, this.current + 1);
                this.table.push(nextColumn);
                var err = new Error(this.reportLexerError(e));
                err.offset = this.current;
                err.token = e.token;
                throw err;
            }
            // We add new states to table[current+1]
            var column = this.table[this.current];

            // GC unused states
            if (!this.options.keepHistory) {
                delete this.table[this.current - 1];
            }

            var n = this.current + 1;
            var nextColumn = new Column(this.grammar, n);
            this.table.push(nextColumn);

            // Advance all tokens that expect the symbol
            var literal = token.text !== undefined ? token.text : token.value;
            var value = lexer.constructor === StreamLexer ? token.value : token;
            var scannable = column.scannable;
            for (var w = scannable.length; w--; ) {
                var state = scannable[w];
                var expect = state.rule.symbols[state.dot];
                // Try to consume the token
                // either regex or literal
                if (expect.test ? expect.test(value) :
                    expect.type ? expect.type === token.type
                                : expect.literal === literal) {
                    // Add it
                    var next = state.nextState({data: value, token: token, isToken: true, reference: n - 1});
                    nextColumn.states.push(next);
                }
            }

            // Next, for each of the rules, we either
            // (a) complete it, and try to see if the reference row expected that
            //     rule
            // (b) predict the next nonterminal it expects by adding that
            //     nonterminal's start state
            // To prevent duplication, we also keep track of rules we have already
            // added

            nextColumn.process();

            // If needed, throw an error:
            if (nextColumn.states.length === 0) {
                // No states at all! This is not good.
                var err = new Error(this.reportError(token));
                err.offset = this.current;
                err.token = token;
                throw err;
            }

            // maybe save lexer state
            if (this.options.keepHistory) {
              column.lexerState = lexer.save()
            }

            this.current++;
        }
        if (column) {
          this.lexerState = lexer.save()
        }

        // Incrementally keep track of results
        this.results = this.finish();

        // Allow chaining, for whatever it's worth
        return this;
    };

    Parser.prototype.reportLexerError = function(lexerError) {
        var tokenDisplay, lexerMessage;
        // Planning to add a token property to moo's thrown error
        // even on erroring tokens to be used in error display below
        var token = lexerError.token;
        if (token) {
            tokenDisplay = "input " + JSON.stringify(token.text[0]) + " (lexer error)";
            lexerMessage = this.lexer.formatError(token, "Syntax error");
        } else {
            tokenDisplay = "input (lexer error)";
            lexerMessage = lexerError.message;
        }
        return this.reportErrorCommon(lexerMessage, tokenDisplay);
    };

    Parser.prototype.reportError = function(token) {
        var tokenDisplay = (token.type ? token.type + " token: " : "") + JSON.stringify(token.value !== undefined ? token.value : token);
        var lexerMessage = this.lexer.formatError(token, "Syntax error");
        return this.reportErrorCommon(lexerMessage, tokenDisplay);
    };

    Parser.prototype.reportErrorCommon = function(lexerMessage, tokenDisplay) {
        var lines = [];
        lines.push(lexerMessage);
        var lastColumnIndex = this.table.length - 2;
        var lastColumn = this.table[lastColumnIndex];
        var expectantStates = lastColumn.states
            .filter(function(state) {
                var nextSymbol = state.rule.symbols[state.dot];
                return nextSymbol && typeof nextSymbol !== "string";
            });

        if (expectantStates.length === 0) {
            lines.push('Unexpected ' + tokenDisplay + '. I did not expect any more input. Here is the state of my parse table:\n');
            this.displayStateStack(lastColumn.states, lines);
        } else {
            lines.push('Unexpected ' + tokenDisplay + '. Instead, I was expecting to see one of the following:\n');
            // Display a "state stack" for each expectant state
            // - which shows you how this state came to be, step by step.
            // If there is more than one derivation, we only display the first one.
            var stateStacks = expectantStates
                .map(function(state) {
                    return this.buildFirstStateStack(state, []) || [state];
                }, this);
            // Display each state that is expecting a terminal symbol next.
            stateStacks.forEach(function(stateStack) {
                var state = stateStack[0];
                var nextSymbol = state.rule.symbols[state.dot];
                var symbolDisplay = this.getSymbolDisplay(nextSymbol);
                lines.push('A ' + symbolDisplay + ' based on:');
                this.displayStateStack(stateStack, lines);
            }, this);
        }
        lines.push("");
        return lines.join("\n");
    }
    
    Parser.prototype.displayStateStack = function(stateStack, lines) {
        var lastDisplay;
        var sameDisplayCount = 0;
        for (var j = 0; j < stateStack.length; j++) {
            var state = stateStack[j];
            var display = state.rule.toString(state.dot);
            if (display === lastDisplay) {
                sameDisplayCount++;
            } else {
                if (sameDisplayCount > 0) {
                    lines.push('    ^ ' + sameDisplayCount + ' more lines identical to this');
                }
                sameDisplayCount = 0;
                lines.push('    ' + display);
            }
            lastDisplay = display;
        }
    };

    Parser.prototype.getSymbolDisplay = function(symbol) {
        return getSymbolLongDisplay(symbol);
    };

    /*
    Builds a the first state stack. You can think of a state stack as the call stack
    of the recursive-descent parser which the Nearley parse algorithm simulates.
    A state stack is represented as an array of state objects. Within a
    state stack, the first item of the array will be the starting
    state, with each successive item in the array going further back into history.

    This function needs to be given a starting state and an empty array representing
    the visited states, and it returns an single state stack.

    */
    Parser.prototype.buildFirstStateStack = function(state, visited) {
        if (visited.indexOf(state) !== -1) {
            // Found cycle, return null
            // to eliminate this path from the results, because
            // we don't know how to display it meaningfully
            return null;
        }
        if (state.wantedBy.length === 0) {
            return [state];
        }
        var prevState = state.wantedBy[0];
        var childVisited = [state].concat(visited);
        var childResult = this.buildFirstStateStack(prevState, childVisited);
        if (childResult === null) {
            return null;
        }
        return [state].concat(childResult);
    };

    Parser.prototype.save = function() {
        var column = this.table[this.current];
        column.lexerState = this.lexerState;
        return column;
    };

    Parser.prototype.restore = function(column) {
        var index = column.index;
        this.current = index;
        this.table[index] = column;
        this.table.splice(index + 1);
        this.lexerState = column.lexerState;

        // Incrementally keep track of results
        this.results = this.finish();
    };

    // nb. deprecated: use save/restore instead!
    Parser.prototype.rewind = function(index) {
        if (!this.options.keepHistory) {
            throw new Error('set option `keepHistory` to enable rewinding')
        }
        // nb. recall column (table) indicies fall between token indicies.
        //        col 0   --   token 0   --   col 1
        this.restore(this.table[index]);
    };

    Parser.prototype.finish = function() {
        // Return the possible parsings
        var considerations = [];
        var start = this.grammar.start;
        var column = this.table[this.table.length - 1]
        column.states.forEach(function (t) {
            if (t.rule.name === start
                    && t.dot === t.rule.symbols.length
                    && t.reference === 0
                    && t.data !== Parser.fail) {
                considerations.push(t);
            }
        });
        return considerations.map(function(c) {return c.data; });
    };

    function getSymbolLongDisplay(symbol) {
        var type = typeof symbol;
        if (type === "string") {
            return symbol;
        } else if (type === "object") {
            if (symbol.literal) {
                return JSON.stringify(symbol.literal);
            } else if (symbol instanceof RegExp) {
                return 'character matching ' + symbol;
            } else if (symbol.type) {
                return symbol.type + ' token';
            } else if (symbol.test) {
                return 'token matching ' + String(symbol.test);
            } else {
                throw new Error('Unknown symbol type: ' + symbol);
            }
        }
    }

    function getSymbolShortDisplay(symbol) {
        var type = typeof symbol;
        if (type === "string") {
            return symbol;
        } else if (type === "object") {
            if (symbol.literal) {
                return JSON.stringify(symbol.literal);
            } else if (symbol instanceof RegExp) {
                return symbol.toString();
            } else if (symbol.type) {
                return '%' + symbol.type;
            } else if (symbol.test) {
                return '<' + String(symbol.test) + '>';
            } else {
                throw new Error('Unknown symbol type: ' + symbol);
            }
        }
    }

    return {
        Parser: Parser,
        Grammar: Grammar,
        Rule: Rule,
    };

}));


/***/ }),

/***/ "./node_modules/ramda/es/bind.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/bind.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js");
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");


/**
 * Creates a function that is bound to a context.
 * Note: `R.bind` does not provide the additional argument-binding capabilities of
 * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
 *
 * @func
 * @memberOf R
 * @since v0.6.0
 * @category Function
 * @category Object
 * @sig (* -> *) -> {*} -> (* -> *)
 * @param {Function} fn The function to bind to context
 * @param {Object} thisObj The context to bind `fn` to
 * @return {Function} A function that will execute in the context of `thisObj`.
 * @see R.partial
 * @example
 *
 *      const log = R.bind(console.log, console);
 *      R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}
 *      // logs {a: 2}
 * @symb R.bind(f, o)(a, b) = f.call(o, a, b)
 */

var bind =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function bind(fn, thisObj) {
  return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_1__.default)(fn.length, function () {
    return fn.apply(thisObj, arguments);
  });
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bind);

/***/ }),

/***/ "./node_modules/ramda/es/curryN.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/curryN.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js");
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js");




/**
 * Returns a curried equivalent of the provided function, with the specified
 * arity. The curried function has two unusual capabilities. First, its
 * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
 * following are equivalent:
 *
 *   - `g(1)(2)(3)`
 *   - `g(1)(2, 3)`
 *   - `g(1, 2)(3)`
 *   - `g(1, 2, 3)`
 *
 * Secondly, the special placeholder value [`R.__`](#__) may be used to specify
 * "gaps", allowing partial application of any combination of arguments,
 * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
 * the following are equivalent:
 *
 *   - `g(1, 2, 3)`
 *   - `g(_, 2, 3)(1)`
 *   - `g(_, _, 3)(1)(2)`
 *   - `g(_, _, 3)(1, 2)`
 *   - `g(_, 2)(1)(3)`
 *   - `g(_, 2)(1, 3)`
 *   - `g(_, 2)(_, 3)(1)`
 *
 * @func
 * @memberOf R
 * @since v0.5.0
 * @category Function
 * @sig Number -> (* -> a) -> (* -> a)
 * @param {Number} length The arity for the returned function.
 * @param {Function} fn The function to curry.
 * @return {Function} A new, curried function.
 * @see R.curry
 * @example
 *
 *      const sumArgs = (...args) => R.sum(args);
 *
 *      const curriedAddFourNumbers = R.curryN(4, sumArgs);
 *      const f = curriedAddFourNumbers(1, 2);
 *      const g = f(3);
 *      g(4); //=> 10
 */

var curryN =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function curryN(length, fn) {
  if (length === 1) {
    return (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__.default)(fn);
  }

  return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_2__.default)(length, (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__.default)(length, [], fn));
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (curryN);

/***/ }),

/***/ "./node_modules/ramda/es/defaultTo.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/defaultTo.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");

/**
 * Returns the second argument if it is not `null`, `undefined` or `NaN`;
 * otherwise the first argument is returned.
 *
 * @func
 * @memberOf R
 * @since v0.10.0
 * @category Logic
 * @sig a -> b -> a | b
 * @param {a} default The default value.
 * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`.
 * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value
 * @example
 *
 *      const defaultTo42 = R.defaultTo(42);
 *
 *      defaultTo42(null);  //=> 42
 *      defaultTo42(undefined);  //=> 42
 *      defaultTo42(false);  //=> false
 *      defaultTo42('Ramda');  //=> 'Ramda'
 *      // parseInt('string') results in NaN
 *      defaultTo42(parseInt('string')); //=> 42
 */

var defaultTo =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function defaultTo(d, v) {
  return v == null || v !== v ? d : v;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaultTo);

/***/ }),

/***/ "./node_modules/ramda/es/differenceWith.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/differenceWith.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js");
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");


/**
 * Finds the set (i.e. no duplicates) of all elements in the first list not
 * contained in the second list. Duplication is determined according to the
 * value returned by applying the supplied predicate to two list elements.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category Relation
 * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a]
 * @param {Function} pred A predicate used to test whether two items are equal.
 * @param {Array} list1 The first list.
 * @param {Array} list2 The second list.
 * @return {Array} The elements in `list1` that are not in `list2`.
 * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith
 * @example
 *
 *      const cmp = (x, y) => x.a === y.a;
 *      const l1 = [{a: 1}, {a: 2}, {a: 3}];
 *      const l2 = [{a: 3}, {a: 4}];
 *      R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}]
 */

var differenceWith =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(function differenceWith(pred, first, second) {
  var out = [];
  var idx = 0;
  var firstLen = first.length;

  while (idx < firstLen) {
    if (!(0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_1__.default)(pred, first[idx], second) && !(0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_1__.default)(pred, first[idx], out)) {
      out.push(first[idx]);
    }

    idx += 1;
  }

  return out;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (differenceWith);

/***/ }),

/***/ "./node_modules/ramda/es/equals.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/equals.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_equals.js */ "./node_modules/ramda/es/internal/_equals.js");


/**
 * Returns `true` if its arguments are equivalent, `false` otherwise. Handles
 * cyclical data structures.
 *
 * Dispatches symmetrically to the `equals` methods of both arguments, if
 * present.
 *
 * @func
 * @memberOf R
 * @since v0.15.0
 * @category Relation
 * @sig a -> b -> Boolean
 * @param {*} a
 * @param {*} b
 * @return {Boolean}
 * @example
 *
 *      R.equals(1, 1); //=> true
 *      R.equals(1, '1'); //=> false
 *      R.equals([1, 2, 3], [1, 2, 3]); //=> true
 *
 *      const a = {}; a.v = a;
 *      const b = {}; b.v = b;
 *      R.equals(a, b); //=> true
 */

var equals =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function equals(a, b) {
  return (0,_internal_equals_js__WEBPACK_IMPORTED_MODULE_1__.default)(a, b, [], []);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (equals);

/***/ }),

/***/ "./node_modules/ramda/es/filter.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/filter.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js");
/* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/_filter.js */ "./node_modules/ramda/es/internal/_filter.js");
/* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js");
/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js");
/* harmony import */ var _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfilter.js */ "./node_modules/ramda/es/internal/_xfilter.js");
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js");







/**
 * Takes a predicate and a `Filterable`, and returns a new filterable of the
 * same type containing the members of the given filterable which satisfy the
 * given predicate. Filterable objects include plain objects or any object
 * that has a filter method such as `Array`.
 *
 * Dispatches to the `filter` method of the second argument, if present.
 *
 * Acts as a transducer if a transformer is given in list position.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig Filterable f => (a -> Boolean) -> f a -> f a
 * @param {Function} pred
 * @param {Array} filterable
 * @return {Array} Filterable
 * @see R.reject, R.transduce, R.addIndex
 * @example
 *
 *      const isEven = n => n % 2 === 0;
 *
 *      R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]
 *
 *      R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
 */

var filter =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(
/*#__PURE__*/
(0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__.default)(['filter'], _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_2__.default, function (pred, filterable) {
  return (0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__.default)(filterable) ? (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__.default)(function (acc, key) {
    if (pred(filterable[key])) {
      acc[key] = filterable[key];
    }

    return acc;
  }, {}, (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__.default)(filterable)) : // else
  (0,_internal_filter_js__WEBPACK_IMPORTED_MODULE_6__.default)(pred, filterable);
}));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (filter);

/***/ }),

/***/ "./node_modules/ramda/es/identity.js":
/*!*******************************************!*\
  !*** ./node_modules/ramda/es/identity.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_identity.js */ "./node_modules/ramda/es/internal/_identity.js");


/**
 * A function that does nothing but return the parameter supplied to it. Good
 * as a default or placeholder function.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category Function
 * @sig a -> a
 * @param {*} x The value to return.
 * @return {*} The input value, `x`.
 * @example
 *
 *      R.identity(1); //=> 1
 *
 *      const obj = {};
 *      R.identity(obj) === obj; //=> true
 * @symb R.identity(a) = a
 */

var identity =
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(_internal_identity_js__WEBPACK_IMPORTED_MODULE_1__.default);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (identity);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_Set.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_Set.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includes.js */ "./node_modules/ramda/es/internal/_includes.js");


var _Set =
/*#__PURE__*/
function () {
  function _Set() {
    /* globals Set */
    this._nativeSet = typeof Set === 'function' ? new Set() : null;
    this._items = {};
  }

  // until we figure out why jsdoc chokes on this
  // @param item The item to add to the Set
  // @returns {boolean} true if the item did not exist prior, otherwise false
  //
  _Set.prototype.add = function (item) {
    return !hasOrAdd(item, true, this);
  }; //
  // @param item The item to check for existence in the Set
  // @returns {boolean} true if the item exists in the Set, otherwise false
  //


  _Set.prototype.has = function (item) {
    return hasOrAdd(item, false, this);
  }; //
  // Combines the logic for checking whether an item is a member of the set and
  // for adding a new item to the set.
  //
  // @param item       The item to check or add to the Set instance.
  // @param shouldAdd  If true, the item will be added to the set if it doesn't
  //                   already exist.
  // @param set        The set instance to check or add to.
  // @return {boolean} true if the item already existed, otherwise false.
  //


  return _Set;
}();

function hasOrAdd(item, shouldAdd, set) {
  var type = typeof item;
  var prevSize, newSize;

  switch (type) {
    case 'string':
    case 'number':
      // distinguish between +0 and -0
      if (item === 0 && 1 / item === -Infinity) {
        if (set._items['-0']) {
          return true;
        } else {
          if (shouldAdd) {
            set._items['-0'] = true;
          }

          return false;
        }
      } // these types can all utilise the native Set


      if (set._nativeSet !== null) {
        if (shouldAdd) {
          prevSize = set._nativeSet.size;

          set._nativeSet.add(item);

          newSize = set._nativeSet.size;
          return newSize === prevSize;
        } else {
          return set._nativeSet.has(item);
        }
      } else {
        if (!(type in set._items)) {
          if (shouldAdd) {
            set._items[type] = {};
            set._items[type][item] = true;
          }

          return false;
        } else if (item in set._items[type]) {
          return true;
        } else {
          if (shouldAdd) {
            set._items[type][item] = true;
          }

          return false;
        }
      }

    case 'boolean':
      // set._items['boolean'] holds a two element array
      // representing [ falseExists, trueExists ]
      if (type in set._items) {
        var bIdx = item ? 1 : 0;

        if (set._items[type][bIdx]) {
          return true;
        } else {
          if (shouldAdd) {
            set._items[type][bIdx] = true;
          }

          return false;
        }
      } else {
        if (shouldAdd) {
          set._items[type] = item ? [false, true] : [true, false];
        }

        return false;
      }

    case 'function':
      // compare functions for reference equality
      if (set._nativeSet !== null) {
        if (shouldAdd) {
          prevSize = set._nativeSet.size;

          set._nativeSet.add(item);

          newSize = set._nativeSet.size;
          return newSize === prevSize;
        } else {
          return set._nativeSet.has(item);
        }
      } else {
        if (!(type in set._items)) {
          if (shouldAdd) {
            set._items[type] = [item];
          }

          return false;
        }

        if (!(0,_includes_js__WEBPACK_IMPORTED_MODULE_0__.default)(item, set._items[type])) {
          if (shouldAdd) {
            set._items[type].push(item);
          }

          return false;
        }

        return true;
      }

    case 'undefined':
      if (set._items[type]) {
        return true;
      } else {
        if (shouldAdd) {
          set._items[type] = true;
        }

        return false;
      }

    case 'object':
      if (item === null) {
        if (!set._items['null']) {
          if (shouldAdd) {
            set._items['null'] = true;
          }

          return false;
        }

        return true;
      }

    /* falls through */

    default:
      // reduce the search size of heterogeneous sets by creating buckets
      // for each type.
      type = Object.prototype.toString.call(item);

      if (!(type in set._items)) {
        if (shouldAdd) {
          set._items[type] = [item];
        }

        return false;
      } // scan through all previously applied items


      if (!(0,_includes_js__WEBPACK_IMPORTED_MODULE_0__.default)(item, set._items[type])) {
        if (shouldAdd) {
          set._items[type].push(item);
        }

        return false;
      }

      return true;
  }
} // A simple Set type that honours R.equals semantics


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Set);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_arity.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_arity.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _arity)
/* harmony export */ });
function _arity(n, fn) {
  /* eslint-disable no-unused-vars */
  switch (n) {
    case 0:
      return function () {
        return fn.apply(this, arguments);
      };

    case 1:
      return function (a0) {
        return fn.apply(this, arguments);
      };

    case 2:
      return function (a0, a1) {
        return fn.apply(this, arguments);
      };

    case 3:
      return function (a0, a1, a2) {
        return fn.apply(this, arguments);
      };

    case 4:
      return function (a0, a1, a2, a3) {
        return fn.apply(this, arguments);
      };

    case 5:
      return function (a0, a1, a2, a3, a4) {
        return fn.apply(this, arguments);
      };

    case 6:
      return function (a0, a1, a2, a3, a4, a5) {
        return fn.apply(this, arguments);
      };

    case 7:
      return function (a0, a1, a2, a3, a4, a5, a6) {
        return fn.apply(this, arguments);
      };

    case 8:
      return function (a0, a1, a2, a3, a4, a5, a6, a7) {
        return fn.apply(this, arguments);
      };

    case 9:
      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {
        return fn.apply(this, arguments);
      };

    case 10:
      return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
        return fn.apply(this, arguments);
      };

    default:
      throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
  }
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_arrayFromIterator.js":
/*!**************************************************************!*\
  !*** ./node_modules/ramda/es/internal/_arrayFromIterator.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _arrayFromIterator)
/* harmony export */ });
function _arrayFromIterator(iter) {
  var list = [];
  var next;

  while (!(next = iter.next()).done) {
    list.push(next.value);
  }

  return list;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_checkForMethod.js":
/*!***********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_checkForMethod.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _checkForMethod)
/* harmony export */ });
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js");

/**
 * This checks whether a function has a [methodname] function. If it isn't an
 * array it will execute that function otherwise it will default to the ramda
 * implementation.
 *
 * @private
 * @param {Function} fn ramda implemtation
 * @param {String} methodname property to check for a custom implementation
 * @return {Object} Whatever the return value of the method is.
 */

function _checkForMethod(methodname, fn) {
  return function () {
    var length = arguments.length;

    if (length === 0) {
      return fn();
    }

    var obj = arguments[length - 1];
    return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_complement.js":
/*!*******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_complement.js ***!
  \*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _complement)
/* harmony export */ });
function _complement(f) {
  return function () {
    return !f.apply(this, arguments);
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry1.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry1.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _curry1)
/* harmony export */ });
/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js");

/**
 * Optimized internal one-arity curry function.
 *
 * @private
 * @category Function
 * @param {Function} fn The function to curry.
 * @return {Function} The curried function.
 */

function _curry1(fn) {
  return function f1(a) {
    if (arguments.length === 0 || (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a)) {
      return f1;
    } else {
      return fn.apply(this, arguments);
    }
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry2.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry2.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _curry2)
/* harmony export */ });
/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js");


/**
 * Optimized internal two-arity curry function.
 *
 * @private
 * @category Function
 * @param {Function} fn The function to curry.
 * @return {Function} The curried function.
 */

function _curry2(fn) {
  return function f2(a, b) {
    switch (arguments.length) {
      case 0:
        return f2;

      case 1:
        return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) ? f2 : (0,_curry1_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_b) {
          return fn(a, _b);
        });

      default:
        return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? f2 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_a) {
          return fn(_a, b);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_b) {
          return fn(a, _b);
        }) : fn(a, b);
    }
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curry3.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curry3.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _curry3)
/* harmony export */ });
/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js");



/**
 * Optimized internal three-arity curry function.
 *
 * @private
 * @category Function
 * @param {Function} fn The function to curry.
 * @return {Function} The curried function.
 */

function _curry3(fn) {
  return function f3(a, b, c) {
    switch (arguments.length) {
      case 0:
        return f3;

      case 1:
        return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) ? f3 : (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_b, _c) {
          return fn(a, _b, _c);
        });

      case 2:
        return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? f3 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_a, _c) {
          return fn(_a, b, _c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_b, _c) {
          return fn(a, _b, _c);
        }) : (0,_curry1_js__WEBPACK_IMPORTED_MODULE_2__.default)(function (_c) {
          return fn(a, b, _c);
        });

      default:
        return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(c) ? f3 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_a, _b) {
          return fn(_a, _b, c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(c) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_a, _c) {
          return fn(_a, b, _c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(c) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (_b, _c) {
          return fn(a, _b, _c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(a) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_2__.default)(function (_a) {
          return fn(_a, b, c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(b) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_2__.default)(function (_b) {
          return fn(a, _b, c);
        }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(c) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_2__.default)(function (_c) {
          return fn(a, b, _c);
        }) : fn(a, b, c);
    }
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_curryN.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_curryN.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _curryN)
/* harmony export */ });
/* harmony import */ var _arity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_arity.js */ "./node_modules/ramda/es/internal/_arity.js");
/* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js");


/**
 * Internal curryN function.
 *
 * @private
 * @category Function
 * @param {Number} length The arity of the curried function.
 * @param {Array} received An array of arguments received thus far.
 * @param {Function} fn The function to curry.
 * @return {Function} The curried function.
 */

function _curryN(length, received, fn) {
  return function () {
    var combined = [];
    var argsIdx = 0;
    var left = length;
    var combinedIdx = 0;

    while (combinedIdx < received.length || argsIdx < arguments.length) {
      var result;

      if (combinedIdx < received.length && (!(0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(received[combinedIdx]) || argsIdx >= arguments.length)) {
        result = received[combinedIdx];
      } else {
        result = arguments[argsIdx];
        argsIdx += 1;
      }

      combined[combinedIdx] = result;

      if (!(0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__.default)(result)) {
        left -= 1;
      }

      combinedIdx += 1;
    }

    return left <= 0 ? fn.apply(this, combined) : (0,_arity_js__WEBPACK_IMPORTED_MODULE_1__.default)(left, _curryN(length, combined, fn));
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_dispatchable.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_dispatchable.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _dispatchable)
/* harmony export */ });
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js");
/* harmony import */ var _isTransformer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isTransformer.js */ "./node_modules/ramda/es/internal/_isTransformer.js");


/**
 * Returns a function that dispatches with different strategies based on the
 * object in list position (last argument). If it is an array, executes [fn].
 * Otherwise, if it has a function with one of the given method names, it will
 * execute that function (functor case). Otherwise, if it is a transformer,
 * uses transducer [xf] to return a new transformer (transducer case).
 * Otherwise, it will default to executing [fn].
 *
 * @private
 * @param {Array} methodNames properties to check for a custom implementation
 * @param {Function} xf transducer to initialize if object is transformer
 * @param {Function} fn default ramda implementation
 * @return {Function} A function that dispatches on object in list position
 */

function _dispatchable(methodNames, xf, fn) {
  return function () {
    if (arguments.length === 0) {
      return fn();
    }

    var args = Array.prototype.slice.call(arguments, 0);
    var obj = args.pop();

    if (!(0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__.default)(obj)) {
      var idx = 0;

      while (idx < methodNames.length) {
        if (typeof obj[methodNames[idx]] === 'function') {
          return obj[methodNames[idx]].apply(obj, args);
        }

        idx += 1;
      }

      if ((0,_isTransformer_js__WEBPACK_IMPORTED_MODULE_1__.default)(obj)) {
        var transducer = xf.apply(null, args);
        return transducer(obj);
      }
    }

    return fn.apply(this, arguments);
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_equals.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_equals.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _equals)
/* harmony export */ });
/* harmony import */ var _arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayFromIterator.js */ "./node_modules/ramda/es/internal/_arrayFromIterator.js");
/* harmony import */ var _includesWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js");
/* harmony import */ var _functionName_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_functionName.js */ "./node_modules/ramda/es/internal/_functionName.js");
/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js");
/* harmony import */ var _objectIs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_objectIs.js */ "./node_modules/ramda/es/internal/_objectIs.js");
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../keys.js */ "./node_modules/ramda/es/keys.js");
/* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../type.js */ "./node_modules/ramda/es/type.js");







/**
 * private _uniqContentEquals function.
 * That function is checking equality of 2 iterator contents with 2 assumptions
 * - iterators lengths are the same
 * - iterators values are unique
 *
 * false-positive result will be returned for comparision of, e.g.
 * - [1,2,3] and [1,2,3,4]
 * - [1,1,1] and [1,2,3]
 * */

function _uniqContentEquals(aIterator, bIterator, stackA, stackB) {
  var a = (0,_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__.default)(aIterator);

  var b = (0,_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__.default)(bIterator);

  function eq(_a, _b) {
    return _equals(_a, _b, stackA.slice(), stackB.slice());
  } // if *a* array contains any element that is not included in *b*


  return !(0,_includesWith_js__WEBPACK_IMPORTED_MODULE_1__.default)(function (b, aItem) {
    return !(0,_includesWith_js__WEBPACK_IMPORTED_MODULE_1__.default)(eq, aItem, b);
  }, b, a);
}

function _equals(a, b, stackA, stackB) {
  if ((0,_objectIs_js__WEBPACK_IMPORTED_MODULE_2__.default)(a, b)) {
    return true;
  }

  var typeA = (0,_type_js__WEBPACK_IMPORTED_MODULE_3__.default)(a);

  if (typeA !== (0,_type_js__WEBPACK_IMPORTED_MODULE_3__.default)(b)) {
    return false;
  }

  if (a == null || b == null) {
    return false;
  }

  if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
    return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
  }

  if (typeof a.equals === 'function' || typeof b.equals === 'function') {
    return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);
  }

  switch (typeA) {
    case 'Arguments':
    case 'Array':
    case 'Object':
      if (typeof a.constructor === 'function' && (0,_functionName_js__WEBPACK_IMPORTED_MODULE_4__.default)(a.constructor) === 'Promise') {
        return a === b;
      }

      break;

    case 'Boolean':
    case 'Number':
    case 'String':
      if (!(typeof a === typeof b && (0,_objectIs_js__WEBPACK_IMPORTED_MODULE_2__.default)(a.valueOf(), b.valueOf()))) {
        return false;
      }

      break;

    case 'Date':
      if (!(0,_objectIs_js__WEBPACK_IMPORTED_MODULE_2__.default)(a.valueOf(), b.valueOf())) {
        return false;
      }

      break;

    case 'Error':
      return a.name === b.name && a.message === b.message;

    case 'RegExp':
      if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {
        return false;
      }

      break;
  }

  var idx = stackA.length - 1;

  while (idx >= 0) {
    if (stackA[idx] === a) {
      return stackB[idx] === b;
    }

    idx -= 1;
  }

  switch (typeA) {
    case 'Map':
      if (a.size !== b.size) {
        return false;
      }

      return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));

    case 'Set':
      if (a.size !== b.size) {
        return false;
      }

      return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));

    case 'Arguments':
    case 'Array':
    case 'Object':
    case 'Boolean':
    case 'Number':
    case 'String':
    case 'Date':
    case 'Error':
    case 'RegExp':
    case 'Int8Array':
    case 'Uint8Array':
    case 'Uint8ClampedArray':
    case 'Int16Array':
    case 'Uint16Array':
    case 'Int32Array':
    case 'Uint32Array':
    case 'Float32Array':
    case 'Float64Array':
    case 'ArrayBuffer':
      break;

    default:
      // Values of other types are only equal if identical.
      return false;
  }

  var keysA = (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__.default)(a);

  if (keysA.length !== (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__.default)(b).length) {
    return false;
  }

  var extendedStackA = stackA.concat([a]);
  var extendedStackB = stackB.concat([b]);
  idx = keysA.length - 1;

  while (idx >= 0) {
    var key = keysA[idx];

    if (!((0,_has_js__WEBPACK_IMPORTED_MODULE_6__.default)(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {
      return false;
    }

    idx -= 1;
  }

  return true;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_filter.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_filter.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _filter)
/* harmony export */ });
function _filter(fn, list) {
  var idx = 0;
  var len = list.length;
  var result = [];

  while (idx < len) {
    if (fn(list[idx])) {
      result[result.length] = list[idx];
    }

    idx += 1;
  }

  return result;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_functionName.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_functionName.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _functionName)
/* harmony export */ });
function _functionName(f) {
  // String(x => x) evaluates to "x => x", so the pattern may not match.
  var match = String(f).match(/^function (\w*)/);
  return match == null ? '' : match[1];
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_has.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_has.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _has)
/* harmony export */ });
function _has(prop, obj) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_identity.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_identity.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _identity)
/* harmony export */ });
function _identity(x) {
  return x;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_includes.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_includes.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _includes)
/* harmony export */ });
/* harmony import */ var _indexOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_indexOf.js */ "./node_modules/ramda/es/internal/_indexOf.js");

function _includes(a, list) {
  return (0,_indexOf_js__WEBPACK_IMPORTED_MODULE_0__.default)(list, a, 0) >= 0;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_includesWith.js":
/*!*********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_includesWith.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _includesWith)
/* harmony export */ });
function _includesWith(pred, x, list) {
  var idx = 0;
  var len = list.length;

  while (idx < len) {
    if (pred(x, list[idx])) {
      return true;
    }

    idx += 1;
  }

  return false;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_indexOf.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_indexOf.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _indexOf)
/* harmony export */ });
/* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../equals.js */ "./node_modules/ramda/es/equals.js");

function _indexOf(list, a, idx) {
  var inf, item; // Array.prototype.indexOf doesn't exist below IE9

  if (typeof list.indexOf === 'function') {
    switch (typeof a) {
      case 'number':
        if (a === 0) {
          // manually crawl the list to distinguish between +0 and -0
          inf = 1 / a;

          while (idx < list.length) {
            item = list[idx];

            if (item === 0 && 1 / item === inf) {
              return idx;
            }

            idx += 1;
          }

          return -1;
        } else if (a !== a) {
          // NaN
          while (idx < list.length) {
            item = list[idx];

            if (typeof item === 'number' && item !== item) {
              return idx;
            }

            idx += 1;
          }

          return -1;
        } // non-zero numbers can utilise Set


        return list.indexOf(a, idx);
      // all these types can utilise Set

      case 'string':
      case 'boolean':
      case 'function':
      case 'undefined':
        return list.indexOf(a, idx);

      case 'object':
        if (a === null) {
          // null can utilise Set
          return list.indexOf(a, idx);
        }

    }
  } // anything else not covered above, defer to R.equals


  while (idx < list.length) {
    if ((0,_equals_js__WEBPACK_IMPORTED_MODULE_0__.default)(list[idx], a)) {
      return idx;
    }

    idx += 1;
  }

  return -1;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArguments.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArguments.js ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js");

var toString = Object.prototype.toString;

var _isArguments =
/*#__PURE__*/
function () {
  return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
    return toString.call(x) === '[object Arguments]';
  } : function _isArguments(x) {
    return (0,_has_js__WEBPACK_IMPORTED_MODULE_0__.default)('callee', x);
  };
}();

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_isArguments);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArray.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArray.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
 * Tests whether or not an object is an array.
 *
 * @private
 * @param {*} val The object to test.
 * @return {Boolean} `true` if `val` is an array, `false` otherwise.
 * @example
 *
 *      _isArray([]); //=> true
 *      _isArray(null); //=> false
 *      _isArray({}); //=> false
 */
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Array.isArray || function _isArray(val) {
  return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';
});

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isArrayLike.js":
/*!********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isArrayLike.js ***!
  \********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js");
/* harmony import */ var _isString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isString.js */ "./node_modules/ramda/es/internal/_isString.js");



/**
 * Tests whether or not an object is similar to an array.
 *
 * @private
 * @category Type
 * @category List
 * @sig * -> Boolean
 * @param {*} x The object to test.
 * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.
 * @example
 *
 *      _isArrayLike([]); //=> true
 *      _isArrayLike(true); //=> false
 *      _isArrayLike({}); //=> false
 *      _isArrayLike({length: 10}); //=> false
 *      _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
 */

var _isArrayLike =
/*#__PURE__*/
(0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function isArrayLike(x) {
  if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_1__.default)(x)) {
    return true;
  }

  if (!x) {
    return false;
  }

  if (typeof x !== 'object') {
    return false;
  }

  if ((0,_isString_js__WEBPACK_IMPORTED_MODULE_2__.default)(x)) {
    return false;
  }

  if (x.nodeType === 1) {
    return !!x.length;
  }

  if (x.length === 0) {
    return true;
  }

  if (x.length > 0) {
    return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
  }

  return false;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_isArrayLike);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isInteger.js":
/*!******************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isInteger.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/**
 * Determine if the passed argument is an integer.
 *
 * @private
 * @param {*} n
 * @category Type
 * @return {Boolean}
 */
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Number.isInteger || function _isInteger(n) {
  return n << 0 === n;
});

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isObject.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isObject.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _isObject)
/* harmony export */ });
function _isObject(x) {
  return Object.prototype.toString.call(x) === '[object Object]';
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isPlaceholder.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isPlaceholder.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _isPlaceholder)
/* harmony export */ });
function _isPlaceholder(a) {
  return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isString.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isString.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _isString)
/* harmony export */ });
function _isString(x) {
  return Object.prototype.toString.call(x) === '[object String]';
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_isTransformer.js":
/*!**********************************************************!*\
  !*** ./node_modules/ramda/es/internal/_isTransformer.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _isTransformer)
/* harmony export */ });
function _isTransformer(obj) {
  return obj != null && typeof obj['@@transducer/step'] === 'function';
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_map.js":
/*!************************************************!*\
  !*** ./node_modules/ramda/es/internal/_map.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _map)
/* harmony export */ });
function _map(fn, functor) {
  var idx = 0;
  var len = functor.length;
  var result = Array(len);

  while (idx < len) {
    result[idx] = fn(functor[idx]);
    idx += 1;
  }

  return result;
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_objectIs.js":
/*!*****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_objectIs.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
function _objectIs(a, b) {
  // SameValue algorithm
  if (a === b) {
    // Steps 1-5, 7-10
    // Steps 6.b-6.e: +0 != -0
    return a !== 0 || 1 / a === 1 / b;
  } else {
    // Step 6.a: NaN == NaN
    return a !== a && b !== b;
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Object.is === 'function' ? Object.is : _objectIs);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_pipe.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_pipe.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _pipe)
/* harmony export */ });
function _pipe(f, g) {
  return function () {
    return g.call(this, f.apply(this, arguments));
  };
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_reduce.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_reduce.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _reduce)
/* harmony export */ });
/* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isArrayLike.js */ "./node_modules/ramda/es/internal/_isArrayLike.js");
/* harmony import */ var _xwrap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xwrap.js */ "./node_modules/ramda/es/internal/_xwrap.js");
/* harmony import */ var _bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../bind.js */ "./node_modules/ramda/es/bind.js");




function _arrayReduce(xf, acc, list) {
  var idx = 0;
  var len = list.length;

  while (idx < len) {
    acc = xf['@@transducer/step'](acc, list[idx]);

    if (acc && acc['@@transducer/reduced']) {
      acc = acc['@@transducer/value'];
      break;
    }

    idx += 1;
  }

  return xf['@@transducer/result'](acc);
}

function _iterableReduce(xf, acc, iter) {
  var step = iter.next();

  while (!step.done) {
    acc = xf['@@transducer/step'](acc, step.value);

    if (acc && acc['@@transducer/reduced']) {
      acc = acc['@@transducer/value'];
      break;
    }

    step = iter.next();
  }

  return xf['@@transducer/result'](acc);
}

function _methodReduce(xf, acc, obj, methodName) {
  return xf['@@transducer/result'](obj[methodName]((0,_bind_js__WEBPACK_IMPORTED_MODULE_0__.default)(xf['@@transducer/step'], xf), acc));
}

var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';
function _reduce(fn, acc, list) {
  if (typeof fn === 'function') {
    fn = (0,_xwrap_js__WEBPACK_IMPORTED_MODULE_1__.default)(fn);
  }

  if ((0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__.default)(list)) {
    return _arrayReduce(fn, acc, list);
  }

  if (typeof list['fantasy-land/reduce'] === 'function') {
    return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
  }

  if (list[symIterator] != null) {
    return _iterableReduce(fn, acc, list[symIterator]());
  }

  if (typeof list.next === 'function') {
    return _iterableReduce(fn, acc, list);
  }

  if (typeof list.reduce === 'function') {
    return _methodReduce(fn, acc, list, 'reduce');
  }

  throw new TypeError('reduce: list must be array or iterable');
}

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfBase.js":
/*!***************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfBase.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  init: function () {
    return this.xf['@@transducer/init']();
  },
  result: function (result) {
    return this.xf['@@transducer/result'](result);
  }
});

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xfilter.js":
/*!****************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xfilter.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js");



var XFilter =
/*#__PURE__*/
function () {
  function XFilter(f, xf) {
    this.xf = xf;
    this.f = f;
  }

  XFilter.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__.default.init;
  XFilter.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__.default.result;

  XFilter.prototype['@@transducer/step'] = function (result, input) {
    return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
  };

  return XFilter;
}();

var _xfilter =
/*#__PURE__*/
(0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function _xfilter(f, xf) {
  return new XFilter(f, xf);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_xfilter);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xmap.js":
/*!*************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xmap.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js");



var XMap =
/*#__PURE__*/
function () {
  function XMap(f, xf) {
    this.xf = xf;
    this.f = f;
  }

  XMap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__.default.init;
  XMap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__.default.result;

  XMap.prototype['@@transducer/step'] = function (result, input) {
    return this.xf['@@transducer/step'](result, this.f(input));
  };

  return XMap;
}();

var _xmap =
/*#__PURE__*/
(0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__.default)(function _xmap(f, xf) {
  return new XMap(f, xf);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_xmap);

/***/ }),

/***/ "./node_modules/ramda/es/internal/_xwrap.js":
/*!**************************************************!*\
  !*** ./node_modules/ramda/es/internal/_xwrap.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ _xwrap)
/* harmony export */ });
var XWrap =
/*#__PURE__*/
function () {
  function XWrap(fn) {
    this.f = fn;
  }

  XWrap.prototype['@@transducer/init'] = function () {
    throw new Error('init not implemented on XWrap');
  };

  XWrap.prototype['@@transducer/result'] = function (acc) {
    return acc;
  };

  XWrap.prototype['@@transducer/step'] = function (acc, x) {
    return this.f(acc, x);
  };

  return XWrap;
}();

function _xwrap(fn) {
  return new XWrap(fn);
}

/***/ }),

/***/ "./node_modules/ramda/es/invertObj.js":
/*!********************************************!*\
  !*** ./node_modules/ramda/es/invertObj.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js");


/**
 * Returns a new object with the keys of the given object as values, and the
 * values of the given object, which are coerced to strings, as keys. Note
 * that the last key found is preferred when handling the same value.
 *
 * @func
 * @memberOf R
 * @since v0.9.0
 * @category Object
 * @sig {s: x} -> {x: s}
 * @param {Object} obj The object or array to invert
 * @return {Object} out A new object
 * @see R.invert
 * @example
 *
 *      const raceResults = {
 *        first: 'alice',
 *        second: 'jake'
 *      };
 *      R.invertObj(raceResults);
 *      //=> { 'alice': 'first', 'jake':'second' }
 *
 *      // Alternatively:
 *      const raceResults = ['alice', 'jake'];
 *      R.invertObj(raceResults);
 *      //=> { 'alice': '0', 'jake':'1' }
 */

var invertObj =
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function invertObj(obj) {
  var props = (0,_keys_js__WEBPACK_IMPORTED_MODULE_1__.default)(obj);
  var len = props.length;
  var idx = 0;
  var out = {};

  while (idx < len) {
    var key = props[idx];
    out[obj[key]] = key;
    idx += 1;
  }

  return out;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (invertObj);

/***/ }),

/***/ "./node_modules/ramda/es/is.js":
/*!*************************************!*\
  !*** ./node_modules/ramda/es/is.js ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");

/**
 * See if an object (`val`) is an instance of the supplied constructor. This
 * function will check up the inheritance chain, if any.
 *
 * @func
 * @memberOf R
 * @since v0.3.0
 * @category Type
 * @sig (* -> {*}) -> a -> Boolean
 * @param {Object} ctor A constructor
 * @param {*} val The value to test
 * @return {Boolean}
 * @example
 *
 *      R.is(Object, {}); //=> true
 *      R.is(Number, 1); //=> true
 *      R.is(Object, 1); //=> false
 *      R.is(String, 's'); //=> true
 *      R.is(String, new String('')); //=> true
 *      R.is(Object, new String('')); //=> true
 *      R.is(Object, 's'); //=> false
 *      R.is(Number, {}); //=> false
 */

var is =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function is(Ctor, val) {
  return val != null && val.constructor === Ctor || val instanceof Ctor;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (is);

/***/ }),

/***/ "./node_modules/ramda/es/keys.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/keys.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js");
/* harmony import */ var _internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArguments.js */ "./node_modules/ramda/es/internal/_isArguments.js");


 // cover IE < 9 keys issues

var hasEnumBug = !
/*#__PURE__*/
{
  toString: null
}.propertyIsEnumerable('toString');
var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug

var hasArgsEnumBug =
/*#__PURE__*/
function () {
  'use strict';

  return arguments.propertyIsEnumerable('length');
}();

var contains = function contains(list, item) {
  var idx = 0;

  while (idx < list.length) {
    if (list[idx] === item) {
      return true;
    }

    idx += 1;
  }

  return false;
};
/**
 * Returns a list containing the names of all the enumerable own properties of
 * the supplied object.
 * Note that the order of the output array is not guaranteed to be consistent
 * across different JS platforms.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category Object
 * @sig {k: v} -> [k]
 * @param {Object} obj The object to extract properties from
 * @return {Array} An array of the object's own properties.
 * @see R.keysIn, R.values
 * @example
 *
 *      R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
 */


var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function keys(obj) {
  return Object(obj) !== obj ? [] : Object.keys(obj);
}) :
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function keys(obj) {
  if (Object(obj) !== obj) {
    return [];
  }

  var prop, nIdx;
  var ks = [];

  var checkArgsLength = hasArgsEnumBug && (0,_internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__.default)(obj);

  for (prop in obj) {
    if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_2__.default)(prop, obj) && (!checkArgsLength || prop !== 'length')) {
      ks[ks.length] = prop;
    }
  }

  if (hasEnumBug) {
    nIdx = nonEnumerableProps.length - 1;

    while (nIdx >= 0) {
      prop = nonEnumerableProps[nIdx];

      if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_2__.default)(prop, obj) && !contains(ks, prop)) {
        ks[ks.length] = prop;
      }

      nIdx -= 1;
    }
  }

  return ks;
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keys);

/***/ }),

/***/ "./node_modules/ramda/es/map.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/map.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js");
/* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/_map.js */ "./node_modules/ramda/es/internal/_map.js");
/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js");
/* harmony import */ var _internal_xmap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xmap.js */ "./node_modules/ramda/es/internal/_xmap.js");
/* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js");
/* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js");







/**
 * Takes a function and
 * a [functor](https://github.com/fantasyland/fantasy-land#functor),
 * applies the function to each of the functor's values, and returns
 * a functor of the same shape.
 *
 * Ramda provides suitable `map` implementations for `Array` and `Object`,
 * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.
 *
 * Dispatches to the `map` method of the second argument, if present.
 *
 * Acts as a transducer if a transformer is given in list position.
 *
 * Also treats functions as functors and will compose them together.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig Functor f => (a -> b) -> f a -> f b
 * @param {Function} fn The function to be called on every element of the input `list`.
 * @param {Array} list The list to be iterated over.
 * @return {Array} The new list.
 * @see R.transduce, R.addIndex
 * @example
 *
 *      const double = x => x * 2;
 *
 *      R.map(double, [1, 2, 3]); //=> [2, 4, 6]
 *
 *      R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}
 * @symb R.map(f, [a, b]) = [f(a), f(b)]
 * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }
 * @symb R.map(f, functor_o) = functor_o.map(f)
 */

var map =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(
/*#__PURE__*/
(0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__.default)(['fantasy-land/map', 'map'], _internal_xmap_js__WEBPACK_IMPORTED_MODULE_2__.default, function map(fn, functor) {
  switch (Object.prototype.toString.call(functor)) {
    case '[object Function]':
      return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_3__.default)(functor.length, function () {
        return fn.call(this, functor.apply(this, arguments));
      });

    case '[object Object]':
      return (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_4__.default)(function (acc, key) {
        acc[key] = fn(functor[key]);
        return acc;
      }, {}, (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__.default)(functor));

    default:
      return (0,_internal_map_js__WEBPACK_IMPORTED_MODULE_6__.default)(fn, functor);
  }
}));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (map);

/***/ }),

/***/ "./node_modules/ramda/es/nth.js":
/*!**************************************!*\
  !*** ./node_modules/ramda/es/nth.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js");


/**
 * Returns the nth element of the given list or string. If n is negative the
 * element at index length + n is returned.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig Number -> [a] -> a | Undefined
 * @sig Number -> String -> String
 * @param {Number} offset
 * @param {*} list
 * @return {*}
 * @example
 *
 *      const list = ['foo', 'bar', 'baz', 'quux'];
 *      R.nth(1, list); //=> 'bar'
 *      R.nth(-1, list); //=> 'quux'
 *      R.nth(-99, list); //=> undefined
 *
 *      R.nth(2, 'abc'); //=> 'c'
 *      R.nth(3, 'abc'); //=> ''
 * @symb R.nth(-1, [a, b, c]) = c
 * @symb R.nth(0, [a, b, c]) = a
 * @symb R.nth(1, [a, b, c]) = b
 */

var nth =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function nth(offset, list) {
  var idx = offset < 0 ? list.length + offset : offset;
  return (0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__.default)(list) ? list.charAt(idx) : list[idx];
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (nth);

/***/ }),

/***/ "./node_modules/ramda/es/path.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/path.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _paths_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paths.js */ "./node_modules/ramda/es/paths.js");


/**
 * Retrieve the value at a given path.
 *
 * @func
 * @memberOf R
 * @since v0.2.0
 * @category Object
 * @typedefn Idx = String | Int
 * @sig [Idx] -> {a} -> a | Undefined
 * @param {Array} path The path to use.
 * @param {Object} obj The object to retrieve the nested property from.
 * @return {*} The data at `path`.
 * @see R.prop, R.nth
 * @example
 *
 *      R.path(['a', 'b'], {a: {b: 2}}); //=> 2
 *      R.path(['a', 'b'], {c: {b: 2}}); //=> undefined
 *      R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1
 *      R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2
 */

var path =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function path(pathAr, obj) {
  return (0,_paths_js__WEBPACK_IMPORTED_MODULE_1__.default)([pathAr], obj)[0];
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (path);

/***/ }),

/***/ "./node_modules/ramda/es/pathOr.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/pathOr.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");
/* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo.js */ "./node_modules/ramda/es/defaultTo.js");
/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js");



/**
 * If the given, non-null object has a value at the given path, returns the
 * value at that path. Otherwise returns the provided default value.
 *
 * @func
 * @memberOf R
 * @since v0.18.0
 * @category Object
 * @typedefn Idx = String | Int
 * @sig a -> [Idx] -> {a} -> a
 * @param {*} d The default value.
 * @param {Array} p The path to use.
 * @param {Object} obj The object to retrieve the nested property from.
 * @return {*} The data at `path` of the supplied object or the default value.
 * @example
 *
 *      R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2
 *      R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A"
 */

var pathOr =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(function pathOr(d, p, obj) {
  return (0,_defaultTo_js__WEBPACK_IMPORTED_MODULE_1__.default)(d, (0,_path_js__WEBPACK_IMPORTED_MODULE_2__.default)(p, obj));
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pathOr);

/***/ }),

/***/ "./node_modules/ramda/es/paths.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/paths.js ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js");
/* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js");



/**
 * Retrieves the values at given paths of an object.
 *
 * @func
 * @memberOf R
 * @since v0.27.1
 * @category Object
 * @typedefn Idx = [String | Int]
 * @sig [Idx] -> {a} -> [a | Undefined]
 * @param {Array} pathsArray The array of paths to be fetched.
 * @param {Object} obj The object to retrieve the nested properties from.
 * @return {Array} A list consisting of values at paths specified by "pathsArray".
 * @see R.path
 * @example
 *
 *      R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3]
 *      R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined]
 */

var paths =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function paths(pathsArray, obj) {
  return pathsArray.map(function (paths) {
    var val = obj;
    var idx = 0;
    var p;

    while (idx < paths.length) {
      if (val == null) {
        return;
      }

      p = paths[idx];
      val = (0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__.default)(p) ? (0,_nth_js__WEBPACK_IMPORTED_MODULE_2__.default)(p, val) : val[p];
      idx += 1;
    }

    return val;
  });
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (paths);

/***/ }),

/***/ "./node_modules/ramda/es/pick.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/pick.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");

/**
 * Returns a partial copy of an object containing only the keys specified. If
 * the key does not exist, the property is ignored.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category Object
 * @sig [k] -> {k: v} -> {k: v}
 * @param {Array} names an array of String property names to copy onto a new object
 * @param {Object} obj The object to copy from
 * @return {Object} A new object with only properties from `names` on it.
 * @see R.omit, R.props
 * @example
 *
 *      R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
 *      R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
 */

var pick =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function pick(names, obj) {
  var result = {};
  var idx = 0;

  while (idx < names.length) {
    if (names[idx] in obj) {
      result[names[idx]] = obj[names[idx]];
    }

    idx += 1;
  }

  return result;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pick);

/***/ }),

/***/ "./node_modules/ramda/es/pipe.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/pipe.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ pipe)
/* harmony export */ });
/* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js");
/* harmony import */ var _internal_pipe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_pipe.js */ "./node_modules/ramda/es/internal/_pipe.js");
/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js");
/* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail.js */ "./node_modules/ramda/es/tail.js");




/**
 * Performs left-to-right function composition. The first argument may have
 * any arity; the remaining arguments must be unary.
 *
 * In some libraries this function is named `sequence`.
 *
 * **Note:** The result of pipe is not automatically curried.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category Function
 * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)
 * @param {...Function} functions
 * @return {Function}
 * @see R.compose
 * @example
 *
 *      const f = R.pipe(Math.pow, R.negate, R.inc);
 *
 *      f(3, 4); // -(3^4) + 1
 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))
 */

function pipe() {
  if (arguments.length === 0) {
    throw new Error('pipe requires at least one argument');
  }

  return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__.default)(arguments[0].length, (0,_reduce_js__WEBPACK_IMPORTED_MODULE_1__.default)(_internal_pipe_js__WEBPACK_IMPORTED_MODULE_2__.default, arguments[0], (0,_tail_js__WEBPACK_IMPORTED_MODULE_3__.default)(arguments)));
}

/***/ }),

/***/ "./node_modules/ramda/es/propOr.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/propOr.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");
/* harmony import */ var _pathOr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pathOr.js */ "./node_modules/ramda/es/pathOr.js");


/**
 * If the given, non-null object has an own property with the specified name,
 * returns the value of that property. Otherwise returns the provided default
 * value.
 *
 * @func
 * @memberOf R
 * @since v0.6.0
 * @category Object
 * @sig a -> String -> Object -> a
 * @param {*} val The default value.
 * @param {String} p The name of the property to return.
 * @param {Object} obj The object to query.
 * @return {*} The value of given property of the supplied object or the default value.
 * @example
 *
 *      const alice = {
 *        name: 'ALICE',
 *        age: 101
 *      };
 *      const favorite = R.prop('favoriteLibrary');
 *      const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary');
 *
 *      favorite(alice);  //=> undefined
 *      favoriteWithDefault(alice);  //=> 'Ramda'
 */

var propOr =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(function propOr(val, p, obj) {
  return (0,_pathOr_js__WEBPACK_IMPORTED_MODULE_1__.default)(val, [p], obj);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (propOr);

/***/ }),

/***/ "./node_modules/ramda/es/reduce.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/reduce.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");
/* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js");


/**
 * Returns a single item by iterating through the list, successively calling
 * the iterator function and passing it an accumulator value and the current
 * value from the array, and then passing the result to the next call.
 *
 * The iterator function receives two values: *(acc, value)*. It may use
 * [`R.reduced`](#reduced) to shortcut the iteration.
 *
 * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function
 * is *(value, acc)*.
 *
 * Note: `R.reduce` does not skip deleted or unassigned indices (sparse
 * arrays), unlike the native `Array.prototype.reduce` method. For more details
 * on this behavior, see:
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description
 *
 * Dispatches to the `reduce` method of the third argument, if present. When
 * doing so, it is up to the user to handle the [`R.reduced`](#reduced)
 * shortcuting, as this is not implemented by `reduce`.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig ((a, b) -> a) -> a -> [b] -> a
 * @param {Function} fn The iterator function. Receives two values, the accumulator and the
 *        current element from the array.
 * @param {*} acc The accumulator value.
 * @param {Array} list The list to iterate over.
 * @return {*} The final, accumulated value.
 * @see R.reduced, R.addIndex, R.reduceRight
 * @example
 *
 *      R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10
 *      //          -               -10
 *      //         / \              / \
 *      //        -   4           -6   4
 *      //       / \              / \
 *      //      -   3   ==>     -3   3
 *      //     / \              / \
 *      //    -   2           -1   2
 *      //   / \              / \
 *      //  0   1            0   1
 *
 * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)
 */

var reduce =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__.default);

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reduce);

/***/ }),

/***/ "./node_modules/ramda/es/reject.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/reject.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_complement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_complement.js */ "./node_modules/ramda/es/internal/_complement.js");
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");
/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter.js */ "./node_modules/ramda/es/filter.js");



/**
 * The complement of [`filter`](#filter).
 *
 * Acts as a transducer if a transformer is given in list position. Filterable
 * objects include plain objects or any object that has a filter method such
 * as `Array`.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig Filterable f => (a -> Boolean) -> f a -> f a
 * @param {Function} pred
 * @param {Array} filterable
 * @return {Array}
 * @see R.filter, R.transduce, R.addIndex
 * @example
 *
 *      const isOdd = (n) => n % 2 === 1;
 *
 *      R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]
 *
 *      R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
 */

var reject =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function reject(pred, filterable) {
  return (0,_filter_js__WEBPACK_IMPORTED_MODULE_1__.default)((0,_internal_complement_js__WEBPACK_IMPORTED_MODULE_2__.default)(pred), filterable);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reject);

/***/ }),

/***/ "./node_modules/ramda/es/reverse.js":
/*!******************************************!*\
  !*** ./node_modules/ramda/es/reverse.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js");


/**
 * Returns a new list or string with the elements or characters in reverse
 * order.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig [a] -> [a]
 * @sig String -> String
 * @param {Array|String} list
 * @return {Array|String}
 * @example
 *
 *      R.reverse([1, 2, 3]);  //=> [3, 2, 1]
 *      R.reverse([1, 2]);     //=> [2, 1]
 *      R.reverse([1]);        //=> [1]
 *      R.reverse([]);         //=> []
 *
 *      R.reverse('abc');      //=> 'cba'
 *      R.reverse('ab');       //=> 'ba'
 *      R.reverse('a');        //=> 'a'
 *      R.reverse('');         //=> ''
 */

var reverse =
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function reverse(list) {
  return (0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__.default)(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reverse);

/***/ }),

/***/ "./node_modules/ramda/es/slice.js":
/*!****************************************!*\
  !*** ./node_modules/ramda/es/slice.js ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js");
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");


/**
 * Returns the elements of the given list or string (or object with a `slice`
 * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).
 *
 * Dispatches to the `slice` method of the third argument, if present.
 *
 * @func
 * @memberOf R
 * @since v0.1.4
 * @category List
 * @sig Number -> Number -> [a] -> [a]
 * @sig Number -> Number -> String -> String
 * @param {Number} fromIndex The start index (inclusive).
 * @param {Number} toIndex The end index (exclusive).
 * @param {*} list
 * @return {*}
 * @example
 *
 *      R.slice(1, 3, ['a', 'b', 'c', 'd']);        //=> ['b', 'c']
 *      R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']
 *      R.slice(0, -1, ['a', 'b', 'c', 'd']);       //=> ['a', 'b', 'c']
 *      R.slice(-3, -1, ['a', 'b', 'c', 'd']);      //=> ['b', 'c']
 *      R.slice(0, 3, 'ramda');                     //=> 'ram'
 */

var slice =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(
/*#__PURE__*/
(0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_1__.default)('slice', function slice(fromIndex, toIndex, list) {
  return Array.prototype.slice.call(list, fromIndex, toIndex);
}));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (slice);

/***/ }),

/***/ "./node_modules/ramda/es/tail.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/tail.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js");
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");
/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js");



/**
 * Returns all but the first element of the given list or string (or object
 * with a `tail` method).
 *
 * Dispatches to the `slice` method of the first argument, if present.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig [a] -> [a]
 * @sig String -> String
 * @param {*} list
 * @return {*}
 * @see R.head, R.init, R.last
 * @example
 *
 *      R.tail([1, 2, 3]);  //=> [2, 3]
 *      R.tail([1, 2]);     //=> [2]
 *      R.tail([1]);        //=> []
 *      R.tail([]);         //=> []
 *
 *      R.tail('abc');  //=> 'bc'
 *      R.tail('ab');   //=> 'b'
 *      R.tail('a');    //=> ''
 *      R.tail('');     //=> ''
 */

var tail =
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(
/*#__PURE__*/
(0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_1__.default)('tail',
/*#__PURE__*/
(0,_slice_js__WEBPACK_IMPORTED_MODULE_2__.default)(1, Infinity)));

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (tail);

/***/ }),

/***/ "./node_modules/ramda/es/type.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/type.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js");

/**
 * Gives a single-word string description of the (native) type of a value,
 * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
 * attempt to distinguish user Object types any further, reporting them all as
 * 'Object'.
 *
 * @func
 * @memberOf R
 * @since v0.8.0
 * @category Type
 * @sig (* -> {*}) -> String
 * @param {*} val The value to test
 * @return {String}
 * @example
 *
 *      R.type({}); //=> "Object"
 *      R.type(1); //=> "Number"
 *      R.type(false); //=> "Boolean"
 *      R.type('s'); //=> "String"
 *      R.type(null); //=> "Null"
 *      R.type([]); //=> "Array"
 *      R.type(/[A-z]/); //=> "RegExp"
 *      R.type(() => {}); //=> "Function"
 *      R.type(undefined); //=> "Undefined"
 */

var type =
/*#__PURE__*/
(0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__.default)(function type(val) {
  return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (type);

/***/ }),

/***/ "./node_modules/ramda/es/uniq.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/uniq.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "./node_modules/ramda/es/identity.js");
/* harmony import */ var _uniqBy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniqBy.js */ "./node_modules/ramda/es/uniqBy.js");


/**
 * Returns a new list containing only one copy of each element in the original
 * list. [`R.equals`](#equals) is used to determine equality.
 *
 * @func
 * @memberOf R
 * @since v0.1.0
 * @category List
 * @sig [a] -> [a]
 * @param {Array} list The array to consider.
 * @return {Array} The list of unique items.
 * @example
 *
 *      R.uniq([1, 1, 2, 1]); //=> [1, 2]
 *      R.uniq([1, '1']);     //=> [1, '1']
 *      R.uniq([[42], [42]]); //=> [[42]]
 */

var uniq =
/*#__PURE__*/
(0,_uniqBy_js__WEBPACK_IMPORTED_MODULE_0__.default)(_identity_js__WEBPACK_IMPORTED_MODULE_1__.default);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniq);

/***/ }),

/***/ "./node_modules/ramda/es/uniqBy.js":
/*!*****************************************!*\
  !*** ./node_modules/ramda/es/uniqBy.js ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_Set.js */ "./node_modules/ramda/es/internal/_Set.js");
/* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js");


/**
 * Returns a new list containing only one copy of each element in the original
 * list, based upon the value returned by applying the supplied function to
 * each list element. Prefers the first item if the supplied function produces
 * the same value on two items. [`R.equals`](#equals) is used for comparison.
 *
 * @func
 * @memberOf R
 * @since v0.16.0
 * @category List
 * @sig (a -> b) -> [a] -> [a]
 * @param {Function} fn A function used to produce a value to use during comparisons.
 * @param {Array} list The array to consider.
 * @return {Array} The list of unique items.
 * @example
 *
 *      R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]
 */

var uniqBy =
/*#__PURE__*/
(0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__.default)(function uniqBy(fn, list) {
  var set = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__.default();
  var result = [];
  var idx = 0;
  var appliedItem, item;

  while (idx < list.length) {
    item = list[idx];
    appliedItem = fn(item);

    if (set.add(appliedItem)) {
      result.push(item);
    }

    idx += 1;
  }

  return result;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (uniqBy);

/***/ }),

/***/ "./node_modules/ramda/es/when.js":
/*!***************************************!*\
  !*** ./node_modules/ramda/es/when.js ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js");

/**
 * Tests the final argument by passing it to the given predicate function. If
 * the predicate is satisfied, the function will return the result of calling
 * the `whenTrueFn` function with the same argument. If the predicate is not
 * satisfied, the argument is returned as is.
 *
 * @func
 * @memberOf R
 * @since v0.18.0
 * @category Logic
 * @sig (a -> Boolean) -> (a -> a) -> a -> a
 * @param {Function} pred       A predicate function
 * @param {Function} whenTrueFn A function to invoke when the `condition`
 *                              evaluates to a truthy value.
 * @param {*}        x          An object to test with the `pred` function and
 *                              pass to `whenTrueFn` if necessary.
 * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`.
 * @see R.ifElse, R.unless, R.cond
 * @example
 *
 *      // truncate :: String -> String
 *      const truncate = R.when(
 *        R.propSatisfies(R.gt(R.__, 10), 'length'),
 *        R.pipe(R.take(10), R.append('…'), R.join(''))
 *      );
 *      truncate('12345');         //=> '12345'
 *      truncate('0123456789ABC'); //=> '0123456789…'
 */

var when =
/*#__PURE__*/
(0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__.default)(function when(pred, whenTrueFn, x) {
  return pred(x) ? whenTrueFn(x) : x;
});

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (when);

/***/ }),

/***/ "./node_modules/semver-compare/index.js":
/*!**********************************************!*\
  !*** ./node_modules/semver-compare/index.js ***!
  \**********************************************/
/***/ ((module) => {

module.exports = function cmp (a, b) {
    var pa = a.split('.');
    var pb = b.split('.');
    for (var i = 0; i < 3; i++) {
        var na = Number(pa[i]);
        var nb = Number(pb[i]);
        if (na > nb) return 1;
        if (nb > na) return -1;
        if (!isNaN(na) && isNaN(nb)) return 1;
        if (isNaN(na) && !isNaN(nb)) return -1;
    }
    return 0;
};


/***/ }),

/***/ "./node_modules/source-map-resolve/index.js":
/*!**************************************************!*\
  !*** ./node_modules/source-map-resolve/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var atob = __webpack_require__(/*! atob */ "./node_modules/atob/browser-atob.js")
var urlLib = __webpack_require__(/*! url */ "?488f")
var pathLib = __webpack_require__(/*! path */ "?282e")
var decodeUriComponentLib = __webpack_require__(/*! decode-uri-component */ "./node_modules/decode-uri-component/index.js")



function resolveUrl(/* ...urls */) {
  return Array.prototype.reduce.call(arguments, function(resolved, nextUrl) {
    return urlLib.resolve(resolved, nextUrl)
  })
}

function convertWindowsPath(aPath) {
  return pathLib.sep === "\\" ? aPath.replace(/\\/g, "/").replace(/^[a-z]:\/?/i, "/") : aPath
}

function customDecodeUriComponent(string) {
  // `decodeUriComponentLib` turns `+` into ` `, but that's not wanted.
  return decodeUriComponentLib(string.replace(/\+/g, "%2B"))
}

function callbackAsync(callback, error, result) {
  setImmediate(function() { callback(error, result) })
}

function parseMapToJSON(string, data) {
  try {
    return JSON.parse(string.replace(/^\)\]\}'/, ""))
  } catch (error) {
    error.sourceMapData = data
    throw error
  }
}

function readSync(read, url, data) {
  var readUrl = customDecodeUriComponent(url)
  try {
    return String(read(readUrl))
  } catch (error) {
    error.sourceMapData = data
    throw error
  }
}



var innerRegex = /[#@] sourceMappingURL=([^\s'"]*)/

var sourceMappingURLRegex = RegExp(
  "(?:" +
    "/\\*" +
    "(?:\\s*\r?\n(?://)?)?" +
    "(?:" + innerRegex.source + ")" +
    "\\s*" +
    "\\*/" +
    "|" +
    "//(?:" + innerRegex.source + ")" +
  ")" +
  "\\s*"
)

function getSourceMappingUrl(code) {
  var match = code.match(sourceMappingURLRegex)
  return match ? match[1] || match[2] || "" : null
}



function resolveSourceMap(code, codeUrl, read, callback) {
  var mapData
  try {
    mapData = resolveSourceMapHelper(code, codeUrl)
  } catch (error) {
    return callbackAsync(callback, error)
  }
  if (!mapData || mapData.map) {
    return callbackAsync(callback, null, mapData)
  }
  var readUrl = customDecodeUriComponent(mapData.url)
  read(readUrl, function(error, result) {
    if (error) {
      error.sourceMapData = mapData
      return callback(error)
    }
    mapData.map = String(result)
    try {
      mapData.map = parseMapToJSON(mapData.map, mapData)
    } catch (error) {
      return callback(error)
    }
    callback(null, mapData)
  })
}

function resolveSourceMapSync(code, codeUrl, read) {
  var mapData = resolveSourceMapHelper(code, codeUrl)
  if (!mapData || mapData.map) {
    return mapData
  }
  mapData.map = readSync(read, mapData.url, mapData)
  mapData.map = parseMapToJSON(mapData.map, mapData)
  return mapData
}

var dataUriRegex = /^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/

/**
 * The media type for JSON text is application/json.
 *
 * {@link https://tools.ietf.org/html/rfc8259#section-11 | IANA Considerations }
 *
 * `text/json` is non-standard media type
 */
var jsonMimeTypeRegex = /^(?:application|text)\/json$/

/**
 * JSON text exchanged between systems that are not part of a closed ecosystem
 * MUST be encoded using UTF-8.
 *
 * {@link https://tools.ietf.org/html/rfc8259#section-8.1 | Character Encoding}
 */
var jsonCharacterEncoding = "utf-8"

function base64ToBuf(b64) {
  var binStr = atob(b64)
  var len = binStr.length
  var arr = new Uint8Array(len)
  for (var i = 0; i < len; i++) {
    arr[i] = binStr.charCodeAt(i)
  }
  return arr
}

function decodeBase64String(b64) {
  if (typeof TextDecoder === "undefined" || typeof Uint8Array === "undefined") {
    return atob(b64)
  }
  var buf = base64ToBuf(b64);
  // Note: `decoder.decode` method will throw a `DOMException` with the
  // `"EncodingError"` value when an coding error is found.
  var decoder = new TextDecoder(jsonCharacterEncoding, {fatal: true})
  return decoder.decode(buf);
}

function resolveSourceMapHelper(code, codeUrl) {
  codeUrl = convertWindowsPath(codeUrl)

  var url = getSourceMappingUrl(code)
  if (!url) {
    return null
  }

  var dataUri = url.match(dataUriRegex)
  if (dataUri) {
    var mimeType = dataUri[1] || "text/plain"
    var lastParameter = dataUri[2] || ""
    var encoded = dataUri[3] || ""
    var data = {
      sourceMappingURL: url,
      url: null,
      sourcesRelativeTo: codeUrl,
      map: encoded
    }
    if (!jsonMimeTypeRegex.test(mimeType)) {
      var error = new Error("Unuseful data uri mime type: " + mimeType)
      error.sourceMapData = data
      throw error
    }
    try {
      data.map = parseMapToJSON(
        lastParameter === ";base64" ? decodeBase64String(encoded) : decodeURIComponent(encoded),
        data
      )
    } catch (error) {
      error.sourceMapData = data
      throw error
    }
    return data
  }

  var mapUrl = resolveUrl(codeUrl, url)
  return {
    sourceMappingURL: url,
    url: mapUrl,
    sourcesRelativeTo: mapUrl,
    map: null
  }
}



function resolveSources(map, mapUrl, read, options, callback) {
  if (typeof options === "function") {
    callback = options
    options = {}
  }
  var pending = map.sources ? map.sources.length : 0
  var result = {
    sourcesResolved: [],
    sourcesContent:  []
  }

  if (pending === 0) {
    callbackAsync(callback, null, result)
    return
  }

  var done = function() {
    pending--
    if (pending === 0) {
      callback(null, result)
    }
  }

  resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {
    result.sourcesResolved[index] = fullUrl
    if (typeof sourceContent === "string") {
      result.sourcesContent[index] = sourceContent
      callbackAsync(done, null)
    } else {
      var readUrl = customDecodeUriComponent(fullUrl)
      read(readUrl, function(error, source) {
        result.sourcesContent[index] = error ? error : String(source)
        done()
      })
    }
  })
}

function resolveSourcesSync(map, mapUrl, read, options) {
  var result = {
    sourcesResolved: [],
    sourcesContent:  []
  }

  if (!map.sources || map.sources.length === 0) {
    return result
  }

  resolveSourcesHelper(map, mapUrl, options, function(fullUrl, sourceContent, index) {
    result.sourcesResolved[index] = fullUrl
    if (read !== null) {
      if (typeof sourceContent === "string") {
        result.sourcesContent[index] = sourceContent
      } else {
        var readUrl = customDecodeUriComponent(fullUrl)
        try {
          result.sourcesContent[index] = String(read(readUrl))
        } catch (error) {
          result.sourcesContent[index] = error
        }
      }
    }
  })

  return result
}

var endingSlash = /\/?$/

function resolveSourcesHelper(map, mapUrl, options, fn) {
  options = options || {}
  mapUrl = convertWindowsPath(mapUrl)
  var fullUrl
  var sourceContent
  var sourceRoot
  for (var index = 0, len = map.sources.length; index < len; index++) {
    sourceRoot = null
    if (typeof options.sourceRoot === "string") {
      sourceRoot = options.sourceRoot
    } else if (typeof map.sourceRoot === "string" && options.sourceRoot !== false) {
      sourceRoot = map.sourceRoot
    }
    // If the sourceRoot is the empty string, it is equivalent to not setting
    // the property at all.
    if (sourceRoot === null || sourceRoot === '') {
      fullUrl = resolveUrl(mapUrl, map.sources[index])
    } else {
      // Make sure that the sourceRoot ends with a slash, so that `/scripts/subdir` becomes
      // `/scripts/subdir/<source>`, not `/scripts/<source>`. Pointing to a file as source root
      // does not make sense.
      fullUrl = resolveUrl(mapUrl, sourceRoot.replace(endingSlash, "/"), map.sources[index])
    }
    sourceContent = (map.sourcesContent || [])[index]
    fn(fullUrl, sourceContent, index)
  }
}



function resolve(code, codeUrl, read, options, callback) {
  if (typeof options === "function") {
    callback = options
    options = {}
  }
  if (code === null) {
    var mapUrl = codeUrl
    var data = {
      sourceMappingURL: null,
      url: mapUrl,
      sourcesRelativeTo: mapUrl,
      map: null
    }
    var readUrl = customDecodeUriComponent(mapUrl)
    read(readUrl, function(error, result) {
      if (error) {
        error.sourceMapData = data
        return callback(error)
      }
      data.map = String(result)
      try {
        data.map = parseMapToJSON(data.map, data)
      } catch (error) {
        return callback(error)
      }
      _resolveSources(data)
    })
  } else {
    resolveSourceMap(code, codeUrl, read, function(error, mapData) {
      if (error) {
        return callback(error)
      }
      if (!mapData) {
        return callback(null, null)
      }
      _resolveSources(mapData)
    })
  }

  function _resolveSources(mapData) {
    resolveSources(mapData.map, mapData.sourcesRelativeTo, read, options, function(error, result) {
      if (error) {
        return callback(error)
      }
      mapData.sourcesResolved = result.sourcesResolved
      mapData.sourcesContent  = result.sourcesContent
      callback(null, mapData)
    })
  }
}

function resolveSync(code, codeUrl, read, options) {
  var mapData
  if (code === null) {
    var mapUrl = codeUrl
    mapData = {
      sourceMappingURL: null,
      url: mapUrl,
      sourcesRelativeTo: mapUrl,
      map: null
    }
    mapData.map = readSync(read, mapUrl, mapData)
    mapData.map = parseMapToJSON(mapData.map, mapData)
  } else {
    mapData = resolveSourceMapSync(code, codeUrl, read)
    if (!mapData) {
      return null
    }
  }
  var result = resolveSourcesSync(mapData.map, mapData.sourcesRelativeTo, read, options)
  mapData.sourcesResolved = result.sourcesResolved
  mapData.sourcesContent  = result.sourcesContent
  return mapData
}



module.exports = {
  resolveSourceMap:     resolveSourceMap,
  resolveSourceMapSync: resolveSourceMapSync,
  resolveSources:       resolveSources,
  resolveSourcesSync:   resolveSourcesSync,
  resolve:              resolve,
  resolveSync:          resolveSync,
  parseMapToJSON:       parseMapToJSON
}


/***/ }),

/***/ "./node_modules/source-map/lib/array-set.js":
/*!**************************************************!*\
  !*** ./node_modules/source-map/lib/array-set.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var util = __webpack_require__(/*! ./util */ "./node_modules/source-map/lib/util.js");
var has = Object.prototype.hasOwnProperty;
var hasNativeMap = typeof Map !== "undefined";

/**
 * A data structure which is a combination of an array and a set. Adding a new
 * member is O(1), testing for membership is O(1), and finding the index of an
 * element is O(1). Removing elements from the set is not supported. Only
 * strings are supported for membership.
 */
function ArraySet() {
  this._array = [];
  this._set = hasNativeMap ? new Map() : Object.create(null);
}

/**
 * Static method for creating ArraySet instances from an existing array.
 */
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  var set = new ArraySet();
  for (var i = 0, len = aArray.length; i < len; i++) {
    set.add(aArray[i], aAllowDuplicates);
  }
  return set;
};

/**
 * Return how many unique items are in this ArraySet. If duplicates have been
 * added, than those do not count towards the size.
 *
 * @returns Number
 */
ArraySet.prototype.size = function ArraySet_size() {
  return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
};

/**
 * Add the given string to this set.
 *
 * @param String aStr
 */
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
  var idx = this._array.length;
  if (!isDuplicate || aAllowDuplicates) {
    this._array.push(aStr);
  }
  if (!isDuplicate) {
    if (hasNativeMap) {
      this._set.set(aStr, idx);
    } else {
      this._set[sStr] = idx;
    }
  }
};

/**
 * Is the given string a member of this set?
 *
 * @param String aStr
 */
ArraySet.prototype.has = function ArraySet_has(aStr) {
  if (hasNativeMap) {
    return this._set.has(aStr);
  } else {
    var sStr = util.toSetString(aStr);
    return has.call(this._set, sStr);
  }
};

/**
 * What is the index of the given string in the array?
 *
 * @param String aStr
 */
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  if (hasNativeMap) {
    var idx = this._set.get(aStr);
    if (idx >= 0) {
        return idx;
    }
  } else {
    var sStr = util.toSetString(aStr);
    if (has.call(this._set, sStr)) {
      return this._set[sStr];
    }
  }

  throw new Error('"' + aStr + '" is not in the set.');
};

/**
 * What is the element at the given index?
 *
 * @param Number aIdx
 */
ArraySet.prototype.at = function ArraySet_at(aIdx) {
  if (aIdx >= 0 && aIdx < this._array.length) {
    return this._array[aIdx];
  }
  throw new Error('No element indexed by ' + aIdx);
};

/**
 * Returns the array representation of this set (which has the proper indices
 * indicated by indexOf). Note that this is a copy of the internal array used
 * for storing the members so that no one can mess with internal state.
 */
ArraySet.prototype.toArray = function ArraySet_toArray() {
  return this._array.slice();
};

exports.ArraySet = ArraySet;


/***/ }),

/***/ "./node_modules/source-map/lib/base64-vlq.js":
/*!***************************************************!*\
  !*** ./node_modules/source-map/lib/base64-vlq.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 *
 * Based on the Base 64 VLQ implementation in Closure Compiler:
 * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
 *
 * Copyright 2011 The Closure Compiler Authors. All rights reserved.
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above
 *    copyright notice, this list of conditions and the following
 *    disclaimer in the documentation and/or other materials provided
 *    with the distribution.
 *  * Neither the name of Google Inc. nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

var base64 = __webpack_require__(/*! ./base64 */ "./node_modules/source-map/lib/base64.js");

// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
//   Continuation
//   |    Sign
//   |    |
//   V    V
//   101011

var VLQ_BASE_SHIFT = 5;

// binary: 100000
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;

// binary: 011111
var VLQ_BASE_MASK = VLQ_BASE - 1;

// binary: 100000
var VLQ_CONTINUATION_BIT = VLQ_BASE;

/**
 * Converts from a two-complement value to a value where the sign bit is
 * placed in the least significant bit.  For example, as decimals:
 *   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
 *   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
 */
function toVLQSigned(aValue) {
  return aValue < 0
    ? ((-aValue) << 1) + 1
    : (aValue << 1) + 0;
}

/**
 * Converts to a two-complement value from a value where the sign bit is
 * placed in the least significant bit.  For example, as decimals:
 *   2 (10 binary) becomes 1, 3 (11 binary) becomes -1
 *   4 (100 binary) becomes 2, 5 (101 binary) becomes -2
 */
function fromVLQSigned(aValue) {
  var isNegative = (aValue & 1) === 1;
  var shifted = aValue >> 1;
  return isNegative
    ? -shifted
    : shifted;
}

/**
 * Returns the base 64 VLQ encoded value.
 */
exports.encode = function base64VLQ_encode(aValue) {
  var encoded = "";
  var digit;

  var vlq = toVLQSigned(aValue);

  do {
    digit = vlq & VLQ_BASE_MASK;
    vlq >>>= VLQ_BASE_SHIFT;
    if (vlq > 0) {
      // There are still more digits in this value, so we must make sure the
      // continuation bit is marked.
      digit |= VLQ_CONTINUATION_BIT;
    }
    encoded += base64.encode(digit);
  } while (vlq > 0);

  return encoded;
};

/**
 * Decodes the next base 64 VLQ value from the given string and returns the
 * value and the rest of the string via the out parameter.
 */
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  var strLen = aStr.length;
  var result = 0;
  var shift = 0;
  var continuation, digit;

  do {
    if (aIndex >= strLen) {
      throw new Error("Expected more digits in base 64 VLQ value.");
    }

    digit = base64.decode(aStr.charCodeAt(aIndex++));
    if (digit === -1) {
      throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
    }

    continuation = !!(digit & VLQ_CONTINUATION_BIT);
    digit &= VLQ_BASE_MASK;
    result = result + (digit << shift);
    shift += VLQ_BASE_SHIFT;
  } while (continuation);

  aOutParam.value = fromVLQSigned(result);
  aOutParam.rest = aIndex;
};


/***/ }),

/***/ "./node_modules/source-map/lib/base64.js":
/*!***********************************************!*\
  !*** ./node_modules/source-map/lib/base64.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, exports) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');

/**
 * Encode an integer in the range of 0 to 63 to a single base 64 digit.
 */
exports.encode = function (number) {
  if (0 <= number && number < intToCharMap.length) {
    return intToCharMap[number];
  }
  throw new TypeError("Must be between 0 and 63: " + number);
};

/**
 * Decode a single base 64 character code digit to an integer. Returns -1 on
 * failure.
 */
exports.decode = function (charCode) {
  var bigA = 65;     // 'A'
  var bigZ = 90;     // 'Z'

  var littleA = 97;  // 'a'
  var littleZ = 122; // 'z'

  var zero = 48;     // '0'
  var nine = 57;     // '9'

  var plus = 43;     // '+'
  var slash = 47;    // '/'

  var littleOffset = 26;
  var numberOffset = 52;

  // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  if (bigA <= charCode && charCode <= bigZ) {
    return (charCode - bigA);
  }

  // 26 - 51: abcdefghijklmnopqrstuvwxyz
  if (littleA <= charCode && charCode <= littleZ) {
    return (charCode - littleA + littleOffset);
  }

  // 52 - 61: 0123456789
  if (zero <= charCode && charCode <= nine) {
    return (charCode - zero + numberOffset);
  }

  // 62: +
  if (charCode == plus) {
    return 62;
  }

  // 63: /
  if (charCode == slash) {
    return 63;
  }

  // Invalid base64 digit.
  return -1;
};


/***/ }),

/***/ "./node_modules/source-map/lib/binary-search.js":
/*!******************************************************!*\
  !*** ./node_modules/source-map/lib/binary-search.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, exports) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

exports.GREATEST_LOWER_BOUND = 1;
exports.LEAST_UPPER_BOUND = 2;

/**
 * Recursive implementation of binary search.
 *
 * @param aLow Indices here and lower do not contain the needle.
 * @param aHigh Indices here and higher do not contain the needle.
 * @param aNeedle The element being searched for.
 * @param aHaystack The non-empty array being searched.
 * @param aCompare Function which takes two elements and returns -1, 0, or 1.
 * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
 *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
 *     closest element that is smaller than or greater than the one we are
 *     searching for, respectively, if the exact element cannot be found.
 */
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  // This function terminates when one of the following is true:
  //
  //   1. We find the exact element we are looking for.
  //
  //   2. We did not find the exact element, but we can return the index of
  //      the next-closest element.
  //
  //   3. We did not find the exact element, and there is no next-closest
  //      element than the one we are searching for, so we return -1.
  var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  var cmp = aCompare(aNeedle, aHaystack[mid], true);
  if (cmp === 0) {
    // Found the element we are looking for.
    return mid;
  }
  else if (cmp > 0) {
    // Our needle is greater than aHaystack[mid].
    if (aHigh - mid > 1) {
      // The element is in the upper half.
      return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
    }

    // The exact needle element was not found in this haystack. Determine if
    // we are in termination case (3) or (2) and return the appropriate thing.
    if (aBias == exports.LEAST_UPPER_BOUND) {
      return aHigh < aHaystack.length ? aHigh : -1;
    } else {
      return mid;
    }
  }
  else {
    // Our needle is less than aHaystack[mid].
    if (mid - aLow > 1) {
      // The element is in the lower half.
      return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
    }

    // we are in termination case (3) or (2) and return the appropriate thing.
    if (aBias == exports.LEAST_UPPER_BOUND) {
      return mid;
    } else {
      return aLow < 0 ? -1 : aLow;
    }
  }
}

/**
 * This is an implementation of binary search which will always try and return
 * the index of the closest element if there is no exact hit. This is because
 * mappings between original and generated line/col pairs are single points,
 * and there is an implicit region between each of them, so a miss just means
 * that you aren't on the very start of a region.
 *
 * @param aNeedle The element you are looking for.
 * @param aHaystack The array that is being searched.
 * @param aCompare A function which takes the needle and an element in the
 *     array and returns -1, 0, or 1 depending on whether the needle is less
 *     than, equal to, or greater than the element, respectively.
 * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
 *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
 *     closest element that is smaller than or greater than the one we are
 *     searching for, respectively, if the exact element cannot be found.
 *     Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
 */
exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  if (aHaystack.length === 0) {
    return -1;
  }

  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
                              aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  if (index < 0) {
    return -1;
  }

  // We have found either the exact element, or the next-closest element than
  // the one we are searching for. However, there may be more than one such
  // element. Make sure we always return the smallest of these.
  while (index - 1 >= 0) {
    if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
      break;
    }
    --index;
  }

  return index;
};


/***/ }),

/***/ "./node_modules/source-map/lib/mapping-list.js":
/*!*****************************************************!*\
  !*** ./node_modules/source-map/lib/mapping-list.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2014 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var util = __webpack_require__(/*! ./util */ "./node_modules/source-map/lib/util.js");

/**
 * Determine whether mappingB is after mappingA with respect to generated
 * position.
 */
function generatedPositionAfter(mappingA, mappingB) {
  // Optimized for most common case
  var lineA = mappingA.generatedLine;
  var lineB = mappingB.generatedLine;
  var columnA = mappingA.generatedColumn;
  var columnB = mappingB.generatedColumn;
  return lineB > lineA || lineB == lineA && columnB >= columnA ||
         util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
}

/**
 * A data structure to provide a sorted view of accumulated mappings in a
 * performance conscious manner. It trades a neglibable overhead in general
 * case for a large speedup in case of mappings being added in order.
 */
function MappingList() {
  this._array = [];
  this._sorted = true;
  // Serves as infimum
  this._last = {generatedLine: -1, generatedColumn: 0};
}

/**
 * Iterate through internal items. This method takes the same arguments that
 * `Array.prototype.forEach` takes.
 *
 * NOTE: The order of the mappings is NOT guaranteed.
 */
MappingList.prototype.unsortedForEach =
  function MappingList_forEach(aCallback, aThisArg) {
    this._array.forEach(aCallback, aThisArg);
  };

/**
 * Add the given source mapping.
 *
 * @param Object aMapping
 */
MappingList.prototype.add = function MappingList_add(aMapping) {
  if (generatedPositionAfter(this._last, aMapping)) {
    this._last = aMapping;
    this._array.push(aMapping);
  } else {
    this._sorted = false;
    this._array.push(aMapping);
  }
};

/**
 * Returns the flat, sorted array of mappings. The mappings are sorted by
 * generated position.
 *
 * WARNING: This method returns internal data without copying, for
 * performance. The return value must NOT be mutated, and should be treated as
 * an immutable borrow. If you want to take ownership, you must make your own
 * copy.
 */
MappingList.prototype.toArray = function MappingList_toArray() {
  if (!this._sorted) {
    this._array.sort(util.compareByGeneratedPositionsInflated);
    this._sorted = true;
  }
  return this._array;
};

exports.MappingList = MappingList;


/***/ }),

/***/ "./node_modules/source-map/lib/quick-sort.js":
/*!***************************************************!*\
  !*** ./node_modules/source-map/lib/quick-sort.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, exports) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

// It turns out that some (most?) JavaScript engines don't self-host
// `Array.prototype.sort`. This makes sense because C++ will likely remain
// faster than JS when doing raw CPU-intensive sorting. However, when using a
// custom comparator function, calling back and forth between the VM's C++ and
// JIT'd JS is rather slow *and* loses JIT type information, resulting in
// worse generated code for the comparator function than would be optimal. In
// fact, when sorting with a comparator, these costs outweigh the benefits of
// sorting in C++. By using our own JS-implemented Quick Sort (below), we get
// a ~3500ms mean speed-up in `bench/bench.html`.

/**
 * Swap the elements indexed by `x` and `y` in the array `ary`.
 *
 * @param {Array} ary
 *        The array.
 * @param {Number} x
 *        The index of the first item.
 * @param {Number} y
 *        The index of the second item.
 */
function swap(ary, x, y) {
  var temp = ary[x];
  ary[x] = ary[y];
  ary[y] = temp;
}

/**
 * Returns a random integer within the range `low .. high` inclusive.
 *
 * @param {Number} low
 *        The lower bound on the range.
 * @param {Number} high
 *        The upper bound on the range.
 */
function randomIntInRange(low, high) {
  return Math.round(low + (Math.random() * (high - low)));
}

/**
 * The Quick Sort algorithm.
 *
 * @param {Array} ary
 *        An array to sort.
 * @param {function} comparator
 *        Function to use to compare two items.
 * @param {Number} p
 *        Start index of the array
 * @param {Number} r
 *        End index of the array
 */
function doQuickSort(ary, comparator, p, r) {
  // If our lower bound is less than our upper bound, we (1) partition the
  // array into two pieces and (2) recurse on each half. If it is not, this is
  // the empty array and our base case.

  if (p < r) {
    // (1) Partitioning.
    //
    // The partitioning chooses a pivot between `p` and `r` and moves all
    // elements that are less than or equal to the pivot to the before it, and
    // all the elements that are greater than it after it. The effect is that
    // once partition is done, the pivot is in the exact place it will be when
    // the array is put in sorted order, and it will not need to be moved
    // again. This runs in O(n) time.

    // Always choose a random pivot so that an input array which is reverse
    // sorted does not cause O(n^2) running time.
    var pivotIndex = randomIntInRange(p, r);
    var i = p - 1;

    swap(ary, pivotIndex, r);
    var pivot = ary[r];

    // Immediately after `j` is incremented in this loop, the following hold
    // true:
    //
    //   * Every element in `ary[p .. i]` is less than or equal to the pivot.
    //
    //   * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
    for (var j = p; j < r; j++) {
      if (comparator(ary[j], pivot) <= 0) {
        i += 1;
        swap(ary, i, j);
      }
    }

    swap(ary, i + 1, j);
    var q = i + 1;

    // (2) Recurse on each half.

    doQuickSort(ary, comparator, p, q - 1);
    doQuickSort(ary, comparator, q + 1, r);
  }
}

/**
 * Sort the given array in-place with the given comparator function.
 *
 * @param {Array} ary
 *        An array to sort.
 * @param {function} comparator
 *        Function to use to compare two items.
 */
exports.quickSort = function (ary, comparator) {
  doQuickSort(ary, comparator, 0, ary.length - 1);
};


/***/ }),

/***/ "./node_modules/source-map/lib/source-map-consumer.js":
/*!************************************************************!*\
  !*** ./node_modules/source-map/lib/source-map-consumer.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var util = __webpack_require__(/*! ./util */ "./node_modules/source-map/lib/util.js");
var binarySearch = __webpack_require__(/*! ./binary-search */ "./node_modules/source-map/lib/binary-search.js");
var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/source-map/lib/array-set.js").ArraySet;
var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/source-map/lib/base64-vlq.js");
var quickSort = __webpack_require__(/*! ./quick-sort */ "./node_modules/source-map/lib/quick-sort.js").quickSort;

function SourceMapConsumer(aSourceMap, aSourceMapURL) {
  var sourceMap = aSourceMap;
  if (typeof aSourceMap === 'string') {
    sourceMap = util.parseSourceMapInput(aSourceMap);
  }

  return sourceMap.sections != null
    ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)
    : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
}

SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
  return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
}

/**
 * The version of the source mapping spec that we are consuming.
 */
SourceMapConsumer.prototype._version = 3;

// `__generatedMappings` and `__originalMappings` are arrays that hold the
// parsed mapping coordinates from the source map's "mappings" attribute. They
// are lazily instantiated, accessed via the `_generatedMappings` and
// `_originalMappings` getters respectively, and we only parse the mappings
// and create these arrays once queried for a source location. We jump through
// these hoops because there can be many thousands of mappings, and parsing
// them is expensive, so we only want to do it if we must.
//
// Each object in the arrays is of the form:
//
//     {
//       generatedLine: The line number in the generated code,
//       generatedColumn: The column number in the generated code,
//       source: The path to the original source file that generated this
//               chunk of code,
//       originalLine: The line number in the original source that
//                     corresponds to this chunk of generated code,
//       originalColumn: The column number in the original source that
//                       corresponds to this chunk of generated code,
//       name: The name of the original symbol which generated this chunk of
//             code.
//     }
//
// All properties except for `generatedLine` and `generatedColumn` can be
// `null`.
//
// `_generatedMappings` is ordered by the generated positions.
//
// `_originalMappings` is ordered by the original positions.

SourceMapConsumer.prototype.__generatedMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
  configurable: true,
  enumerable: true,
  get: function () {
    if (!this.__generatedMappings) {
      this._parseMappings(this._mappings, this.sourceRoot);
    }

    return this.__generatedMappings;
  }
});

SourceMapConsumer.prototype.__originalMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
  configurable: true,
  enumerable: true,
  get: function () {
    if (!this.__originalMappings) {
      this._parseMappings(this._mappings, this.sourceRoot);
    }

    return this.__originalMappings;
  }
});

SourceMapConsumer.prototype._charIsMappingSeparator =
  function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
    var c = aStr.charAt(index);
    return c === ";" || c === ",";
  };

/**
 * Parse the mappings in a string in to a data structure which we can easily
 * query (the ordered arrays in the `this.__generatedMappings` and
 * `this.__originalMappings` properties).
 */
SourceMapConsumer.prototype._parseMappings =
  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    throw new Error("Subclasses must implement _parseMappings");
  };

SourceMapConsumer.GENERATED_ORDER = 1;
SourceMapConsumer.ORIGINAL_ORDER = 2;

SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
SourceMapConsumer.LEAST_UPPER_BOUND = 2;

/**
 * Iterate over each mapping between an original source/line/column and a
 * generated line/column in this source map.
 *
 * @param Function aCallback
 *        The function that is called with each mapping.
 * @param Object aContext
 *        Optional. If specified, this object will be the value of `this` every
 *        time that `aCallback` is called.
 * @param aOrder
 *        Either `SourceMapConsumer.GENERATED_ORDER` or
 *        `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
 *        iterate over the mappings sorted by the generated file's line/column
 *        order or the original's source/line/column order, respectively. Defaults to
 *        `SourceMapConsumer.GENERATED_ORDER`.
 */
SourceMapConsumer.prototype.eachMapping =
  function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
    var context = aContext || null;
    var order = aOrder || SourceMapConsumer.GENERATED_ORDER;

    var mappings;
    switch (order) {
    case SourceMapConsumer.GENERATED_ORDER:
      mappings = this._generatedMappings;
      break;
    case SourceMapConsumer.ORIGINAL_ORDER:
      mappings = this._originalMappings;
      break;
    default:
      throw new Error("Unknown order of iteration.");
    }

    var sourceRoot = this.sourceRoot;
    mappings.map(function (mapping) {
      var source = mapping.source === null ? null : this._sources.at(mapping.source);
      source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
      return {
        source: source,
        generatedLine: mapping.generatedLine,
        generatedColumn: mapping.generatedColumn,
        originalLine: mapping.originalLine,
        originalColumn: mapping.originalColumn,
        name: mapping.name === null ? null : this._names.at(mapping.name)
      };
    }, this).forEach(aCallback, context);
  };

/**
 * Returns all generated line and column information for the original source,
 * line, and column provided. If no column is provided, returns all mappings
 * corresponding to a either the line we are searching for or the next
 * closest line that has any mappings. Otherwise, returns all mappings
 * corresponding to the given line and either the column we are searching for
 * or the next closest column that has any offsets.
 *
 * The only argument is an object with the following properties:
 *
 *   - source: The filename of the original source.
 *   - line: The line number in the original source.  The line number is 1-based.
 *   - column: Optional. the column number in the original source.
 *    The column number is 0-based.
 *
 * and an array of objects is returned, each with the following properties:
 *
 *   - line: The line number in the generated source, or null.  The
 *    line number is 1-based.
 *   - column: The column number in the generated source, or null.
 *    The column number is 0-based.
 */
SourceMapConsumer.prototype.allGeneratedPositionsFor =
  function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
    var line = util.getArg(aArgs, 'line');

    // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
    // returns the index of the closest mapping less than the needle. By
    // setting needle.originalColumn to 0, we thus find the last mapping for
    // the given line, provided such a mapping exists.
    var needle = {
      source: util.getArg(aArgs, 'source'),
      originalLine: line,
      originalColumn: util.getArg(aArgs, 'column', 0)
    };

    needle.source = this._findSourceIndex(needle.source);
    if (needle.source < 0) {
      return [];
    }

    var mappings = [];

    var index = this._findMapping(needle,
                                  this._originalMappings,
                                  "originalLine",
                                  "originalColumn",
                                  util.compareByOriginalPositions,
                                  binarySearch.LEAST_UPPER_BOUND);
    if (index >= 0) {
      var mapping = this._originalMappings[index];

      if (aArgs.column === undefined) {
        var originalLine = mapping.originalLine;

        // Iterate until either we run out of mappings, or we run into
        // a mapping for a different line than the one we found. Since
        // mappings are sorted, this is guaranteed to find all mappings for
        // the line we found.
        while (mapping && mapping.originalLine === originalLine) {
          mappings.push({
            line: util.getArg(mapping, 'generatedLine', null),
            column: util.getArg(mapping, 'generatedColumn', null),
            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
          });

          mapping = this._originalMappings[++index];
        }
      } else {
        var originalColumn = mapping.originalColumn;

        // Iterate until either we run out of mappings, or we run into
        // a mapping for a different line than the one we were searching for.
        // Since mappings are sorted, this is guaranteed to find all mappings for
        // the line we are searching for.
        while (mapping &&
               mapping.originalLine === line &&
               mapping.originalColumn == originalColumn) {
          mappings.push({
            line: util.getArg(mapping, 'generatedLine', null),
            column: util.getArg(mapping, 'generatedColumn', null),
            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
          });

          mapping = this._originalMappings[++index];
        }
      }
    }

    return mappings;
  };

exports.SourceMapConsumer = SourceMapConsumer;

/**
 * A BasicSourceMapConsumer instance represents a parsed source map which we can
 * query for information about the original file positions by giving it a file
 * position in the generated source.
 *
 * The first parameter is the raw source map (either as a JSON string, or
 * already parsed to an object). According to the spec, source maps have the
 * following attributes:
 *
 *   - version: Which version of the source map spec this map is following.
 *   - sources: An array of URLs to the original source files.
 *   - names: An array of identifiers which can be referrenced by individual mappings.
 *   - sourceRoot: Optional. The URL root from which all sources are relative.
 *   - sourcesContent: Optional. An array of contents of the original source files.
 *   - mappings: A string of base64 VLQs which contain the actual mappings.
 *   - file: Optional. The generated file this source map is associated with.
 *
 * Here is an example source map, taken from the source map spec[0]:
 *
 *     {
 *       version : 3,
 *       file: "out.js",
 *       sourceRoot : "",
 *       sources: ["foo.js", "bar.js"],
 *       names: ["src", "maps", "are", "fun"],
 *       mappings: "AA,AB;;ABCDE;"
 *     }
 *
 * The second parameter, if given, is a string whose value is the URL
 * at which the source map was found.  This URL is used to compute the
 * sources array.
 *
 * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
 */
function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
  var sourceMap = aSourceMap;
  if (typeof aSourceMap === 'string') {
    sourceMap = util.parseSourceMapInput(aSourceMap);
  }

  var version = util.getArg(sourceMap, 'version');
  var sources = util.getArg(sourceMap, 'sources');
  // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
  // requires the array) to play nice here.
  var names = util.getArg(sourceMap, 'names', []);
  var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
  var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
  var mappings = util.getArg(sourceMap, 'mappings');
  var file = util.getArg(sourceMap, 'file', null);

  // Once again, Sass deviates from the spec and supplies the version as a
  // string rather than a number, so we use loose equality checking here.
  if (version != this._version) {
    throw new Error('Unsupported version: ' + version);
  }

  if (sourceRoot) {
    sourceRoot = util.normalize(sourceRoot);
  }

  sources = sources
    .map(String)
    // Some source maps produce relative source paths like "./foo.js" instead of
    // "foo.js".  Normalize these first so that future comparisons will succeed.
    // See bugzil.la/1090768.
    .map(util.normalize)
    // Always ensure that absolute sources are internally stored relative to
    // the source root, if the source root is absolute. Not doing this would
    // be particularly problematic when the source root is a prefix of the
    // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
    .map(function (source) {
      return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
        ? util.relative(sourceRoot, source)
        : source;
    });

  // Pass `true` below to allow duplicate names and sources. While source maps
  // are intended to be compressed and deduplicated, the TypeScript compiler
  // sometimes generates source maps with duplicates in them. See Github issue
  // #72 and bugzil.la/889492.
  this._names = ArraySet.fromArray(names.map(String), true);
  this._sources = ArraySet.fromArray(sources, true);

  this._absoluteSources = this._sources.toArray().map(function (s) {
    return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
  });

  this.sourceRoot = sourceRoot;
  this.sourcesContent = sourcesContent;
  this._mappings = mappings;
  this._sourceMapURL = aSourceMapURL;
  this.file = file;
}

BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;

/**
 * Utility function to find the index of a source.  Returns -1 if not
 * found.
 */
BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
  var relativeSource = aSource;
  if (this.sourceRoot != null) {
    relativeSource = util.relative(this.sourceRoot, relativeSource);
  }

  if (this._sources.has(relativeSource)) {
    return this._sources.indexOf(relativeSource);
  }

  // Maybe aSource is an absolute URL as returned by |sources|.  In
  // this case we can't simply undo the transform.
  var i;
  for (i = 0; i < this._absoluteSources.length; ++i) {
    if (this._absoluteSources[i] == aSource) {
      return i;
    }
  }

  return -1;
};

/**
 * Create a BasicSourceMapConsumer from a SourceMapGenerator.
 *
 * @param SourceMapGenerator aSourceMap
 *        The source map that will be consumed.
 * @param String aSourceMapURL
 *        The URL at which the source map can be found (optional)
 * @returns BasicSourceMapConsumer
 */
BasicSourceMapConsumer.fromSourceMap =
  function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
    var smc = Object.create(BasicSourceMapConsumer.prototype);

    var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
    var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
    smc.sourceRoot = aSourceMap._sourceRoot;
    smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
                                                            smc.sourceRoot);
    smc.file = aSourceMap._file;
    smc._sourceMapURL = aSourceMapURL;
    smc._absoluteSources = smc._sources.toArray().map(function (s) {
      return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
    });

    // Because we are modifying the entries (by converting string sources and
    // names to indices into the sources and names ArraySets), we have to make
    // a copy of the entry or else bad things happen. Shared mutable state
    // strikes again! See github issue #191.

    var generatedMappings = aSourceMap._mappings.toArray().slice();
    var destGeneratedMappings = smc.__generatedMappings = [];
    var destOriginalMappings = smc.__originalMappings = [];

    for (var i = 0, length = generatedMappings.length; i < length; i++) {
      var srcMapping = generatedMappings[i];
      var destMapping = new Mapping;
      destMapping.generatedLine = srcMapping.generatedLine;
      destMapping.generatedColumn = srcMapping.generatedColumn;

      if (srcMapping.source) {
        destMapping.source = sources.indexOf(srcMapping.source);
        destMapping.originalLine = srcMapping.originalLine;
        destMapping.originalColumn = srcMapping.originalColumn;

        if (srcMapping.name) {
          destMapping.name = names.indexOf(srcMapping.name);
        }

        destOriginalMappings.push(destMapping);
      }

      destGeneratedMappings.push(destMapping);
    }

    quickSort(smc.__originalMappings, util.compareByOriginalPositions);

    return smc;
  };

/**
 * The version of the source mapping spec that we are consuming.
 */
BasicSourceMapConsumer.prototype._version = 3;

/**
 * The list of original sources.
 */
Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  get: function () {
    return this._absoluteSources.slice();
  }
});

/**
 * Provide the JIT with a nice shape / hidden class.
 */
function Mapping() {
  this.generatedLine = 0;
  this.generatedColumn = 0;
  this.source = null;
  this.originalLine = null;
  this.originalColumn = null;
  this.name = null;
}

/**
 * Parse the mappings in a string in to a data structure which we can easily
 * query (the ordered arrays in the `this.__generatedMappings` and
 * `this.__originalMappings` properties).
 */
BasicSourceMapConsumer.prototype._parseMappings =
  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    var generatedLine = 1;
    var previousGeneratedColumn = 0;
    var previousOriginalLine = 0;
    var previousOriginalColumn = 0;
    var previousSource = 0;
    var previousName = 0;
    var length = aStr.length;
    var index = 0;
    var cachedSegments = {};
    var temp = {};
    var originalMappings = [];
    var generatedMappings = [];
    var mapping, str, segment, end, value;

    while (index < length) {
      if (aStr.charAt(index) === ';') {
        generatedLine++;
        index++;
        previousGeneratedColumn = 0;
      }
      else if (aStr.charAt(index) === ',') {
        index++;
      }
      else {
        mapping = new Mapping();
        mapping.generatedLine = generatedLine;

        // Because each offset is encoded relative to the previous one,
        // many segments often have the same encoding. We can exploit this
        // fact by caching the parsed variable length fields of each segment,
        // allowing us to avoid a second parse if we encounter the same
        // segment again.
        for (end = index; end < length; end++) {
          if (this._charIsMappingSeparator(aStr, end)) {
            break;
          }
        }
        str = aStr.slice(index, end);

        segment = cachedSegments[str];
        if (segment) {
          index += str.length;
        } else {
          segment = [];
          while (index < end) {
            base64VLQ.decode(aStr, index, temp);
            value = temp.value;
            index = temp.rest;
            segment.push(value);
          }

          if (segment.length === 2) {
            throw new Error('Found a source, but no line and column');
          }

          if (segment.length === 3) {
            throw new Error('Found a source and line, but no column');
          }

          cachedSegments[str] = segment;
        }

        // Generated column.
        mapping.generatedColumn = previousGeneratedColumn + segment[0];
        previousGeneratedColumn = mapping.generatedColumn;

        if (segment.length > 1) {
          // Original source.
          mapping.source = previousSource + segment[1];
          previousSource += segment[1];

          // Original line.
          mapping.originalLine = previousOriginalLine + segment[2];
          previousOriginalLine = mapping.originalLine;
          // Lines are stored 0-based
          mapping.originalLine += 1;

          // Original column.
          mapping.originalColumn = previousOriginalColumn + segment[3];
          previousOriginalColumn = mapping.originalColumn;

          if (segment.length > 4) {
            // Original name.
            mapping.name = previousName + segment[4];
            previousName += segment[4];
          }
        }

        generatedMappings.push(mapping);
        if (typeof mapping.originalLine === 'number') {
          originalMappings.push(mapping);
        }
      }
    }

    quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
    this.__generatedMappings = generatedMappings;

    quickSort(originalMappings, util.compareByOriginalPositions);
    this.__originalMappings = originalMappings;
  };

/**
 * Find the mapping that best matches the hypothetical "needle" mapping that
 * we are searching for in the given "haystack" of mappings.
 */
BasicSourceMapConsumer.prototype._findMapping =
  function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
                                         aColumnName, aComparator, aBias) {
    // To return the position we are searching for, we must first find the
    // mapping for the given position and then return the opposite position it
    // points to. Because the mappings are sorted, we can use binary search to
    // find the best mapping.

    if (aNeedle[aLineName] <= 0) {
      throw new TypeError('Line must be greater than or equal to 1, got '
                          + aNeedle[aLineName]);
    }
    if (aNeedle[aColumnName] < 0) {
      throw new TypeError('Column must be greater than or equal to 0, got '
                          + aNeedle[aColumnName]);
    }

    return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  };

/**
 * Compute the last column for each generated mapping. The last column is
 * inclusive.
 */
BasicSourceMapConsumer.prototype.computeColumnSpans =
  function SourceMapConsumer_computeColumnSpans() {
    for (var index = 0; index < this._generatedMappings.length; ++index) {
      var mapping = this._generatedMappings[index];

      // Mappings do not contain a field for the last generated columnt. We
      // can come up with an optimistic estimate, however, by assuming that
      // mappings are contiguous (i.e. given two consecutive mappings, the
      // first mapping ends where the second one starts).
      if (index + 1 < this._generatedMappings.length) {
        var nextMapping = this._generatedMappings[index + 1];

        if (mapping.generatedLine === nextMapping.generatedLine) {
          mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
          continue;
        }
      }

      // The last mapping for each line spans the entire line.
      mapping.lastGeneratedColumn = Infinity;
    }
  };

/**
 * Returns the original source, line, and column information for the generated
 * source's line and column positions provided. The only argument is an object
 * with the following properties:
 *
 *   - line: The line number in the generated source.  The line number
 *     is 1-based.
 *   - column: The column number in the generated source.  The column
 *     number is 0-based.
 *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
 *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
 *     closest element that is smaller than or greater than the one we are
 *     searching for, respectively, if the exact element cannot be found.
 *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
 *
 * and an object is returned with the following properties:
 *
 *   - source: The original source file, or null.
 *   - line: The line number in the original source, or null.  The
 *     line number is 1-based.
 *   - column: The column number in the original source, or null.  The
 *     column number is 0-based.
 *   - name: The original identifier, or null.
 */
BasicSourceMapConsumer.prototype.originalPositionFor =
  function SourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util.getArg(aArgs, 'line'),
      generatedColumn: util.getArg(aArgs, 'column')
    };

    var index = this._findMapping(
      needle,
      this._generatedMappings,
      "generatedLine",
      "generatedColumn",
      util.compareByGeneratedPositionsDeflated,
      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
    );

    if (index >= 0) {
      var mapping = this._generatedMappings[index];

      if (mapping.generatedLine === needle.generatedLine) {
        var source = util.getArg(mapping, 'source', null);
        if (source !== null) {
          source = this._sources.at(source);
          source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
        }
        var name = util.getArg(mapping, 'name', null);
        if (name !== null) {
          name = this._names.at(name);
        }
        return {
          source: source,
          line: util.getArg(mapping, 'originalLine', null),
          column: util.getArg(mapping, 'originalColumn', null),
          name: name
        };
      }
    }

    return {
      source: null,
      line: null,
      column: null,
      name: null
    };
  };

/**
 * Return true if we have the source content for every source in the source
 * map, false otherwise.
 */
BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
  function BasicSourceMapConsumer_hasContentsOfAllSources() {
    if (!this.sourcesContent) {
      return false;
    }
    return this.sourcesContent.length >= this._sources.size() &&
      !this.sourcesContent.some(function (sc) { return sc == null; });
  };

/**
 * Returns the original source content. The only argument is the url of the
 * original source file. Returns null if no original source content is
 * available.
 */
BasicSourceMapConsumer.prototype.sourceContentFor =
  function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    if (!this.sourcesContent) {
      return null;
    }

    var index = this._findSourceIndex(aSource);
    if (index >= 0) {
      return this.sourcesContent[index];
    }

    var relativeSource = aSource;
    if (this.sourceRoot != null) {
      relativeSource = util.relative(this.sourceRoot, relativeSource);
    }

    var url;
    if (this.sourceRoot != null
        && (url = util.urlParse(this.sourceRoot))) {
      // XXX: file:// URIs and absolute paths lead to unexpected behavior for
      // many users. We can help them out when they expect file:// URIs to
      // behave like it would if they were running a local HTTP server. See
      // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
      var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
      if (url.scheme == "file"
          && this._sources.has(fileUriAbsPath)) {
        return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
      }

      if ((!url.path || url.path == "/")
          && this._sources.has("/" + relativeSource)) {
        return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
      }
    }

    // This function is used recursively from
    // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
    // don't want to throw if we can't find the source - we just want to
    // return null, so we provide a flag to exit gracefully.
    if (nullOnMissing) {
      return null;
    }
    else {
      throw new Error('"' + relativeSource + '" is not in the SourceMap.');
    }
  };

/**
 * Returns the generated line and column information for the original source,
 * line, and column positions provided. The only argument is an object with
 * the following properties:
 *
 *   - source: The filename of the original source.
 *   - line: The line number in the original source.  The line number
 *     is 1-based.
 *   - column: The column number in the original source.  The column
 *     number is 0-based.
 *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
 *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
 *     closest element that is smaller than or greater than the one we are
 *     searching for, respectively, if the exact element cannot be found.
 *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
 *
 * and an object is returned with the following properties:
 *
 *   - line: The line number in the generated source, or null.  The
 *     line number is 1-based.
 *   - column: The column number in the generated source, or null.
 *     The column number is 0-based.
 */
BasicSourceMapConsumer.prototype.generatedPositionFor =
  function SourceMapConsumer_generatedPositionFor(aArgs) {
    var source = util.getArg(aArgs, 'source');
    source = this._findSourceIndex(source);
    if (source < 0) {
      return {
        line: null,
        column: null,
        lastColumn: null
      };
    }

    var needle = {
      source: source,
      originalLine: util.getArg(aArgs, 'line'),
      originalColumn: util.getArg(aArgs, 'column')
    };

    var index = this._findMapping(
      needle,
      this._originalMappings,
      "originalLine",
      "originalColumn",
      util.compareByOriginalPositions,
      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
    );

    if (index >= 0) {
      var mapping = this._originalMappings[index];

      if (mapping.source === needle.source) {
        return {
          line: util.getArg(mapping, 'generatedLine', null),
          column: util.getArg(mapping, 'generatedColumn', null),
          lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
        };
      }
    }

    return {
      line: null,
      column: null,
      lastColumn: null
    };
  };

exports.BasicSourceMapConsumer = BasicSourceMapConsumer;

/**
 * An IndexedSourceMapConsumer instance represents a parsed source map which
 * we can query for information. It differs from BasicSourceMapConsumer in
 * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
 * input.
 *
 * The first parameter is a raw source map (either as a JSON string, or already
 * parsed to an object). According to the spec for indexed source maps, they
 * have the following attributes:
 *
 *   - version: Which version of the source map spec this map is following.
 *   - file: Optional. The generated file this source map is associated with.
 *   - sections: A list of section definitions.
 *
 * Each value under the "sections" field has two fields:
 *   - offset: The offset into the original specified at which this section
 *       begins to apply, defined as an object with a "line" and "column"
 *       field.
 *   - map: A source map definition. This source map could also be indexed,
 *       but doesn't have to be.
 *
 * Instead of the "map" field, it's also possible to have a "url" field
 * specifying a URL to retrieve a source map from, but that's currently
 * unsupported.
 *
 * Here's an example source map, taken from the source map spec[0], but
 * modified to omit a section which uses the "url" field.
 *
 *  {
 *    version : 3,
 *    file: "app.js",
 *    sections: [{
 *      offset: {line:100, column:10},
 *      map: {
 *        version : 3,
 *        file: "section.js",
 *        sources: ["foo.js", "bar.js"],
 *        names: ["src", "maps", "are", "fun"],
 *        mappings: "AAAA,E;;ABCDE;"
 *      }
 *    }],
 *  }
 *
 * The second parameter, if given, is a string whose value is the URL
 * at which the source map was found.  This URL is used to compute the
 * sources array.
 *
 * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
 */
function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
  var sourceMap = aSourceMap;
  if (typeof aSourceMap === 'string') {
    sourceMap = util.parseSourceMapInput(aSourceMap);
  }

  var version = util.getArg(sourceMap, 'version');
  var sections = util.getArg(sourceMap, 'sections');

  if (version != this._version) {
    throw new Error('Unsupported version: ' + version);
  }

  this._sources = new ArraySet();
  this._names = new ArraySet();

  var lastOffset = {
    line: -1,
    column: 0
  };
  this._sections = sections.map(function (s) {
    if (s.url) {
      // The url field will require support for asynchronicity.
      // See https://github.com/mozilla/source-map/issues/16
      throw new Error('Support for url field in sections not implemented.');
    }
    var offset = util.getArg(s, 'offset');
    var offsetLine = util.getArg(offset, 'line');
    var offsetColumn = util.getArg(offset, 'column');

    if (offsetLine < lastOffset.line ||
        (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
      throw new Error('Section offsets must be ordered and non-overlapping.');
    }
    lastOffset = offset;

    return {
      generatedOffset: {
        // The offset fields are 0-based, but we use 1-based indices when
        // encoding/decoding from VLQ.
        generatedLine: offsetLine + 1,
        generatedColumn: offsetColumn + 1
      },
      consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)
    }
  });
}

IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;

/**
 * The version of the source mapping spec that we are consuming.
 */
IndexedSourceMapConsumer.prototype._version = 3;

/**
 * The list of original sources.
 */
Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  get: function () {
    var sources = [];
    for (var i = 0; i < this._sections.length; i++) {
      for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
        sources.push(this._sections[i].consumer.sources[j]);
      }
    }
    return sources;
  }
});

/**
 * Returns the original source, line, and column information for the generated
 * source's line and column positions provided. The only argument is an object
 * with the following properties:
 *
 *   - line: The line number in the generated source.  The line number
 *     is 1-based.
 *   - column: The column number in the generated source.  The column
 *     number is 0-based.
 *
 * and an object is returned with the following properties:
 *
 *   - source: The original source file, or null.
 *   - line: The line number in the original source, or null.  The
 *     line number is 1-based.
 *   - column: The column number in the original source, or null.  The
 *     column number is 0-based.
 *   - name: The original identifier, or null.
 */
IndexedSourceMapConsumer.prototype.originalPositionFor =
  function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util.getArg(aArgs, 'line'),
      generatedColumn: util.getArg(aArgs, 'column')
    };

    // Find the section containing the generated position we're trying to map
    // to an original position.
    var sectionIndex = binarySearch.search(needle, this._sections,
      function(needle, section) {
        var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
        if (cmp) {
          return cmp;
        }

        return (needle.generatedColumn -
                section.generatedOffset.generatedColumn);
      });
    var section = this._sections[sectionIndex];

    if (!section) {
      return {
        source: null,
        line: null,
        column: null,
        name: null
      };
    }

    return section.consumer.originalPositionFor({
      line: needle.generatedLine -
        (section.generatedOffset.generatedLine - 1),
      column: needle.generatedColumn -
        (section.generatedOffset.generatedLine === needle.generatedLine
         ? section.generatedOffset.generatedColumn - 1
         : 0),
      bias: aArgs.bias
    });
  };

/**
 * Return true if we have the source content for every source in the source
 * map, false otherwise.
 */
IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
  function IndexedSourceMapConsumer_hasContentsOfAllSources() {
    return this._sections.every(function (s) {
      return s.consumer.hasContentsOfAllSources();
    });
  };

/**
 * Returns the original source content. The only argument is the url of the
 * original source file. Returns null if no original source content is
 * available.
 */
IndexedSourceMapConsumer.prototype.sourceContentFor =
  function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];

      var content = section.consumer.sourceContentFor(aSource, true);
      if (content) {
        return content;
      }
    }
    if (nullOnMissing) {
      return null;
    }
    else {
      throw new Error('"' + aSource + '" is not in the SourceMap.');
    }
  };

/**
 * Returns the generated line and column information for the original source,
 * line, and column positions provided. The only argument is an object with
 * the following properties:
 *
 *   - source: The filename of the original source.
 *   - line: The line number in the original source.  The line number
 *     is 1-based.
 *   - column: The column number in the original source.  The column
 *     number is 0-based.
 *
 * and an object is returned with the following properties:
 *
 *   - line: The line number in the generated source, or null.  The
 *     line number is 1-based. 
 *   - column: The column number in the generated source, or null.
 *     The column number is 0-based.
 */
IndexedSourceMapConsumer.prototype.generatedPositionFor =
  function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];

      // Only consider this section if the requested source is in the list of
      // sources of the consumer.
      if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {
        continue;
      }
      var generatedPosition = section.consumer.generatedPositionFor(aArgs);
      if (generatedPosition) {
        var ret = {
          line: generatedPosition.line +
            (section.generatedOffset.generatedLine - 1),
          column: generatedPosition.column +
            (section.generatedOffset.generatedLine === generatedPosition.line
             ? section.generatedOffset.generatedColumn - 1
             : 0)
        };
        return ret;
      }
    }

    return {
      line: null,
      column: null
    };
  };

/**
 * Parse the mappings in a string in to a data structure which we can easily
 * query (the ordered arrays in the `this.__generatedMappings` and
 * `this.__originalMappings` properties).
 */
IndexedSourceMapConsumer.prototype._parseMappings =
  function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    this.__generatedMappings = [];
    this.__originalMappings = [];
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];
      var sectionMappings = section.consumer._generatedMappings;
      for (var j = 0; j < sectionMappings.length; j++) {
        var mapping = sectionMappings[j];

        var source = section.consumer._sources.at(mapping.source);
        source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
        this._sources.add(source);
        source = this._sources.indexOf(source);

        var name = null;
        if (mapping.name) {
          name = section.consumer._names.at(mapping.name);
          this._names.add(name);
          name = this._names.indexOf(name);
        }

        // The mappings coming from the consumer for the section have
        // generated positions relative to the start of the section, so we
        // need to offset them to be relative to the start of the concatenated
        // generated file.
        var adjustedMapping = {
          source: source,
          generatedLine: mapping.generatedLine +
            (section.generatedOffset.generatedLine - 1),
          generatedColumn: mapping.generatedColumn +
            (section.generatedOffset.generatedLine === mapping.generatedLine
            ? section.generatedOffset.generatedColumn - 1
            : 0),
          originalLine: mapping.originalLine,
          originalColumn: mapping.originalColumn,
          name: name
        };

        this.__generatedMappings.push(adjustedMapping);
        if (typeof adjustedMapping.originalLine === 'number') {
          this.__originalMappings.push(adjustedMapping);
        }
      }
    }

    quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
    quickSort(this.__originalMappings, util.compareByOriginalPositions);
  };

exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;


/***/ }),

/***/ "./node_modules/source-map/lib/source-map-generator.js":
/*!*************************************************************!*\
  !*** ./node_modules/source-map/lib/source-map-generator.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var base64VLQ = __webpack_require__(/*! ./base64-vlq */ "./node_modules/source-map/lib/base64-vlq.js");
var util = __webpack_require__(/*! ./util */ "./node_modules/source-map/lib/util.js");
var ArraySet = __webpack_require__(/*! ./array-set */ "./node_modules/source-map/lib/array-set.js").ArraySet;
var MappingList = __webpack_require__(/*! ./mapping-list */ "./node_modules/source-map/lib/mapping-list.js").MappingList;

/**
 * An instance of the SourceMapGenerator represents a source map which is
 * being built incrementally. You may pass an object with the following
 * properties:
 *
 *   - file: The filename of the generated source.
 *   - sourceRoot: A root for all relative URLs in this source map.
 */
function SourceMapGenerator(aArgs) {
  if (!aArgs) {
    aArgs = {};
  }
  this._file = util.getArg(aArgs, 'file', null);
  this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  this._sources = new ArraySet();
  this._names = new ArraySet();
  this._mappings = new MappingList();
  this._sourcesContents = null;
}

SourceMapGenerator.prototype._version = 3;

/**
 * Creates a new SourceMapGenerator based on a SourceMapConsumer
 *
 * @param aSourceMapConsumer The SourceMap.
 */
SourceMapGenerator.fromSourceMap =
  function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
    var sourceRoot = aSourceMapConsumer.sourceRoot;
    var generator = new SourceMapGenerator({
      file: aSourceMapConsumer.file,
      sourceRoot: sourceRoot
    });
    aSourceMapConsumer.eachMapping(function (mapping) {
      var newMapping = {
        generated: {
          line: mapping.generatedLine,
          column: mapping.generatedColumn
        }
      };

      if (mapping.source != null) {
        newMapping.source = mapping.source;
        if (sourceRoot != null) {
          newMapping.source = util.relative(sourceRoot, newMapping.source);
        }

        newMapping.original = {
          line: mapping.originalLine,
          column: mapping.originalColumn
        };

        if (mapping.name != null) {
          newMapping.name = mapping.name;
        }
      }

      generator.addMapping(newMapping);
    });
    aSourceMapConsumer.sources.forEach(function (sourceFile) {
      var sourceRelative = sourceFile;
      if (sourceRoot !== null) {
        sourceRelative = util.relative(sourceRoot, sourceFile);
      }

      if (!generator._sources.has(sourceRelative)) {
        generator._sources.add(sourceRelative);
      }

      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        generator.setSourceContent(sourceFile, content);
      }
    });
    return generator;
  };

/**
 * Add a single mapping from original source line and column to the generated
 * source's line and column for this source map being created. The mapping
 * object should have the following properties:
 *
 *   - generated: An object with the generated line and column positions.
 *   - original: An object with the original line and column positions.
 *   - source: The original source file (relative to the sourceRoot).
 *   - name: An optional original token name for this mapping.
 */
SourceMapGenerator.prototype.addMapping =
  function SourceMapGenerator_addMapping(aArgs) {
    var generated = util.getArg(aArgs, 'generated');
    var original = util.getArg(aArgs, 'original', null);
    var source = util.getArg(aArgs, 'source', null);
    var name = util.getArg(aArgs, 'name', null);

    if (!this._skipValidation) {
      this._validateMapping(generated, original, source, name);
    }

    if (source != null) {
      source = String(source);
      if (!this._sources.has(source)) {
        this._sources.add(source);
      }
    }

    if (name != null) {
      name = String(name);
      if (!this._names.has(name)) {
        this._names.add(name);
      }
    }

    this._mappings.add({
      generatedLine: generated.line,
      generatedColumn: generated.column,
      originalLine: original != null && original.line,
      originalColumn: original != null && original.column,
      source: source,
      name: name
    });
  };

/**
 * Set the source content for a source file.
 */
SourceMapGenerator.prototype.setSourceContent =
  function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
    var source = aSourceFile;
    if (this._sourceRoot != null) {
      source = util.relative(this._sourceRoot, source);
    }

    if (aSourceContent != null) {
      // Add the source content to the _sourcesContents map.
      // Create a new _sourcesContents map if the property is null.
      if (!this._sourcesContents) {
        this._sourcesContents = Object.create(null);
      }
      this._sourcesContents[util.toSetString(source)] = aSourceContent;
    } else if (this._sourcesContents) {
      // Remove the source file from the _sourcesContents map.
      // If the _sourcesContents map is empty, set the property to null.
      delete this._sourcesContents[util.toSetString(source)];
      if (Object.keys(this._sourcesContents).length === 0) {
        this._sourcesContents = null;
      }
    }
  };

/**
 * Applies the mappings of a sub-source-map for a specific source file to the
 * source map being generated. Each mapping to the supplied source file is
 * rewritten using the supplied source map. Note: The resolution for the
 * resulting mappings is the minimium of this map and the supplied map.
 *
 * @param aSourceMapConsumer The source map to be applied.
 * @param aSourceFile Optional. The filename of the source file.
 *        If omitted, SourceMapConsumer's file property will be used.
 * @param aSourceMapPath Optional. The dirname of the path to the source map
 *        to be applied. If relative, it is relative to the SourceMapConsumer.
 *        This parameter is needed when the two source maps aren't in the same
 *        directory, and the source map to be applied contains relative source
 *        paths. If so, those relative source paths need to be rewritten
 *        relative to the SourceMapGenerator.
 */
SourceMapGenerator.prototype.applySourceMap =
  function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
    var sourceFile = aSourceFile;
    // If aSourceFile is omitted, we will use the file property of the SourceMap
    if (aSourceFile == null) {
      if (aSourceMapConsumer.file == null) {
        throw new Error(
          'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
          'or the source map\'s "file" property. Both were omitted.'
        );
      }
      sourceFile = aSourceMapConsumer.file;
    }
    var sourceRoot = this._sourceRoot;
    // Make "sourceFile" relative if an absolute Url is passed.
    if (sourceRoot != null) {
      sourceFile = util.relative(sourceRoot, sourceFile);
    }
    // Applying the SourceMap can add and remove items from the sources and
    // the names array.
    var newSources = new ArraySet();
    var newNames = new ArraySet();

    // Find mappings for the "sourceFile"
    this._mappings.unsortedForEach(function (mapping) {
      if (mapping.source === sourceFile && mapping.originalLine != null) {
        // Check if it can be mapped by the source map, then update the mapping.
        var original = aSourceMapConsumer.originalPositionFor({
          line: mapping.originalLine,
          column: mapping.originalColumn
        });
        if (original.source != null) {
          // Copy mapping
          mapping.source = original.source;
          if (aSourceMapPath != null) {
            mapping.source = util.join(aSourceMapPath, mapping.source)
          }
          if (sourceRoot != null) {
            mapping.source = util.relative(sourceRoot, mapping.source);
          }
          mapping.originalLine = original.line;
          mapping.originalColumn = original.column;
          if (original.name != null) {
            mapping.name = original.name;
          }
        }
      }

      var source = mapping.source;
      if (source != null && !newSources.has(source)) {
        newSources.add(source);
      }

      var name = mapping.name;
      if (name != null && !newNames.has(name)) {
        newNames.add(name);
      }

    }, this);
    this._sources = newSources;
    this._names = newNames;

    // Copy sourcesContents of applied map.
    aSourceMapConsumer.sources.forEach(function (sourceFile) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        if (aSourceMapPath != null) {
          sourceFile = util.join(aSourceMapPath, sourceFile);
        }
        if (sourceRoot != null) {
          sourceFile = util.relative(sourceRoot, sourceFile);
        }
        this.setSourceContent(sourceFile, content);
      }
    }, this);
  };

/**
 * A mapping can have one of the three levels of data:
 *
 *   1. Just the generated position.
 *   2. The Generated position, original position, and original source.
 *   3. Generated and original position, original source, as well as a name
 *      token.
 *
 * To maintain consistency, we validate that any new mapping being added falls
 * in to one of these categories.
 */
SourceMapGenerator.prototype._validateMapping =
  function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
                                              aName) {
    // When aOriginal is truthy but has empty values for .line and .column,
    // it is most likely a programmer error. In this case we throw a very
    // specific error message to try to guide them the right way.
    // For example: https://github.com/Polymer/polymer-bundler/pull/519
    if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
        throw new Error(
            'original.line and original.column are not numbers -- you probably meant to omit ' +
            'the original mapping entirely and only map the generated position. If so, pass ' +
            'null for the original mapping instead of an object with empty or null values.'
        );
    }

    if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
        && aGenerated.line > 0 && aGenerated.column >= 0
        && !aOriginal && !aSource && !aName) {
      // Case 1.
      return;
    }
    else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
             && aOriginal && 'line' in aOriginal && 'column' in aOriginal
             && aGenerated.line > 0 && aGenerated.column >= 0
             && aOriginal.line > 0 && aOriginal.column >= 0
             && aSource) {
      // Cases 2 and 3.
      return;
    }
    else {
      throw new Error('Invalid mapping: ' + JSON.stringify({
        generated: aGenerated,
        source: aSource,
        original: aOriginal,
        name: aName
      }));
    }
  };

/**
 * Serialize the accumulated mappings in to the stream of base 64 VLQs
 * specified by the source map format.
 */
SourceMapGenerator.prototype._serializeMappings =
  function SourceMapGenerator_serializeMappings() {
    var previousGeneratedColumn = 0;
    var previousGeneratedLine = 1;
    var previousOriginalColumn = 0;
    var previousOriginalLine = 0;
    var previousName = 0;
    var previousSource = 0;
    var result = '';
    var next;
    var mapping;
    var nameIdx;
    var sourceIdx;

    var mappings = this._mappings.toArray();
    for (var i = 0, len = mappings.length; i < len; i++) {
      mapping = mappings[i];
      next = ''

      if (mapping.generatedLine !== previousGeneratedLine) {
        previousGeneratedColumn = 0;
        while (mapping.generatedLine !== previousGeneratedLine) {
          next += ';';
          previousGeneratedLine++;
        }
      }
      else {
        if (i > 0) {
          if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
            continue;
          }
          next += ',';
        }
      }

      next += base64VLQ.encode(mapping.generatedColumn
                                 - previousGeneratedColumn);
      previousGeneratedColumn = mapping.generatedColumn;

      if (mapping.source != null) {
        sourceIdx = this._sources.indexOf(mapping.source);
        next += base64VLQ.encode(sourceIdx - previousSource);
        previousSource = sourceIdx;

        // lines are stored 0-based in SourceMap spec version 3
        next += base64VLQ.encode(mapping.originalLine - 1
                                   - previousOriginalLine);
        previousOriginalLine = mapping.originalLine - 1;

        next += base64VLQ.encode(mapping.originalColumn
                                   - previousOriginalColumn);
        previousOriginalColumn = mapping.originalColumn;

        if (mapping.name != null) {
          nameIdx = this._names.indexOf(mapping.name);
          next += base64VLQ.encode(nameIdx - previousName);
          previousName = nameIdx;
        }
      }

      result += next;
    }

    return result;
  };

SourceMapGenerator.prototype._generateSourcesContent =
  function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
    return aSources.map(function (source) {
      if (!this._sourcesContents) {
        return null;
      }
      if (aSourceRoot != null) {
        source = util.relative(aSourceRoot, source);
      }
      var key = util.toSetString(source);
      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
        ? this._sourcesContents[key]
        : null;
    }, this);
  };

/**
 * Externalize the source map.
 */
SourceMapGenerator.prototype.toJSON =
  function SourceMapGenerator_toJSON() {
    var map = {
      version: this._version,
      sources: this._sources.toArray(),
      names: this._names.toArray(),
      mappings: this._serializeMappings()
    };
    if (this._file != null) {
      map.file = this._file;
    }
    if (this._sourceRoot != null) {
      map.sourceRoot = this._sourceRoot;
    }
    if (this._sourcesContents) {
      map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
    }

    return map;
  };

/**
 * Render the source map being generated to a string.
 */
SourceMapGenerator.prototype.toString =
  function SourceMapGenerator_toString() {
    return JSON.stringify(this.toJSON());
  };

exports.SourceMapGenerator = SourceMapGenerator;


/***/ }),

/***/ "./node_modules/source-map/lib/source-node.js":
/*!****************************************************!*\
  !*** ./node_modules/source-map/lib/source-node.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

var SourceMapGenerator = __webpack_require__(/*! ./source-map-generator */ "./node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
var util = __webpack_require__(/*! ./util */ "./node_modules/source-map/lib/util.js");

// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).
var REGEX_NEWLINE = /(\r?\n)/;

// Newline character code for charCodeAt() comparisons
var NEWLINE_CODE = 10;

// Private symbol for identifying `SourceNode`s when multiple versions of
// the source-map library are loaded. This MUST NOT CHANGE across
// versions!
var isSourceNode = "$$$isSourceNode$$$";

/**
 * SourceNodes provide a way to abstract over interpolating/concatenating
 * snippets of generated JavaScript source code while maintaining the line and
 * column information associated with the original source code.
 *
 * @param aLine The original line number.
 * @param aColumn The original column number.
 * @param aSource The original source's filename.
 * @param aChunks Optional. An array of strings which are snippets of
 *        generated JS, or other SourceNodes.
 * @param aName The original identifier.
 */
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  this.children = [];
  this.sourceContents = {};
  this.line = aLine == null ? null : aLine;
  this.column = aColumn == null ? null : aColumn;
  this.source = aSource == null ? null : aSource;
  this.name = aName == null ? null : aName;
  this[isSourceNode] = true;
  if (aChunks != null) this.add(aChunks);
}

/**
 * Creates a SourceNode from generated code and a SourceMapConsumer.
 *
 * @param aGeneratedCode The generated code
 * @param aSourceMapConsumer The SourceMap for the generated code
 * @param aRelativePath Optional. The path that relative sources in the
 *        SourceMapConsumer should be relative to.
 */
SourceNode.fromStringWithSourceMap =
  function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
    // The SourceNode we want to fill with the generated code
    // and the SourceMap
    var node = new SourceNode();

    // All even indices of this array are one line of the generated code,
    // while all odd indices are the newlines between two adjacent lines
    // (since `REGEX_NEWLINE` captures its match).
    // Processed fragments are accessed by calling `shiftNextLine`.
    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
    var remainingLinesIndex = 0;
    var shiftNextLine = function() {
      var lineContents = getNextLine();
      // The last line of a file might not have a newline.
      var newLine = getNextLine() || "";
      return lineContents + newLine;

      function getNextLine() {
        return remainingLinesIndex < remainingLines.length ?
            remainingLines[remainingLinesIndex++] : undefined;
      }
    };

    // We need to remember the position of "remainingLines"
    var lastGeneratedLine = 1, lastGeneratedColumn = 0;

    // The generate SourceNodes we need a code range.
    // To extract it current and last mapping is used.
    // Here we store the last mapping.
    var lastMapping = null;

    aSourceMapConsumer.eachMapping(function (mapping) {
      if (lastMapping !== null) {
        // We add the code from "lastMapping" to "mapping":
        // First check if there is a new line in between.
        if (lastGeneratedLine < mapping.generatedLine) {
          // Associate first line with "lastMapping"
          addMappingWithCode(lastMapping, shiftNextLine());
          lastGeneratedLine++;
          lastGeneratedColumn = 0;
          // The remaining code is added without mapping
        } else {
          // There is no new line in between.
          // Associate the code between "lastGeneratedColumn" and
          // "mapping.generatedColumn" with "lastMapping"
          var nextLine = remainingLines[remainingLinesIndex] || '';
          var code = nextLine.substr(0, mapping.generatedColumn -
                                        lastGeneratedColumn);
          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
                                              lastGeneratedColumn);
          lastGeneratedColumn = mapping.generatedColumn;
          addMappingWithCode(lastMapping, code);
          // No more remaining code, continue
          lastMapping = mapping;
          return;
        }
      }
      // We add the generated code until the first mapping
      // to the SourceNode without any mapping.
      // Each line is added as separate string.
      while (lastGeneratedLine < mapping.generatedLine) {
        node.add(shiftNextLine());
        lastGeneratedLine++;
      }
      if (lastGeneratedColumn < mapping.generatedColumn) {
        var nextLine = remainingLines[remainingLinesIndex] || '';
        node.add(nextLine.substr(0, mapping.generatedColumn));
        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
        lastGeneratedColumn = mapping.generatedColumn;
      }
      lastMapping = mapping;
    }, this);
    // We have processed all mappings.
    if (remainingLinesIndex < remainingLines.length) {
      if (lastMapping) {
        // Associate the remaining code in the current line with "lastMapping"
        addMappingWithCode(lastMapping, shiftNextLine());
      }
      // and add the remaining lines without any mapping
      node.add(remainingLines.splice(remainingLinesIndex).join(""));
    }

    // Copy sourcesContent into SourceNode
    aSourceMapConsumer.sources.forEach(function (sourceFile) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        if (aRelativePath != null) {
          sourceFile = util.join(aRelativePath, sourceFile);
        }
        node.setSourceContent(sourceFile, content);
      }
    });

    return node;

    function addMappingWithCode(mapping, code) {
      if (mapping === null || mapping.source === undefined) {
        node.add(code);
      } else {
        var source = aRelativePath
          ? util.join(aRelativePath, mapping.source)
          : mapping.source;
        node.add(new SourceNode(mapping.originalLine,
                                mapping.originalColumn,
                                source,
                                code,
                                mapping.name));
      }
    }
  };

/**
 * Add a chunk of generated JS to this source node.
 *
 * @param aChunk A string snippet of generated JS code, another instance of
 *        SourceNode, or an array where each member is one of those things.
 */
SourceNode.prototype.add = function SourceNode_add(aChunk) {
  if (Array.isArray(aChunk)) {
    aChunk.forEach(function (chunk) {
      this.add(chunk);
    }, this);
  }
  else if (aChunk[isSourceNode] || typeof aChunk === "string") {
    if (aChunk) {
      this.children.push(aChunk);
    }
  }
  else {
    throw new TypeError(
      "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
    );
  }
  return this;
};

/**
 * Add a chunk of generated JS to the beginning of this source node.
 *
 * @param aChunk A string snippet of generated JS code, another instance of
 *        SourceNode, or an array where each member is one of those things.
 */
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  if (Array.isArray(aChunk)) {
    for (var i = aChunk.length-1; i >= 0; i--) {
      this.prepend(aChunk[i]);
    }
  }
  else if (aChunk[isSourceNode] || typeof aChunk === "string") {
    this.children.unshift(aChunk);
  }
  else {
    throw new TypeError(
      "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
    );
  }
  return this;
};

/**
 * Walk over the tree of JS snippets in this node and its children. The
 * walking function is called once for each snippet of JS and is passed that
 * snippet and the its original associated source's line/column location.
 *
 * @param aFn The traversal function.
 */
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  var chunk;
  for (var i = 0, len = this.children.length; i < len; i++) {
    chunk = this.children[i];
    if (chunk[isSourceNode]) {
      chunk.walk(aFn);
    }
    else {
      if (chunk !== '') {
        aFn(chunk, { source: this.source,
                     line: this.line,
                     column: this.column,
                     name: this.name });
      }
    }
  }
};

/**
 * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
 * each of `this.children`.
 *
 * @param aSep The separator.
 */
SourceNode.prototype.join = function SourceNode_join(aSep) {
  var newChildren;
  var i;
  var len = this.children.length;
  if (len > 0) {
    newChildren = [];
    for (i = 0; i < len-1; i++) {
      newChildren.push(this.children[i]);
      newChildren.push(aSep);
    }
    newChildren.push(this.children[i]);
    this.children = newChildren;
  }
  return this;
};

/**
 * Call String.prototype.replace on the very right-most source snippet. Useful
 * for trimming whitespace from the end of a source node, etc.
 *
 * @param aPattern The pattern to replace.
 * @param aReplacement The thing to replace the pattern with.
 */
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  var lastChild = this.children[this.children.length - 1];
  if (lastChild[isSourceNode]) {
    lastChild.replaceRight(aPattern, aReplacement);
  }
  else if (typeof lastChild === 'string') {
    this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  }
  else {
    this.children.push(''.replace(aPattern, aReplacement));
  }
  return this;
};

/**
 * Set the source content for a source file. This will be added to the SourceMapGenerator
 * in the sourcesContent field.
 *
 * @param aSourceFile The filename of the source file
 * @param aSourceContent The content of the source file
 */
SourceNode.prototype.setSourceContent =
  function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
    this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  };

/**
 * Walk over the tree of SourceNodes. The walking function is called for each
 * source file content and is passed the filename and source content.
 *
 * @param aFn The traversal function.
 */
SourceNode.prototype.walkSourceContents =
  function SourceNode_walkSourceContents(aFn) {
    for (var i = 0, len = this.children.length; i < len; i++) {
      if (this.children[i][isSourceNode]) {
        this.children[i].walkSourceContents(aFn);
      }
    }

    var sources = Object.keys(this.sourceContents);
    for (var i = 0, len = sources.length; i < len; i++) {
      aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
    }
  };

/**
 * Return the string representation of this source node. Walks over the tree
 * and concatenates all the various snippets together to one string.
 */
SourceNode.prototype.toString = function SourceNode_toString() {
  var str = "";
  this.walk(function (chunk) {
    str += chunk;
  });
  return str;
};

/**
 * Returns the string representation of this source node along with a source
 * map.
 */
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  var generated = {
    code: "",
    line: 1,
    column: 0
  };
  var map = new SourceMapGenerator(aArgs);
  var sourceMappingActive = false;
  var lastOriginalSource = null;
  var lastOriginalLine = null;
  var lastOriginalColumn = null;
  var lastOriginalName = null;
  this.walk(function (chunk, original) {
    generated.code += chunk;
    if (original.source !== null
        && original.line !== null
        && original.column !== null) {
      if(lastOriginalSource !== original.source
         || lastOriginalLine !== original.line
         || lastOriginalColumn !== original.column
         || lastOriginalName !== original.name) {
        map.addMapping({
          source: original.source,
          original: {
            line: original.line,
            column: original.column
          },
          generated: {
            line: generated.line,
            column: generated.column
          },
          name: original.name
        });
      }
      lastOriginalSource = original.source;
      lastOriginalLine = original.line;
      lastOriginalColumn = original.column;
      lastOriginalName = original.name;
      sourceMappingActive = true;
    } else if (sourceMappingActive) {
      map.addMapping({
        generated: {
          line: generated.line,
          column: generated.column
        }
      });
      lastOriginalSource = null;
      sourceMappingActive = false;
    }
    for (var idx = 0, length = chunk.length; idx < length; idx++) {
      if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
        generated.line++;
        generated.column = 0;
        // Mappings end at eol
        if (idx + 1 === length) {
          lastOriginalSource = null;
          sourceMappingActive = false;
        } else if (sourceMappingActive) {
          map.addMapping({
            source: original.source,
            original: {
              line: original.line,
              column: original.column
            },
            generated: {
              line: generated.line,
              column: generated.column
            },
            name: original.name
          });
        }
      } else {
        generated.column++;
      }
    }
  });
  this.walkSourceContents(function (sourceFile, sourceContent) {
    map.setSourceContent(sourceFile, sourceContent);
  });

  return { code: generated.code, map: map };
};

exports.SourceNode = SourceNode;


/***/ }),

/***/ "./node_modules/source-map/lib/util.js":
/*!*********************************************!*\
  !*** ./node_modules/source-map/lib/util.js ***!
  \*********************************************/
/***/ ((__unused_webpack_module, exports) => {

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */

/**
 * This is a helper function for getting values from parameter/options
 * objects.
 *
 * @param args The object we are extracting values from
 * @param name The name of the property we are getting.
 * @param defaultValue An optional value to return if the property is missing
 * from the object. If this is not specified and the property is missing, an
 * error will be thrown.
 */
function getArg(aArgs, aName, aDefaultValue) {
  if (aName in aArgs) {
    return aArgs[aName];
  } else if (arguments.length === 3) {
    return aDefaultValue;
  } else {
    throw new Error('"' + aName + '" is a required argument.');
  }
}
exports.getArg = getArg;

var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
var dataUrlRegexp = /^data:.+\,.+$/;

function urlParse(aUrl) {
  var match = aUrl.match(urlRegexp);
  if (!match) {
    return null;
  }
  return {
    scheme: match[1],
    auth: match[2],
    host: match[3],
    port: match[4],
    path: match[5]
  };
}
exports.urlParse = urlParse;

function urlGenerate(aParsedUrl) {
  var url = '';
  if (aParsedUrl.scheme) {
    url += aParsedUrl.scheme + ':';
  }
  url += '//';
  if (aParsedUrl.auth) {
    url += aParsedUrl.auth + '@';
  }
  if (aParsedUrl.host) {
    url += aParsedUrl.host;
  }
  if (aParsedUrl.port) {
    url += ":" + aParsedUrl.port
  }
  if (aParsedUrl.path) {
    url += aParsedUrl.path;
  }
  return url;
}
exports.urlGenerate = urlGenerate;

/**
 * Normalizes a path, or the path portion of a URL:
 *
 * - Replaces consecutive slashes with one slash.
 * - Removes unnecessary '.' parts.
 * - Removes unnecessary '<dir>/..' parts.
 *
 * Based on code in the Node.js 'path' core module.
 *
 * @param aPath The path or url to normalize.
 */
function normalize(aPath) {
  var path = aPath;
  var url = urlParse(aPath);
  if (url) {
    if (!url.path) {
      return aPath;
    }
    path = url.path;
  }
  var isAbsolute = exports.isAbsolute(path);

  var parts = path.split(/\/+/);
  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
    part = parts[i];
    if (part === '.') {
      parts.splice(i, 1);
    } else if (part === '..') {
      up++;
    } else if (up > 0) {
      if (part === '') {
        // The first part is blank if the path is absolute. Trying to go
        // above the root is a no-op. Therefore we can remove all '..' parts
        // directly after the root.
        parts.splice(i + 1, up);
        up = 0;
      } else {
        parts.splice(i, 2);
        up--;
      }
    }
  }
  path = parts.join('/');

  if (path === '') {
    path = isAbsolute ? '/' : '.';
  }

  if (url) {
    url.path = path;
    return urlGenerate(url);
  }
  return path;
}
exports.normalize = normalize;

/**
 * Joins two paths/URLs.
 *
 * @param aRoot The root path or URL.
 * @param aPath The path or URL to be joined with the root.
 *
 * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
 *   scheme-relative URL: Then the scheme of aRoot, if any, is prepended
 *   first.
 * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
 *   is updated with the result and aRoot is returned. Otherwise the result
 *   is returned.
 *   - If aPath is absolute, the result is aPath.
 *   - Otherwise the two paths are joined with a slash.
 * - Joining for example 'http://' and 'www.example.com' is also supported.
 */
function join(aRoot, aPath) {
  if (aRoot === "") {
    aRoot = ".";
  }
  if (aPath === "") {
    aPath = ".";
  }
  var aPathUrl = urlParse(aPath);
  var aRootUrl = urlParse(aRoot);
  if (aRootUrl) {
    aRoot = aRootUrl.path || '/';
  }

  // `join(foo, '//www.example.org')`
  if (aPathUrl && !aPathUrl.scheme) {
    if (aRootUrl) {
      aPathUrl.scheme = aRootUrl.scheme;
    }
    return urlGenerate(aPathUrl);
  }

  if (aPathUrl || aPath.match(dataUrlRegexp)) {
    return aPath;
  }

  // `join('http://', 'www.example.com')`
  if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
    aRootUrl.host = aPath;
    return urlGenerate(aRootUrl);
  }

  var joined = aPath.charAt(0) === '/'
    ? aPath
    : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);

  if (aRootUrl) {
    aRootUrl.path = joined;
    return urlGenerate(aRootUrl);
  }
  return joined;
}
exports.join = join;

exports.isAbsolute = function (aPath) {
  return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
};

/**
 * Make a path relative to a URL or another path.
 *
 * @param aRoot The root path or URL.
 * @param aPath The path or URL to be made relative to aRoot.
 */
function relative(aRoot, aPath) {
  if (aRoot === "") {
    aRoot = ".";
  }

  aRoot = aRoot.replace(/\/$/, '');

  // It is possible for the path to be above the root. In this case, simply
  // checking whether the root is a prefix of the path won't work. Instead, we
  // need to remove components from the root one by one, until either we find
  // a prefix that fits, or we run out of components to remove.
  var level = 0;
  while (aPath.indexOf(aRoot + '/') !== 0) {
    var index = aRoot.lastIndexOf("/");
    if (index < 0) {
      return aPath;
    }

    // If the only part of the root that is left is the scheme (i.e. http://,
    // file:///, etc.), one or more slashes (/), or simply nothing at all, we
    // have exhausted all components, so the path is not relative to the root.
    aRoot = aRoot.slice(0, index);
    if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
      return aPath;
    }

    ++level;
  }

  // Make sure we add a "../" for each component we removed from the root.
  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
}
exports.relative = relative;

var supportsNullProto = (function () {
  var obj = Object.create(null);
  return !('__proto__' in obj);
}());

function identity (s) {
  return s;
}

/**
 * Because behavior goes wacky when you set `__proto__` on objects, we
 * have to prefix all the strings in our set with an arbitrary character.
 *
 * See https://github.com/mozilla/source-map/pull/31 and
 * https://github.com/mozilla/source-map/issues/30
 *
 * @param String aStr
 */
function toSetString(aStr) {
  if (isProtoString(aStr)) {
    return '$' + aStr;
  }

  return aStr;
}
exports.toSetString = supportsNullProto ? identity : toSetString;

function fromSetString(aStr) {
  if (isProtoString(aStr)) {
    return aStr.slice(1);
  }

  return aStr;
}
exports.fromSetString = supportsNullProto ? identity : fromSetString;

function isProtoString(s) {
  if (!s) {
    return false;
  }

  var length = s.length;

  if (length < 9 /* "__proto__".length */) {
    return false;
  }

  if (s.charCodeAt(length - 1) !== 95  /* '_' */ ||
      s.charCodeAt(length - 2) !== 95  /* '_' */ ||
      s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
      s.charCodeAt(length - 4) !== 116 /* 't' */ ||
      s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
      s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
      s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
      s.charCodeAt(length - 8) !== 95  /* '_' */ ||
      s.charCodeAt(length - 9) !== 95  /* '_' */) {
    return false;
  }

  for (var i = length - 10; i >= 0; i--) {
    if (s.charCodeAt(i) !== 36 /* '$' */) {
      return false;
    }
  }

  return true;
}

/**
 * Comparator between two mappings where the original positions are compared.
 *
 * Optionally pass in `true` as `onlyCompareGenerated` to consider two
 * mappings with the same original source/line/column, but different generated
 * line and column the same. Useful when searching for a mapping with a
 * stubbed out mapping.
 */
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  var cmp = strcmp(mappingA.source, mappingB.source);
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalLine - mappingB.originalLine;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalColumn - mappingB.originalColumn;
  if (cmp !== 0 || onlyCompareOriginal) {
    return cmp;
  }

  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.generatedLine - mappingB.generatedLine;
  if (cmp !== 0) {
    return cmp;
  }

  return strcmp(mappingA.name, mappingB.name);
}
exports.compareByOriginalPositions = compareByOriginalPositions;

/**
 * Comparator between two mappings with deflated source and name indices where
 * the generated positions are compared.
 *
 * Optionally pass in `true` as `onlyCompareGenerated` to consider two
 * mappings with the same generated line and column, but different
 * source/name/original line and column the same. Useful when searching for a
 * mapping with a stubbed out mapping.
 */
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  var cmp = mappingA.generatedLine - mappingB.generatedLine;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  if (cmp !== 0 || onlyCompareGenerated) {
    return cmp;
  }

  cmp = strcmp(mappingA.source, mappingB.source);
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalLine - mappingB.originalLine;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalColumn - mappingB.originalColumn;
  if (cmp !== 0) {
    return cmp;
  }

  return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;

function strcmp(aStr1, aStr2) {
  if (aStr1 === aStr2) {
    return 0;
  }

  if (aStr1 === null) {
    return 1; // aStr2 !== null
  }

  if (aStr2 === null) {
    return -1; // aStr1 !== null
  }

  if (aStr1 > aStr2) {
    return 1;
  }

  return -1;
}

/**
 * Comparator between two mappings with inflated source and name strings where
 * the generated positions are compared.
 */
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  var cmp = mappingA.generatedLine - mappingB.generatedLine;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = strcmp(mappingA.source, mappingB.source);
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalLine - mappingB.originalLine;
  if (cmp !== 0) {
    return cmp;
  }

  cmp = mappingA.originalColumn - mappingB.originalColumn;
  if (cmp !== 0) {
    return cmp;
  }

  return strcmp(mappingA.name, mappingB.name);
}
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;

/**
 * Strip any JSON XSSI avoidance prefix from the string (as documented
 * in the source maps specification), and then parse the string as
 * JSON.
 */
function parseSourceMapInput(str) {
  return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
}
exports.parseSourceMapInput = parseSourceMapInput;

/**
 * Compute the URL of a source given the the source root, the source's
 * URL, and the source map's URL.
 */
function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
  sourceURL = sourceURL || '';

  if (sourceRoot) {
    // This follows what Chrome does.
    if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
      sourceRoot += '/';
    }
    // The spec says:
    //   Line 4: An optional source root, useful for relocating source
    //   files on a server or removing repeated values in the
    //   “sources” entry.  This value is prepended to the individual
    //   entries in the “source” field.
    sourceURL = sourceRoot + sourceURL;
  }

  // Historically, SourceMapConsumer did not take the sourceMapURL as
  // a parameter.  This mode is still somewhat supported, which is why
  // this code block is conditional.  However, it's preferable to pass
  // the source map URL to SourceMapConsumer, so that this function
  // can implement the source URL resolution algorithm as outlined in
  // the spec.  This block is basically the equivalent of:
  //    new URL(sourceURL, sourceMapURL).toString()
  // ... except it avoids using URL, which wasn't available in the
  // older releases of node still supported by this library.
  //
  // The spec says:
  //   If the sources are not absolute URLs after prepending of the
  //   “sourceRoot”, the sources are resolved relative to the
  //   SourceMap (like resolving script src in a html document).
  if (sourceMapURL) {
    var parsed = urlParse(sourceMapURL);
    if (!parsed) {
      throw new Error("sourceMapURL could not be parsed");
    }
    if (parsed.path) {
      // Strip the last path component, but keep the "/".
      var index = parsed.path.lastIndexOf('/');
      if (index >= 0) {
        parsed.path = parsed.path.substring(0, index + 1);
      }
    }
    sourceURL = join(urlGenerate(parsed), sourceURL);
  }

  return normalize(sourceURL);
}
exports.computeSourceURL = computeSourceURL;


/***/ }),

/***/ "./node_modules/source-map/source-map.js":
/*!***********************************************!*\
  !*** ./node_modules/source-map/source-map.js ***!
  \***********************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/*
 * Copyright 2009-2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE.txt or:
 * http://opensource.org/licenses/BSD-3-Clause
 */
exports.SourceMapGenerator = __webpack_require__(/*! ./lib/source-map-generator */ "./node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(/*! ./lib/source-map-consumer */ "./node_modules/source-map/lib/source-map-consumer.js").SourceMapConsumer;
exports.SourceNode = __webpack_require__(/*! ./lib/source-node */ "./node_modules/source-map/lib/source-node.js").SourceNode;


/***/ }),

/***/ "./src/lib/html-tagged-template.js":
/*!*****************************************!*\
  !*** ./src/lib/html-tagged-template.js ***!
  \*****************************************/
/***/ (() => {

(function(window) {
    "use strict"

    // test for es6 support of needed functionality
    try {
        // spread operator and template strings support
        (function testSpreadOpAndTemplate() {
            const tag = function tag() {
                return
            }
            // We don't need this value - we're just checking if its attempted creation causes any errors
            // eslint-disable-next-line @typescript-eslint/no-unused-expressions
            tag`test`
        })()

        // template tag and Array.from support
        if (
            !(
                "content" in document.createElement("template") &&
                "from" in Array
            )
        ) {
            throw new Error()
        }
    } catch (e) {
        // missing support;
        console.log(
            "Your browser does not support the needed functionality to use the html tagged template",
        )
        return
    }

    if (typeof window.html === "undefined") {
        // --------------------------------------------------
        // constants
        // --------------------------------------------------

        const SUBSTITUTION_INDEX = "substitutionindex:" // tag names are always all lowercase
        const SUBSTITUTION_REGEX = new RegExp(
            SUBSTITUTION_INDEX + "([0-9]+):",
            "g",
        )

        // rejection string is used to replace xss attacks that cannot be escaped either
        // because the escaped string is still executable
        // (e.g. setTimeout(/* escaped string */)) or because it produces invalid results
        // (e.g. <h${xss}> where xss='><script>alert(1337)</script')
        // @see https://developers.google.com/closure/templates/docs/security#in_tags_and_attrs
        const REJECTION_STRING = "zXssPreventedz"

        // which characters should be encoded in which contexts
        const ENCODINGS = {
            attribute: {
                "&": "&amp;",
                "<": "&lt;",
                ">": "&gt;",
            },
            uri: {
                "&": "&amp;",
            },
        }

        // which attributes are DOM Level 0 events
        // taken from https://en.wikipedia.org/wiki/DOM_events#DOM_Level_0
        const DOM_EVENTS = [
            "onclick",
            "ondblclick",
            "onmousedown",
            "onmouseup",
            "onmouseover",
            "onmousemove",
            "onmouseout",
            "ondragstart",
            "ondrag",
            "ondragenter",
            "ondragleave",
            "ondragover",
            "ondrop",
            "ondragend",
            "onkeydown",
            "onkeypress",
            "onkeyup",
            "onload",
            "onunload",
            "onabort",
            "onerror",
            "onresize",
            "onscroll",
            "onselect",
            "onchange",
            "onsubmit",
            "onreset",
            "onfocus",
            "onblur",
            "onpointerdown",
            "onpointerup",
            "onpointercancel",
            "onpointermove",
            "onpointerover",
            "onpointerout",
            "onpointerenter",
            "onpointerleave",
            "ongotpointercapture",
            "onlostpointercapture",
            "oncut",
            "oncopy",
            "onpaste",
            "onbeforecut",
            "onbeforecopy",
            "onbeforepaste",
            "onafterupdate",
            "onbeforeupdate",
            "oncellchange",
            "ondataavailable",
            "ondatasetchanged",
            "ondatasetcomplete",
            "onerrorupdate",
            "onrowenter",
            "onrowexit",
            "onrowsdelete",
            "onrowinserted",
            "oncontextmenu",
            "ondrag",
            "ondragstart",
            "ondragenter",
            "ondragover",
            "ondragleave",
            "ondragend",
            "ondrop",
            "onselectstart",
            "help",
            "onbeforeunload",
            "onstop",
            "beforeeditfocus",
            "onstart",
            "onfinish",
            "onbounce",
            "onbeforeprint",
            "onafterprint",
            "onpropertychange",
            "onfilterchange",
            "onreadystatechange",
            "onlosecapture",
            "DOMMouseScroll",
            "ondragdrop",
            "ondragenter",
            "ondragexit",
            "ondraggesture",
            "ondragover",
            "onclose",
            "oncommand",
            "oninput",
            "DOMMenuItemActive",
            "DOMMenuItemInactive",
            "oncontextmenu",
            "onoverflow",
            "onoverflowchanged",
            "onunderflow",
            "onpopuphidden",
            "onpopuphiding",
            "onpopupshowing",
            "onpopupshown",
            "onbroadcast",
            "oncommandupdate",
        ]

        // which attributes take URIs
        // taken from https://www.w3.org/TR/html4/index/attributes.html
        const URI_ATTRIBUTES = [
            "action",
            "background",
            "cite",
            "classid",
            "codebase",
            "data",
            "href",
            "longdesc",
            "profile",
            "src",
            "usemap",
        ]

        const ENCODINGS_REGEX = {
            attribute: new RegExp(
                "[" + Object.keys(ENCODINGS.attribute).join("") + "]",
                "g",
            ),
            uri: new RegExp(
                "[" + Object.keys(ENCODINGS.uri).join("") + "]",
                "g",
            ),
        }

        // find all attributes after the first whitespace (which would follow the tag
        // name. Only used when the DOM has been clobbered to still parse attributes
        const ATTRIBUTE_PARSER_REGEX = /\s([^">=\s]+)(?:="[^"]+")?/g

        // test if a javascript substitution is wrapped with quotes
        const WRAPPED_WITH_QUOTES_REGEX = /^('|")[\s\S]*\1$/

        // allow custom attribute names that start or end with url or ui to do uri escaping
        // @see https://developers.google.com/closure/templates/docs/security#in_urls
        const CUSTOM_URI_ATTRIBUTES_REGEX = /\bur[il]|ur[il]s?$/i

        // --------------------------------------------------
        // private functions
        // --------------------------------------------------

        /**
         * Escape HTML entities in an attribute.
         * @private
         *
         * @param {string} str - String to escape.
         *
         * @returns {string}
         */
        function encodeAttributeHTMLEntities(str) {
            return str.replace(ENCODINGS_REGEX.attribute, function(match) {
                return ENCODINGS.attribute[match]
            })
        }

        /**
         * Escape entities in a URI.
         * @private
         *
         * @param {string} str - URI to escape.
         *
         * @returns {string}
         */
        function encodeURIEntities(str) {
            return str.replace(ENCODINGS_REGEX.uri, function(match) {
                return ENCODINGS.uri[match]
            })
        }

        // --------------------------------------------------
        // html tagged template function
        // --------------------------------------------------

        /**
         * Safely convert a DOM string into DOM nodes using by using E4H and contextual
         * auto-escaping techniques to prevent xss attacks.
         *
         * @param {string[]} strings - Safe string literals.
         * @param {*} values - Unsafe substitution expressions.
         *
         * @returns {HTMLElement|DocumentFragment}
         */
        window.html = function(strings, ...values) {
            // break early if called with empty content
            if (!strings[0] && values.length === 0) {
                return
            }

            /**
             * Replace a string with substitution placeholders with its substitution values.
             * @private
             *
             * @param {string} match - Matched substitution placeholder.
             * @param {string} index - Substitution placeholder index.
             */
            function replaceSubstitution(match, index) {
                return values[parseInt(index, 10)]
            }

            // insert placeholders into the generated string so we can run it through the
            // HTML parser without any malicious content.
            // (this particular placeholder will even work when used to create a DOM element)
            let str = strings[0]
            for (let i = 0; i < values.length; i++) {
                str += SUBSTITUTION_INDEX + i + ":" + strings[i + 1]
            }

            // template tags allow any HTML (even <tr> elements out of context)
            // @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
            const template = document.createElement("template")
            template.innerHTML = str

            // find all substitution values and safely encode them using DOM APIs and
            // contextual auto-escaping
            const walker = document.createNodeIterator(
                template.content,
                NodeFilter.SHOW_ALL,
            )
            let node
            while ((node = walker.nextNode())) {
                let tag = null
                const attributesToRemove = []

                // --------------------------------------------------
                // node name substitution
                // --------------------------------------------------

                let nodeName = node.nodeName.toLowerCase()
                if (nodeName.indexOf(SUBSTITUTION_INDEX) !== -1) {
                    nodeName = nodeName.replace(
                        SUBSTITUTION_REGEX,
                        replaceSubstitution,
                    )

                    // createElement() should not need to be escaped to prevent XSS?

                    // this will throw an error if the tag name is invalid (e.g. xss tried
                    // to escape out of the tag using '><script>alert(1337)</script><')
                    // instead of replacing the tag name we'll just let the error be thrown
                    tag = document.createElement(nodeName)

                    // mark that this node needs to be cleaned up later with the newly
                    // created node
                    node._replacedWith = tag

                    // use insertBefore() instead of replaceChild() so that the node Iterator
                    // doesn't think the new tag should be the next node
                    node.parentNode.insertBefore(tag, node)

                // special case for script tags:
                // using innerHTML with a string that contains a script tag causes the script
                // tag to not be executed when added to the DOM. We'll need to create a script
                // tag and append its contents which will make it execute correctly.
                // @see http://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml
                } else if (node.nodeName === "SCRIPT") {
                    const script = document.createElement("script")
                    tag = script

                    node._replacedWith = script
                    node.parentNode.insertBefore(script, node)
                }

                // --------------------------------------------------
                // attribute substitution
                // --------------------------------------------------

                let attributes
                if (node.attributes) {
                    // if the attributes property is not of type NamedNodeMap then the DOM
                    // has been clobbered. E.g. <form><input name="attributes"></form>.
                    // We'll manually build up an array of objects that mimic the Attr
                    // object so the loop will still work as expected.
                    if (!(node.attributes instanceof NamedNodeMap)) {
                        // first clone the node so we can isolate it from any children
                        const temp = node.cloneNode()

                        // parse the node string for all attributes
                        const attributeMatches = temp.outerHTML.match(
                            ATTRIBUTE_PARSER_REGEX,
                        )

                        // get all attribute names and their value
                        attributes = []
                        for (const attribute of attributeMatches.length) {
                            const attributeName = attribute
                                .trim()
                                .split("=")[0]
                            const attributeValue = node.getAttribute(
                                attributeName,
                            )

                            attributes.push({
                                name: attributeName,
                                value: attributeValue,
                            })
                        }
                    } else {
                        // Windows 10 Firefox 44 will shift the attributes NamedNodeMap and
                        // push the attribute to the end when using setAttribute(). We'll have
                        // to clone the NamedNodeMap so the order isn't changed for setAttribute()
                        attributes = Array.from(node.attributes)
                    }

                    for (const attribute of attributes) {
                        let name = attribute.name
                        let value = attribute.value
                        let hasSubstitution = false

                        // name has substitution
                        if (name.indexOf(SUBSTITUTION_INDEX) !== -1) {
                            name = name.replace(
                                SUBSTITUTION_REGEX,
                                replaceSubstitution,
                            )

                            // ensure substitution was with a non-empty string
                            if (name && typeof name === "string") {
                                hasSubstitution = true
                            }

                            // remove old attribute
                            attributesToRemove.push(attribute.name)
                        }

                        // value has substitution - only check if name exists (only happens
                        // when name is a substitution with an empty value)
                        if (name && value.indexOf(SUBSTITUTION_INDEX) !== -1) {
                            hasSubstitution = true

                            // if an uri attribute has been rejected
                            let isRejected = false

                            value = value.replace(SUBSTITUTION_REGEX, function(
                                match,
                                index,
                                offset,
                            ) {
                                if (isRejected) {
                                    return ""
                                }

                                let substitutionValue =
                                    values[parseInt(index, 10)]

                                // contextual auto-escaping:
                                // if attribute is a DOM Level 0 event then we need to ensure it
                                // is quoted
                                if (
                                    DOM_EVENTS.indexOf(name) !== -1 &&
                                    typeof substitutionValue === "string" &&
                                    !WRAPPED_WITH_QUOTES_REGEX.test(
                                        substitutionValue,
                                    )
                                ) {
                                    substitutionValue =
                                        '"' + substitutionValue + '"'

                                // contextual auto-escaping:
                                // if the attribute is a uri attribute then we need to uri encode it and
                                // remove bad protocols
                                } else if (
                                    URI_ATTRIBUTES.indexOf(name) !== -1 ||
                                    CUSTOM_URI_ATTRIBUTES_REGEX.test(name)
                                ) {
                                    // percent encode if the value is inside of a query parameter
                                    const queryParamIndex = value.indexOf("=")
                                    if (
                                        queryParamIndex !== -1 &&
                                        offset > queryParamIndex
                                    ) {
                                        substitutionValue = encodeURIComponent(
                                            substitutionValue,
                                        )

                                    // entity encode if value is part of the URL
                                    } else {
                                        substitutionValue = encodeURI(
                                            encodeURIEntities(
                                                substitutionValue,
                                            ),
                                        )

                                        // only allow the : when used after http or https otherwise reject
                                        // the entire url (will not allow any 'javascript:' or filter
                                        // evasion techniques)
                                        if (
                                            offset === 0 &&
                                            substitutionValue.indexOf(":") !==
                                                -1
                                        ) {
                                            const authorized_protocols = [
                                                "http://",
                                                "https://",
                                                "moz-extension://",
                                                "about://",
                                                "data:image/png;base64",
                                                "data:image/gif;base64",
                                                "data:image/jpg;base64",
                                                "data:image/jpeg;base64",
                                                "data:image/x-icon;base64",
                                            ]
                                            // If substitutionValue doesn't start with any of the authorized protocols
                                            if (
                                                !authorized_protocols.find(p =>
                                                    substitutionValue.startsWith(
                                                        p,
                                                    ),
                                                )
                                            ) {
                                                isRejected = true
                                            }
                                        }
                                    }

                                // contextual auto-escaping:
                                // HTML encode attribute value if it is not a URL or URI to prevent
                                // DOM Level 0 event handlers from executing xss code
                                } else if (
                                    typeof substitutionValue === "string"
                                ) {
                                    substitutionValue = encodeAttributeHTMLEntities(
                                        substitutionValue,
                                    )
                                }

                                return substitutionValue
                            })

                            if (isRejected) {
                                value = "#" + REJECTION_STRING
                            }
                        }

                        // add the attribute to the new tag or replace it on the current node
                        // setAttribute() does not need to be escaped to prevent XSS since it does
                        // all of that for us
                        // @see https://www.mediawiki.org/wiki/DOM-based_XSS
                        if (tag || hasSubstitution) {
                            const el = tag || node

                            // optional attribute
                            if (name.substr(-1) === "?") {
                                el.removeAttribute(name)

                                if (value === "true") {
                                    name = name.slice(0, -1)
                                    el.setAttribute(name, "")
                                }
                            } else {
                                el.setAttribute(name, value)
                            }
                        }
                    }
                }

                // remove placeholder attributes outside of the attribute loop since it
                // will modify the attributes NamedNodeMap indices.
                // @see https://github.com/straker/html-tagged-template/issues/13
                attributesToRemove.forEach(function(attribute) {
                    node.removeAttribute(attribute)
                })

                // append the current node to a replaced parent
                let parentNode
                if (node.parentNode && node.parentNode._replacedWith) {
                    parentNode = node.parentNode
                    node.parentNode._replacedWith.appendChild(node)
                }

                // remove the old node from the DOM
                if (
                    (node._replacedWith && node.childNodes.length === 0) ||
                    (parentNode && parentNode.childNodes.length === 0)
                ) {
                    (parentNode || node).remove()
                }

                // --------------------------------------------------
                // text content substitution
                // --------------------------------------------------

                if (
                    node.nodeType === 3 &&
                    node.nodeValue.indexOf(SUBSTITUTION_INDEX) !== -1
                ) {
                    const nodeValue = node.nodeValue.replace(
                        SUBSTITUTION_REGEX,
                        replaceSubstitution,
                    )

                    // createTextNode() should not need to be escaped to prevent XSS?
                    const text = document.createTextNode(nodeValue)

                    // since the parent node has already gone through the iterator, we can use
                    // replaceChild() here
                    node.parentNode.replaceChild(text, node)
                }
            }

            // return the documentFragment for multiple nodes
            if (template.content.childNodes.length > 1) {
                return template.content
            }

            return template.content.firstChild
        }
    }
})(window)


/***/ }),

/***/ "./compiler/metadata/AllMetadata.ts":
/*!******************************************!*\
  !*** ./compiler/metadata/AllMetadata.ts ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SymbolMetadata": () => (/* reexport safe */ _SymbolMetadata__WEBPACK_IMPORTED_MODULE_0__.SymbolMetadata),
/* harmony export */   "ClassMetadata": () => (/* reexport safe */ _ClassMetadata__WEBPACK_IMPORTED_MODULE_1__.ClassMetadata),
/* harmony export */   "FileMetadata": () => (/* reexport safe */ _FileMetadata__WEBPACK_IMPORTED_MODULE_2__.FileMetadata),
/* harmony export */   "ProgramMetadata": () => (/* reexport safe */ _ProgramMetadata__WEBPACK_IMPORTED_MODULE_3__.ProgramMetadata)
/* harmony export */ });
/* harmony import */ var _SymbolMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SymbolMetadata */ "./compiler/metadata/SymbolMetadata.ts");
/* harmony import */ var _ClassMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ClassMetadata */ "./compiler/metadata/ClassMetadata.ts");
/* harmony import */ var _FileMetadata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FileMetadata */ "./compiler/metadata/FileMetadata.ts");
/* harmony import */ var _ProgramMetadata__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProgramMetadata */ "./compiler/metadata/ProgramMetadata.ts");






/***/ }),

/***/ "./compiler/metadata/ClassMetadata.ts":
/*!********************************************!*\
  !*** ./compiler/metadata/ClassMetadata.ts ***!
  \********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ClassMetadata": () => (/* binding */ ClassMetadata)
/* harmony export */ });
class ClassMetadata {
    constructor(members = new Map()) {
        this.members = members;
    }
    setMember(name, s) {
        this.members.set(name, s);
    }
    getMember(name) {
        return this.members.get(name);
    }
    getMembers() {
        return this.members.keys();
    }
    toConstructor() {
        return (`new ClassMetadata(new Map<string, SymbolMetadata>([` +
            Array.from(this.members.entries())
                .map(([n, m]) => `[${JSON.stringify(n)}, ${m.toConstructor()}]`)
                .join(",\n") +
            `]))`);
    }
}


/***/ }),

/***/ "./compiler/metadata/FileMetadata.ts":
/*!*******************************************!*\
  !*** ./compiler/metadata/FileMetadata.ts ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FileMetadata": () => (/* binding */ FileMetadata)
/* harmony export */ });
class FileMetadata {
    constructor(classes = new Map(), functions = new Map()) {
        this.classes = classes;
        this.functions = functions;
    }
    setClass(name, c) {
        this.classes.set(name, c);
    }
    getClass(name) {
        return this.classes.get(name);
    }
    getClasses() {
        return Array.from(this.classes.keys());
    }
    setFunction(name, f) {
        this.functions.set(name, f);
    }
    getFunction(name) {
        return this.functions.get(name);
    }
    getFunctions() {
        return Array.from(this.functions.entries());
    }
    getFunctionNames() {
        return Array.from(this.functions.keys());
    }
    toConstructor() {
        return (`new FileMetadata(new Map<string, ClassMetadata>([` +
            Array.from(this.classes.entries())
                .map(([n, c]) => `[${JSON.stringify(n)}, ${c.toConstructor()}]`)
                .join(",\n") +
            `]), new Map<string, SymbolMetadata>([` +
            Array.from(this.functions.entries())
                .map(([n, f]) => `[${JSON.stringify(n)}, ${f.toConstructor()}]`)
                .join(",\n") +
            `]))`);
    }
}


/***/ }),

/***/ "./compiler/metadata/ProgramMetadata.ts":
/*!**********************************************!*\
  !*** ./compiler/metadata/ProgramMetadata.ts ***!
  \**********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ProgramMetadata": () => (/* binding */ ProgramMetadata)
/* harmony export */ });
class ProgramMetadata {
    constructor(files = new Map()) {
        this.files = files;
    }
    setFile(name, file) {
        this.files.set(name, file);
    }
    getFile(name) {
        return this.files.get(name);
    }
    toConstructor() {
        return (`new ProgramMetadata(new Map<string, FileMetadata>([` +
            Array.from(this.files.entries())
                .map(([n, f]) => `[${JSON.stringify(n)}, ${f.toConstructor()}]`)
                .join(",\n") +
            `]))`);
    }
}


/***/ }),

/***/ "./compiler/metadata/SymbolMetadata.ts":
/*!*********************************************!*\
  !*** ./compiler/metadata/SymbolMetadata.ts ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SymbolMetadata": () => (/* binding */ SymbolMetadata)
/* harmony export */ });
class SymbolMetadata {
    constructor(doc, type, hidden = false) {
        this.doc = doc;
        this.type = type;
        this.hidden = hidden;
    }
    toConstructor() {
        return `new SymbolMetadata(${JSON.stringify(this.doc)}, ${this.type.toConstructor()}, ${this.hidden})`;
    }
}


/***/ }),

/***/ "./compiler/types/AllTypes.ts":
/*!************************************!*\
  !*** ./compiler/types/AllTypes.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AnyType": () => (/* reexport safe */ _AnyType__WEBPACK_IMPORTED_MODULE_0__.AnyType),
/* harmony export */   "BooleanType": () => (/* reexport safe */ _BooleanType__WEBPACK_IMPORTED_MODULE_1__.BooleanType),
/* harmony export */   "FunctionType": () => (/* reexport safe */ _FunctionType__WEBPACK_IMPORTED_MODULE_2__.FunctionType),
/* harmony export */   "NumberType": () => (/* reexport safe */ _NumberType__WEBPACK_IMPORTED_MODULE_3__.NumberType),
/* harmony export */   "ObjectType": () => (/* reexport safe */ _ObjectType__WEBPACK_IMPORTED_MODULE_4__.ObjectType),
/* harmony export */   "StringType": () => (/* reexport safe */ _StringType__WEBPACK_IMPORTED_MODULE_5__.StringType),
/* harmony export */   "TypeReferenceType": () => (/* reexport safe */ _TypeReferenceType__WEBPACK_IMPORTED_MODULE_6__.TypeReferenceType),
/* harmony export */   "VoidType": () => (/* reexport safe */ _VoidType__WEBPACK_IMPORTED_MODULE_7__.VoidType),
/* harmony export */   "ArrayType": () => (/* reexport safe */ _ArrayType__WEBPACK_IMPORTED_MODULE_8__.ArrayType),
/* harmony export */   "LiteralTypeType": () => (/* reexport safe */ _LiteralTypeType__WEBPACK_IMPORTED_MODULE_9__.LiteralTypeType),
/* harmony export */   "TupleType": () => (/* reexport safe */ _TupleType__WEBPACK_IMPORTED_MODULE_10__.TupleType),
/* harmony export */   "UnionType": () => (/* reexport safe */ _UnionType__WEBPACK_IMPORTED_MODULE_11__.UnionType)
/* harmony export */ });
/* harmony import */ var _AnyType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnyType */ "./compiler/types/AnyType.ts");
/* harmony import */ var _BooleanType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BooleanType */ "./compiler/types/BooleanType.ts");
/* harmony import */ var _FunctionType__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FunctionType */ "./compiler/types/FunctionType.ts");
/* harmony import */ var _NumberType__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NumberType */ "./compiler/types/NumberType.ts");
/* harmony import */ var _ObjectType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ObjectType */ "./compiler/types/ObjectType.ts");
/* harmony import */ var _StringType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./StringType */ "./compiler/types/StringType.ts");
/* harmony import */ var _TypeReferenceType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TypeReferenceType */ "./compiler/types/TypeReferenceType.ts");
/* harmony import */ var _VoidType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./VoidType */ "./compiler/types/VoidType.ts");
/* harmony import */ var _ArrayType__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ArrayType */ "./compiler/types/ArrayType.ts");
/* harmony import */ var _LiteralTypeType__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./LiteralTypeType */ "./compiler/types/LiteralTypeType.ts");
/* harmony import */ var _TupleType__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TupleType */ "./compiler/types/TupleType.ts");
/* harmony import */ var _UnionType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./UnionType */ "./compiler/types/UnionType.ts");














/***/ }),

/***/ "./compiler/types/AnyType.ts":
/*!***********************************!*\
  !*** ./compiler/types/AnyType.ts ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AnyType": () => (/* binding */ AnyType)
/* harmony export */ });
class AnyType {
    constructor(isDotDotDot = false, isQuestion = false) {
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "any";
    }
    toConstructor() {
        return `new AnyType(${!this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convert(argument) {
        return argument;
    }
}


/***/ }),

/***/ "./compiler/types/ArrayType.ts":
/*!*************************************!*\
  !*** ./compiler/types/ArrayType.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ArrayType": () => (/* binding */ ArrayType)
/* harmony export */ });
class ArrayType {
    constructor(elemType, isDotDotDot = false, isQuestion = false) {
        this.elemType = elemType;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "array";
    }
    toConstructor() {
        return `new ArrayType(${this.elemType.toConstructor()}, ${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return `${this.elemType.toString()}[]`;
    }
    convert(argument) {
        if (!Array.isArray(argument)) {
            try {
                argument = JSON.parse(argument);
            }
            catch (e) {
                throw new Error(`Can't convert ${argument} to array:`);
            }
            if (!Array.isArray(argument)) {
                throw new Error(`Can't convert ${argument} to array:`);
            }
        }
        return argument.map(v => this.elemType.convert(v));
    }
}


/***/ }),

/***/ "./compiler/types/BooleanType.ts":
/*!***************************************!*\
  !*** ./compiler/types/BooleanType.ts ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BooleanType": () => (/* binding */ BooleanType)
/* harmony export */ });
class BooleanType {
    constructor(isDotDotDot = false, isQuestion = false) {
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "boolean";
    }
    toConstructor() {
        return `new BooleanType(${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convert(argument) {
        if (argument === "true") {
            return true;
        }
        else if (argument === "false") {
            return false;
        }
        throw new Error("Can't convert ${argument} to boolean");
    }
}


/***/ }),

/***/ "./compiler/types/FunctionType.ts":
/*!****************************************!*\
  !*** ./compiler/types/FunctionType.ts ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FunctionType": () => (/* binding */ FunctionType)
/* harmony export */ });
class FunctionType {
    constructor(args, ret, isDotDotDot = false, isQuestion = false) {
        this.args = args;
        this.ret = ret;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "function";
    }
    toConstructor() {
        return (`new FunctionType([` +
            // Convert every argument type to its string constructor representation
            this.args.map(cur => cur.toConstructor()) +
            `], ${this.ret.toConstructor()}, ${this.isDotDotDot}, ${this.isQuestion})`);
    }
    toString() {
        return `(${this.args.map(a => a.toString()).join(", ")}) => ${this.ret.toString()}`;
    }
    convert(argument) {
        // Possible strategies:
        // - eval()
        // - window[argument]
        // - tri.excmds[argument]
        throw new Error(`Conversion to function not implemented: ${argument}`);
    }
}


/***/ }),

/***/ "./compiler/types/LiteralTypeType.ts":
/*!*******************************************!*\
  !*** ./compiler/types/LiteralTypeType.ts ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LiteralTypeType": () => (/* binding */ LiteralTypeType)
/* harmony export */ });
class LiteralTypeType {
    constructor(value, isDotDotDot = false, isQuestion = false) {
        this.value = value;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "LiteralType";
    }
    toConstructor() {
        return `new LiteralTypeType(${JSON.stringify(this.value)}, ${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return JSON.stringify(this.value);
    }
    convert(argument) {
        if (argument === this.value) {
            return argument;
        }
        throw new Error(`Argument does not match expected value (${this.value}): ${argument}`);
    }
}


/***/ }),

/***/ "./compiler/types/NumberType.ts":
/*!**************************************!*\
  !*** ./compiler/types/NumberType.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "NumberType": () => (/* binding */ NumberType)
/* harmony export */ });
class NumberType {
    constructor(isDotDotDot = false, isQuestion = false) {
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "number";
    }
    toConstructor() {
        return `new NumberType(${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convert(argument) {
        const n = parseFloat(argument);
        if (!Number.isNaN(n)) {
            return n;
        }
        throw new Error(`Can't convert to number: ${argument}`);
    }
}


/***/ }),

/***/ "./compiler/types/ObjectType.ts":
/*!**************************************!*\
  !*** ./compiler/types/ObjectType.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ObjectType": () => (/* binding */ ObjectType)
/* harmony export */ });
class ObjectType {
    // Note: a map that has an empty key ("") uses the corresponding type as default type
    constructor(members = new Map(), isDotDotDot = false, isQuestion = false) {
        this.members = members;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "object";
    }
    toConstructor() {
        return `new ObjectType(new Map<string, Type>([` +
            Array.from(this.members.entries()).map(([n, m]) => `[${JSON.stringify(n)}, ${m.toConstructor()}]`)
                .join(", ") +
            `]), ${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convertMember(memberName, memberValue) {
        let type = this.members.get(memberName[0]);
        if (!type) {
            // No type, try to get the default type
            type = this.members.get("");
            if (!type) {
                // No info for this member and no default type, anything goes
                return memberValue;
            }
        }
        if (type.kind === "object") {
            return type.convertMember(memberName.slice(1), memberValue);
        }
        return type.convert(memberValue);
    }
    convert(argument) {
        try {
            return JSON.parse(argument);
        }
        catch (e) {
            throw new Error(`Can't convert to object: ${argument}`);
        }
    }
}


/***/ }),

/***/ "./compiler/types/StringType.ts":
/*!**************************************!*\
  !*** ./compiler/types/StringType.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StringType": () => (/* binding */ StringType)
/* harmony export */ });
class StringType {
    constructor(isDotDotDot = false, isQuestion = false) {
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "string";
    }
    toConstructor() {
        return `new StringType(${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convert(argument) {
        if (typeof argument === "string") {
            return argument;
        }
        throw new Error(`Can't convert to string: ${argument}`);
    }
}


/***/ }),

/***/ "./compiler/types/TupleType.ts":
/*!*************************************!*\
  !*** ./compiler/types/TupleType.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TupleType": () => (/* binding */ TupleType)
/* harmony export */ });
class TupleType {
    constructor(elemTypes, isDotDotDot = false, isQuestion = false) {
        this.elemTypes = elemTypes;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "tuple";
    }
    toConstructor() {
        return (`new TupleType([` +
            // Convert every element type to its constructor representation
            this.elemTypes.map(cur => cur.toConstructor()).join(",\n") +
            `], ${this.isDotDotDot}, ${this.isQuestion})`);
    }
    toString() {
        return `[${this.elemTypes.map(e => e.toString()).join(", ")}]`;
    }
    convert(argument) {
        if (!Array.isArray(argument)) {
            try {
                argument = JSON.parse(argument);
            }
            catch (e) {
                throw new Error(`Can't convert to tuple: ${argument}`);
            }
            if (!Array.isArray(argument)) {
                throw new Error(`Can't convert to tuple: ${argument}`);
            }
        }
        if (argument.length !== this.elemTypes.length) {
            throw new Error(`Error converting tuple: number of elements and type mismatch ${argument}`);
        }
        return argument.map((v, i) => this.elemTypes[i].convert(v));
    }
}


/***/ }),

/***/ "./compiler/types/TypeReferenceType.ts":
/*!*********************************************!*\
  !*** ./compiler/types/TypeReferenceType.ts ***!
  \*********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TypeReferenceType": () => (/* binding */ TypeReferenceType)
/* harmony export */ });
class TypeReferenceType {
    constructor(kind, args, isDotDotDot = false, isQuestion = false) {
        this.kind = kind;
        this.args = args;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
    }
    toConstructor() {
        return (`new TypeReferenceType(${JSON.stringify(this.kind)}, [` +
            // Turn every type argument into its constructor representation
            this.args.map(cur => cur.toConstructor()).join(",\n") +
            `], ${this.isDotDotDot}, ${this.isQuestion})`);
    }
    toString() {
        return `${this.kind}<${this.args.map(a => a.toString()).join(", ")}>`;
    }
    convert(argument) {
        throw new Error("Conversion of simple type references not implemented.");
    }
}


/***/ }),

/***/ "./compiler/types/UnionType.ts":
/*!*************************************!*\
  !*** ./compiler/types/UnionType.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "UnionType": () => (/* binding */ UnionType)
/* harmony export */ });
class UnionType {
    constructor(types, isDotDotDot = false, isQuestion = false) {
        this.types = types;
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "union";
    }
    toConstructor() {
        return (`new UnionType([` +
            // Convert every type to its string constructor representation
            this.types.map(cur => cur.toConstructor()).join(",\n") +
            `], ${this.isDotDotDot}, ${this.isQuestion})`);
    }
    toString() {
        return this.types.map(t => t.toString()).join(" | ");
    }
    convert(argument) {
        for (const t of this.types) {
            try {
                return t.convert(argument);
            }
            catch (e) { }
        }
        throw new Error(`Can't convert "${argument}" to any of: ${this.types}`);
    }
}


/***/ }),

/***/ "./compiler/types/VoidType.ts":
/*!************************************!*\
  !*** ./compiler/types/VoidType.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "VoidType": () => (/* binding */ VoidType)
/* harmony export */ });
class VoidType {
    constructor(isDotDotDot = false, isQuestion = false) {
        this.isDotDotDot = isDotDotDot;
        this.isQuestion = isQuestion;
        this.kind = "void";
    }
    toConstructor() {
        return `new VoidType(${this.isDotDotDot}, ${this.isQuestion})`;
    }
    toString() {
        return this.kind;
    }
    convert(argument) {
        return null;
    }
}


/***/ }),

/***/ "./src/.metadata.generated.ts":
/*!************************************!*\
  !*** ./src/.metadata.generated.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "everything": () => (/* binding */ everything),
/* harmony export */   "staticThemes": () => (/* binding */ staticThemes)
/* harmony export */ });
/* harmony import */ var _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../compiler/types/AllTypes */ "./compiler/types/AllTypes.ts");
/* harmony import */ var _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../compiler/metadata/AllMetadata */ "./compiler/metadata/AllMetadata.ts");


let everything = new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.ProgramMetadata(new Map([["src/excmds.ts", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.FileMetadata(new Map([]), new Map([["getNativeVersion", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], false, false), false, false), true)], ["getRssLinks", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false, false)], false, false), false, false), true)], ["rssexec", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Execute [[rsscmd]] for an rss link.\n\nIf `url` is undefined, Tridactyl will look for rss links in the current\npage. If it doesn't find any, it will display an error message. If it finds\nmultiple urls, it will offer completions in order for you to select the link\nyou're interested in. If a single rss feed is found, it will automatically\nbe selected.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["fillinput", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Fills the element matched by `selector` with content and falls back to the last used input if the element can't be found. You probably don't want this; it's used internally for [[editor]].\n\nThat said, `bind gs fillinput null [Tridactyl](https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/) is my favourite add-on` could probably come in handy.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["getInput", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("HTMLElement", [], false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), true)],
            ["getinput", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), true)],
            ["getInputSelector", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["addTridactylEditorClass", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Element", [], false, false), false, false), true)],
            ["removeTridactylEditorClass", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["editor", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens your favourite editor (which is currently gVim) and fills the last used input with whatever you write into that file.\n**Requires that the native messenger is installed, see [[native]] and [[nativeinstall]]**.\n\nUses the `editorcmd` config option, default = `auto` looks through a list defined in lib/native.ts try find a sensible combination. If it's a bit slow, or chooses the wrong editor, or gives up completely, set editorcmd to something you want. The command must stay in the foreground until the editor exits.\n\nThe editorcmd needs to accept a filename, stay in the foreground while it's edited, save the file and exit. By default the filename is added to the end of editorcmd, if you require control over the position of that argument, the first occurrence of %f in editorcmd is replaced with the filename. %l, if it exists, is replaced with the line number of the cursor and %c with the column number. For example:\n```\nset editorcmd terminator -u -e \"vim %f '+normal!%lGzv%c|'\"\n```\n\nYou're probably better off using the default insert mode bind of `<C-i>` (Ctrl-i) to access this.\n\nThis function returns a tuple containing the path to the file that was opened by the editor and its content. This enables creating commands such as the following one, which deletes the temporary file created by the editor:\n```\nalias editor_rm composite editor | jsb -p tri.native.run(`rm -f '${JS_ARG[0]}'`)\nbind --mode=insert <C-i> editor_rm\nbind --mode=input <C-i> editor_rm\n```", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false)], false, false)], false, false), false, false), false)],
            ["guiset_quiet", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[guiset]] but quieter.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["guiset", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Change which parts of the Firefox user interface are shown. **NB: This feature is experimental and might break stuff.**\n\nMight mangle your userChrome. Requires native messenger, and you must restart Firefox each time to see any changes (this can be done using [[restart]]). <!-- (unless you enable addon debugging and refresh using the browser toolbox) -->\n\nAlso flips the preference `toolkit.legacyUserProfileCustomizations.stylesheets` to true so that FF will read your userChrome.\n\nView available rules and options [here](/static/docs/modules/_src_lib_css_util_.html#potentialrules) and [here](/static/docs/modules/_src_lib_css_util_.html#metarules).\n\nExample usage: `guiset gui none`, `guiset gui full`, `guiset tabs autohide`.\n\nSome of the available options:\n\n- gui\n      - full\n      - none\n\n- tabs\n      - always\n      - autohide\n\n- navbar\n      - always\n      - autohide\n      - none\n\n- hoverlink (the little link that appears when you hover over a link)\n      - none\n      - left\n      - right\n      - top-left\n      - top-right\n\n- statuspanel (hoverlink + the indicator that appears when a website is loading)\n      - none\n      - left\n      - right\n      - top-left\n      - top-right\n\nIf you want to use guiset in your tridactylrc, you might want to use [[guiset_quiet]] instead.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["cssparse", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["loadtheme", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["unloadtheme", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["colourscheme", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Changes the current theme.\n\nIf THEMENAME is any of the themes that can be found in the [Tridactyl repo](https://github.com/tridactyl/tridactyl/tree/master/src/static/themes) (e.g. 'dark'), the theme will be loaded from Tridactyl's internal storage.\n\nIf THEMENAME is set to any other value except `--url`, Tridactyl will attempt to use its native binary (see [[native]]) in order to load a CSS file named THEMENAME from disk. The CSS file has to be in a directory named \"themes\" and this directory has to be in the same directory as your tridactylrc. If this fails, Tridactyl will attempt to load the theme from its internal storage.\n\nLastly, themes can be loaded from URLs with `:colourscheme --url [url] [themename]`. They are stored internally - if you want to update the theme run the whole command again.\n\nNote that the theme name should NOT contain any dot.\n\nExample: `:colourscheme mysupertheme`\nOn linux, this will load ~/.config/tridactyl/themes/mysupertheme.css\n\n__NB__: due to Tridactyl's architecture, the theme will take a small amount of time to apply as each page is loaded. If this annoys you, you may use [userContent.css](http://kb.mozillazine.org/index.php?title=UserContent.css&printable=yes) to make changes to Tridactyl earlier. For example, users using the dark theme may like to put\n\n```\n:root {\n     --tridactyl-bg: black !important;\n     --tridactyl-fg: white !important;\n}\n```\n\nin their `userContent.css`. Follow [issue #2510](https://github.com/tridactyl/tridactyl/issues/2510) if you would like to find out when we have made a more user-friendly solution.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["setpref", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Write a setting to your user.js file. Requires a [[restart]] after running to take effect.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["removepref", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Remove a setting from your user.js file.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["fixamo_quiet", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[fixamo]] but quieter.\n\nNow purely a placebo as [[fixamo]] has been removed.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["fixamo", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Used to simply set\n```js\n  \"privacy.resistFingerprinting.block_mozAddonManager\":true\n  \"extensions.webextensions.restrictedDomains\":\"\"\n```\nin about:config via user.js so that Tridactyl (and other extensions!) can be used on addons.mozilla.org and other sites.\n\nRemoved at the request of the Firefox Security team. Replacements exist in our exemplar RC file.\n\nRequires `native` and a `restart`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["nativeopen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Uses the native messenger to open URLs.\n\n**Be *seriously* careful with this:**\n\n1. the implementation basically execs `firefox --new-tab <your shell escaped string here>`\n2. you can use it to open any URL you can open in the Firefox address bar,\n    including ones that might cause side effects (firefox does not guarantee\n    that about: pages ignore query strings).\n\nYou've been warned.\n\nThis uses the [[browser]] setting to know which binary to call. If you need to pass additional arguments to firefox (e.g. '--new-window'), make sure they appear before the url.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["exclaim", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Run command in /bin/sh (unless you're on Windows), and print the output in the command line. Non-zero exit codes and stderr are ignored, currently.\n\nRequires the native messenger, obviously.\n\nIf you want to use a different shell, just prepend your command with whatever the invocation is and keep in mind that most shells require quotes around the command to be executed, e.g. `:exclaim xonsh -c \"1+2\"`.\n\nAliased to `!` but the exclamation mark **must be followed with a space**.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["exclaim_quiet", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like exclaim, but without any output to the command line.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], false, false), false, false), false)],
            ["native", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Tells you if the native messenger is installed and its version.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["nativeinstall", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Copies the installation command for the native messenger to the clipboard and asks the user to run it in their shell.\n\nThe native messenger's source code may be found here: https://github.com/tridactyl/native_messenger/blob/master/src/native_main.nim\n\nIf your corporate IT policy disallows execution of binaries which have not been whitelisted but allows Python scripts, you may instead use the old native messenger by running `install.sh` or `win_install.ps1` from https://github.com/tridactyl/tridactyl/tree/master/native - the main downside is that it is significantly slower.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["mktridactylrc", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Writes current config to a file.\n\nNB: an RC file is not required for your settings to persist: all settings are stored in a local Firefox storage database by default as soon as you set them.\n\nWith no arguments supplied the excmd will try to find an appropriate\nconfig path and write the rc file to there. Any argument given to the\nexcmd excluding the `-f` flag will be treated as a path to write the rc\nfile to relative to the native messenger's location (`~/.local/share/tridactyl/`). By default, it silently refuses to overwrite existing files.\n\nThe RC file will be split into sections that will be created if a config\nproperty is discovered within one of them:\n- General settings\n- Binds\n- Aliases\n- Autocmds\n- Autocontainers\n- Logging\n\nNote:\n- Subconfig paths fall back to using `js tri.config.set(key: obj)` notation.\n- This method is also used as a fallback mechanism for objects that didn't hit\n  any of the heuristics.\n\nAvailable flags:\n- `-f` will overwrite the config file if it exists.\n- `--clipboard` write config to clipboard - no [[native]] required", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["source", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Runs an RC file from disk or a URL\n\nThis function accepts a flag: `--url` to load a RC from a URL.\n\nIf no argument given, it will try to open ~/.tridactylrc, ~/.config/tridactyl/tridactylrc or $XDG_CONFIG_HOME/tridactyl/tridactylrc in reverse order. You may use a `_` in place of a leading `.` if you wish, e.g, if you use Windows.\n\nIf no url is specified with the `--url` flag, the current page's URL is used to locate the RC file. Ensure the URL you pass (or page you are on) is a \"raw\" RC file, e.g. https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc and not https://github.com/tridactyl/tridactyl/blob/master/.tridactylrc.\n\nTridactyl won't run on many raw pages due to a Firefox bug with Content Security Policy, so you may need to use the `source --url [URL]` form.\n\nOn Windows, the `~` expands to `%USERPROFILE%`.\n\nThe RC file is just a bunch of Tridactyl excmds (i.e, the stuff on this help page). Settings persist in local storage. There's an [example file](https://raw.githubusercontent.com/tridactyl/tridactyl/master/.tridactylrc) if you want it.\n\nThere is a [bug](https://github.com/tridactyl/tridactyl/issues/1409) where not all lines of the RC file are executed if you use `sanitise` at the top of it. We instead recommend you put `:bind ZZ composite sanitise tridactyllocal; qall` in your RC file and use `ZZ` to exit Firefox.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["source_quiet", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Same as [[source]] but suppresses all errors", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["updatenative", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Updates the native messenger if it is installed, using our GitHub repo. This is run every time Tridactyl is updated.\n\nIf you want to disable this, or point it to your own native messenger, edit the `nativeinstallcmd` setting.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["restart", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Restarts firefox with the same commandline arguments.\n\nWarning: This can kill your tabs, especially if you :restart several times\nin a row", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["saveas", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Download the current document.\n\nIf you have the native messenger v>=0.1.9 installed, the function accepts an optional argument, filename, which can be:\n- An absolute path\n- A path starting with ~, which will be expanded to your home directory\n- A relative path, relative to the native messenger executable (e.g. ~/.local/share/tridactyl on linux).\nIf filename is not given, a download dialogue will be opened. If filename is a directory, the file will be saved inside of it, its name being inferred from the URL. If the directories mentioned in the path do not exist or if a file already exists at this path, the file will be kept in your downloads folder and an error message will be given.\n\n**NB**: if a non-default save location is chosen, Firefox's download manager will say the file is missing. It is not - it is where you asked it to be saved.\n\nFlags:\n- `--overwrite`: overwrite the destination file.\n- `--cleanup`: removes the downloaded source file e.g. `$HOME/Downlods/downloaded.doc` if moving it to the desired directory fails.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tabSetActive", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)],
            ["getJumpPageId", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("This is used as an ID for the current page in the jumplist.\nIt has a potentially confusing behavior: if you visit site A, then site B, then visit site A again, the jumplist that was created for your first visit on A will be re-used for your second visit.\nAn ideal solution would be to have a counter that is incremented every time a new page is visited within the tab and use that as the return value for getJumpPageId but this doesn't seem to be trivial to implement.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), true)],
            ["saveJumps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["curJumps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Returns a promise for an object containing the jumplist of all pages accessed in the current tab.\nThe keys of the object currently are the page's URL, however this might change some day. Use [[getJumpPageId]] to access the jumplist of a specific page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["jumpnext", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Calls [[jumpprev]](-n)", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["jumpprev", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Similar to Pentadactyl or vim's jump list.\n\nWhen you scroll on a page, either by using the mouse or Tridactyl's key bindings, your position in the page will be saved after jumpdelay milliseconds (`:get jumpdelay` to know how many milliseconds that is). If you scroll again, you'll be able to go back to your previous position by using `:jumpprev 1`. If you need to go forward in the jumplist, use `:jumpprev -1`.\n\nKnown bug: Tridactyl will use the same jumplist for multiple visits to a same website in the same tab, see [github issue 834](https://github.com/tridactyl/tridactyl/issues/834).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["addJump", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Called on 'scroll' events.\nIf you want to have a function that moves within the page but doesn't add a\nlocation to the jumplist, make sure to set JUMPED to true before moving\naround.\nThe setTimeout call is required because sometimes a user wants to move\nsomewhere by pressing 'j' multiple times and we don't want to add the\nin-between locations to the jump list", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["unfocus", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Blur (unfocus) the active element", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["scrollpx", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Scrolls the window or any scrollable child element by a pixels on the horizontal axis and b pixels on the vertical axis.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["scrollto", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("If two numbers are given, treat as x and y values to give to window.scrollTo\nIf one number is given, scroll to that percentage along a chosen axis, defaulting to the y-axis. If the number has 'c' appended to it, it will be interpreted in radians.\n\nNote that if `a` is 0 or 100 and if the document is not scrollable in the given direction, Tridactyl will attempt to scroll the first scrollable element until it reaches the very bottom of that element.\n\nExamples:\n\n- `scrollto 50` -> scroll halfway down the page.\n- `scrollto 3.14c` -> scroll approximately 49.97465213% of the way down the page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("x", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("y", false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["scrollline", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Scrolls the document of its first scrollable child element by n lines.\n\nThe height of a line is defined by the site's CSS. If Tridactyl can't get it, it'll default to 22 pixels.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["scrollpage", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Scrolls the document by n pages.\nThe height of a page is the current height of the window.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["find", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Rudimentary find mode, left unbound by default as we don't currently support `incsearch`. Suggested binds:\n\n     bind / fillcmdline find\n     bind ? fillcmdline find -?\n     bind n findnext 1\n     bind N findnext -1\n     bind ,<Space> nohlsearch\n\nArgument: A string you want to search for.\n\nThis function accepts two flags: `-?` to search from the bottom rather than the top and `-: n` to jump directly to the nth match.\n\nThe behavior of this function is affected by the following setting:\n\n`findcase`: either \"smart\", \"sensitive\" or \"insensitive\". If \"smart\", find will be case-sensitive if the pattern contains uppercase letters.\n\nKnown bugs: find will currently happily jump to a non-visible element, and pressing n or N without having searched for anything will cause an error.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["findnext", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Jump to the next searched pattern.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["clearsearchhighlight", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["history", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["forward", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Navigate forward one page in history.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["back", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Navigate back one page in history.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["reload", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reload the next n tabs, starting with activeTab, possibly bypassingCache", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["reloadall", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reloads all tabs, bypassing the cache if hard is set to true", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["reloadallbut", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reloads all tabs except the current one, bypassing the cache if hard is set to true\nYou probably want to use [[reloaddead]] instead if you just want to be able to ensure Tridactyl is loaded in all tabs where it can be", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["reloaddead", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reloads all tabs which Tridactyl isn't loaded in", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TupleType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false)], false, false), false, false), false)],
            ["reloadhard", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reload the next n tabs, starting with activeTab. bypass cache for all", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["open", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Open a new page in the current tab.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["bmarks", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Works exactly like [[open]], but only suggests bookmarks.\n\nIf you want to use optional flags, you should run `:set completions.Bmark.autoselect false` to prevent the spacebar from inserting the URL of the top bookmark.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["open_quiet", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[open]] but doesn't make a new entry in history.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["url2args", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("If the url of the current document matches one of your search engines, will convert it to a list of arguments that open/tabopen will understand. If the url doesn't match any search engine, returns the url without modifications.\n\nFor example, if you have searchurls.gi set to \"https://www.google.com/search?q=%s&tbm=isch\", using this function on a page you opened using \"gi butterflies\" will return \"gi butterflies\".\n\nThis is useful when combined with fillcmdline, for example like this: `bind O composite url2args | fillcmdline open`.\n\nNote that this might break with search engines that redirect you to other pages/add GET parameters that do not exist in your searchurl.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], false, false), false, false), false)],
            ["removeSource", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["viewsource", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Display the (HTML) source of the current page.\n\nBehaviour can be changed by the 'viewsource' setting.\n\nIf the 'viewsource' setting is set to 'default' rather than 'tridactyl',\nthe url the source of which should be displayed can be given as argument.\nOtherwise, the source of the current document will be displayed.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["home", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Go to the homepages you have set with `set homepages [\"url1\", \"url2\"]`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["help", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Show this page.\n\n`:help something` jumps to the entry for something. Something can be an excmd, an alias for an excmd, a binding or a setting.\n\nOn the ex command page, the \"nmaps\" list is a list of all the bindings for the command you're seeing and the \"exaliases\" list lists all its aliases.\n\nIf there's a conflict (e.g. you have a \"go\" binding that does something, a \"go\" excmd that does something else and a \"go\" setting that does a third thing), the binding is chosen first, then the setting, then the excmd. In such situations, if you want to let Tridactyl know you're looking for something specfic, you can specify the following flags as first arguments:\n\n`-a`: look for an alias\n`-b`: look for a binding\n`-e`: look for an ex command\n`-s`: look for a setting\n\nIf the keyword you gave to `:help` is actually an alias for a composite command (see [[composite]]) , you will be taken to the help section for the first command of the pipeline. You will be able to see the whole pipeline by hovering your mouse over the alias in the \"exaliases\" list. Unfortunately there currently is no way to display these HTML tooltips from the keyboard.\n\ne.g. `:help bind`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["apropos", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Search through the help pages. Accepts the same flags as [[help]]. Only useful in interactive usage with completions; the command itself is just a wrapper for [[help]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tutor", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Start the tutorial", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["credits", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Display Tridactyl's contributors in order of commits in a user-friendly fashion", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["no_mouse_mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Cover the current page in an overlay to prevent clicking on links with the mouse to force yourself to use hint mode. Get rid of it by reloading the page.\n\nTo bring back mouse control, use [[mouse_mode]] or refresh the page.\n\nSuggested usage: `autocmd DocLoad .* no_mouse_mode`\n\n\"There is no mouse\".", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["neo_mouse_mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Matrix variant of [[no_mouse_mode]]\n\n\"There is no mouse\".\n\nCoincidentally added to Tridactyl at the same time as we reached 1337 stars on GitHub.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["snow_mouse_mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Christmas variant of [[no_mouse_mode]] (if you live in $DEFAULT hemisphere).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["pied_piper_mouse_mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Music variant of [[no_mouse_mode]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["mouse_mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Revert any variant of the [[no_mouse_mode]]\n\nSuggested usage: `bind <C-\\> mouse_mode` with the autocmd mentioned in [[no_mouse_mode]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["findRelLink", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("RegExp", [], false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("HTMLAnchorElement", [], false, false), false, false), true)],
            ["selectLast", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("HTMLElement", [], false, false), false, false), true)],
            ["followpage", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Find a likely next/previous link and follow it\n\nIf a link or anchor element with rel=rel exists, use that, otherwise fall back to:\n\n    1) find the last anchor on the page with innerText matching the appropriate `followpagepattern`.\n    2) call [[urlincrement]] with 1 or -1\n\nIf you want to support e.g. French:\n\n```\nset followpagepatterns.next ^(next|newer|prochain)\\b|»|>>\nset followpagepatterns.prev ^(prev(ious)?|older|précédent)\\b|«|<<\n```", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("next", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("prev", false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["urlincrement", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Increment the current tab URL", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["urlroot", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Go to the root domain of the current URL", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["urlparent", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Go to the parent URL of the current tab's URL", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["urlmodify", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Open a URL made by modifying the current URL\n\nThere are several modes:\n\n* Text replace mode:   `urlmodify -t <old> <new>`\n\n   Replaces the first instance of the text `old` with `new`.\n      * `http://example.com` -> (`-t exa peta`) -> `http://petample.com`\n\n* Regex replacment mode: `urlmodify -r <regexp> <new> [flags]`\n\n   Replaces the first match of the `regexp` with `new`. You can use\n   flags `i` and `g` to match case-insensitively and to match\n   all instances respectively\n      * `http://example.com` -> (`-r [ea] X g`) -> `http://XxXmplX.com`\n\n* Query set mode: `urlmodify -s <query> <value>`\n\n   Sets the value of a query to be a specific one. If the query already\n   exists, it will be replaced.\n      * `http://e.com?id=abc` -> (`-s foo bar`) -> `http://e.com?id=abc&foo=bar\n\n* Query replace mode: `urlmodify -q <query> <new_val>`\n\n   Replace the value of a query with a new one:\n      * `http://e.com?id=foo` -> (`-q id bar`) -> `http://e.com?id=bar\n\n* Query delete mode: `urlmodify -Q <query>`\n\n   Deletes the given query (and the value if any):\n      * `http://e.com?id=foo&page=1` -> (`-Q id`) -> `http://e.com?page=1`\n\n* Graft mode: `urlmodify -g <graft_point> <new_path_tail>`\n\n   \"Grafts\" a new tail on the URL path, possibly removing some of the old\n   tail. Graft point indicates where the old URL is truncated before adding\n   the new path.\n\n   * `graft_point` >= 0 counts path levels, starting from the left\n   (beginning). 0 will append from the \"root\", and no existing path will\n   remain, 1 will keep one path level, and so on.\n   * `graft_point` < 0 counts from the right (i.e. the end of the current\n   path). -1 will append to the existing path, -2 will remove the last path\n   level, and so on.\n\n   ```plaintext\n   http://website.com/this/is/the/path/component\n   Graft point:       ^    ^  ^   ^    ^        ^\n   From left:         0    1  2   3    4        5\n   From right:       -6   -5 -4  -3   -2       -1\n   ```\n\n   Examples:\n\n   * `http://e.com/issues/42` -> (`-g 0 foo`) -> `http://e.com/foo`\n   * `http://e.com/issues/42` -> (`-g 1 foo`) -> `http://e.com/issues/foo`\n   * `http://e.com/issues/42` -> (`-g -1 foo`) -> `http://e.com/issues/42/foo`\n   * `http://e.com/issues/42` -> (`-g -2 foo`) -> `http://e.com/issues/foo`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-t", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-r", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-s", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-q", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-Q", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-g", false, false)], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["urlmodify_js", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[urlmodify]] but returns the modified URL for use with [[js]] and [[composite]]\n\nE.g.\n\n`:composite urlmodify_js -t www. old. | tabopen `", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-t", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-r", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-s", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-q", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-Q", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-g", false, false)], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["geturlsforlinks", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Returns the url of links that have a matching rel.\n\nDon't bind to this: it's an internal function.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["zoom", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Sets the current page's zoom level anywhere between 30% and 300%.\n\nIf you overshoot the level while using relative adjustments i.e. level > 300% or level < 30% the zoom level will be set to it's maximum or minimum position. Relative adjustments are made * in percentage points, i.e. `:zoom +10 true` increases the zoom level from 50% to 60% or from * 200% to 210%.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["reader", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens the current page in Firefox's reader mode.\nYou currently cannot use Tridactyl while in reader mode.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["loadaucmds", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("UriChange", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("DocStart", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("DocLoad", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("DocEnd", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("TabEnter", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("TabLeft", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("FullscreenEnter", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("FullscreenLeft", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("FullscreenChange", false, false)], false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["focusinput", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Focus the last used input on the page", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["changelistjump", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Focus the tab which contains the last focussed input element. If you're lucky, it will focus the right input, too.\n\nCurrently just goes to the last focussed input; being able to jump forwards and backwards is planned.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["focusbyid", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["tabIndexSetActive", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)],
            ["tabnext", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Switch to the next tab, wrapping round.\n\nIf increment is specified, move that many tabs forwards.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["tabnext_gt", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Switch to the next tab, wrapping round.\n\nIf an index is specified, go to the tab with that number (this mimics the\nbehaviour of `{count}gt` in vim, except that this command will accept a\ncount that is out of bounds (and will mod it so that it is within bounds as\nper [[tabmove]], etc)).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tabprev", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Switch to the previous tab, wrapping round.\n\nIf increment is specified, move that many tabs backwards.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["tabpush", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Pushes the current tab to another window. Only works for windows of the same type\n(can't push a non-private tab to a private window or a private tab to\na non-private window).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tabaudio", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Switch to the tab currently playing audio, if any.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["winmerge", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Moves all of the targetted window's tabs to the current window. Only works for windows of the same type\n(can't merge a non-private tab with a private window).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["parseWinTabIndex", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Given a string of the format windowIndex.tabIndex, returns a tuple of\nnumbers corresponding to the window index and tab index or the current\nwindow and tab if the string doesn't have the right format.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false, false)], false, false), false, false), false)],
            ["tabgrab", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Moves a tab identified by a windowIndex.tabIndex id to the current window.\nOnly works for windows of the same type (can't grab a non-private tab from a\nprivate window and can't grab a private tab from a non-private window).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false), false, false)], false, false)], false, false), false, false), false)],
            ["tabopen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[open]], but in a new tab. If no address is given, it will open the newtab page, which can be set with `set newtab [url]`\n\nUse the `-c` flag followed by a container name to open a tab in said container. Tridactyl will try to fuzzy match a name if an exact match is not found (opening the tab in no container can be enforced with \"firefox-default\" or \"none\"). If any autocontainer directives are configured and -c is not set, Tridactyl will try to use the right container automatically using your configurations.\n\nUse the `-b` flag to open the tab in the background.\n\nUse the `-w` flag to wait for the web page to load before \"returning\". This only makes sense for use with [[composite]], which waits for each command to return before moving on to the next one, e.g. `composite tabopen -b -w news.bbc.co.uk ; tabnext`.\n\nThese three can be combined in any order, but need to be placed as the first arguments.\n\nUnlike Firefox's Ctrl-t shortcut, this opens tabs immediately after the\ncurrently active tab rather than at the end of the tab list because that is\nthe authors' preference.\n\nIf you would rather the Firefox behaviour `set tabopenpos last`. This\npreference also affects the clipboard, quickmarks, home, help, etc.\n\nIf you would rather the URL be opened as if you'd middle clicked it, `set\ntabopenpos related`.\n\nHinting is controlled by `relatedopenpos`\n\nAlso see the [[searchengine]] and [[searchurls]] settings.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["tabqueue", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Passes its first argument to `tabopen -b`. Once the tab opened by `tabopen\n-b` is activated/selected/focused, opens its second argument with `tabopen\n-b`. Once the second tab is activated/selected/focused, opens its third\nargument with `tabopen -b` and so on and so forth until all arguments have\nbeen opened in a new tab or until a tab is closed without being\nactivated/selected/focused.\n\nExample usage:\n   `tabqueue http://example.org http://example.com http://example.net`\n   `composite hint -qpipe a href | tabqueue`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["idFromIndex", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Resolve a tab index to the tab id of the corresponding tab in this window.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, false), false, false), true)],
            ["tabFromIndex", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[idFromIndex]] but returns the whole tab object", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), true)],
            ["tabonly", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Close all other tabs in this window", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["tabduplicate", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Duplicate a tab.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["tabdetach", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Detach a tab, opening it in a new window.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Window", [], false, false)], false, false), false, false), false)],
            ["getSortedWinTabs", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Get list of tabs sorted by most recent use", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false), false, false)], false, false), false, false), true)],
            ["fullscreen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Toggle fullscreen state", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Window", [], false, false)], false, false), false, false), false)],
            ["tabclose", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Close a tab.\n\nKnown bug: autocompletion will make it impossible to close more than one tab at once if the list of numbers looks enough like an open tab's title or URL.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["tabcloseallto", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Close all tabs to the side specified", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["undo", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Restore the most recently closed item.\nThe default behaviour is to restore the most recently closed tab in the\ncurrent window unless the most recently closed item is a window.\n\nSupplying either \"tab\" or \"window\" as an argument will specifically only\nrestore an item of the specified type. Supplying \"tab_strict\" only restores\ntabs that were open in the current window.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], false, false), false, false), false)],
            ["tabmove", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Move the current tab to be just in front of the index specified.\n\nKnown bug: This supports relative movement with `tabmove +pos` and `tabmove -pos`, but autocomplete doesn't know that yet and will override positive and negative indexes.\n\nPut a space in front of tabmove if you want to disable completion and have the relative indexes at the command line.\n\nBinds are unaffected.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false), false, false)], false, false)], false, false), false, false), false)],
            ["tabsort", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Move tabs in current window according to various criteria:\n\n- `--containers` groups tabs by containers\n- `--title` sorts tabs by title\n- `--url` sorts tabs by url (the default)\n- `(tab1, tab2) => true|false`\n      - sort by arbitrary comparison function. `tab{1,2}` are objects with properties described here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["pin", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Pin the current tab", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["mute", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Mute current tab or all tabs.\n\nPassing \"all\" to the excmd will operate on  the mute state of all tabs.\nPassing \"unmute\" to the excmd will unmute.\nPassing \"toggle\" to the excmd will toggle the state of `browser.tabs.tab.MutedInfo`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["winopen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[tabopen]], but in a new window.\n\n`winopen -private [...]` will open the result in a private window (and won't store the command in your ex-history ;) ).\n\n`winopen -popup [...]` will open it in a popup window. You can combine the two for a private popup.\n\n`winopen -c containername [...]` will open the result in a container while ignoring other options given. See [[tabopen]] for more details on containers.\n\nExample: `winopen -popup -private ddg.gg`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["winclose", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Close a window.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["qall", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Close all windows", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], false, false), false, false), false)],
            ["containerclose", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Closes all tabs open in the same container across all windows.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["containercreate", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Creates a new container. Note that container names must be unique and that the checks are case-insensitive.\n\nFurther reading https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextualIdentities/ContextualIdentity\n\nExample usage:\n    - `:containercreate tridactyl green dollar`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["containerdelete", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Delete a container. Closes all tabs associated with that container beforehand. Note: container names are case-insensitive.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["containerupdate", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Update a container's information. Note that none of the parameters are optional and that container names are case-insensitive.\n\nExample usage:\n\n- Changing the container name: `:containerupdate banking blockchain green dollar`\n\n- Changing the container icon: `:containerupdate banking banking green briefcase`\n\n- Changing the container color: `:containerupdate banking banking purple dollar`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["viewcontainers", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Shows a list of the current containers in Firefox's native JSON viewer in the current tab.\n\nNB: Tridactyl cannot run on this page!", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["recontain", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens the current tab in another container.\n\nThis is probably not a good idea if you care about tracking protection!\nTransfering URLs from one container to another allows websites to track\nyou across those containers.\n\nRead more here:\nhttps://github.com/mozilla/multi-account-containers/wiki/Moving-between-containers", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["version", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["mode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Switch mode.\n\nFor now you probably shouldn't manually switch to other modes than `normal` and `ignore`. Make sure you're aware of the key bindings (ignoremaps) that will allow you to go come back to normal mode from ignore mode before you run `:mode ignore` otherwise you're going to have a hard time re-enabling Tridactyl.\n\nExample:\n     - `mode ignore` to ignore almost all keys.\n\nIf you're looking for a way to temporarily disable Tridactyl, `mode ignore` might be what you're looking for.\n\nNote that when in ignore mode, Tridactyl will not switch to insert mode when focusing text areas/inputs. This is by design.\n\n**New feature:** you can add modes as simply as adding binds with `bind --mode=[newmodename]` and then enter the mode with `mode [newmodename]`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["getnexttabs", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false, false)], false, false), false, false), true)],
            ["repeat", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Repeats a `cmd` `n` times.\nIf `cmd` doesn't exist, re-executes the last exstr that was executed in the tab.\nExecutes the command once if `n` isn't defined either.\n\nThis re-executes the last *exstr*, not the last *excmd*. Some excmds operate internally by constructing and evaluating exstrs, others by directly invoking excmds without going through the exstr parser. For example, aucmds and keybindings evaluate exstrs and are repeatable, while commands like `:bmarks` directly invoke `:tabopen` and you'll repeat the `:bmarks` rather than the internal `:tabopen`.\n\nIt's difficult to execute this in the background script (`:jsb`, `:run_excmd`, `:autocmd TriStart`, `:source`), but if you you do, it will re-execute the last exstr that was executed in the background script. What this may have been is unpredictable and not precisely encouraged.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["composite", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Split `cmds` on pipes (|) and treat each as its own command. Return values are passed as the last argument of the next ex command, e.g,\n\n`composite echo yes | fillcmdline` becomes `fillcmdline yes`. A more complicated example is the ex alias, `command current_url composite get_current_url | fillcmdline_notrail `, which is used in, e.g. `bind T current_url tabopen`.\n\nWorkaround: this should clearly be in the parser, but we haven't come up with a good way to deal with |s in URLs, search terms, etc. yet.\n\n`cmds` are also split with semicolons (;) and don't pass things along to each other.\n\nIf you wish to have a command that has semi-colons in it (e.g. some JavaScript or `hint -;`), first bind a [[command]] to it. For example, `command hint_focus -;`, and then `composite hint_focus; !s xdotool key Menu`.\n\nThe behaviour of combining ; and | in the same composite command is left as an exercise for the reader.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["shellescape", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Escape command for safe use in shell with composite. E.g: `composite js MALICIOUS_WEBSITE_FUNCTION() | shellescape | exclaim ls`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["escapehatch", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Magic escape hatch: if Tridactyl can't run in the current tab, return to a tab in the current window where Tridactyl can run, making such a tab if it doesn't currently exist. If Tridactyl can run in the current tab, return focus to the document body from e.g. the URL bar or a video player.\n\nOnly useful if called from a background context, e.g. at the end of an RC file to ensure that when you start the browser you don't get trapped on an about: page, or via `bind --mode=browser escapehatch` (bound to `<C-,>` by default).\n\nNB: when called via `bind --mode=browser`, we return focus from the address bar by opening and closing the \"sidebar\" (which is used exclusively for this purpose). If escapehatch is called in any other way, we cannot do this as Mozilla thinks it might [spook](https://extensionworkshop.com/documentation/publish/add-on-policies/#no-surprises) [you](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions) : ).\n\nThis sidebar hack will close other sidebars such a TreestyleTabs. You can disable it with `:set escapehatchsidebarhack false`, but Tridactyl will no longer be able to get focus back from certain places such as the address bar.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["sleep", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Sleep time_ms milliseconds.\nThis is probably only useful for composite commands that need to wait until the previous asynchronous command has finished running.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["showcmdline", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["hidecmdline", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["fillcmdline", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Set the current value of the commandline to string *with* a trailing space", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["fillcmdline_notrail", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Set the current value of the commandline to string *without* a trailing space", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["fillcmdline_nofocus", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Show and fill the command line without focusing it", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["fillcmdline_tmp", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Shows str in the command line for ms milliseconds. Recommended duration: 3000ms.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["yank", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Copy `content` to clipboard without feedback. Use `clipboard yank` for interactive use.\n\ne.g. `yank bob` puts \"bob\" in the clipboard; `composite js document.title | yank` puts the document title in the clipboard.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false)], false, false), false, false), false)],
            ["setclip", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Copies a string to the clipboard/selection buffer depending on the user's preferences.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false)], false, false), false, false), true)],
            ["setclip_webapi", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Copies a string to the clipboard using the Clipboard API.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["getclip", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Fetches the content of the clipboard/selection buffer depending on user's preferences\n\nExposed for use with [[composite]], e.g. `composite getclip | fillcmdline`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("clipboard", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("selection", false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["getclip_webapi", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Gets the clipboard content using the Clipboard API.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], false, false), false, false), true)],
            ["clipboard", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Use the system clipboard.\n\nIf `excmd === \"open\"`, call [[open]] with the contents of the clipboard. Similarly for [[tabopen]].\n\nIf `excmd === \"yank\"`, copy the current URL, or if given, the value of toYank, into the system clipboard.\n\nIf `excmd === \"yankcanon\"`, copy the canonical URL of the current page if it exists, otherwise copy the current URL.\n\nIf `excmd === \"yankshort\"`, copy the shortlink version of the current URL, and fall back to the canonical then actual URL. Known to work on https://yankshort.neocities.org/.\n\nIf `excmd === \"yanktitle\"`, copy the title of the open page.\n\nIf `excmd === \"yankmd\"`, copy the title and url of the open page formatted in Markdown for easy use on sites such as reddit. `yankorg` is similar but for Emacs orgmode.\n\nIf you're on Linux and the native messenger is installed, Tridactyl will call an external binary (either xclip or xsel) to read or write to your X selection buffer. If you want another program to be used, set \"externalclipboardcmd\" to its name and make sure it has the same interface as xsel/xclip (\"-i\"/\"-o\" and reading from stdin).\n\nWhen doing a read operation (i.e. open or tabopen), if \"putfrom\" is set to \"selection\", the X selection buffer will be read instead of the clipboard. Set \"putfrom\" to \"clipboard\" to use the clipboard.\n\nWhen doing a write operation, if \"yankto\" is set to \"selection\", only the X selection buffer will be written to. If \"yankto\" is set to \"both\", both the X selection and the clipboard will be written to. If \"yankto\" is set to \"clipboard\", only the clipboard will be written to.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("open", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yank", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yankshort", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yankcanon", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yanktitle", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yankmd", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("yankorg", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("xselpaste", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("tabopen", false, false)], false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["yankimage", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Copy an image to the clipboard.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["tab", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Change active tab.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["taball", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Wrapper for [[tab]] with multi-window completions", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tab_helper", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Helper to change active tab. Used by [[tab]] and [[taball]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["command", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Similar to vim's `:command`. Maps one ex-mode command to another.\nIf command already exists, this will override it, and any new commands\nadded in a future release will be SILENTLY overridden. Aliases are\nexpanded recursively.\n\nExamples:\n  - `command t tabopen`\n  - `command tn tabnext_gt`\n  - `command hello t` This will expand recursively into 'hello'->'tabopen'\n\nCommands/aliases are expanded as in a shell, so, given the commands above,\nentering `:tn 43` will expand to `:tabnext_gt 43`. You can use this to create\nyour own ex-commands in conjunction with [[js]], specifically `js -p` and `js -d`.\n\nNote that this is only for excmd -> excmd mappings. To map a normal-mode\ncommand to an excommand, see [[bind]].\n\nSee also:\n  - [[comclear]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["comclear", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Similar to vim's `comclear` command. Clears an excmd alias defined by\n`command`.\n\nFor example: `comclear helloworld` will reverse any changes caused\nby `command helloworld xxx`\n\nSee also:\n  - [[command]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["bind", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Bind a sequence of keys to an excmd or view bound sequence.\n\nThis is an easier-to-implement bodge while we work on vim-style maps.\n\nExamples:\n\n    - `bind G fillcmdline tabopen google`\n    - `bind D composite tabclose | tab #` -> close current tab and switch to most recent previous tab\n    - `bind j scrollline 20`\n    - `bind F hint -b`\n\nYou can view binds by omitting the command line:\n\n    - `bind j`\n    - `bind k`\n\nYou can bind to modifiers and special keys by enclosing them with angle brackets, for example `bind <C-\\>z fullscreen`, `unbind <F1>` (a favourite of people who use TreeStyleTabs :) ), or `bind <Backspace> forward`.\n\nModifiers are truncated to a single character, so Ctrl -> C, Alt -> A, and Shift -> S. Shift is a bit special as it is only required if Shift does not change the key inputted, e.g. `<S-ArrowDown>` is OK, but `<S-a>` should just be `A`.\n\nYou can view all special key names here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n\nUse [[composite]] if you want to execute multiple excmds. Use\n[[fillcmdline]] to put a string in the cmdline and focus the cmdline\n(otherwise the string is executed immediately).\n\nYou can bind to other modes with `bind --mode={insert|ignore|normal|input|ex|hint} ...`, e.g, `bind --mode=insert emacs qall` (NB: unlike vim, all preceeding characters will not be input), or `bind --mode=hint <C-[> hint.reset`.\n\n`bind --mode=browser [key sequence] [ex command]` binds to a special mode which can be accessed all the time in all browser tabs - even tabs in which Tridactyl cannot run. It comes with a few caveats:\n\n- you may only have a few browser-mode binds at once. At the time of writing, this is 8, with 3 initially taken by Tridactyl. If you desperately need more, file an [[issue]].\n- the key sequence must consist of a single, simple key with at least one and no more than two modifiers. An error will be thrown if you try to bind to an invalid key sequence.\n- the `ex command` you bind to may not work fully unless you are on a tab which Tridactyl has access to. Generally, browser-wide actions like making or closing tabs will work but tab-specific actions like scrolling down or entering hint mode will not.\n\nA list of editor functions can be found\n[here](/static/docs/modules/_src_lib_editor_.html).\n\nSee also:\n\n    - [[unbind]]\n    - [[reset]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["bindurl", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Like [[bind]] but for a specific url pattern (also see [[seturl]]).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["keymap", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Makes one key equivalent to another for the purposes of most of our parsers. Useful for international keyboard layouts. See user-provided examples for various layouts on our wiki: https://github.com/tridactyl/tridactyl/wiki/Internationalisation\n\ne.g,\n     keymap ę e\n\nSee `:help keytranslatemodes` to enable keymaps in modes other than normal mode.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["searchsetkeyword", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["validateSetArgs", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Validates arguments for set/seturl", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false, false), true)],
            ["seturl", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Usage: `seturl [pattern] key values`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["set", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Set a key value pair in config.\n\nUse to set any values found [here](/static/docs/classes/_src_lib_config_.default_config.html).\n\nArrays should be set using JS syntax, e.g. `:set blacklistkeys [\"/\",\",\"]`.\n\ne.g.\n    set searchurls.google https://www.google.com/search?q=\n    set logging.messaging info\n\nIf no value is given, the value of the of the key will be displayed.\n\nSee also: [[unset]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["firefoxsyncpull", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Replaces your local configuration with that stored in the Firefox Sync area.\n\nIt does not merge your configurations: it overwrites.\n\nAlso see [[firefoxsyncpush]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["firefoxsyncpush", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Pushes your local configuration to the Firefox Sync area.\n\nIt does not merge your configurations: it overwrites.\n\nAlso see [[firefoxsyncpull]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["autocmd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Set autocmds to run when certain events happen.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["autocontain", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Automatically open a domain and all its subdomains in a specified container.\n\n__NB:__ You should use this command with an -s (sane mode) or -u (URL mode) flag. Usage without a flag uses an incorrect regular expression which may cause weird behaviour and has been left in for compatibility reasons.\n\nThis function accepts a `-u` flag to treat the pattern as a URL rather than a domain.\nFor example: `autocontain -u ^https?://([^/]*\\\\.|)youtube\\\\.com/ google` is equivalent to `autocontain -s youtube\\.com google`\n\nFor declaring containers that do not yet exist, consider using `auconcreatecontainer true` in your tridactylrc.\nThis allows Tridactyl to automatically create containers from your autocontain directives. Note that they will be random icons and colors.\n\nThe domain is passed through as a regular expression so there are a few gotchas to be aware of:\n* Unescaped periods will match *anything*. `autocontain -s google.co.uk work` will match `google!co$uk`. Escape your periods [twice](https://javascript.info/regexp-escaping#new-regexp) (i.e. `\\\\.` rather than `\\.`) or accept that you might get some false positives.\n* You can use regex in your pattern. `autocontain -s google\\\\.(co\\\\.uk|com) work` will match either `google.co.uk` or `google.com`.\n\nThis *should* now peacefully coexist with the Temporary Containers and Multi-Account Containers addons. Do not trust this claim. If a fight starts the participants will try to open infinite tabs. It is *strongly* recommended that you use a tridactylrc so that you can abort a sorceror's-apprentice scenario by killing firefox, commenting out all of autocontainer directives in your rc file, and restarting firefox to clean up the mess. There are a number of strange behaviors resulting from limited coordination between extensions. Redirects can be particularly surprising; for example, with `:autocontain -s will-redirect.example.org example` set and `will-redirect.example.org` redirecting to `redirected.example.org`, navigating to `will-redirect.example.org` will result in the new tab being in the `example` container under some conditions and in the `firefox-default` container under others.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["autocmddelete", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Remove autocmds", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["blacklistadd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Helper function to put Tridactyl into ignore mode on the provided URL.\n\nSimply creates a DocStart [[autocmd]] that runs `mode ignore`. NB: ignore mode does have a few keybinds by default - see `:viewconfig ignoremaps`. These can be unbound with, e.g. `:unbind --mode=ignore <C-o>`, or `:unbindurl [url] --mode=ignore <C-o>`.\n\nRemove sites from the blacklist with `blacklistremove [url]` or `autocmddelete DocStart [url]`.\n\nIf you're looking for a way to temporarily disable Tridactyl, this might be what you're looking for.\n\n<!-- this should probably be moved to an ex alias once configuration has better help --!>", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["unbind", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Unbind a sequence of keys so that they do nothing at all.\n\nSee also:\n\n    - [[bind]]\n    - [[reset]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["unbindurl", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Unbind a sequence of keys you have set with [[bindurl]]. Note that this **kills** a bind, which means Tridactyl will pass it to the page on `pattern`. If instead you want to use the default setting again, use [[reseturl]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["reset", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Restores a sequence of keys to their default value.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["reseturl", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Restores a sequence of keys to their value in the global config for a specific URL pattern.\n\nSee also:\n  - [[bind]]\n  - [[unbind]]\n  - [[reset]]\n  - [[bindurl]]\n  - [[unbindurl]]\n  - [[seturl]]\n  - [[unseturl]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["sanitise", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Deletes various bits of Firefox or Tridactyl data\n\nThe list of possible arguments can be found here:\nhttps://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/DataTypeSet\n\nAdditional Tridactyl-specific arguments are:\n- `commandline`: Removes the in-memory commandline history.\n- `tridactyllocal`: Removes all tridactyl storage local to this machine. Use it with\n    commandline if you want to delete your commandline history.\n- `tridactylsync`: Removes all tridactyl storage associated with your Firefox Account (i.e, all user configuration, by default).\nThese arguments aren't affected by the timespan parameter.\n\nTimespan parameter:\n-t [0-9]+(m|h|d|w)\n\nExamples:\n\n- `sanitise all` -> Deletes __everything__, including any saved usernames / passwords(!)\n- `sanitise history` -> Deletes all history\n- `sanitise commandline tridactyllocal tridactylsync` -> Deletes every bit of data Tridactyl holds\n- `sanitise cookies -t 3d` -> Deletes cookies that were set during the last three days.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["quickmark", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Bind a quickmark for the current URL or space-separated list of URLs to a key on the keyboard.\n\nAfterwards use go[key], gn[key], or gw[key] to [[open]], [[tabopen]], or\n[[winopen]] the URL respectively.\n\nExample:\n- `quickmark m https://mail.google.com/mail/u/0/#inbox`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["get", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Puts the contents of config value with keys `keys` into the commandline and the background page console\n\nIt's a bit rubbish, but we don't have a good way to provide feedback to the commandline yet.\n\nYou can view the log entry in the browser console (Ctrl-Shift-j).\n\nFor example, you might try `get nmaps` to see all of your current binds.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["viewconfig", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens the current configuration in Firefox's native JSON viewer in the current tab.\n\nNB: only works well from a \"normal\" page, e.g not a Tridactyl help or new tab page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["jsonview", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("View a JSON object in Firefox's JSON viewer. NB: only works well from a \"normal\" page, e.g not a Tridactyl help or new tab page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["unseturl", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reset a site-specific setting.\n\nusage: `unseturl [pattern] key`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["unset", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Reset a config setting to default", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["setnull", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("\"Delete\" a default setting. E.g. `setnull searchurls.github` means `open github test` would search your default search engine for \"github test\".", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["hint", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Hint a page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["rot13", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Perform rot13.\n\nTransforms all text nodes in the current tab via rot13. Only characters in\nthe ASCII range are considered.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["jumble", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Perform text jumbling (reibadailty).\n\nShuffles letters except for first and last in all words in text nodes in the current tab. Only characters in\nthe ASCII range are considered.\n\nInspired by: https://www.newscientist.com/letter/mg16221887-600-reibadailty/", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["run_exstr", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Hacky ex string parser.\n\nUse it for fire-and-forget running of background commands in content.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["gobble", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Initialize gobble mode.\n\nIt will read `nChars` input keys, append them to `endCmd` and execute that\nstring.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["nmode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Initialize n [mode] mode.\n\nIn this special mode, a series of key sequences are executed as bindings from a different mode, as specified by the\n`mode` argument. After the count of accepted sequences is `n`, the finalizing ex command given as the `endexArr`\nargument is executed, which defaults to `mode ignore`.\n\nExample: `:nmode normal 1 mode ignore`\nThis looks up the next key sequence in the normal mode bindings, executes it, and switches the mode to `ignore`.\nIf the key sequence does not match a binding, it will be silently passed through to Firefox, but it will be counted\nfor the termination condition.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["tssReadFromCss", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Read text content of elements matching the given selector", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), false)],
            ["ttsread", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Read the given text using the browser's text to speech functionality and\nthe settings currently set", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-t", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("-c", false, false)], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["ttsvoices", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Show a list of the voices available to the TTS system. These can be\nset in the config using `ttsvoice`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["ttscontrol", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Cancel current reading and clear pending queue\n\nArguments:\n   - stop:    cancel current and pending utterances", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["buildFilterConfigs", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Build a set of FilterConfigs from a list of human-input filter\nspecs.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false, false), true)],
            ["perfdump", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Dump the raw json for our performance counters. Filters with\ntrailing slashes are class names, :start | :end | :measure specify\nwhat type of sample to pass through, and all others are function\nnames. All filters must match for a sample to be dumped.\n\nTridactyl does not collect performance information by default. To\nget this data you'll have to set the configuration option\n`perfcounters` to `\"true\"`. You may also want to examine the value\nof `perfsamples`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["perfhistogram", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Pretty-print a histogram of execution durations for you. Arguments\nare as above, with the addition that this automatically filters to\ncounter samples of type :measure.\n\nNote that this will display its output by opening a data: url with\ntext in the place of your current tab.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["bmark", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Add or remove a bookmark.\n\nOptionally, you may give the bookmark a title. If no URL is given, a bookmark is added for the current page.\n\nIf a bookmark already exists for the URL, it is removed, even if a title is given.\n\nDoes not support creation of folders: you'll need to use the Firefox menus for that.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("BookmarkTreeNode", [], false, false)], false, false), false, false), false)],
            ["echo", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), false)],
            ["js_helper", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("helper function for js and jsb\n\n-p to take a single extra argument located at the end of str[]\n-d[delimiter character] to take a space-separated array of arguments after the delimiter\n-s to load js script of a source file from the config path", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), true)],
            ["js", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Lets you execute JavaScript in the page context. If you want to get the result back, use\n\n     `composite js ... | fillcmdline`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["jsb", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Lets you execute JavaScript in the background context. All the help from [[js]] applies. Gives you a different `tri` object which has access to more excmds and web-extension APIs.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["issue", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens a new tab the url of which is \"https://github.com/tridactyl/tridactyl/issues/new\" and automatically fill add tridactyl, firefox and os version to the issue.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Tab", [], false, false)], false, false), false, false), false)],
            ["updatecheck", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Checks if there are any stable updates available for Tridactyl.\n\nRelated settings:\n\n- `update.nag = true | false` - checks for updates on Tridactyl start.\n- `update.nagwait = 7` - waits 7 days before nagging you to update.\n- `update.checkintervalsecs = 86400` - waits 24 hours between checking for an update.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("manual", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("auto_polite", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("auto_impolite", false, false)], false, true)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, false)], false, false), false, false), false)],
            ["keyfeed", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Feed some keys to Tridactyl's parser. E.g. `keyfeed jkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjkjjkj`.\n\nNB:\n\n- Does _not_ function like Vim's noremap - `bind j keyfeed j` will cause an infinite loop.\n- Doesn't work in exmode - i.e. `keyfeed t<CR>` won't work.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["extoptions", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Opens optionsUrl for the selected extension in a popup window.\n\nNB: Tridactyl cannot run on this page!", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["elementunhide", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Restore the most recently hidden element. Repeated invocations restore the next-most-recently-hidden element.\n\n(Elements can be hidden with `;K` and `:hint -K`.)", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)]]))],
    ["src/lib/config.ts", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.FileMetadata(new Map([["default_config", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.ClassMetadata(new Map([["configversion", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Internal version number Tridactyl uses to know whether it needs to update from old versions of the configuration.\n\nChanging this might do weird stuff.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)], ["subconfigs", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Internal field to handle site-specific configs. Use :seturl/:unseturl to change these values.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([["", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("DeepPartial", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("default_config", [], false, false)], false, false)]]), false, false), false)], ["priority", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Internal field to handle site-specific config priorities. Use :seturl/:unseturl to change this value.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)], ["exmaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("exmaps contains all of the bindings for the command line.\nYou can of course bind regular ex commands but also [editor functions](/static/docs/modules/_src_lib_editor_.html) and [commandline-specific functions](/static/docs/modules/_src_commandline_frame_.html).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["ignoremaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("ignoremaps contain all of the bindings for \"ignore mode\".\n\nThey consist of key sequences mapped to ex commands.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["imaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("imaps contain all of the bindings for \"insert mode\".\n\nOn top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in insert mode.\n\nThey consist of key sequences mapped to ex commands.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["inputmaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("inputmaps contain all of the bindings for \"input mode\".\n\nOn top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in input mode.\n\nThey consist of key sequences mapped to ex commands.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["nmaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("nmaps contain all of the bindings for \"normal mode\".\n\nThey consist of key sequences mapped to ex commands.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["vmaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["hintmaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["browsermaps", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Browser-wide binds accessible in all modes and on pages where Tridactyl \"cannot run\".\n<!-- Note to developers: binds here need to also be listed in manifest.json -->", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["leavegithubalone", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to allow pages (not necessarily github) to override `/`, which is a default Firefox binding.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["blacklistkeys", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Which keys to protect from pages that try to override them. Requires [[leavegithubalone]] to be set to false.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), false)], ["autocmds", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Autocommands that run when certain events happen, and other conditions are met.\n\nRelated ex command: `autocmd`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["keytranslatemap", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Map for translating keys directly into other keys in normal-ish modes. For example, if you have an entry in this config option mapping `п` to `g`, then you could type `пп` instead of `gg` or `пi` instead of `gi` or `;п` instead of `;g`. This is primarily useful for international users who don't want to deal with rebuilding their bindings every time tridactyl ships a new default keybind. It's not as good as shipping properly internationalized sets of default bindings, but it's probably as close as we're going to get on a small open-source project like this.\n\nNote that the current implementation does not allow you to \"chain\" keys, for example, \"a\"=>\"b\" and \"b\"=>\"c\" for \"a\"=>\"c\". You can, however, swap or rotate keys, so \"a\"=>\"b\" and \"b\"=>\"a\" will work the way you'd expect, as will \"a\"=>\"b\" and \"b\"=>\"c\" and \"c\"=>\"a\".", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["keytranslatemodes", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to use the keytranslatemap in various maps.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([["", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false)]]), false, false), false)], ["autocontain", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Automatically place these sites in the named container.\n\nEach key corresponds to a URL fragment which, if contained within the page URL, the site will be opened in a container tab instead.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false)],
                    ["autocontainmode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary.\n\nRelaxed mode is less aggressive and instead treats container domains as a default when opening a new tab.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("strict", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("relaxed", false, false)], false, false), false)], ["exaliases", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Aliases for the commandline.\n\nYou can make a new one with `command alias ex-command`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)],
                    ["followpagepatterns", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Used by `]]` and `[[` to look for links containing these words.\n\nEdit these if you want to add, e.g. other language support.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["searchengine", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The default search engine used by `open search`. If empty string, your browser's default search engine will be used. If set to something, Tridactyl will first look at your [[searchurls]] and then at the search engines for which you have defined a keyword on `about:preferences#search`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)], ["searchurls", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Definitions of search engines for use via `open [keyword]`.\n\n`%s` will be replaced with your whole query and `%s1`, `%s2`, ..., `%sn` will be replaced with the first, second and nth word of your query. If there are none of these patterns in your search urls, your query will simply be appended to the searchurl.\n\nExamples:\n- When running `open gi cute puppies`, with a `gi` searchurl defined with `set searchurls.gi https://www.google.com/search?q=%s&tbm=isch`, tridactyl will navigate to `https://www.google.com/search?q=cute puppies&tbm=isch`.\n- When running `tabopen translate en ja Tridactyl`, with a `translate` searchurl defined with `set searchurls.translate https://translate.google.com/#view=home&op=translate&sl=%s1&tl=%s2&text=%s3`, tridactyl will navigate to `https://translate.google.com/#view=home&op=translate&sl=en&tl=ja&text=Tridactyl`.\n\n[[setnull]] can be used to \"delete\" the default search engines. E.g. `setnull searchurls.google`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["newtab", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("URL the newtab will redirect to.\n\nAll usual rules about things you can open with `open` apply, with the caveat that you'll get interesting results if you try to use something that needs `nativeopen`: so don't try `about:newtab` or a `file:///` URI. You should instead use a data URI - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - or host a local webserver (e.g. Caddy).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["viewsource", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether `:viewsource` will use our own page that you can use Tridactyl binds on, or Firefox's default viewer, which you cannot use Tridactyl on.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("tridactyl", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("default", false, false)], false, false), false)],
                    ["homepages", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Pages opened with `gH`. In order to set this value, use `:set homepages [\"example.org\", \"example.net\", \"example.com\"]` and so on.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), false)],
                    ["hintchars", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Characters to use in hint mode.\n\nThey are used preferentially from left to right.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["hintfiltermode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The type of hinting to use. `vimperator` will allow you to filter links based on their names by typing non-hint chars. It is recommended that you use this in conjuction with the [[hintchars]] setting, which you should probably set to e.g, `5432167890`. ´vimperator-reflow´ additionally updates the hint labels after filtering.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("simple", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("vimperator", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("vimperator-reflow", false, false)], false, false), false)],
                    ["hintnames", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to optimise for the shortest possible names for each hint, or to use a simple numerical ordering. If set to `numeric`, overrides `hintchars` setting.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("short", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("numeric", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("uniform", false, false)], false, false), false)],
                    ["hintuppercase", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to display the names for hints in uppercase.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["hintdelay", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The delay in milliseconds in `vimperator` style hint modes after selecting a hint before you are returned to normal mode.\n\nThe point of this is to prevent accidental execution of normal mode binds due to people typing more than is necessary to choose a hint.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["hintshift", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls whether hints should be shifted in quick-hints mode.\n\nHere's what it means: let's say you have hints from a to z but are only\ninterested in every second hint. You first press `a`, then `c`.\nTridactyl will realize that you skipped over `b`, and so that the next\nhint you're going to trigger is probably `e`. Tridactyl will shift all\nhint names so that `e` becomes `c`, `d` becomes `b`, `c` becomes `a` and\nso on.\nThis means that once you pressed `c`, you can keep on pressing `c` to\ntrigger every second hint. Only makes sense with hintnames = short.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["hintautoselect", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls whether hints should be followed automatically.\n\nIf set to `false`, hints will only be followed upon confirmation. This applies to cases when there is only a single match or only one link on the page.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["allowautofocus", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls whether the page can focus elements for you via js\n\nNB: will break fancy editors such as CodeMirror on Jupyter. Simply use `seturl` to whitelist pages you need it on.\n\nBest used in conjunction with browser.autofocus in `about:config`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["preventautofocusjackhammer", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Uses a loop to prevent focus until you interact with a page. Only recommended for use via `seturl` for problematic sites as it can be a little heavy on CPU if running on all tabs. Should be used in conjuction with [[allowautofocus]]", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["smoothscroll", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to use Tridactyl's (bad) smooth scrolling.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["scrollduration", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("How viscous you want smooth scrolling to feel.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["tabopenpos", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Where to open tabs opened with `tabopen` - to the right of the current tab, or at the end of the tabs.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("next", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("last", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("related", false, false)], false, false), false)],
                    ["tabclosepinned", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("When enabled (the default), running tabclose will close the tabs whether they are pinned or not. When disabled, tabclose will fail with an error if a tab is pinned.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["tabsort", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls which tab order to use when opening the tab/buffer list. Either mru = sort by most recent tab or default = by tab index", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("default", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("mru", false, false)], false, false), false)],
                    ["relatedopenpos", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Where to open tabs opened with hinting - as if it had been middle clicked, to the right of the current tab, or at the end of the tabs.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("next", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("last", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("related", false, false)], false, false), false)],
                    ["ttsvoice", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The name of the voice to use for text-to-speech. You can get the list of installed voices by running the following snippet: `js alert(window.speechSynthesis.getVoices().reduce((a, b) => a + \" \" + b.name))`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["ttsvolume", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls text-to-speech volume. Has to be a number between 0 and 1.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["ttsrate", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls text-to-speech speed. Has to be a number between 0.1 and 10.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["ttspitch", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Controls text-to-speech pitch. Has to be between 0 and 2.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["gimode", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("When set to \"nextinput\", pressing `<Tab>` after gi selects the next input.\n\nWhen set to \"firefox\", `<Tab>` behaves like normal, focusing the next tab-indexed element regardless of type.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("nextinput", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("firefox", false, false)], false, false), false)],
                    ["cursorpos", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Decides where to place the cursor when selecting non-empty input fields", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("beginning", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("end", false, false)], false, false), false)],
                    ["theme", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The theme to use.\n\nPermitted values: run `:composite js tri.styling.THEMES | fillcmdline` to find out.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)], ["customthemes", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Storage for custom themes\n\nMaps theme names to CSS. Predominantly used automatically by [[colourscheme]] to store themes read from disk, as documented by [[colourscheme]]. Setting this manually is untested but might work provided that [[colourscheme]] is then used to change the theme to the right theme name.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["modeindicator", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to display the mode indicator or not.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)], ["modeindicatormodes", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to display the mode indicator in various modes. Ignored if modeindicator set to false.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([["", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false)]]), false, false), false)], ["jumpdelay", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Milliseconds before registering a scroll in the jumplist", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)], ["logging", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Logging levels. Unless you're debugging Tridactyl, it's unlikely you'll ever need to change these.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([["", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("never", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("error", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("warning", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("info", false, false),
                                    new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("debug", false, false)], false, false)]]), false, false), false)], ["noiframe", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Disables the commandline iframe. Dangerous setting, use [[seturl]] to set it. If you ever set this setting to \"true\" globally and then want to set it to false again, you can do this by opening Tridactyl's preferences page from about:addons.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["noiframeon", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), false)],
                    ["editorcmd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Insert / input mode edit-in-$EDITOR command to run\nThis has to be a command that stays in the foreground for the whole editing session\n\"auto\" will attempt to find a sane editor in your path.\nPlease send your requests to have your favourite terminal moved further up the list to /dev/null.\n          (but we are probably happy to add your terminal to the list if it isn't already there.)\n\nExample values:\n- linux: `xterm -e vim`\n- windows: `start cmd.exe /c \\\"vim\\\"`.\n\nAlso see [:editor](/static/docs/modules/_src_excmds_.html#editor).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["rsscmd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Command that should be run by the [[rssexec]] ex command. Has the\nfollowing format:\n- %u: url\n- %t: title\n- %y: type (rss, atom, xml...)\nWarning: This is a very large footgun. %u will be inserted without any\nkind of escaping, hence you must obey the following rules if you care\nabout security:\n- Do not use a composite command. If you need a composite command,\ncreate an alias.\n- Do not use `js` or `jsb`. If you need to use them, create an alias.\n- Do not insert any %u, %t or %y in shell commands run by the native\nmessenger. Use pipes instead.\n\nHere's an example of how to save an rss url in a file on your disk\nsafely:\n`alias save_rss jsb -p tri.native.run(\"cat >> ~/.config.newsboat/urls\", JS_ARG)`\n`set rsscmd save_rss %u`\nThis is safe because the url is passed to jsb as an argument rather than\nbeing expanded inside of the string it will execute and because it is\npiped to the shell command rather than being expanded inside of it.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["browser", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("The browser executable to look for in commands such as `restart`. Not as mad as it seems if you have multiple versions of Firefox...", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["yankto", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Which clipboard to store items in. Requires the native messenger to be installed.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("clipboard", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("selection", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("both", false, false)], false, false), false)],
                    ["putfrom", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Which clipboard to retrieve items from. Requires the native messenger to be installed.\n\nPermitted values: `clipboard`, or `selection`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("clipboard", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("selection", false, false)], false, false), false)],
                    ["externalclipboardcmd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Clipboard command to try to get the selection from (e.g. `xsel` or `xclip`)", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["downloadsskiphistory", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether downloads (e.g. via ;s hint modes) appear in your download history.\n\nNB: will cause downloads to fail silently if Tridactyl is not allowed to run in private windows (regardless of whether you are trying to call it in a private window).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["nativeinstallcmd", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Set this to something weird if you want to have fun every time Tridactyl tries to update its native messenger.\n\n%TAG will be replaced with your version of Tridactyl for stable builds, or \"master\" for beta builds\n\nNB: Windows has its own platform-specific default.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)], ["update", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Used by :updatecheck and related built-in functionality to automatically check for updates and prompt users to upgrade.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["profiledir", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Profile directory to use with native messenger with e.g, `guiset`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["tabopencontaineraware", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("If enabled, tabopen opens a new tab in the currently active tab's container.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["containerindicator", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("If moodeindicator is enabled, containerindicator will color the border of the mode indicator with the container color.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["auconcreatecontainer", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Autocontain directives create a container if it doesn't exist already.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["historyresults", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Number of most recent results to ask Firefox for. We display the top 20 or so most frequently visited ones.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["bmarkweight", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("When displaying bookmarks in history completions, how many page views to pretend they have.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)], ["completions", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("General completions options - NB: options are set according to our internal completion source name - see - `src/completions/[name].ts` in the Tridactyl source.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ObjectType(new Map([]), false, false), false)], ["findresults", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Number of results that should be shown in completions. -1 for unlimited", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["findcontextlen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Number of characters to use as context for the matches shown in completions", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["findcase", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether find should be case-sensitive", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("smart", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("sensitive", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("insensitive", false, false)], false, false), false)],
                    ["incsearch", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether Tridactyl should jump to the first match when using `:find`", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["minincsearchlen", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("How many characters should be typed before triggering incsearch/completions", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.NumberType(false, false), false)],
                    ["csp", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Deprecated.\nChange this to \"clobber\" to ruin the \"Content Security Policy\" of all sites a bit and make Tridactyl run a bit better on some of them, e.g. raw.github*", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("untouched", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("clobber", false, false)], false, false), false)],
                    ["wordpattern", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("JavaScript RegExp used to recognize words in text.* functions (e.g. text.transpose_words). Should match any character belonging to a word.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["perfcounters", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Activate tridactyl's performance counters. These have a\nmeasurable performance impact, since every sample is a few\nhundred bytes and we sample tridactyl densely, but they're good\nwhen you're trying to optimize things.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["perfsamples", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("How many samples to store from the perf counters.\n\nEach performance entry is two numbers (16 bytes), an entryType\nof either \"mark\" or \"measure\" (js strings are utf-16 ad we have\ntwo marks for each measure, so amortize to about 10 bytes per\nentry), and a string name that for Tridactyl object will be\nabout 40 (utf-16) characters (80 bytes), plus object overhead\nroughly proportional to the string-length of the name of the\nconstructor (in this case something like 30 bytes), for a total\nof what we'll call 128 bytes for ease of math.\n\nWe want to store, by default, about 1MB of performance\nstatistics, so somewhere around 10k samples.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false)],
                    ["modeindicatorshowkeys", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Show (partial) command in the mode indicator.\nCorresponds to 'showcmd' option of vi.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["urlparenttrailingslash", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether a trailing slash is appended when we get the parent of a url with\ngu (or other means).", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["visualenterauto", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to enter visual mode when text is selected. Visual mode can always be entered with `:mode visual`.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["visualexitauto", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to return to visual mode when text is deselected.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)],
                    ["escapehatchsidebarhack", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Whether to open and close the sidebar quickly to get focus back to the page when <C-,> is pressed.\n\nDisable if the fact that it closes TreeStyleTabs gets on your nerves too much : )\n\nNB: when disabled, <C-,> can't get focus back from the address bar, but it can still get it back from lots of other places (e.g. Flash-style video players)", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("false", false, false),
                            new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("true", false, false)], false, false), false)]]))]]), new Map([["o", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["schlepp", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["getDeepProperty", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Given an object and a target, extract the target if it exists, else return undefined", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["setDeepProperty", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Create the key path target if it doesn't exist and set the final property to value.\n\nIf the path is an empty array, replace the obj.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["mergeDeep", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["getURL", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["get", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Get the value of the key target.\n\nIf the user has not specified a key, use the corresponding key from\ndefaults, if one exists, else undefined.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("rsscmd", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("noiframeon", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("csp", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("theme", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("autocmds", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("exaliases", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("autocontain", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("update", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("imaps", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("viewsource", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("nmaps", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("configversion", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("subconfigs", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("priority", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("... 69 more ...", [], false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("escapehatchsidebarhack", false, false)], false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), true)],
            ["getDynamic", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Get the value of the key target.\n\nPlease only use this with targets that will be used at runtime - it skips static checks. Prefer [[get]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), false, false), false)],
            ["getAsyncDynamic", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Get the value of the key target.\n\nPlease only use this with targets that will be used at runtime - it skips static checks. Prefer [[getAsync]].", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], false, false), false, false), false)],
            ["getAsync", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Get the value of the key target, but wait for config to be loaded from the\ndatabase first if it has not been at least once before.\n\nThis is useful if you are a content script and you've just been loaded.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.UnionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("rsscmd", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("noiframeon", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("csp", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("theme", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("autocmds", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("exaliases", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("autocontain", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("update", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("imaps", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("viewsource", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("nmaps", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("configversion", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("subconfigs", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("priority", false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("... 69 more ...", [], false, false),
                        new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.LiteralTypeType("escapehatchsidebarhack", false, false)], false, true), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("...", [], false, false)], false, false), false, false), true)],
            ["push", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["pull", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), false)],
            ["setURL", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["set", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Full target specification, then value\n\ne.g.\n    set(\"nmaps\", \"o\", \"open\")\n    set(\"search\", \"default\", \"google\")\n    set(\"aucmd\", \"BufRead\", \"memrise.com\", \"open memrise.com\")", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["unsetURL", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["unset", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Delete the key at target in USERCONFIG if it exists", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.ArrayType(new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["save", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Save the config back to storage API.\n\nConfig is not synchronised between different instances of this module until\nsometime after this happens.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["update", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Updates the config to the latest version.\nProposed semantic for config versionning:\n- x.y -> x+1.0 : major architectural changes\n- x.y -> x.y+1 : renaming settings/changing their types\nThere's no need for an updater if you're only adding a new setting/changing\na default setting\n\nWhen adding updaters, don't forget to set(\"configversion\", newversionnumber)!", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.BooleanType(false, false)], false, false), false, false), true)],
            ["init", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Read all user configuration from storage API then notify any waiting asynchronous calls\n\nasynchronous calls generated by getAsync.", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("Promise", [new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false)], false, false), false, false), true)],
            ["addChangeListener", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("P", [], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["removeChangeListener", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.TypeReferenceType("P", [], false, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false), new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.AnyType(true, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false)], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.VoidType(false, false), false, false), true)],
            ["parseConfig", new _compiler_metadata_AllMetadata__WEBPACK_IMPORTED_MODULE_1__.SymbolMetadata("Parse the config into a string representation of a .tridactylrc config file.\nTries to parse the config into sectionable chunks based on keywords.\nBinds, aliases, autocmds and logging settings each have their own section while the rest are dumped into \"General Settings\".", new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.FunctionType([], new _compiler_types_AllTypes__WEBPACK_IMPORTED_MODULE_0__.StringType(false, false), false, false), false)]]))]]));
let staticThemes = ["dark", "default", "greenmat", "halloween", "quake", "quakelight", "shydactyl"];


/***/ }),

/***/ "./src/commandline_frame.ts":
/*!**********************************!*\
  !*** ./src/commandline_frame.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "enableCompletions": () => (/* binding */ enableCompletions),
/* harmony export */   "focus": () => (/* binding */ focus),
/* harmony export */   "refresh_completions": () => (/* binding */ refresh_completions),
/* harmony export */   "clear": () => (/* binding */ clear),
/* harmony export */   "fillcmdline": () => (/* binding */ fillcmdline),
/* harmony export */   "getContent": () => (/* binding */ getContent),
/* harmony export */   "editor_function": () => (/* binding */ editor_function)
/* harmony export */ });
/* harmony import */ var _src_commandline_frame__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/commandline_frame */ "./src/commandline_frame.ts");
/* harmony import */ var _src_completions_Apropos__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions/Apropos */ "./src/completions/Apropos.ts");
/* harmony import */ var _src_completions_Bindings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/completions/Bindings */ "./src/completions/Bindings.ts");
/* harmony import */ var _src_completions_Bmark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/completions/Bmark */ "./src/completions/Bmark.ts");
/* harmony import */ var _src_completions_Composite__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/completions/Composite */ "./src/completions/Composite.ts");
/* harmony import */ var _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/completions/Excmd */ "./src/completions/Excmd.ts");
/* harmony import */ var _src_completions_Extensions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/completions/Extensions */ "./src/completions/Extensions.ts");
/* harmony import */ var _src_completions_FileSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @src/completions/FileSystem */ "./src/completions/FileSystem.ts");
/* harmony import */ var _src_completions_Guiset__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @src/completions/Guiset */ "./src/completions/Guiset.ts");
/* harmony import */ var _src_completions_Help__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @src/completions/Help */ "./src/completions/Help.ts");
/* harmony import */ var _src_completions_History__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @src/completions/History */ "./src/completions/History.ts");
/* harmony import */ var _src_completions_Preferences__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @src/completions/Preferences */ "./src/completions/Preferences.ts");
/* harmony import */ var _src_completions_Rss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @src/completions/Rss */ "./src/completions/Rss.ts");
/* harmony import */ var _src_completions_Sessions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @src/completions/Sessions */ "./src/completions/Sessions.ts");
/* harmony import */ var _src_completions_Settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @src/completions/Settings */ "./src/completions/Settings.ts");
/* harmony import */ var _src_completions_Tab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @src/completions/Tab */ "./src/completions/Tab.ts");
/* harmony import */ var _src_completions_TabAll__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @src/completions/TabAll */ "./src/completions/TabAll.ts");
/* harmony import */ var _src_completions_Theme__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @src/completions/Theme */ "./src/completions/Theme.ts");
/* harmony import */ var _src_completions_Window__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @src/completions/Window */ "./src/completions/Window.ts");
/* harmony import */ var _src_content_state_content__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @src/content/state_content */ "./src/content/state_content.ts");
/* harmony import */ var _src_content_styling__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @src/content/styling */ "./src/content/styling.ts");
/* harmony import */ var _src_lib_commandline_cmds__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @src/lib/commandline_cmds */ "./src/lib/commandline_cmds.ts");
/* harmony import */ var _src_lib_editor__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @src/lib/editor */ "./src/lib/editor.ts");
/* harmony import */ var _src_lib_html_tagged_template__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @src/lib/html-tagged-template */ "./src/lib/html-tagged-template.js");
/* harmony import */ var _src_lib_html_tagged_template__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_src_lib_html_tagged_template__WEBPACK_IMPORTED_MODULE_23__);
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_lib_number_clamp__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @src/lib/number.clamp */ "./src/lib/number.clamp.ts");
/* harmony import */ var _src_lib_number_clamp__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_src_lib_number_clamp__WEBPACK_IMPORTED_MODULE_26__);
/* harmony import */ var _src_parsers_genericmode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @src/parsers/genericmode */ "./src/parsers/genericmode.ts");
/* harmony import */ var _src_perf__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @src/perf */ "./src/perf.ts");
/* harmony import */ var _src_state__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @src/state */ "./src/state.ts");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/reverse.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/uniq.js");
/** # Command line functions
 *
 * This file contains functions to interact with the command line.
 *
 * If you want to bind them to keyboard shortcuts, be sure to prefix them with "ex.". For example, if you want to bind control-p to `prev_completion`, use:
 *
 * ```
 * bind --mode=ex <C-p> ex.prev_completion
 * ```
 *
 * Note that you can also bind Tridactyl's [editor functions](/static/docs/modules/_src_lib_editor_.html) in the command line.
 *
 * Contrary to the main tridactyl help page, this one doesn't tell you whether a specific function is bound to something. For now, you'll have to make do with `:bind` and `:viewconfig`.
 *
 */
/** ignore this line */
/** Script used in the commandline iframe. Communicates with background. */































/** @hidden **/
const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_24__.default("cmdline");
/** @hidden **/
const commandline_state = {
    activeCompletions: undefined,
    clInput: window.document.getElementById("tridactyl-input"),
    clear,
    cmdline_history_position: 0,
    completionsDiv: window.document.getElementById("completions"),
    fns: undefined,
    getCompletion,
    history,
    /** @hidden
     * This is to handle Escape key which, while the cmdline is focused,
     * ends up firing both keydown and input listeners. In the worst case
     * hides the cmdline, shows and refocuses it and replaces its text
     * which could be the prefix to generate a completion.
     * tl;dr TODO: delete this and better resolve race condition
     */
    isVisible: false,
    keyEvents: new Array(),
    refresh_completions,
    state: _src_state__WEBPACK_IMPORTED_MODULE_29__.default,
};
// first theming of commandline iframe
(0,_src_content_styling__WEBPACK_IMPORTED_MODULE_20__.theme)(document.querySelector(":root"));
/** @hidden **/
function resizeArea() {
    if (commandline_state.isVisible) {
        _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.messageOwnTab("commandline_content", "show");
        _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.messageOwnTab("commandline_content", "focus");
        focus();
    }
}
/** @hidden
 * This is a bit loosely defined at the moment.
 * Should work so long as there's only one completion source per prefix.
 */
function getCompletion(args_only = false) {
    if (!commandline_state.activeCompletions)
        return undefined;
    for (const comp of commandline_state.activeCompletions) {
        if (comp.state === "normal" && comp.completion !== undefined) {
            return args_only ? comp.args : comp.completion;
        }
    }
}
commandline_state.getCompletion = getCompletion;
/** @hidden **/
function enableCompletions() {
    if (!commandline_state.activeCompletions) {
        commandline_state.activeCompletions = [
            // FindCompletionSource,
            _src_completions_Bindings__WEBPACK_IMPORTED_MODULE_2__.BindingsCompletionSource,
            _src_completions_Bmark__WEBPACK_IMPORTED_MODULE_3__.BmarkCompletionSource,
            _src_completions_TabAll__WEBPACK_IMPORTED_MODULE_16__.TabAllCompletionSource,
            _src_completions_Tab__WEBPACK_IMPORTED_MODULE_15__.BufferCompletionSource,
            _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_5__.ExcmdCompletionSource,
            _src_completions_Theme__WEBPACK_IMPORTED_MODULE_17__.ThemeCompletionSource,
            _src_completions_Composite__WEBPACK_IMPORTED_MODULE_4__.CompositeCompletionSource,
            _src_completions_FileSystem__WEBPACK_IMPORTED_MODULE_7__.FileSystemCompletionSource,
            _src_completions_Guiset__WEBPACK_IMPORTED_MODULE_8__.GuisetCompletionSource,
            _src_completions_Help__WEBPACK_IMPORTED_MODULE_9__.HelpCompletionSource,
            _src_completions_Apropos__WEBPACK_IMPORTED_MODULE_1__.AproposCompletionSource,
            _src_completions_History__WEBPACK_IMPORTED_MODULE_10__.HistoryCompletionSource,
            _src_completions_Preferences__WEBPACK_IMPORTED_MODULE_11__.PreferenceCompletionSource,
            _src_completions_Rss__WEBPACK_IMPORTED_MODULE_12__.RssCompletionSource,
            _src_completions_Sessions__WEBPACK_IMPORTED_MODULE_13__.SessionsCompletionSource,
            _src_completions_Settings__WEBPACK_IMPORTED_MODULE_14__.SettingsCompletionSource,
            _src_completions_Window__WEBPACK_IMPORTED_MODULE_18__.WindowCompletionSource,
            _src_completions_Extensions__WEBPACK_IMPORTED_MODULE_6__.ExtensionsCompletionSource,
        ]
            .map(constructorr => {
            try {
                return new constructorr(commandline_state.completionsDiv);
            }
            catch (e) { }
        })
            .filter(c => c);
        const fragment = document.createDocumentFragment();
        commandline_state.activeCompletions.forEach(comp => fragment.appendChild(comp.node));
        commandline_state.completionsDiv.appendChild(fragment);
        logger.debug(commandline_state.activeCompletions);
    }
}
/* document.addEventListener("DOMContentLoaded", enableCompletions) */
/** @hidden **/
const noblur = () => setTimeout(() => commandline_state.clInput.focus(), 0);
/** @hidden **/
function focus() {
    commandline_state.clInput.focus();
    commandline_state.clInput.removeEventListener("blur", noblur);
    commandline_state.clInput.addEventListener("blur", noblur);
}
/** @hidden **/
let HISTORY_SEARCH_STRING;
/** @hidden
 * Command line keybindings
 **/
const keyParser = keys => _src_parsers_genericmode__WEBPACK_IMPORTED_MODULE_27__.parser("exmaps", keys);
/** @hidden **/
let history_called = false;
/** @hidden **/
let prev_cmd_called_history = false;
// Save programmer time by generating an immediately resolved promise
// eslint-disable-next-line @typescript-eslint/no-empty-function
const QUEUE = [(async () => { })()];
/** @hidden **/
commandline_state.clInput.addEventListener("keydown", function (keyevent) {
    if (!keyevent.isTrusted)
        return;
    commandline_state.keyEvents.push(keyevent);
    const response = keyParser(commandline_state.keyEvents);
    if (response.isMatch) {
        keyevent.preventDefault();
        keyevent.stopImmediatePropagation();
    }
    else {
        // Ideally, all keys that aren't explicitly bound to an ex command
        // should be bound to a "self-insert" command that would input the
        // key itself. Because it's not possible to generate events as if
        // they originated from the user, we can't do this, but we still
        // need to simulate it, in order to have history() work.
        prev_cmd_called_history = false;
    }
    if (response.value) {
        commandline_state.keyEvents = [];
        history_called = false;
        // If excmds start with 'ex.' they're coming back to us anyway, so skip that.
        // This is definitely a hack. Should expand aliases with exmode, etc.
        // but this whole thing should be scrapped soon, so whatever.
        if (response.value.startsWith("ex.")) {
            const [funcname, ...args] = response.value.slice(3).split(/\s+/);
            QUEUE[QUEUE.length - 1].then(() => {
                QUEUE.push(
                // Abuse async to wrap non-promises in a promise
                // eslint-disable-next-line @typescript-eslint/require-await
                (async () => commandline_state.fns[funcname](args.length === 0 ? undefined : args.join(" ")))());
                prev_cmd_called_history = history_called;
            });
        }
        else {
            // Send excmds directly to our own tab, which fixes the
            // old bug where a command would be issued in one tab but
            // land in another because the active tab had
            // changed. Background-mode excmds will be received by the
            // own tab's content script and then bounced through a
            // shim to the background, but the latency increase should
            // be acceptable becuase the background-mode excmds tend
            // to be a touch less latency-sensitive.
            _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.messageOwnTab("controller_content", "acceptExCmd", [
                response.value,
            ]).then(_ => (prev_cmd_called_history = history_called));
        }
    }
    else {
        commandline_state.keyEvents = response.keys;
    }
}, true);
function refresh_completions(exstr) {
    if (!commandline_state.activeCompletions)
        enableCompletions();
    return Promise.all(commandline_state.activeCompletions.map(comp => comp.filter(exstr).then(() => {
        if (comp.shouldRefresh()) {
            return resizeArea();
        }
    }))).catch(err => {
        console.error(err);
        return [];
    }); // We can't use the regular logging mechanism because the user is using the command line.
}
/** @hidden **/
let onInputPromise = Promise.resolve();
/** @hidden **/
commandline_state.clInput.addEventListener("input", () => {
    const exstr = commandline_state.clInput.value;
    _src_content_state_content__WEBPACK_IMPORTED_MODULE_19__.contentState.current_cmdline = exstr;
    _src_content_state_content__WEBPACK_IMPORTED_MODULE_19__.contentState.cmdline_filter = "";
    // Schedule completion computation. We do not start computing immediately because this would incur a slow down on quickly repeated input events (e.g. maintaining <Backspace> pressed)
    setTimeout(async () => {
        // Make sure the previous computation has ended
        await onInputPromise;
        // If we're not the current completion computation anymore, stop
        if (exstr !== commandline_state.clInput.value) {
            _src_content_state_content__WEBPACK_IMPORTED_MODULE_19__.contentState.cmdline_filter = exstr;
            return;
        }
        onInputPromise = refresh_completions(exstr);
        onInputPromise.then(() => {
            _src_content_state_content__WEBPACK_IMPORTED_MODULE_19__.contentState.cmdline_filter = exstr;
        });
    }, 100);
});
/** @hidden **/
let cmdline_history_current = "";
/** @hidden
 * Clears the command line.
 * If you intend to close the command line after this, set evlistener to true in order to enable losing focus.
 *  Otherwise, no need to pass an argument.
 */
function clear(evlistener = false) {
    if (evlistener)
        commandline_state.clInput.removeEventListener("blur", noblur);
    commandline_state.clInput.value = "";
    commandline_state.cmdline_history_position = 0;
    cmdline_history_current = "";
}
commandline_state.clear = clear;
/** @hidden **/
async function history(n) {
    history_called = true;
    if (!prev_cmd_called_history) {
        HISTORY_SEARCH_STRING = commandline_state.clInput.value;
    }
    // Check for matches in history, removing duplicates
    const matches = ramda__WEBPACK_IMPORTED_MODULE_30__.default(ramda__WEBPACK_IMPORTED_MODULE_31__.default(ramda__WEBPACK_IMPORTED_MODULE_30__.default(await _src_state__WEBPACK_IMPORTED_MODULE_29__.getAsync("cmdHistory")))).filter(key => key.startsWith(HISTORY_SEARCH_STRING));
    if (commandline_state.cmdline_history_position === 0) {
        cmdline_history_current = commandline_state.clInput.value;
    }
    let clamped_ind = matches.length + n - commandline_state.cmdline_history_position;
    clamped_ind = clamped_ind.clamp(0, matches.length);
    const pot_history = matches[clamped_ind];
    commandline_state.clInput.value =
        pot_history === undefined ? cmdline_history_current : pot_history;
    // if there was no clampage, update history position
    // there's a more sensible way of doing this but that would require more programmer time
    if (clamped_ind ===
        matches.length + n - commandline_state.cmdline_history_position)
        commandline_state.cmdline_history_position =
            commandline_state.cmdline_history_position - n;
}
commandline_state.history = history;
/** @hidden **/
function fillcmdline(newcommand, trailspace = true, ffocus = true) {
    if (trailspace)
        commandline_state.clInput.value = newcommand + " ";
    else
        commandline_state.clInput.value = newcommand;
    commandline_state.isVisible = true;
    let result = Promise.resolve([]);
    // Focus is lost for some reason.
    if (ffocus) {
        focus();
        result = refresh_completions(commandline_state.clInput.value);
    }
    return result;
}
/** @hidden **/
function getContent() {
    return commandline_state.clInput.value;
}
/** @hidden **/
function editor_function(fn_name, ...args) {
    let result = Promise.resolve([]);
    if (_src_lib_editor__WEBPACK_IMPORTED_MODULE_22__[fn_name]) {
        _src_lib_editor__WEBPACK_IMPORTED_MODULE_22__[fn_name](commandline_state.clInput, ...args);
        result = refresh_completions(commandline_state.clInput.value);
    }
    else {
        // The user is using the command line so we can't log message there
        // logger.error(`No editor function named ${fn_name}!`)
        console.error(`No editor function named ${fn_name}!`);
    }
    return result;
}
_src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.addListener("commandline_frame", _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.attributeCaller(_src_commandline_frame__WEBPACK_IMPORTED_MODULE_0__));
commandline_state.fns = (0,_src_lib_commandline_cmds__WEBPACK_IMPORTED_MODULE_21__.getCommandlineFns)(commandline_state);
_src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.addListener("commandline_cmd", _src_lib_messaging__WEBPACK_IMPORTED_MODULE_25__.attributeCaller(commandline_state.fns));
window.tri = Object.assign(window.tri || {}, {
    perfObserver: _src_perf__WEBPACK_IMPORTED_MODULE_28__.listenForCounters(),
});


/***/ }),

/***/ "./src/completions.ts":
/*!****************************!*\
  !*** ./src/completions.ts ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DEFAULT_FAVICON": () => (/* binding */ DEFAULT_FAVICON),
/* harmony export */   "CompletionOption": () => (/* binding */ CompletionOption),
/* harmony export */   "CompletionSource": () => (/* binding */ CompletionSource),
/* harmony export */   "CompletionOptionHTML": () => (/* binding */ CompletionOptionHTML),
/* harmony export */   "CompletionSourceFuse": () => (/* binding */ CompletionSourceFuse)
/* harmony export */ });
/* harmony import */ var fuse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fuse.js */ "./node_modules/fuse.js/dist/fuse.esm.js");
/* harmony import */ var _src_lib_itertools__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/itertools */ "./src/lib/itertools.ts");
/* harmony import */ var _src_lib_convert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/convert */ "./src/lib/convert.ts");
/* harmony import */ var _src_lib_aliases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/aliases */ "./src/lib/aliases.ts");
/* harmony import */ var _src_lib_patience__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/lib/patience */ "./src/lib/patience.ts");
/*

Have an array of all completion sources. Completion sources display nothing if the filter doesn't match for them.

On each input event, call updateCompletions on the array. That will mutate the array and update the display as required.

How to handle cached e.g. buffer information going out of date?

Concrete completion classes have been moved to src/completions/.

*/





const DEFAULT_FAVICON = browser.runtime.getURL("static/defaultFavicon.svg");
class CompletionOption {
}
class CompletionSource {
    constructor(prefixes) {
        this.prefixes = [];
        const commands = _src_lib_aliases__WEBPACK_IMPORTED_MODULE_3__.getCmdAliasMapping();
        // Now, for each prefix given as argument, add it to the completionsource's prefix list and also add any alias it has
        prefixes
            .map(p => p.trim())
            .forEach(p => {
            this.prefixes.push(p);
            if (commands[p])
                this.prefixes = this.prefixes.concat(commands[p]);
        });
        // Not sure this is necessary but every completion source has it
        this.prefixes = this.prefixes.map(p => p + " ");
    }
    /** Control presentation of Source */
    set state(newstate) {
        switch (newstate) {
            case "normal":
                this.node.classList.remove("hidden");
                this.completion = undefined;
                break;
            case "hidden":
                this.node.classList.add("hidden");
                break;
        }
        this._prevState = this._state;
        this._state = newstate;
    }
    get state() {
        return this._state;
    }
    shouldRefresh() {
        // A completion source should be refreshed if it is not hidden or if it just became hidden
        return this._state !== "hidden" || this.state !== this._prevState;
    }
    prev(inc = 1) {
        return this.next(-1 * inc);
    }
    deselect() {
        this.completion = undefined;
        if (this.lastFocused !== undefined)
            this.lastFocused.state = "normal";
    }
}
// Default classes
class CompletionOptionHTML extends CompletionOption {
    constructor() {
        super(...arguments);
        this._state = "hidden";
    }
    /** Control presentation of element */
    set state(newstate) {
        // console.log("state from to", this._state, newstate)
        switch (newstate) {
            case "focused":
                this.html.classList.add("focused");
                this.html.classList.remove("hidden");
                const myRect = this.html.getClientRects()[0];
                if (myRect) {
                    const container = document.getElementById("completions");
                    const boxRect = container.getClientRects()[0];
                    if (myRect.bottom > boxRect.bottom)
                        this.html.scrollIntoView();
                    else if (myRect.top < boxRect.top)
                        this.html.scrollIntoView(false);
                }
                break;
            case "normal":
                this.html.classList.remove("focused");
                this.html.classList.remove("hidden");
                break;
            case "hidden":
                this.html.classList.remove("focused");
                this.html.classList.add("hidden");
                break;
        }
        this._state = newstate;
    }
    get state() {
        return this._state;
    }
}
class CompletionSourceFuse extends CompletionSource {
    constructor(prefixes, className, title) {
        super(prefixes);
        this.fuseOptions = {
            keys: ["fuseKeys"],
            shouldSort: true,
            includeScore: true,
        };
        // PERF: Could be expensive not to cache Fuse()
        // yeah, it was.
        this.fuse = undefined;
        this.sortScoredOptions = false;
        this.optionContainer = html `<table class="optionContainer"></table>`;
        this.node = html `<div class="${className} hidden">
            <div class="sectionHeader">${title || className}</div>
        </div>`;
        this.node.appendChild(this.optionContainer);
        this.state = "hidden";
    }
    // Helpful default implementations
    async filter(exstr) {
        this.lastExstr = exstr;
        await this.onInput(exstr);
        return this.updateChain();
    }
    updateChain(exstr = this.lastExstr, options = this.options) {
        if (options === undefined) {
            this.state = "hidden";
            return;
        }
        const [prefix, query] = this.splitOnPrefix(exstr);
        // console.log(prefix, query, options)
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        // Filter by query if query is not empty
        if (query) {
            this.setStateFromScore(this.scoredOptions(query));
            // Else show all options
        }
        else {
            options.forEach(option => (option.state = "normal"));
        }
        // Call concrete class
        this.updateDisplay();
    }
    select(option) {
        if (this.lastExstr !== undefined && option !== undefined) {
            const [prefix] = this.splitOnPrefix(this.lastExstr);
            this.completion = prefix + option.value;
            this.args = option.value;
            option.state = "focused";
            this.lastFocused = option;
        }
        else {
            throw new Error("lastExstr and option must be defined!");
        }
    }
    splitOnPrefix(exstr) {
        for (const prefix of this.prefixes) {
            if (exstr.startsWith(prefix)) {
                const query = exstr.replace(prefix, "");
                return [prefix, query];
            }
        }
        return [undefined, undefined];
    }
    /** Rtn sorted array of {option, score} */
    scoredOptions(query) {
        const searchThis = this.options.map((elem, index) => ({
            index,
            fuseKeys: elem.fuseKeys,
        }));
        this.fuse = new fuse_js__WEBPACK_IMPORTED_MODULE_0__.default(searchThis, this.fuseOptions);
        return this.fuse.search(query).map(result => {
            // console.log(result, result.item, query)
            const index = (0,_src_lib_convert__WEBPACK_IMPORTED_MODULE_2__.toNumber)(result.item.index);
            return {
                index,
                option: this.options[index],
                score: result.score,
            };
        });
    }
    /** Set option state by score

        For now just displays all scored elements (see threshold in fuse) and
        focus the best match.
    */
    setStateFromScore(scoredOpts, autoselect = false) {
        const matches = scoredOpts.map(res => res.index);
        const hidden_options = [];
        for (const [index, option] of (0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_1__.enumerate)(this.options)) {
            if (matches.includes(index))
                option.state = "normal";
            else {
                option.state = "hidden";
                hidden_options.push(option);
            }
        }
        // ideally, this would not deselect anything unless it fell off the list of matches
        if (matches.length && autoselect) {
            this.select(this.options[matches[0]]);
        }
        else {
            this.deselect();
        }
        // sort this.options by score
        if (this.sortScoredOptions) {
            const sorted_options = matches.map(index => this.options[index]);
            this.options = sorted_options.concat(hidden_options);
        }
    }
    /** Call to replace the current display */
    // TODO: optionContainer.replaceWith and optionContainer.remove don't work.
    // I don't know why, but it means we can't replace the div in one go. Maybe
    // an iframe thing.
    updateDisplay() {
        /* const newContainer = html`<div>` */
        while (this.optionContainer.hasChildNodes()) {
            this.optionContainer.removeChild(this.optionContainer.lastChild);
        }
        for (const option of this.options) {
            /* newContainer.appendChild(option.html) */
            if (option.state !== "hidden")
                this.optionContainer.appendChild(option.html);
        }
        this.next(0);
        /* console.log('updateDisplay', this.optionContainer, newContainer) */
        /* let result1 = this.optionContainer.remove() */
        /* let res2 = this.node.appendChild(newContainer) */
        /* console.log('results', result1, res2) */
    }
    async next(inc = 1) {
        if (this.state !== "hidden") {
            // We're abusing `async` here to help us to catch errors in backoff
            // and to make it easier to return consistent types
            /* eslint-disable-next-line @typescript-eslint/require-await */
            return (0,_src_lib_patience__WEBPACK_IMPORTED_MODULE_4__.backoff)(async () => {
                const visopts = this.options.filter(o => o.state !== "hidden");
                const currind = visopts.findIndex(o => o.state === "focused");
                this.deselect();
                // visopts.length + 1 because we want an empty completion at the end
                const max = visopts.length + 1;
                const opt = visopts[(currind + inc + max) % max];
                if (opt)
                    this.select(opt);
                return true;
            });
        }
        else
            return false;
    }
    /* abstract onUpdate(query: string, prefix: string, options: CompletionOptionFuse[]) */
    // Lots of methods don't need this but some do
    // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars-experimental
    async onInput(exstr) { }
}
// }}}


/***/ }),

/***/ "./src/completions/Apropos.ts":
/*!************************************!*\
  !*** ./src/completions/Apropos.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AproposCompletionSource": () => (/* binding */ AproposCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/aliases */ "./src/lib/aliases.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");




class AproposCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(name, doc, flag) {
        super();
        this.name = name;
        this.fuseKeys = [];
        this.value = `${flag} ${name}`;
        this.html = html `<tr class="AproposCompletionOption option">
            <td class="name">${name}</td>
            <td class="doc">${doc}</td>
        </tr>`;
    }
}
class AproposCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["apropos"], "AproposCompletionSource", "Apropos");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        this.completion = undefined;
        const [prefix, query] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const file = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.everything.getFile("src/lib/config.ts");
        const default_config = file.getClass("default_config");
        const excmds = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.everything.getFile("src/excmds.ts");
        const fns = excmds.getFunctions();
        const settings = _src_lib_config__WEBPACK_IMPORTED_MODULE_3__.get();
        const exaliases = settings.exaliases;
        const bindings = settings.nmaps;
        if (fns === undefined ||
            exaliases === undefined ||
            bindings === undefined) {
            return;
        }
        const flags = {
            "-a": (options, query) => options.concat(Object.keys(exaliases)
                .filter(alias => (alias +
                _src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__.expandExstr(alias) +
                excmds.getFunction(_src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__.expandExstr(alias)))
                .toLowerCase()
                .includes(query))
                .map(alias => {
                const cmd = _src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__.expandExstr(alias);
                const doc = (excmds.getFunction(cmd) || {}).doc ||
                    "";
                return new AproposCompletionOption(alias, `Alias for \`${cmd}\`. ${doc}`, "-a");
            })),
            "-b": (options, query) => options.concat(Object.keys(bindings)
                .filter(binding => (binding + bindings[binding])
                .toLowerCase()
                .includes(query))
                .map(binding => new AproposCompletionOption(binding, `Normal mode binding for \`${bindings[binding]}\``, "-b"))),
            "-e": (options, query) => options.concat(fns
                .filter(([name, fn]) => !fn.hidden &&
                (name + fn.doc).toLowerCase().includes(query))
                .map(([name, fn]) => new AproposCompletionOption(name, `Excmd. ${fn.doc}`, "-e"))),
            "-s": (options, query) => options.concat(Object.keys(settings)
                .filter(x => (x + default_config.getMember(x).doc)
                .toLowerCase()
                .includes(query))
                .map(setting => {
                const member = default_config.getMember(setting);
                let doc = "";
                if (member !== undefined) {
                    doc = member.doc;
                }
                return new AproposCompletionOption(setting, `Setting. ${doc}`, "-s");
            })),
        };
        const args = query.split(" ");
        let opts = [];
        if (Object.keys(flags).includes(args[0])) {
            opts = flags[args[0]](opts, args.slice(1).join(" "));
        }
        else {
            opts = Object.keys(flags).reduce((acc, curFlag) => flags[curFlag](acc, query), []);
        }
        this.options = opts;
        this.options.sort((compopt1, compopt2) => compopt1.name.localeCompare(compopt2.name));
        return this.updateChain();
    }
    updateChain() {
        // Options are pre-trimmed to the right length.
        this.options.forEach(option => (option.state = "normal"));
        // Call concrete class
        return this.updateDisplay();
    }
}


/***/ }),

/***/ "./src/completions/Bindings.ts":
/*!*************************************!*\
  !*** ./src/completions/Bindings.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BindingsCompletionSource": () => (/* binding */ BindingsCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_binding__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/binding */ "./src/lib/binding.ts");



class BindingsCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, binding) {
        super();
        this.value = value;
        this.fuseKeys = [];
        this.html = html `<tr class="BindingsCompletionOption option">
            <td class="name">${binding.name}</td>
            <td class="content">${binding.value}</td>
            <td class="type">${binding.mode}</td>
        </tr>`;
    }
}
class BindingsCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["bind", "unbind", "bindurl", "unbindurl", "reset", "reseturl"], "BindingsCompletionSource", "Bindings");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        let options = "";
        let [prefix, query] = this.splitOnPrefix(exstr);
        const args = query ? query.split(/\s+/) : [];
        let configName = "nmaps";
        let modeName = "normal";
        let urlPattern = null;
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        this.deselect();
        // url pattern is mandatory: bindurl, unbindurl, reseturl
        if (prefix.trim().endsWith("url")) {
            urlPattern = args.length > 0 ? args.shift() : "";
            options += urlPattern ? urlPattern + " " : "";
            if (args.length === 0) {
                const patterns = _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("subconfigs");
                this.options = Object.keys(patterns)
                    .filter(pattern => pattern.startsWith(urlPattern))
                    .sort()
                    .map(pattern => new BindingsCompletionOption(pattern, {
                    name: pattern,
                    value: "",
                    mode: "URL Pattern",
                }));
                return this.updateChain();
            }
        }
        // completion maps mode
        if (args.length === 1 && args[0].startsWith("--m")) {
            const margs = args[0].split("=");
            if ("--mode".includes(margs[0])) {
                const modeStr = margs.length > 1 ? margs[1] : "";
                this.options = _src_lib_binding__WEBPACK_IMPORTED_MODULE_2__.modes.filter(k => k.startsWith(modeStr))
                    .map(name => new BindingsCompletionOption(options + "--mode=" + name, {
                    name,
                    value: "",
                    mode: "Mode Name",
                }));
                return this.updateChain();
            }
        }
        if (args.length > 0 && args[0].startsWith("--mode=")) {
            const modeStr = args.shift();
            const mode = modeStr.replace("--mode=", "");
            modeName = mode;
            if (_src_lib_binding__WEBPACK_IMPORTED_MODULE_2__.maps2mode.has(mode + "maps")) {
                modeName = _src_lib_binding__WEBPACK_IMPORTED_MODULE_2__.maps2mode.get(mode + "maps");
            }
            configName = _src_lib_binding__WEBPACK_IMPORTED_MODULE_2__.mode2maps.get(modeName);
            options += `--mode=${modeName} `;
        }
        if (!configName) {
            this.options = [];
            return this.updateChain();
        }
        const bindings = urlPattern
            ? _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.getURL(urlPattern, [configName])
            : _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get(configName);
        if (bindings === undefined) {
            this.options = [];
            return this.updateChain();
        }
        query = args.join(" ").toLowerCase();
        this.options = Object.keys(bindings)
            .filter(x => x.toLowerCase().startsWith(query))
            .sort()
            .map(keystr => new BindingsCompletionOption(options + keystr + " " + bindings[keystr], {
            name: keystr,
            value: JSON.stringify(bindings[keystr]),
            mode: `${configName} (${modeName})`,
        }));
        return this.updateChain();
    }
    updateChain() {
        // Options are pre-trimmed to the right length.
        this.options.forEach(option => (option.state = "normal"));
        // Call concrete class
        return this.updateDisplay();
    }
}


/***/ }),

/***/ "./src/completions/Bmark.ts":
/*!**********************************!*\
  !*** ./src/completions/Bmark.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BmarkCompletionSource": () => (/* binding */ BmarkCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_completions_providers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions/providers */ "./src/completions/providers.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");



class BmarkCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, bmark) {
        super();
        this.value = value;
        this.fuseKeys = [];
        if (!bmark.title) {
            bmark.title = new URL(bmark.url).host;
        }
        // Push properties we want to fuzmatch on
        this.fuseKeys.push(bmark.title, bmark.url);
        this.html = html `<tr class="BmarkCompletionOption option">
            <td class="prefix">${"".padEnd(2)}</td>
            <td class="title">${bmark.title}</td>
            <td class="content">
                <a class="url" target="_blank" href=${bmark.url}
                    >${bmark.url}</a
                >
            </td>
        </tr>`;
    }
}
class BmarkCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["bmarks"], "BmarkCompletionSource", "Bookmarks");
        this._parent = _parent;
        this.shouldSetStateFromScore = true;
        this._parent.appendChild(this.node);
        this.sortScoredOptions = true;
        this.shouldSetStateFromScore =
            _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("completions", "Bmark", "autoselect") === "true";
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        let [prefix, query] = this.splitOnPrefix(exstr);
        let option = "";
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        if (query.startsWith("-t ")) {
            option = "-t ";
            query = query.slice(3);
        }
        if (query.startsWith("-c")) {
            const args = query.split(" ");
            option += args.slice(0, 2).join(" ");
            option += " ";
            query = args.slice(2).join(" ");
        }
        this.completion = undefined;
        this.options = (await _src_completions_providers__WEBPACK_IMPORTED_MODULE_1__.getBookmarks(query))
            .slice(0, 10)
            .map(page => new BmarkCompletionOption(option + page.url, page));
        this.lastExstr = prefix + query;
        return this.updateChain();
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore);
    }
    updateChain() {
        const query = this.splitOnPrefix(this.lastExstr)[1];
        if (query && query.trim().length > 0) {
            this.setStateFromScore(this.scoredOptions(query));
        }
        else {
            this.options.forEach(option => (option.state = "normal"));
        }
        // Call concrete class
        return this.updateDisplay();
    }
    select(option) {
        if (this.lastExstr !== undefined && option !== undefined) {
            this.completion = "bmarks " + option.value;
            option.state = "focused";
            this.lastFocused = option;
        }
        else {
            throw new Error("lastExstr and option must be defined!");
        }
    }
}


/***/ }),

/***/ "./src/completions/Composite.ts":
/*!**************************************!*\
  !*** ./src/completions/Composite.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CompositeCompletionSource": () => (/* binding */ CompositeCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions/Excmd */ "./src/completions/Excmd.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_aliases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/lib/aliases */ "./src/lib/aliases.ts");





const PREFIX = "composite";
const regex = new RegExp("^" + PREFIX + " ");
// Most of this is copied verbatim from Excmd.ts - would have liked to inherit but constructor posed difficulties
class CompositeCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super([PREFIX], "CompositeCompletionSource", "ex commands");
        this._parent = _parent;
        this.updateOptions();
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        return this.onInput(exstr);
    }
    async onInput(exstr) {
        return this.updateOptions(exstr);
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental
    updateChain(exstr = this.lastExstr, options = this.options) {
        if (this.options.length > 0)
            this.state = "normal";
        else
            this.state = "hidden";
        this.updateDisplay();
    }
    select(option) {
        this.completion =
            this.lastExstr.replace(new RegExp(this.getendexstr(this.lastExstr) + "$"), "") + option.value;
        option.state = "focused";
        this.lastFocused = option;
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, false);
    }
    async updateOptions(exstr = "") {
        const end_exstr = this.getendexstr(exstr);
        this.lastExstr = exstr;
        const [prefix] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const excmds = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_2__.everything.getFile("src/excmds.ts");
        if (!excmds)
            return;
        const fns = excmds.getFunctions();
        // Add all excmds that start with exstr and that tridactyl has metadata about to completions
        this.options = this.scoreOptions(fns
            .filter(([name, fn]) => !fn.hidden && name.startsWith(end_exstr))
            .map(([name, fn]) => new _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_1__.ExcmdCompletionOption(name, fn.doc)));
        // Also add aliases to possible completions
        const exaliases = Object.keys(_src_lib_config__WEBPACK_IMPORTED_MODULE_3__.get("exaliases")).filter(a => a.startsWith(end_exstr));
        for (const alias of exaliases) {
            const cmd = _src_lib_aliases__WEBPACK_IMPORTED_MODULE_4__.expandExstr(alias);
            const fn = excmds.getFunction(cmd);
            if (fn) {
                this.options.push(new _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_1__.ExcmdCompletionOption(alias, `Alias for \`${cmd}\`. ${fn.doc}`));
            }
            else {
                // This can happen when the alias is a composite command or a command with arguments. We can't display doc because we don't know what parameter the alias takes or what it does.
                this.options.push(new _src_completions_Excmd__WEBPACK_IMPORTED_MODULE_1__.ExcmdCompletionOption(alias, `Alias for \`${cmd}\`.`));
            }
        }
        this.options.forEach(o => (o.state = "normal"));
        return this.updateChain();
    }
    scoreOptions(options) {
        return options.sort((o1, o2) => o1.value.localeCompare(o2.value));
    }
    getendexstr(exstr) {
        return exstr
            .replace(regex, "")
            .split("|")
            .slice(-1)[0]
            .split(";")
            .slice(-1)[0]
            .trim();
    }
}


/***/ }),

/***/ "./src/completions/Excmd.ts":
/*!**********************************!*\
  !*** ./src/completions/Excmd.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ExcmdCompletionOption": () => (/* binding */ ExcmdCompletionOption),
/* harmony export */   "ExcmdCompletionSource": () => (/* binding */ ExcmdCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_aliases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/aliases */ "./src/lib/aliases.ts");




class ExcmdCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, documentation = "") {
        super();
        this.value = value;
        this.documentation = documentation;
        this.fuseKeys = [];
        this.fuseKeys.push(this.value);
        // Create HTMLElement
        this.html = html `<tr class="ExcmdCompletionOption option">
            <td class="excmd">${value}</td>
            <td class="documentation">${documentation}</td>
        </tr>`;
    }
}
class ExcmdCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super([], "ExcmdCompletionSource", "ex commands");
        this._parent = _parent;
        this.updateOptions();
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        return this.onInput(exstr);
    }
    async onInput(exstr) {
        return this.updateOptions(exstr);
    }
    // eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental
    updateChain(exstr = this.lastExstr, options = this.options) {
        if (this.options.length > 0)
            this.state = "normal";
        else
            this.state = "hidden";
        this.updateDisplay();
    }
    select(option) {
        this.completion = option.value;
        option.state = "focused";
        this.lastFocused = option;
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, false);
    }
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const excmds = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.everything.getFile("src/excmds.ts");
        if (!excmds)
            return;
        const fns = excmds.getFunctions();
        // Add all excmds that start with exstr and that tridactyl has metadata about to completions
        this.options = this.scoreOptions(fns
            .filter(([name, fn]) => !fn.hidden && name.startsWith(exstr))
            .map(([name, fn]) => new ExcmdCompletionOption(name, fn.doc)));
        // Also narrow down aliases map to possible completions
        const exaliasesConfig = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("exaliases");
        const exaliases = Object.keys(exaliasesConfig)
            .filter(a => a.startsWith(exstr))
            .reduce((obj, key) => {
            obj[key] = exaliasesConfig[key];
            return obj;
        }, {});
        for (const alias of Object.keys(exaliases)) {
            const cmd = _src_lib_aliases__WEBPACK_IMPORTED_MODULE_3__.expandExstr(alias, exaliases);
            const fn = excmds.getFunction(cmd);
            if (fn) {
                this.options.push(new ExcmdCompletionOption(alias, `Alias for \`${cmd}\`. ${fn.doc}`));
            }
            else {
                // This can happen when the alias is a composite command or a command with arguments. We can't display doc because we don't know what parameter the alias takes or what it does.
                this.options.push(new ExcmdCompletionOption(alias, `Alias for \`${cmd}\`.`));
            }
        }
        // Add partial matched funcs like: 'conf' ~= 'viewconfig'
        const seen = new Set(this.options.map(o => o.value));
        const partial_options = this.scoreOptions(fns
            .filter(([name, fn]) => !fn.hidden && name.includes(exstr) && !seen.has(name))
            .map(([name, fn]) => new ExcmdCompletionOption(name, fn.doc)));
        this.options = this.options.concat(partial_options);
        this.options.forEach(o => (o.state = "normal"));
        return this.updateChain();
    }
    scoreOptions(options) {
        return options.sort((o1, o2) => o1.value.localeCompare(o2.value));
        // Too slow with large profiles
        // let histpos = state.cmdHistory.map(s => s.split(" ")[0]).reverse()
        // return exstrs.sort((a, b) => {
        //     let posa = histpos.findIndex(x => x == a)
        //     let posb = histpos.findIndex(x => x == b)
        //     // If two ex commands have the same position, sort lexically
        //     if (posa == posb) return a < b ? -1 : 1
        //     // If they aren't found in the list they get lower priority
        //     if (posa == -1) return 1
        //     if (posb == -1) return -1
        //     // Finally, sort by history position
        //     return posa < posb ? -1 : 1
        // })
    }
}


/***/ }),

/***/ "./src/completions/Extensions.ts":
/*!***************************************!*\
  !*** ./src/completions/Extensions.ts ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ExtensionsCompletionSource": () => (/* binding */ ExtensionsCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_lib_extension_info__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/extension_info */ "./src/lib/extension_info.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");


class ExtensionsCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionOptionHTML {
    constructor(name, optionsUrl) {
        super();
        this.name = name;
        this.optionsUrl = optionsUrl;
        this.fuseKeys = [];
        this.fuseKeys.push(this.name);
        this.html = html `<tr class="option">
            <td class="title">${name}</td>
        </tr>`;
    }
}
class ExtensionsCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionSourceFuse {
    constructor(_parent) {
        super(["extoptions"], "ExtensionsCompletionSource", "Extension options");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        const [prefix, query] = this.splitOnPrefix(exstr);
        if (prefix) {
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const extensions = await _src_lib_extension_info__WEBPACK_IMPORTED_MODULE_0__.listExtensions();
        this.options = this.scoreOptions(extensions
            .filter(extension => extension.name.startsWith(query))
            .map(extension => new ExtensionsCompletionOption(extension.name, extension.optionsUrl)));
        return this.updateChain();
    }
    updateChain() {
        this.options.forEach(option => (option.state = "normal"));
        return this.updateDisplay();
    }
    select(option) {
        this.completion = "extoptions " + option.name;
        option.state = "focused";
        this.lastFocused = option;
    }
    scoreOptions(options) {
        return options.sort((o1, o2) => o1.name.localeCompare(o2.name));
    }
}


/***/ }),

/***/ "./src/completions/FileSystem.ts":
/*!***************************************!*\
  !*** ./src/completions/FileSystem.ts ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "FileSystemCompletionSource": () => (/* binding */ FileSystemCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_native__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/native */ "./src/lib/native.ts");


class FileSystemCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value) {
        super();
        this.value = value;
        this.fuseKeys = [];
        this.fuseKeys = [value];
        this.html = html `<tr class="FileSystemCompletionOption option">
            <td class="value">${value}</td>
        </tr>`;
    }
}
class FileSystemCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["saveas", "source", "js -s", "jsb -s"], "FileSystemCompletionSource", "FileSystem");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async onInput(exstr) {
        return this.filter(exstr);
    }
    async filter(exstr) {
        if (!exstr || exstr.indexOf(" ") === -1) {
            this.state = "hidden";
            return;
        }
        let [cmd, path] = this.splitOnPrefix(exstr);
        if (cmd === undefined) {
            this.state = "hidden";
            return;
        }
        if (!path)
            path = ".";
        if (!["/", "$", "~", "."].find(s => path.startsWith(s))) {
            // If the path doesn't start with a special character, it is relative to the native messenger, thus use "." as starting point
            // Does this work on windows?
            path = "./" + path;
        }
        // Update lastExstr because we modified the path and scoreOptions uses that in order to assign scores
        this.lastExstr = cmd + path;
        let req;
        try {
            req = await _src_lib_native__WEBPACK_IMPORTED_MODULE_1__.listDir(path);
        }
        catch (e) {
            // Failing silently because we can't nativegate (the user is typing stuff in the commandline)
            this.state = "hidden";
            return;
        }
        if (req.isDir) {
            if (!path.endsWith(req.sep))
                path += req.sep;
        }
        else {
            path = path.substring(0, path.lastIndexOf("/") + 1);
        }
        this.options = req.files.map(p => new FileSystemCompletionOption(path + p));
        this.state = "normal";
        return this.updateChain();
    }
}


/***/ }),

/***/ "./src/completions/Guiset.ts":
/*!***********************************!*\
  !*** ./src/completions/Guiset.ts ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "GuisetCompletionSource": () => (/* binding */ GuisetCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/css_util */ "./src/lib/css_util.ts");


class GuisetCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, displayValue) {
        super();
        this.value = value;
        this.fuseKeys = [];
        this.fuseKeys.push(value);
        this.html = html `<tr class="GuisetCompletionOption option">
            <td class="value">${displayValue}</td>
        </tr>`;
    }
}
class GuisetCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["guiset", "guiset_quiet"], "GuisetCompletionSource", "Guiset");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        const [prefix, query] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        this.completion = undefined;
        let ruleName = "";
        let subRule = "";
        if (query) {
            const args = query.trim().split(" ");
            ruleName = args[0] || "";
            subRule = args[1] || "";
        }
        this.options = [];
        if (_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.metaRules[ruleName]) {
            this.options = this.options.concat(Object.keys(_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.metaRules[ruleName])
                .filter(s => s.startsWith(subRule))
                .map(s => new GuisetCompletionOption(`${ruleName} ${s}`, s)));
        }
        if (_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.potentialRules[ruleName]) {
            this.options = this.options.concat(Object.keys(_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.potentialRules[ruleName].options)
                .filter(s => s.startsWith(subRule))
                .map(s => new GuisetCompletionOption(`${ruleName} ${s}`, s)));
        }
        if (this.options.length === 0) {
            this.options = Object.keys(_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.metaRules)
                .concat(Object.keys(_src_lib_css_util__WEBPACK_IMPORTED_MODULE_1__.potentialRules))
                .filter(s => s.startsWith(ruleName))
                .map(s => new GuisetCompletionOption(s, s));
        }
        return this.updateChain();
    }
    updateChain() {
        // Options are pre-trimmed to the right length.
        this.options.forEach(option => (option.state = "normal"));
        // Call concrete class
        return this.updateDisplay();
    }
    onInput(arg) {
        return this.filter(arg);
    }
}


/***/ }),

/***/ "./src/completions/Help.ts":
/*!*********************************!*\
  !*** ./src/completions/Help.ts ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HelpCompletionSource": () => (/* binding */ HelpCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/aliases */ "./src/lib/aliases.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");




class HelpCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(name, doc, flag) {
        super();
        this.name = name;
        this.fuseKeys = [];
        this.value = `${flag} ${name}`;
        this.html = html `<tr class="HelpCompletionOption option">
            <td class="name">${name}</td>
            <td class="doc">${doc}</td>
        </tr>`;
    }
}
class HelpCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["help"], "HelpCompletionSource", "Help");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        this.completion = undefined;
        const [prefix, query] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const file = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.everything.getFile("src/lib/config.ts");
        const default_config = file.getClass("default_config");
        const excmds = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.everything.getFile("src/excmds.ts");
        const fns = excmds.getFunctions();
        const settings = _src_lib_config__WEBPACK_IMPORTED_MODULE_3__.get();
        const exaliases = settings.exaliases;
        const bindings = settings.nmaps;
        if (fns === undefined ||
            exaliases === undefined ||
            bindings === undefined) {
            return;
        }
        const flags = {
            "-a": (options, query) => options.concat(Object.keys(exaliases)
                .filter(alias => alias.startsWith(query))
                .map(alias => {
                const cmd = _src_lib_aliases__WEBPACK_IMPORTED_MODULE_2__.expandExstr(alias);
                const doc = (excmds.getFunction(cmd) || {}).doc ||
                    "";
                return new HelpCompletionOption(alias, `Alias for \`${cmd}\`. ${doc}`, "-a");
            })),
            "-b": (options, query) => options.concat(Object.keys(bindings)
                .filter(binding => binding.startsWith(query))
                .map(binding => new HelpCompletionOption(binding, `Normal mode binding for \`${bindings[binding]}\``, "-b"))),
            "-e": (options, query) => options.concat(fns
                .filter(([name, fn]) => !fn.hidden && name.startsWith(query))
                .map(([name, fn]) => new HelpCompletionOption(name, `Excmd. ${fn.doc}`, "-e"))),
            "-s": (options, query) => options.concat(Object.keys(settings)
                .filter(x => x.startsWith(query))
                .map(setting => {
                const member = default_config.getMember(setting);
                let doc = "";
                if (member !== undefined) {
                    doc = member.doc;
                }
                return new HelpCompletionOption(setting, `Setting. ${doc}`, "-s");
            })),
        };
        const args = query.split(" ");
        let opts = [];
        if (Object.keys(flags).includes(args[0])) {
            opts = flags[args[0]](opts, args.slice(1).join(" "));
        }
        else {
            opts = Object.keys(flags).reduce((acc, curFlag) => flags[curFlag](acc, query), []);
        }
        this.options = opts;
        this.options.sort((compopt1, compopt2) => compopt1.name.localeCompare(compopt2.name));
        return this.updateChain();
    }
    updateChain() {
        // Options are pre-trimmed to the right length.
        this.options.forEach(option => (option.state = "normal"));
        // Call concrete class
        return this.updateDisplay();
    }
}


/***/ }),

/***/ "./src/completions/History.ts":
/*!************************************!*\
  !*** ./src/completions/History.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HistoryCompletionSource": () => (/* binding */ HistoryCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_completions_providers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/completions/providers */ "./src/completions/providers.ts");



class HistoryCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, page) {
        super();
        this.value = value;
        this.fuseKeys = [];
        if (!page.title) {
            page.title = new URL(page.url).host;
        }
        // Push properties we want to fuzmatch on
        this.fuseKeys.push(page.title, page.url); // weight by page.visitCount
        // Create HTMLElement
        this.html = html `<tr class="HistoryCompletionOption option">
            <td class="prefix">${"".padEnd(2)}</td>
            <td class="title">${page.title}</td>
            <td class="content">
                <a class="url" target="_blank" href=${page.url}>${page.url}</a>
            </td>
        </tr>`;
    }
}
class HistoryCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["open", "tabopen", "winopen"], "HistoryCompletionSource", "History and bookmarks");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        const prevStr = this.lastExstr;
        this.lastExstr = exstr;
        let [prefix, query] = this.splitOnPrefix(exstr);
        let options = "";
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        // Ignoring command-specific arguments
        // It's terrible but it's ok because it's just a stopgap until an actual commandline-parsing API is implemented
        if (prefix === "tabopen ") {
            if (query.startsWith("-c")) {
                const args = query.split(" ");
                options = args.slice(0, 2).join(" ");
                query = args.slice(2).join(" ");
            }
            if (query.startsWith("-b")) {
                const args = query.split(" ");
                options = args.slice(0, 1).join(" ");
                query = args.slice(1).join(" ");
            }
        }
        else if (prefix === "winopen " && query.startsWith("-private")) {
            options = "-private";
            query = query.substring(options.length);
        }
        options += options ? " " : "";
        // Options are pre-trimmed to the right length.
        // Typescript throws an error here - further investigation is probably warranted
        this.options = (await this.scoreOptions(query, _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("historyresults"))).map(page => new HistoryCompletionOption(options + page.url, page));
        // Deselect any selected, but remember what they were.
        const lastFocused = this.lastFocused;
        this.deselect();
        // Set initial state to normal, unless the option was selected a moment
        // ago, then reselect it so that users don't lose their selections.
        this.options.forEach(option => (option.state = "normal"));
        for (const option of this.options) {
            if (lastFocused !== undefined &&
                lastFocused.value === option.value &&
                prevStr.length <= exstr.length) {
                this.select(option);
                break;
            }
        }
        return this.updateDisplay();
    }
    // We don't need this inherited function
    // eslint-disable-next-line @typescript-eslint/no-empty-function
    updateChain() { }
    async scoreOptions(query, n) {
        if (!query || _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("historyresults") === 0) {
            return (await _src_completions_providers__WEBPACK_IMPORTED_MODULE_2__.getTopSites()).slice(0, n);
        }
        else {
            return (await _src_completions_providers__WEBPACK_IMPORTED_MODULE_2__.getCombinedHistoryBmarks(query)).slice(0, n);
        }
    }
}


/***/ }),

/***/ "./src/completions/Preferences.ts":
/*!****************************************!*\
  !*** ./src/completions/Preferences.ts ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PreferenceCompletionSource": () => (/* binding */ PreferenceCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_native__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/native */ "./src/lib/native.ts");


class PreferenceCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, prefvalue) {
        super();
        this.value = value;
        this.prefvalue = prefvalue;
        this.fuseKeys = [];
        this.fuseKeys.push(value);
        this.html = html `<tr class="PreferenceCompletionOption option">
            <td class="name">${value}</td>
            <td class="value">${prefvalue}</td>
        </tr>`;
    }
}
class PreferenceCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["setpref"], "PreferenceCompletionSource", "Preference");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    onInput(exstr) {
        return this.filter(exstr);
    }
    async filter(exstr) {
        if (!exstr) {
            this.state = "hidden";
            return;
        }
        const pref = this.splitOnPrefix(exstr)[1];
        if (pref === undefined) {
            this.state = "hidden";
            return;
        }
        this.lastExstr = exstr;
        const preferences = await _src_lib_native__WEBPACK_IMPORTED_MODULE_1__.getPrefs();
        this.options = Object.keys(preferences)
            .filter(key => key.startsWith(pref))
            .map(key => new PreferenceCompletionOption(key, preferences[key]));
        if (this.options.length > 0)
            this.state = "normal";
        return this.updateChain();
    }
}


/***/ }),

/***/ "./src/completions/Rss.ts":
/*!********************************!*\
  !*** ./src/completions/Rss.ts ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "RssCompletionSource": () => (/* binding */ RssCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");



class RssCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionOptionHTML {
    constructor(url, title, type) {
        super();
        this.url = url;
        this.title = title;
        this.type = type;
        this.fuseKeys = [];
        this.value = `${url} ${type} ${title}`;
        this.fuseKeys.push(url);
        this.fuseKeys.push(title);
        this.html = html `<tr class="RssCompletionOption option">
            <td class="title">${title}</td>
            <td class="content">
                <a class="url" target="_blank" href=${url}>${url}</a>
            </td>
            <td class="type">${type}</td>
        </tr>`;
    }
}
class RssCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionSourceFuse {
    constructor(_parent) {
        super(["rssexec"], "RssCompletionSource", "Feeds");
        this._parent = _parent;
        this.options = [];
        this.shouldSetStateFromScore = true;
        this.updateOptions();
        this.shouldSetStateFromScore =
            _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("completions", "Rss", "autoselect") === "true";
        this._parent.appendChild(this.node);
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore);
    }
    onInput(...whatever) {
        return this.updateOptions(...whatever);
    }
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const [prefix] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        if (this.options.length < 1) {
            this.options = (await _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab("excmd_content", "getRssLinks", [])).map(link => {
                const opt = new RssCompletionOption(link.url, link.title, link.type);
                opt.state = "normal";
                return opt;
            });
        }
        return this.updateChain();
    }
}


/***/ }),

/***/ "./src/completions/Sessions.ts":
/*!*************************************!*\
  !*** ./src/completions/Sessions.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SessionsCompletionSource": () => (/* binding */ SessionsCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/webext.ts */ "./src/lib/webext.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");



function computeDate(session) {
    let howLong = Math.round((new Date() - session.lastModified) / 1000);
    let qualifier = "s";
    if (Math.abs(howLong) > 60) {
        qualifier = "m";
        howLong = Math.round(howLong / 60);
        if (Math.abs(howLong) > 60) {
            qualifier = "h";
            howLong = Math.round(howLong / 60);
            if (Math.abs(howLong) > 24) {
                qualifier = "d";
                howLong = Math.round(howLong / 24);
            }
        }
    }
    return [howLong, qualifier];
}
function getTabInfo(session) {
    let tab;
    let extraInfo;
    if (session.tab) {
        tab = session.tab;
        extraInfo = tab.url;
    }
    else {
        tab = session.window.tabs.sort((a, b) => b.lastAccessed - a.lastAccessed)[0];
        const tabCount = session.window.tabs.length;
        if (tabCount < 2) {
            extraInfo = tab.url;
        }
        else {
            extraInfo = `${tabCount - 1} more tab${tabCount > 2 ? "s" : ""}.`;
        }
    }
    return [tab, extraInfo];
}
class SessionCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionOptionHTML {
    constructor(session) {
        super();
        this.session = session;
        this.fuseKeys = [];
        this.value = (session.tab || session.window).sessionId;
        const [howLong, qualifier] = computeDate(session);
        const [tab, extraInfo] = getTabInfo(session);
        this.fuseKeys.push(tab.title);
        this.html = html `<tr class="SessionCompletionOption option">
            <td class="type">${session.tab ? "T" : "W"}</td>
            <td class="time">${howLong}${qualifier}</td>
            <td class="icon">
                <img src="${tab.favIconUrl || _src_completions__WEBPACK_IMPORTED_MODULE_1__.DEFAULT_FAVICON}" />
            </td>
            <td class="title">${tab.title}</td>
            <td class="extraInfo">${extraInfo}</td>
        </tr>`;
    }
}
class SessionsCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionSourceFuse {
    constructor(_parent) {
        super(["undo"], "SessionCompletionSource", "sessions");
        this._parent = _parent;
        this.shouldSetStateFromScore = true;
        this.updateOptions();
        this.shouldSetStateFromScore =
            _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("completions", "Sessions", "autoselect") === "true";
        this._parent.appendChild(this.node);
    }
    async onInput(exstr) {
        return this.updateOptions(exstr);
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore);
    }
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const [prefix] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const sessions = await _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_0__.browserBg.sessions.getRecentlyClosed();
        this.options = sessions.map(s => new SessionCompletionOption(s));
    }
}


/***/ }),

/***/ "./src/completions/Settings.ts":
/*!*************************************!*\
  !*** ./src/completions/Settings.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "SettingsCompletionSource": () => (/* binding */ SettingsCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");



class SettingsCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, setting) {
        super();
        this.value = value;
        this.fuseKeys = [];
        this.html = html `<tr class="SettingsCompletionOption option">
            <td class="title">${setting.name}</td>
            <td class="content">${setting.value}</td>
            <td class="type">${setting.type}</td>
            <td class="doc">${setting.doc}</td>
        </tr>`;
    }
}
class SettingsCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["set", "get", "unset", "seturl", "unseturl", "viewconfig"], "SettingsCompletionSource", "Settings");
        this._parent = _parent;
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        let [prefix, query] = this.splitOnPrefix(exstr);
        let options = "";
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        // Ignoring command-specific arguments
        // It's terrible but it's ok because it's just a stopgap until an actual commandline-parsing API is implemented
        // copy pasting code is fun and good
        if ((prefix === "seturl " || prefix === "unseturl ") || (prefix === "viewconfig " &&
            (query.startsWith("--user") || query.startsWith("--default")))) {
            const args = query.split(" ");
            options = args.slice(0, 1).join(" ");
            query = args.slice(1).join(" ");
        }
        options += options ? " " : "";
        const file = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_2__.everything.getFile("src/lib/config.ts");
        const default_config = file.getClass("default_config");
        const settings = _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get();
        if (default_config === undefined || settings === undefined) {
            return;
        }
        this.options = Object.keys(settings)
            .filter(x => x.startsWith(query))
            .sort()
            .map(setting => {
            const md = default_config.getMember(setting);
            let doc = "";
            let type = "";
            if (md !== undefined) {
                doc = md.doc;
                type = md.type.toString();
            }
            return new SettingsCompletionOption(options + setting, {
                name: setting,
                value: JSON.stringify(settings[setting]),
                doc,
                type,
            });
        });
        return this.updateChain();
    }
    updateChain() {
        // Options are pre-trimmed to the right length.
        this.options.forEach(option => (option.state = "normal"));
        // Call concrete class
        return this.updateDisplay();
    }
}


/***/ }),

/***/ "./src/completions/Tab.ts":
/*!********************************!*\
  !*** ./src/completions/Tab.ts ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "BufferCompletionSource": () => (/* binding */ BufferCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_perf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/perf */ "./src/perf.ts");
/* harmony import */ var _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/webext.ts */ "./src/lib/webext.ts");
/* harmony import */ var _src_lib_itertools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/itertools */ "./src/lib/itertools.ts");
/* harmony import */ var _src_lib_containers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/containers */ "./src/lib/containers.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/differenceWith.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};








class BufferCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_4__.CompletionOptionHTML {
    constructor(value, tab, isAlternative = false, container) {
        super();
        this.value = value;
        this.isAlternative = isAlternative;
        this.fuseKeys = [];
        this.tabIndex = tab.index;
        this.tabId = tab.id;
        // Two character tab properties prefix
        let pre = "";
        if (tab.active)
            pre += "%";
        else if (isAlternative) {
            pre += "#";
            this.value = "#";
        }
        if (tab.pinned)
            pre += "@";
        // Push prefix before padding so we don't match on whitespace
        this.fuseKeys.push(pre);
        // Push properties we want to fuzmatch on
        this.fuseKeys.push(String(tab.index + 1), tab.title, tab.url);
        // Create HTMLElement
        const favIconUrl = tab.favIconUrl
            ? tab.favIconUrl
            : _src_completions__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_FAVICON;
        const indicator = tab.audible
            ? String.fromCodePoint(0x1F50A)
            : "";
        this.html = html `<tr
            class="BufferCompletionOption option container_${container.color} container_${container.icon} container_${container.name}"
        >
            <td class="prefix">${pre.padEnd(2)}</td>
            <td class="container"></td>
            <td class="icon"><img loading="lazy" src="${favIconUrl}" /></td>
            <td class="title">${tab.index + 1}: ${indicator} ${tab.title}</td>
            <td class="content">
                <a class="url" target="_blank" href=${tab.url}>${tab.url}</a>
            </td>
        </tr>`;
    }
}
class BufferCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_4__.CompletionSourceFuse {
    // TODO:
    //     - store the exstr and trigger redraws on user or data input without
    //       callback faffery
    //     - sort out the element redrawing.
    constructor(_parent) {
        super(["tab", "tabclose", "tabdetach", "tabduplicate", "tabmove"], "BufferCompletionSource", "Tabs");
        this._parent = _parent;
        this.shouldSetStateFromScore = true;
        this.sortScoredOptions = true;
        this.shouldSetStateFromScore =
            _src_lib_config__WEBPACK_IMPORTED_MODULE_5__.get("completions", "Tab", "autoselect") === "true";
        this.updateOptions();
        this._parent.appendChild(this.node);
        _src_lib_messaging__WEBPACK_IMPORTED_MODULE_6__.addListener("tab_changes", () => this.reactToTabChanges());
    }
    async onInput(exstr) {
        // Schedule an update, if you like. Not very useful for tabs, but
        // will be for other things.
        return this.updateOptions(exstr);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        return this.onInput(exstr);
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore);
    }
    /** Score with fuse unless query is a single # or looks like a tab index */
    scoredOptions(query, options = this.options) {
        const args = query.trim().split(/\s+/gu);
        if (args.length === 1) {
            // if query is an integer n and |n| < options.length
            if (Number.isInteger(Number(args[0]))) {
                let index = Number(args[0]) - 1;
                if (Math.abs(index) < options.length) {
                    index = index.mod(options.length);
                    // options order might change by scored sorting
                    return this.TabscoredOptionsStartsWithN(index, options);
                }
            }
            else if (args[0] === "#") {
                for (const [index, option] of (0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_2__.enumerate)(options)) {
                    if (option.isAlternative) {
                        return [
                            {
                                index,
                                option,
                                score: 0,
                            },
                        ];
                    }
                }
            }
        }
        // If not yet returned...
        return super.scoredOptions(query);
    }
    /** Return the scoredOption[] result for the tab index startswith n */
    TabscoredOptionsStartsWithN(n, options) {
        const nstr = (n + 1).toString();
        const res = [];
        for (const [index, option] of (0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_2__.enumerate)(options)) {
            if ((option.tabIndex + 1).toString().startsWith(nstr)) {
                res.push({
                    index,
                    option,
                    score: 0,
                });
            }
        }
        // old input will change order: 12 => 123 => 12
        res.sort((a, b) => a.option.tabIndex - b.option.tabIndex);
        return res;
    }
    async fillOptions() {
        const tabs = await _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_1__.browserBg.tabs.query({
            currentWindow: true,
        });
        const options = [];
        // Get alternative tab, defined as last accessed tab.
        tabs.sort((a, b) => b.lastAccessed - a.lastAccessed);
        const alt = tabs[1];
        const useMruTabOrder = _src_lib_config__WEBPACK_IMPORTED_MODULE_5__.get("tabsort") === "mru";
        if (!useMruTabOrder) {
            tabs.sort((a, b) => a.index - b.index);
        }
        const container_all = await _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_1__.browserBg.contextualIdentities.query({});
        const container_map = new Map();
        container_all.forEach(elem => container_map.set(elem.cookieStoreId, elem));
        // firefox-default is not in contextualIdenetities
        container_map.set("firefox-default", _src_lib_containers__WEBPACK_IMPORTED_MODULE_3__.DefaultContainer);
        for (const tab of tabs) {
            let tab_container = container_map.get(tab.cookieStoreId);
            if (!tab_container) {
                tab_container = _src_lib_containers__WEBPACK_IMPORTED_MODULE_3__.DefaultContainer;
            }
            options.push(new BufferCompletionOption((tab.index + 1).toString(), tab, tab === alt, tab_container));
        }
        this.options = options;
    }
    // Eslint doesn't like this decorator but there's nothing we can do about it
    // eslint-disable-next-line @typescript-eslint/member-ordering
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const [prefix, query] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        // When the user is asking for tabmove completions, don't autoselect if the query looks like a relative move https://github.com/tridactyl/tridactyl/issues/825
        if (prefix === "tabmove")
            this.shouldSetStateFromScore = !/^[+-][0-9]+$/.exec(query);
        await this.fillOptions();
        this.completion = undefined;
        /* console.log('updateOptions', this.optionContainer) */
        if (query && query.trim().length > 0) {
            this.setStateFromScore(this.scoredOptions(query));
        }
        else {
            this.options.forEach(option => (option.state = "normal"));
        }
        return this.updateDisplay();
    }
    /**
     * Update the list of possible tab options and select (focus on)
     * the appropriate option.
     */
    async reactToTabChanges() {
        const prevOptions = this.options;
        await this.updateOptions(this.lastExstr);
        if (!prevOptions || !this.options || !this.lastFocused)
            return;
        // Determine which option to focus on
        const diff = ramda__WEBPACK_IMPORTED_MODULE_7__.default((x, y) => x.tabId === y.tabId, prevOptions, this.options);
        const lastFocusedTabCompletion = this
            .lastFocused;
        // If the focused option was removed then focus on the next option
        if (diff.length === 1 &&
            diff[0].tabId === lastFocusedTabCompletion.tabId) {
            this.select(this.getTheNextTabOption(lastFocusedTabCompletion));
        }
    }
    /**
     * Gets the next option in this BufferCompletionSource assuming
     * that this BufferCompletionSource length has been reduced by 1
     */
    getTheNextTabOption(option) {
        if (option.tabIndex === this.options.length) {
            return this.options[this.options.length - 1];
        }
        return this.options[option.tabIndex];
    }
}
__decorate([
    _src_perf__WEBPACK_IMPORTED_MODULE_0__.measuredAsync
], BufferCompletionSource.prototype, "updateOptions", null);


/***/ }),

/***/ "./src/completions/TabAll.ts":
/*!***********************************!*\
  !*** ./src/completions/TabAll.ts ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TabAllCompletionSource": () => (/* binding */ TabAllCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_perf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/perf */ "./src/perf.ts");
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");
/* harmony import */ var _src_lib_containers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/containers */ "./src/lib/containers.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};






class TabAllCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_3__.CompletionOptionHTML {
    constructor(value, tab, winindex, container, incognito) {
        super();
        this.value = value;
        this.fuseKeys = [];
        this.value = `${winindex}.${tab.index + 1}`;
        this.fuseKeys.push(this.value, tab.title, tab.url);
        this.tab = tab;
        // Create HTMLElement
        const favIconUrl = tab.favIconUrl
            ? tab.favIconUrl
            : _src_completions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_FAVICON;
        this.html = html `<tr
            class="BufferAllCompletionOption option container_${container.color} container_${container.icon} container_${container.name} ${incognito
            ? "incognito"
            : ""}"
        >
            <td class="prefix"></td>
            <td class="privatewindow"></td>
            <td class="container"></td>
            <td class="icon"><img src="${favIconUrl}" /></td>
            <td class="title">${this.value}: ${tab.title}</td>
            <td class="content">
                <a class="url" target="_blank" href=${tab.url}>${tab.url}</a>
            </td>
        </tr>`;
    }
}
class TabAllCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_3__.CompletionSourceFuse {
    constructor(_parent) {
        super(["taball", "tabgrab"], "TabAllCompletionSource", "All Tabs");
        this._parent = _parent;
        this.shouldSetStateFromScore = true;
        this.updateOptions();
        this._parent.appendChild(this.node);
        this.shouldSetStateFromScore =
            _src_lib_config__WEBPACK_IMPORTED_MODULE_5__.get("completions", "TabAll", "autoselect") === "true";
        _src_lib_messaging__WEBPACK_IMPORTED_MODULE_4__.addListener("tab_changes", () => this.reactToTabChanges());
    }
    async onInput(exstr) {
        return this.updateOptions(exstr);
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, this.shouldSetStateFromScore);
    }
    /**
     * Map all windows into a {[windowId]: window} object
     */
    async getWindows() {
        const windows = await _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__.browserBg.windows.getAll();
        const response = {};
        windows.forEach(win => (response[win.id] = win));
        return response;
    }
    /**
     * Update the list of possible tab options and select (focus on)
     * the appropriate option.
     */
    async reactToTabChanges() {
        // const prevOptions = this.options
        await this.updateOptions(this.lastExstr);
        // TODO: update this from Tab.ts for TabAll.ts
        // if (!prevOptions || !this.options || !this.lastFocused) return
        // // Determine which option to focus on
        // const diff = R.differenceWith(
        //     (x, y) => x.tab.id === y.tab.id,
        //     prevOptions,
        //     this.options,
        // )
        // const lastFocusedTabCompletion = this
        //     .lastFocused as TabAllCompletionOption
        // // If the focused option was removed then focus on the next option
        // if (
        //    diff.length === 1 &&
        //    diff[0].tab.id === lastFocusedTabCompletion.tab.id
        // ) {
        //    //this.select(this.getTheNextTabOption(lastFocusedTabCompletion))
        // }
    }
    /**
     * Gets the next option in this BufferCompletionSource assuming
     * that this BufferCompletionSource length has been reduced by 1
     *
     * TODO: this ain't going to work, need to work out position based on win.tab
     */
    // private getTheNextTabOption(option: TabAllCompletionOption) {
    //     if (option.tab.index === this.options.length) {
    //         return this.options[this.options.length - 1]
    //     }
    //     return this.options[option.tab.index]
    // }
    // Eslint doesn't like this decorator but there's nothing we can do about it
    // eslint-disable-next-line @typescript-eslint/member-ordering
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const [prefix] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        const tabsPromise = _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__.browserBg.tabs.query({});
        const windowsPromise = this.getWindows();
        const [tabs, windows] = await Promise.all([tabsPromise, windowsPromise]);
        const options = [];
        tabs.sort((a, b) => {
            if (a.windowId === b.windowId)
                return a.index - b.index;
            return a.windowId - b.windowId;
        });
        // Window Ids don't make sense so we're using LASTID and WININDEX to compute a window index
        // This relies on the fact that tabs are sorted by window ids
        let lastId = 0;
        let winindex = 0;
        for (const tab of tabs) {
            if (lastId !== tab.windowId) {
                lastId = tab.windowId;
                winindex += 1;
            }
            options.push(new TabAllCompletionOption(tab.id.toString(), tab, winindex, await _src_lib_containers__WEBPACK_IMPORTED_MODULE_2__.getFromId(tab.cookieStoreId), windows[tab.windowId].incognito));
        }
        this.completion = undefined;
        this.options = options;
        return this.updateChain();
    }
}
__decorate([
    _src_perf__WEBPACK_IMPORTED_MODULE_0__.measuredAsync
], TabAllCompletionSource.prototype, "updateOptions", null);


/***/ }),

/***/ "./src/completions/Theme.ts":
/*!**********************************!*\
  !*** ./src/completions/Theme.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ThemeCompletionOption": () => (/* binding */ ThemeCompletionOption),
/* harmony export */   "ThemeCompletionSource": () => (/* binding */ ThemeCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");



class ThemeCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionOptionHTML {
    constructor(value, documentation = "") {
        super();
        this.value = value;
        this.documentation = documentation;
        this.fuseKeys = [];
        this.fuseKeys.push(this.value);
        // Create HTMLElement
        this.html = html `<tr class="ThemeCompletionOption option">
            <td class="theme">${value}</td>
        </tr>`;
    }
}
class ThemeCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_0__.CompletionSourceFuse {
    constructor(_parent) {
        super(["set theme", "colourscheme"], "ThemeCompletionSource", "Themes");
        this._parent = _parent;
        this.updateOptions();
        this._parent.appendChild(this.node);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        return this.onInput(exstr);
    }
    async onInput(exstr) {
        return this.updateOptions(exstr);
    }
    setStateFromScore(scoredOpts) {
        super.setStateFromScore(scoredOpts, false);
    }
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const themes = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_1__.staticThemes.concat(Object.keys(await _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("customthemes")));
        const [prefix, query] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        // Add all excmds that start with exstr and that tridactyl has metadata about to completions
        this.options = this.scoreOptions(themes
            .filter(name => name.startsWith(query))
            .map(name => new ThemeCompletionOption(name)));
        this.options.forEach(o => (o.state = "normal"));
        return this.updateChain();
    }
    scoreOptions(options) {
        return options.sort((o1, o2) => o1.value.localeCompare(o2.value));
        // Too slow with large profiles
        // let histpos = state.cmdHistory.map(s => s.split(" ")[0]).reverse()
        // return exstrs.sort((a, b) => {
        //     let posa = histpos.findIndex(x => x == a)
        //     let posb = histpos.findIndex(x => x == b)
        //     // If two ex commands have the same position, sort lexically
        //     if (posa == posb) return a < b ? -1 : 1
        //     // If they aren't found in the list they get lower priority
        //     if (posa == -1) return 1
        //     if (posb == -1) return -1
        //     // Finally, sort by history position
        //     return posa < posb ? -1 : 1
        // })
    }
}


/***/ }),

/***/ "./src/completions/Window.ts":
/*!***********************************!*\
  !*** ./src/completions/Window.ts ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "WindowCompletionSource": () => (/* binding */ WindowCompletionSource)
/* harmony export */ });
/* harmony import */ var _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/webext.ts */ "./src/lib/webext.ts");
/* harmony import */ var _src_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/completions */ "./src/completions.ts");


class WindowCompletionOption extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionOptionHTML {
    constructor(win) {
        super();
        this.fuseKeys = [];
        this.value = win.id;
        this.fuseKeys.push(`${win.title}`);
        this.fuseKeys.push(`${win.id}`);
        // Create HTMLElement
        this.html = html `<tr
            class="WindowCompletionOption option ${win.incognito
            ? "incognito"
            : ""}"
        >
            <td class="privatewindow"></td>
            <td class="prefix">${win.focused ? "%" : ""}</td>
            <td class="id">${win.id}</td>
            <td class="title">${win.title}</td>
            <td class="tabcount">
                ${win.tabs.length} tab${win.tabs.length !== 1 ? "s" : ""}
            </td>
        </tr>`;
    }
}
class WindowCompletionSource extends _src_completions__WEBPACK_IMPORTED_MODULE_1__.CompletionSourceFuse {
    constructor(_parent) {
        super(["tabpush", "winclose", "winmerge"], "WindowCompletionSource", "Windows");
        this._parent = _parent;
        this.updateOptions();
        this._parent.appendChild(this.node);
    }
    async onInput(exstr) {
        // Schedule an update, if you like. Not very useful for windows, but
        // will be for other things.
        return this.updateOptions(exstr);
    }
    async filter(exstr) {
        this.lastExstr = exstr;
        return this.onInput(exstr);
    }
    async updateOptions(exstr = "") {
        this.lastExstr = exstr;
        const [prefix] = this.splitOnPrefix(exstr);
        // Hide self and stop if prefixes don't match
        if (prefix) {
            // Show self if prefix and currently hidden
            if (this.state === "hidden") {
                this.state = "normal";
            }
        }
        else {
            this.state = "hidden";
            return;
        }
        this.options = (await _src_lib_webext_ts__WEBPACK_IMPORTED_MODULE_0__.browserBg.windows.getAll({ populate: true })).map(win => {
            const o = new WindowCompletionOption(win);
            o.state = "normal";
            return o;
        });
        return this.updateDisplay();
    }
}


/***/ }),

/***/ "./src/completions/providers.ts":
/*!**************************************!*\
  !*** ./src/completions/providers.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "newtaburl": () => (/* binding */ newtaburl),
/* harmony export */   "getBookmarks": () => (/* binding */ getBookmarks),
/* harmony export */   "getHistory": () => (/* binding */ getHistory),
/* harmony export */   "getTopSites": () => (/* binding */ getTopSites),
/* harmony export */   "getCombinedHistoryBmarks": () => (/* binding */ getCombinedHistoryBmarks)
/* harmony export */ });
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");


function newtaburl() {
    // In the nonewtab version, this will return `null` and upset getURL.
    // Ternary op below prevents the runtime error.
    const newtab = browser.runtime.getManifest().chrome_url_overrides.newtab;
    return newtab !== null ? browser.runtime.getURL(newtab) : null;
}
async function getBookmarks(query) {
    // Search bookmarks, dedupe and sort by most recent.
    let bookmarks = await _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__.browserBg.bookmarks.search({ query });
    // Remove folder nodes and bad URLs
    bookmarks = bookmarks.filter(b => {
        try {
            return new URL(b.url);
        }
        catch (e) {
            return false;
        }
    });
    bookmarks.sort((a, b) => b.dateAdded - a.dateAdded);
    // Remove duplicate bookmarks
    const seen = new Map();
    bookmarks = bookmarks.filter(b => {
        if (seen.get(b.title) === b.url)
            return false;
        else {
            seen.set(b.title, b.url);
            return true;
        }
    });
    return bookmarks;
}
function frecency(item) {
    // Doesn't actually care about recency yet.
    return item.visitCount * -1;
}
async function getHistory(query) {
    // Search history, dedupe and sort by frecency
    let history = await _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__.browserBg.history.search({
        text: query,
        maxResults: _src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("historyresults"),
        startTime: 0,
    });
    // Remove entries with duplicate URLs
    const dedupe = new Map();
    for (const page of history) {
        if (page.url !== newtaburl()) {
            if (dedupe.has(page.url)) {
                if (dedupe.get(page.url).title.length < page.title.length) {
                    dedupe.set(page.url, page);
                }
            }
            else {
                dedupe.set(page.url, page);
            }
        }
    }
    history = [...dedupe.values()];
    history.sort((a, b) => frecency(a) - frecency(b));
    return history;
}
async function getTopSites() {
    return (await _src_lib_webext__WEBPACK_IMPORTED_MODULE_1__.browserBg.topSites.get()).filter(page => page.url !== newtaburl());
}
async function getCombinedHistoryBmarks(query) {
    const [history, bookmarks] = await Promise.all([
        getHistory(query),
        getBookmarks(query),
    ]);
    // Join records by URL, using the title from bookmarks by preference.
    const combinedMap = new Map(bookmarks.map(bmark => [
        bmark.url,
        { title: bmark.title, url: bmark.url, bmark },
    ]));
    history.forEach(page => {
        if (combinedMap.has(page.url))
            combinedMap.get(page.url).history = page;
        else
            combinedMap.set(page.url, {
                title: page.title,
                url: page.url,
                history: page,
            });
    });
    const score = x => (x.history ? frecency(x.history) : 0) -
        (x.bmark ? _src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("bmarkweight") : 0);
    return Array.from(combinedMap.values()).sort((a, b) => score(a) - score(b));
}


/***/ }),

/***/ "./src/content/state_content.ts":
/*!**************************************!*\
  !*** ./src/content/state_content.ts ***!
  \**************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PrevInput": () => (/* binding */ PrevInput),
/* harmony export */   "addContentStateChangedListener": () => (/* binding */ addContentStateChangedListener),
/* harmony export */   "contentState": () => (/* binding */ contentState)
/* harmony export */ });
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");

const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_0__.default("state");
class PrevInput {
}
class ContentState {
    constructor() {
        this.mode = "normal";
        this.suffix = "";
        this.current_cmdline = "";
        this.cmdline_filter = "";
    }
}
const onChangedListeners = [];
function addContentStateChangedListener(callback) {
    onChangedListeners.push(callback);
}
const contentState = new Proxy({ mode: "normal" }, {
    get(target, property) {
        return target[property];
    },
    set(target, property, newValue) {
        logger.debug("Content state changed!", property, newValue);
        const oldValue = target[property];
        const mode = target.mode;
        target[property] = newValue;
        for (const listener of onChangedListeners) {
            listener(property, mode, oldValue, newValue);
        }
        return true;
    },
});


/***/ }),

/***/ "./src/content/styling.ts":
/*!********************************!*\
  !*** ./src/content/styling.ts ***!
  \********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "THEMES": () => (/* binding */ THEMES),
/* harmony export */   "theme": () => (/* binding */ theme)
/* harmony export */ });
/* harmony import */ var _src_metadata_generated__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/.metadata.generated */ "./src/.metadata.generated.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");




const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_2__.Logger("styling");
const THEMES = _src_metadata_generated__WEBPACK_IMPORTED_MODULE_0__.staticThemes;
function capitalise(str) {
    if (str === "")
        return str;
    return str[0].toUpperCase() + str.slice(1);
}
function prefixTheme(name) {
    return "TridactylTheme" + capitalise(name);
}
// At the moment elements are only ever `:root` and so this array and stuff is all a bit overdesigned.
const THEMED_ELEMENTS = [];
let insertedCSS = false;
const customCss = {
    allFrames: true,
    matchAboutBlank: true,
    code: "",
};
async function theme(element) {
    // Remove any old theme
    /**
     * DEPRECATED
     *
     * You don't need to add weird classnames to your themes any more, but you can if you want.
     *
     * Retained for backwards compatibility.
     **/
    for (const theme of THEMES.map(prefixTheme)) {
        element.classList.remove(theme);
    }
    // DEPRECATION ENDS
    if (insertedCSS) {
        // Typescript doesn't seem to be aware than remove/insertCSS's tabid
        // argument is optional
        await _src_lib_webext__WEBPACK_IMPORTED_MODULE_3__.browserBg.tabs.removeCSS(await (0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_3__.ownTabId)(), customCss);
        insertedCSS = false;
    }
    const newTheme = await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.getAsync("theme");
    /**
     * DEPRECATED
     *
     * You don't need to add weird classnames to your themes any more, but you can if you want.
     *
     * Retained for backwards compatibility.
     **/
    if (newTheme !== "default") {
        element.classList.add(prefixTheme(newTheme));
    }
    // DEPRECATION ENDS
    // Insert custom css if needed
    if (newTheme !== "default") {
        customCss.code = THEMES.includes(newTheme)
            ? "@import url('" +
                browser.runtime.getURL("static/themes/" + newTheme + "/" + newTheme + ".css") +
                "');"
            : await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.getAsync("customthemes", newTheme);
        if (customCss.code) {
            await _src_lib_webext__WEBPACK_IMPORTED_MODULE_3__.browserBg.tabs.insertCSS(await (0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_3__.ownTabId)(), customCss);
            insertedCSS = true;
        }
        else {
            logger.error("Theme " + newTheme + " couldn't be found.");
        }
    }
    // Record for re-theming
    // considering only elements :root (page and cmdline_iframe)
    // TODO:
    //     - Find ways to check if element is already pushed
    if (THEMED_ELEMENTS.length < 2 &&
        element.tagName.toUpperCase() === "HTML") {
        THEMED_ELEMENTS.push(element);
    }
}
function retheme() {
    THEMED_ELEMENTS.forEach(element => {
        theme(element).catch(e => {
            logger.warning(`Failed to retheme element "${element}". Error: ${e}`);
        });
    });
}
_src_lib_config__WEBPACK_IMPORTED_MODULE_1__.addChangeListener("theme", retheme);
/**
 * DEPRECATED
 *
 * You don't need to add weird classnames to your themes any more, but you can if you want.
 *
 * Retained for backwards compatibility.
 **/
// Sometimes pages will overwrite class names of elements. We use a MutationObserver to make sure that the HTML element always has a TridactylTheme class
// We can't just call theme() because it would first try to remove class names from the element, which would trigger the MutationObserver before we had a chance to add the theme class and thus cause infinite recursion
const cb = async (mutationList) => {
    const theme = await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.getAsync("theme");
    mutationList
        .filter(m => m.target.className.search(prefixTheme("")) === -1)
        .forEach(m => m.target.classList.add(prefixTheme(theme)));
};
new MutationObserver(cb).observe(document.documentElement, {
    attributes: true,
    childList: false,
    characterData: false,
    subtree: false,
    attributeOldValue: false,
    attributeFilter: ["class"],
});
// DEPRECATION ENDS


/***/ }),

/***/ "./src/grammars/.bracketexpr.generated.ts":
/*!************************************************!*\
  !*** ./src/grammars/.bracketexpr.generated.ts ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
// Generated automatically by nearley, version 2.20.1
// http://github.com/Hardmath123/nearley
// Bypasses TS6133. Allow declared but unused functions.
// @ts-ignore
function id(d) { return d[0]; }
;
;
;
;
const grammar = {
    Lexer: undefined,
    ParserRules: [
        { "name": "BracketExpr", "symbols": [{ "literal": "<" }, "Modifier", "ModKey", { "literal": ">" }], "postprocess": bexpr => bexpr.slice(1, -1) },
        { "name": "BracketExpr", "symbols": [{ "literal": "<" }, "Key", { "literal": ">" }], "postprocess": bexpr => [{}].concat(bexpr.slice(1, -1)) },
        { "name": "Modifier$ebnf$1", "symbols": [/[acmsACMS]/], "postprocess": id },
        { "name": "Modifier$ebnf$1", "symbols": [], "postprocess": () => null },
        { "name": "Modifier$ebnf$2", "symbols": [/[acmsACMS]/], "postprocess": id },
        { "name": "Modifier$ebnf$2", "symbols": [], "postprocess": () => null },
        { "name": "Modifier$ebnf$3", "symbols": [/[acmsACMS]/], "postprocess": id },
        { "name": "Modifier$ebnf$3", "symbols": [], "postprocess": () => null },
        { "name": "Modifier$ebnf$4", "symbols": [/[acmsACMS]/], "postprocess": id },
        { "name": "Modifier$ebnf$4", "symbols": [], "postprocess": () => null },
        { "name": "Modifier", "symbols": ["Modifier$ebnf$1", "Modifier$ebnf$2", "Modifier$ebnf$3", "Modifier$ebnf$4", { "literal": "-" }], "postprocess": 
            /** For each modifier present,
                add its long name as an attribute set to true to an object */
            (mods, _, reject) => {
                const longNames = new Map([
                    ["A", "altKey"],
                    ["C", "ctrlKey"],
                    ["M", "metaKey"],
                    ["S", "shiftKey"],
                ]);
                let modifiersObj = {};
                for (let mod of mods) {
                    if (mod === null || mod === "-")
                        continue;
                    let longName = longNames.get(mod.toUpperCase());
                    if (longName) {
                        // Reject if the same name is used twice.
                        if (longName in modifiersObj)
                            return reject;
                        else
                            modifiersObj[longName] = true;
                    }
                }
                return modifiersObj;
            }
        },
        { "name": "ModKey", "symbols": [{ "literal": "<" }], "postprocess": id },
        { "name": "ModKey", "symbols": [{ "literal": ">" }], "postprocess": id },
        { "name": "ModKey", "symbols": [{ "literal": "-" }], "postprocess": id },
        { "name": "ModKey", "symbols": ["Key"], "postprocess": id },
        { "name": "Key$ebnf$1", "symbols": [/[^\s<>-]/] },
        { "name": "Key$ebnf$1", "symbols": ["Key$ebnf$1", /[^\s<>-]/], "postprocess": (d) => d[0].concat([d[1]]) },
        { "name": "Key", "symbols": ["Key$ebnf$1"], "postprocess": (key) => key[0].join("") }
    ],
    ParserStart: "BracketExpr",
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (grammar);


/***/ }),

/***/ "./src/lib/aliases.ts":
/*!****************************!*\
  !*** ./src/lib/aliases.ts ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "expandExstr": () => (/* binding */ expandExstr),
/* harmony export */   "getCmdAliasMapping": () => (/* binding */ getCmdAliasMapping)
/* harmony export */ });
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");

/**
 * Expands the alias in the provided exstr recursively. Does nothing if
 * the command is not aliased, including when the command is invalid.
 *
 * @param exstr :exstr typed by the user on the commantd line
 */
function expandExstr(exstr, aliases = _src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("exaliases"), prevExpansions = []) {
    // Split on whitespace
    const [command] = exstr.trim().split(/\s+/);
    // Base case: alias not found; return original command
    if (aliases[command] === undefined) {
        return exstr;
    }
    // Infinite loop detected
    if (prevExpansions.includes(command)) {
        throw new Error(`Infinite loop detected while expanding aliases. Stack: ${prevExpansions}.`);
    }
    // Add command to expansions used so far
    prevExpansions.push(command);
    // Alias exists; expand it recursively
    return expandExstr(exstr.replace(command, aliases[command]), aliases, prevExpansions);
}
/**
 * Get all aliases for all commands.
 *
 * @param aliases An object mapping aliases to commands
 * @return commands An object mapping commands to an array of aliases
 */
function getCmdAliasMapping(aliases = _src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("exaliases")) {
    const commands = {};
    // aliases look like this: {alias: command} but what we really need is this: {command: [alias1, alias2...]}
    // This is what this loop builds
    for (const alias of Object.keys(aliases)) {
        const cmd = expandExstr(alias, aliases).trim();
        if (!commands[cmd])
            commands[cmd] = [];
        commands[cmd].push(alias.trim());
    }
    return commands;
}


/***/ }),

/***/ "./src/lib/binding.ts":
/*!****************************!*\
  !*** ./src/lib/binding.ts ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "mode2maps": () => (/* binding */ mode2maps),
/* harmony export */   "maps2mode": () => (/* binding */ maps2mode),
/* harmony export */   "modes": () => (/* binding */ modes),
/* harmony export */   "modeMaps": () => (/* binding */ modeMaps),
/* harmony export */   "parse_bind_args": () => (/* binding */ parse_bind_args)
/* harmony export */ });
/* harmony import */ var _src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/keyseq */ "./src/lib/keyseq.ts");
/** # Binding Functions
 *
 */

const mode2maps = new Map([
    ["normal", "nmaps"],
    ["ignore", "ignoremaps"],
    ["insert", "imaps"],
    ["input", "inputmaps"],
    ["ex", "exmaps"],
    ["hint", "hintmaps"],
    ["visual", "vmaps"],
    ["browser", "browsermaps"],
]);
const maps2mode = new Map(Array.from(mode2maps.keys()).map(k => [mode2maps.get(k), k]));
const modes = Array.from(mode2maps.keys());
const modeMaps = Array.from(maps2mode.keys());
function parse_bind_args(...args) {
    if (args.length === 0)
        throw new Error("Invalid bind/unbind arguments.");
    const result = {};
    result.mode = "normal";
    if (args[0].startsWith("--mode=")) {
        result.mode = args.shift().replace("--mode=", "");
    }
    if (!mode2maps.has(result.mode)) {
        result.configName = result.mode + "maps";
    }
    else {
        result.configName = mode2maps.get(result.mode);
    }
    const key = args.shift();
    // Convert key to internal representation
    const keyseq = (0,_src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__.mapstrToKeyseq)(key);
    result.key = keyseq.map(k => k.toMapstr()).join("");
    result.excmd = args.join(" ");
    return result;
}


/***/ }),

/***/ "./src/lib/browser_proxy.ts":
/*!**********************************!*\
  !*** ./src/lib/browser_proxy.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");

const browserProxy = new Proxy(Object.create(null), {
    get(target, api) {
        return new Proxy({}, {
            get(_, func) {
                return (...args) => (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.message)("browser_proxy_background", "shim", api, func, args);
            },
        });
    },
});
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (browserProxy);


/***/ }),

/***/ "./src/lib/commandline_cmds.ts":
/*!*************************************!*\
  !*** ./src/lib/commandline_cmds.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getCommandlineFns": () => (/* binding */ getCommandlineFns)
/* harmony export */ });
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/state */ "./src/state.ts");
/* harmony import */ var _src_content_state_content__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/content/state_content */ "./src/content/state_content.ts");



const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
async function awaitProxyEq(proxy, a, b) {
    let counter = 0;
    while (proxy[a] != proxy[b] && counter < 50) {
        await sleep(10);
        counter += 1;
    }
    return proxy[a] == proxy[b];
}
// One day we'll use typeof commandline_state from commandline_frame.ts
function getCommandlineFns(cmdline_state) {
    return {
        /**
         * Insert the first command line history line that starts with the content of the command line in the command line.
         */
        complete: async () => {
            const fragment = cmdline_state.clInput.value;
            const matches = (await _src_state__WEBPACK_IMPORTED_MODULE_1__.getAsync("cmdHistory")).filter(key => key.startsWith(fragment));
            const mostrecent = matches[matches.length - 1];
            if (mostrecent !== undefined)
                cmdline_state.clInput.value = mostrecent;
            return cmdline_state.refresh_completions(cmdline_state.clInput.value);
        },
        /**
         * Selects the next completion.
         */
        next_completion: async () => {
            await awaitProxyEq(_src_content_state_content__WEBPACK_IMPORTED_MODULE_2__.contentState, "current_cmdline", "cmdline_filter");
            if (cmdline_state.activeCompletions)
                cmdline_state.activeCompletions.forEach(comp => comp.next());
        },
        /**
         * Selects the previous completion.
         */
        prev_completion: async () => {
            await awaitProxyEq(_src_content_state_content__WEBPACK_IMPORTED_MODULE_2__.contentState, "current_cmdline", "cmdline_filter");
            if (cmdline_state.activeCompletions)
                cmdline_state.activeCompletions.forEach(comp => comp.prev());
        },
        /**
         * Deselects the currently selected completion.
         */
        deselect_completion: () => {
            if (cmdline_state.activeCompletions)
                cmdline_state.activeCompletions.forEach(comp => comp.deselect());
        },
        /**
         * Inserts the currently selected completion and a space in the command line.
         */
        insert_completion: async () => {
            await awaitProxyEq(_src_content_state_content__WEBPACK_IMPORTED_MODULE_2__.contentState, "current_cmdline", "cmdline_filter");
            const command = cmdline_state.getCompletion();
            if (cmdline_state.activeCompletions) {
                cmdline_state.activeCompletions.forEach(comp => (comp.completion = undefined));
            }
            let result = Promise.resolve([]);
            if (command) {
                cmdline_state.clInput.value = command + " ";
                result = cmdline_state.refresh_completions(cmdline_state.clInput.value);
            }
            return result;
        },
        /**
         * If a completion is selected, inserts it in the command line with a space.
         * If no completion is selected, inserts a space where the caret is.
         */
        insert_space_or_completion: () => {
            const command = cmdline_state.getCompletion();
            if (cmdline_state.activeCompletions) {
                cmdline_state.activeCompletions.forEach(comp => (comp.completion = undefined));
            }
            if (command) {
                cmdline_state.clInput.value = command + " ";
            }
            else {
                const selectionStart = cmdline_state.clInput.selectionStart;
                const selectionEnd = cmdline_state.clInput.selectionEnd;
                cmdline_state.clInput.value =
                    cmdline_state.clInput.value.substring(0, selectionStart) +
                        " " +
                        cmdline_state.clInput.value.substring(selectionEnd);
                cmdline_state.clInput.selectionStart = cmdline_state.clInput.selectionEnd =
                    selectionStart + 1;
            }
            return cmdline_state.refresh_completions(cmdline_state.clInput.value);
        },
        /** Hide the command line and cmdline_state.clear its content without executing it. **/
        hide_and_clear: () => {
            cmdline_state.clear(true);
            cmdline_state.keyEvents = [];
            // Try to make the close cmdline animation as smooth as possible.
            (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab)("commandline_content", "hide");
            (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab)("commandline_content", "blur");
            // Delete all completion sources - I don't think this is required, but this
            // way if there is a transient bug in completions it shouldn't persist.
            if (cmdline_state.activeCompletions)
                cmdline_state.activeCompletions.forEach(comp => cmdline_state.completionsDiv.removeChild(comp.node));
            cmdline_state.activeCompletions = undefined;
            cmdline_state.isVisible = false;
        },
        /**
         * Check if the command is valid
         */
        is_valid_commandline: (command) => {
            if (command === undefined)
                return false;
            const func = command.trim().split(/\s+/)[0];
            if (func.length === 0 || func.startsWith("#")) {
                return false;
            }
            return true;
        },
        /**
         * Save non-secret commands to the cmdHistory and update the cmdline_history_position
         */
        store_ex_string: (command) => {
            const [func, ...args] = command.trim().split(/\s+/);
            // Save non-secret commandlines to the history.
            if (!browser.extension.inIncognitoContext &&
                !(func === "winopen" && args[0] === "-private")) {
                _src_state__WEBPACK_IMPORTED_MODULE_1__.getAsync("cmdHistory").then(c => {
                    cmdline_state.state.cmdHistory = c.concat([command]);
                });
                cmdline_state.cmdline_history_position = 0;
            }
        },
        /**
         * Selects the next history line.
         */
        next_history: () => cmdline_state.history(1),
        /**
         * Selects the prev history line.
         */
        prev_history: () => cmdline_state.history(-1),
        /**
         * Execute the content of the command line and hide it.
         **/
        accept_line: async () => {
            await awaitProxyEq(_src_content_state_content__WEBPACK_IMPORTED_MODULE_2__.contentState, "current_cmdline", "cmdline_filter");
            const command = cmdline_state.getCompletion() || cmdline_state.clInput.value;
            cmdline_state.fns.hide_and_clear();
            if (cmdline_state.fns.is_valid_commandline(command) === false)
                return;
            cmdline_state.fns.store_ex_string(command);
            // Send excmds directly to our own tab, which fixes the
            // old bug where a command would be issued in one tab but
            // land in another because the active tab had
            // changed. Background-mode excmds will be received by the
            // own tab's content script and then bounced through a
            // shim to the background, but the latency increase should
            // be acceptable becuase the background-mode excmds tend
            // to be a touch less latency-sensitive.
            return (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab)("controller_content", "acceptExCmd", [command]);
        },
        execute_ex_on_completion_args: (excmd) => execute_ex_on_x(true, cmdline_state, excmd),
        execute_ex_on_completion: (excmd) => execute_ex_on_x(false, cmdline_state, excmd),
        copy_completion: () => {
            const command = cmdline_state.getCompletion();
            cmdline_state.fns.hide_and_clear();
            return (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab)("controller_content", "acceptExCmd", [
                "clipboard yank " + command,
            ]);
        },
    };
}
function execute_ex_on_x(args_only, cmdline_state, excmd) {
    const args = cmdline_state.getCompletion(args_only) || cmdline_state.clInput.value;
    const cmdToExec = (excmd ? excmd + " " : "") + args;
    cmdline_state.fns.store_ex_string(cmdToExec);
    return (0,_src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.messageOwnTab)("controller_content", "acceptExCmd", [cmdToExec]);
}


/***/ }),

/***/ "./src/lib/config.ts":
/*!***************************!*\
  !*** ./src/lib/config.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "INITIALISED": () => (/* binding */ INITIALISED),
/* harmony export */   "o": () => (/* binding */ o),
/* harmony export */   "USERCONFIG": () => (/* binding */ USERCONFIG),
/* harmony export */   "default_config": () => (/* binding */ default_config),
/* harmony export */   "mergeDeepCull": () => (/* binding */ mergeDeepCull),
/* harmony export */   "DEFAULTS": () => (/* binding */ DEFAULTS),
/* harmony export */   "getDeepProperty": () => (/* binding */ getDeepProperty),
/* harmony export */   "mergeDeep": () => (/* binding */ mergeDeep),
/* harmony export */   "getURL": () => (/* binding */ getURL),
/* harmony export */   "get": () => (/* binding */ get),
/* harmony export */   "getDynamic": () => (/* binding */ getDynamic),
/* harmony export */   "getAsyncDynamic": () => (/* binding */ getAsyncDynamic),
/* harmony export */   "getAsync": () => (/* binding */ getAsync),
/* harmony export */   "push": () => (/* binding */ push),
/* harmony export */   "pull": () => (/* binding */ pull),
/* harmony export */   "setURL": () => (/* binding */ setURL),
/* harmony export */   "set": () => (/* binding */ set),
/* harmony export */   "unsetURL": () => (/* binding */ unsetURL),
/* harmony export */   "unset": () => (/* binding */ unset),
/* harmony export */   "save": () => (/* binding */ save),
/* harmony export */   "update": () => (/* binding */ update),
/* harmony export */   "addChangeListener": () => (/* binding */ addChangeListener),
/* harmony export */   "removeChangeListener": () => (/* binding */ removeChangeListener),
/* harmony export */   "parseConfig": () => (/* binding */ parseConfig)
/* harmony export */ });
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/when.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/is.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/pipe.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/reject.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/map.js");
/* harmony import */ var _src_lib_binding__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/binding */ "./src/lib/binding.ts");
/* harmony import */ var _src_lib_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/platform */ "./src/lib/platform.ts");
// Sketch
//
// Need an easy way of getting and setting settings
// If a setting is not set, the default should probably be returned.
// That probably means that binds etc. should be per-key?
//
// We should probably store all settings in memory, and only load from storage on startup and when we set it
//
// Really, we'd like a way of just letting things use the variables
//
/** # Tridactyl Configuration
 *
 * We very strongly recommend that you pretty much ignore this page and instead follow the link below DEFAULTS that will take you to our own source code which is formatted in a marginally more sane fashion.
 *
 * Intrepid Tridactyl users: this page is how Tridactyl arranges and manages its settings internally. To view your own settings, use `:viewconfig` and `:viewconfig --user`. To understand how to set settings, see `:help set`.
 *
 */



/* Remove all nulls from objects recursively
 * NB: also applies to arrays
 */
const removeNull = ramda__WEBPACK_IMPORTED_MODULE_2__.default(ramda__WEBPACK_IMPORTED_MODULE_3__.default(Object), ramda__WEBPACK_IMPORTED_MODULE_4__.default(
// Ramda gives an error here without the any
ramda__WEBPACK_IMPORTED_MODULE_5__.default(val => val === null), ramda__WEBPACK_IMPORTED_MODULE_6__.default(a => removeNull(a))));
/** @hidden */
const CONFIGNAME = "userconfig";
/** @hidden */
const WAITERS = [];
/** @hidden */
let INITIALISED = false;
/** @hidden */
// make a naked object
function o(object) {
    return Object.assign(Object.create(null), object);
}
/** @hidden */
// "Import" is a reserved word so this will have to do
function schlepp(settings) {
    Object.assign(USERCONFIG, settings);
}
/** @hidden */
let USERCONFIG = o({});
/**
 * This is the default configuration that Tridactyl comes with.
 *
 * You can change anything here using `set key1.key2.key3 value` or specific things any of the various helper commands such as `bind` or `command`. You can also jump to the help section of a setting using `:help $settingname`. Some of the settings have an input field containing their current value. You can modify these values and save them by pressing `<Enter>` but using `:set $setting $value` is a good habit to take as it doesn't force you to leave the page you're visiting to change your settings.
 *
 * If the setting you are changing has a dot or period character (.) in it, it cannot be set with `:set` directly. You must either use a helper command for that specific setting - e.g. `:seturl` or `:autocontain`, or you must use Tridactyl's JavaScript API with `:js tri.config.set("path", "to", "key", "value")` to set `{path: {to: {key: value}}}`.
 *
 */
class default_config {
    constructor() {
        /**
         * Internal version number Tridactyl uses to know whether it needs to update from old versions of the configuration.
         *
         * Changing this might do weird stuff.
         */
        this.configversion = "0.0";
        /**
         * Internal field to handle site-specific configs. Use :seturl/:unseturl to change these values.
         */
        this.subconfigs = {
            "www.google.com": {
                followpagepatterns: {
                    next: "Next",
                    prev: "Previous",
                },
            },
            "^https://web.whatsapp.com": {
                nmaps: {
                    f: "hint -c [tabindex]:not(.two)>div,a",
                    F: "hint -bc [tabindex]:not(.two)>div,a",
                },
            },
        };
        /**
         * Internal field to handle site-specific config priorities. Use :seturl/:unseturl to change this value.
         */
        this.priority = 0;
        // Note to developers: When creating new <modifier-letter> maps, make sure to make the modifier uppercase (e.g. <C-a> instead of <c-a>) otherwise some commands might not be able to find them (e.g. `bind <c-a>`)
        /**
         * exmaps contains all of the bindings for the command line.
         * You can of course bind regular ex commands but also [editor functions](/static/docs/modules/_src_lib_editor_.html) and [commandline-specific functions](/static/docs/modules/_src_commandline_frame_.html).
         */
        this.exmaps = {
            "<Enter>": "ex.accept_line",
            "<C-Enter>": "ex.execute_ex_on_completion",
            "<C-j>": "ex.accept_line",
            "<C-m>": "ex.accept_line",
            "<Escape>": "ex.hide_and_clear",
            "<C-[>": "ex.hide_and_clear",
            "<ArrowUp>": "ex.prev_history",
            "<ArrowDown>": "ex.next_history",
            "<S-Del>": "ex.execute_ex_on_completion_args tabclose",
            "<A-b>": "text.backward_word",
            "<A-f>": "text.forward_word",
            "<C-e>": "text.end_of_line",
            "<A-d>": "text.kill_word",
            "<S-Backspace>": "text.backward_kill_word",
            "<C-u>": "text.backward_kill_line",
            "<C-k>": "text.kill_line",
            "<C-f>": "ex.complete",
            "<Tab>": "ex.next_completion",
            "<S-Tab>": "ex.prev_completion",
            "<Space>": "ex.insert_space_or_completion",
            "<C-o>yy": "ex.execute_ex_on_completion_args clipboard yank",
        };
        /**
         * ignoremaps contain all of the bindings for "ignore mode".
         *
         * They consist of key sequences mapped to ex commands.
         */
        this.ignoremaps = {
            "<S-Insert>": "mode normal",
            "<AC-Escape>": "mode normal",
            "<AC-`>": "mode normal",
            "<S-Escape>": "mode normal",
            "<C-o>": "nmode normal 1 mode ignore",
        };
        /**
         * imaps contain all of the bindings for "insert mode".
         *
         * On top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in insert mode.
         *
         * They consist of key sequences mapped to ex commands.
         */
        this.imaps = {
            "<Escape>": "composite unfocus | mode normal",
            "<C-[>": "composite unfocus | mode normal",
            "<C-i>": "editor",
            "<AC-Escape>": "mode normal",
            "<AC-`>": "mode normal",
            "<S-Escape>": "mode ignore",
        };
        /**
         * inputmaps contain all of the bindings for "input mode".
         *
         * On top of regular ex commands, you can also bind [editor functions](/static/docs/modules/_src_lib_editor_.html) in input mode.
         *
         * They consist of key sequences mapped to ex commands.
         */
        this.inputmaps = {
            "<Tab>": "focusinput -n",
            "<S-Tab>": "focusinput -N",
            /**
             * Config objects with this key inherit their keys from the object specified.
             *
             * Only supports "root" objects. Subconfigs (`seturl`) work as expected.
             *
             * Here, this means that input mode is the same as insert mode except it has added binds for tab and shift-tab.
             */
            "🕷🕷INHERITS🕷🕷": "imaps",
        };
        /**
         * nmaps contain all of the bindings for "normal mode".
         *
         * They consist of key sequences mapped to ex commands.
         */
        this.nmaps = {
            "<A-p>": "pin",
            "<A-m>": "mute toggle",
            "<F1>": "help",
            o: "fillcmdline open",
            O: "current_url open",
            w: "fillcmdline winopen",
            W: "current_url winopen",
            t: "fillcmdline tabopen",
            "]]": "followpage next",
            "[[": "followpage prev",
            "[c": "urlincrement -1",
            "]c": "urlincrement 1",
            "<C-x>": "urlincrement -1",
            "<C-a>": "urlincrement 1",
            T: "current_url tabopen",
            yy: "clipboard yank",
            ys: "clipboard yankshort",
            yc: "clipboard yankcanon",
            ym: "clipboard yankmd",
            yo: "clipboard yankorg",
            yt: "clipboard yanktitle",
            gh: "home",
            gH: "home true",
            p: "clipboard open",
            P: "clipboard tabopen",
            j: "scrollline 10",
            "<C-e>": "scrollline 10",
            k: "scrollline -10",
            "<C-y>": "scrollline -10",
            h: "scrollpx -50",
            l: "scrollpx 50",
            G: "scrollto 100",
            gg: "scrollto 0",
            "<C-u>": "scrollpage -0.5",
            "<C-d>": "scrollpage 0.5",
            "<C-f>": "scrollpage 1",
            "<C-b>": "scrollpage -1",
            "<C-v>": "nmode ignore 1 mode normal",
            $: "scrollto 100 x",
            // "0": "scrollto 0 x", // will get interpreted as a count
            "^": "scrollto 0 x",
            H: "back",
            L: "forward",
            "<C-o>": "jumpprev",
            "<C-i>": "jumpnext",
            d: "tabclose",
            D: "composite tabprev; tabclose #",
            gx0: "tabclosealltoleft",
            gx$: "tabclosealltoright",
            "<<": "tabmove -1",
            ">>": "tabmove +1",
            u: "undo",
            U: "undo window",
            r: "reload",
            R: "reloadhard",
            x: "stop",
            gi: "focusinput -l",
            "g?": "rot13",
            "g!": "jumble",
            "g;": "changelistjump -1",
            J: "tabprev",
            K: "tabnext",
            gt: "tabnext_gt",
            gT: "tabprev",
            // "<c-n>": "tabnext_gt", // c-n is reserved for new window
            // "<c-p>": "tabprev",
            "g^": "tabfirst",
            g0: "tabfirst",
            g$: "tablast",
            ga: "tabaudio",
            gr: "reader",
            gu: "urlparent",
            gU: "urlroot",
            gf: "viewsource",
            ":": "fillcmdline_notrail",
            s: "fillcmdline open search",
            S: "fillcmdline tabopen search",
            // find mode not suitable for general consumption yet.
            // "/": "fillcmdline find",
            // "?": "fillcmdline find -?",
            // n: "findnext 1",
            // N: "findnext -1",
            // ",<Space>": "nohlsearch",
            M: "gobble 1 quickmark",
            B: "fillcmdline taball",
            b: "fillcmdline tab",
            ZZ: "qall",
            f: "hint",
            F: "hint -b",
            gF: "hint -qb",
            ";i": "hint -i",
            ";b": "hint -b",
            ";o": "hint",
            ";I": "hint -I",
            ";k": "hint -k",
            ";K": "hint -K",
            ";y": "hint -y",
            ";Y": "hint -cF img i => tri.excmds.yankimage(tri.urlutils.getAbsoluteURL(i.src))",
            ";p": "hint -p",
            ";h": "hint -h",
            v: "hint -h",
            ";P": "hint -P",
            ";r": "hint -r",
            ";s": "hint -s",
            ";S": "hint -S",
            ";a": "hint -a",
            ";A": "hint -A",
            ";;": "hint -; *",
            ";#": "hint -#",
            ";v": "hint -W mpvsafe",
            ";w": "hint -w",
            ";t": "hint -W tabopen",
            ";O": "hint -W fillcmdline_notrail open ",
            ";W": "hint -W fillcmdline_notrail winopen ",
            ";T": "hint -W fillcmdline_notrail tabopen ",
            ";z": "hint -z",
            ";m": "composite hint -Jpipe img src | open images.google.com/searchbyimage?image_url=",
            ";M": "composite hint -Jpipe img src | tabopen images.google.com/searchbyimage?image_url=",
            ";gi": "hint -qi",
            ";gI": "hint -qI",
            ";gk": "hint -qk",
            ";gy": "hint -qy",
            ";gp": "hint -qp",
            ";gP": "hint -qP",
            ";gr": "hint -qr",
            ";gs": "hint -qs",
            ";gS": "hint -qS",
            ";ga": "hint -qa",
            ";gA": "hint -qA",
            ";g;": "hint -q;",
            ";g#": "hint -q#",
            ";gv": "hint -qW mpvsafe",
            ";gw": "hint -qw",
            ";gb": "hint -qb",
            // These two don't strictly follow the "bind is ;g[flag]" rule but they make sense
            ";gF": "hint -qb",
            ";gf": "hint -q",
            "<S-Insert>": "mode ignore",
            "<AC-Escape>": "mode ignore",
            "<AC-`>": "mode ignore",
            "<S-Escape>": "mode ignore",
            "<Escape>": "composite mode normal ; hidecmdline",
            "<C-[>": "composite mode normal ; hidecmdline",
            a: "current_url bmark",
            A: "bmark",
            zi: "zoom 0.1 true",
            zo: "zoom -0.1 true",
            zm: "zoom 0.5 true",
            zr: "zoom -0.5 true",
            zM: "zoom 0.5 true",
            zR: "zoom -0.5 true",
            zz: "zoom 1",
            zI: "zoom 3",
            zO: "zoom 0.3",
            ".": "repeat",
            "<AS-ArrowUp><AS-ArrowUp><AS-ArrowDown><AS-ArrowDown><AS-ArrowLeft><AS-ArrowRight><AS-ArrowLeft><AS-ArrowRight>ba": "open https://www.youtube.com/watch?v=M3iOROuTuMA",
        };
        this.vmaps = {
            "<Escape>": "composite js document.getSelection().empty(); mode normal; hidecmdline",
            "<C-[>": "composite js document.getSelection().empty(); mode normal ; hidecmdline",
            y: "composite js document.getSelection().toString() | clipboard yank",
            s: "composite js document.getSelection().toString() | fillcmdline open search",
            S: "composite js document.getSelection().toString() | fillcmdline tabopen search",
            l: 'js document.getSelection().modify("extend","forward","character")',
            h: 'js document.getSelection().modify("extend","backward","character")',
            e: 'js document.getSelection().modify("extend","forward","word")',
            w: 'js document.getSelection().modify("extend","forward","word"); document.getSelection().modify("extend","forward","word"); document.getSelection().modify("extend","backward","word"); document.getSelection().modify("extend","forward","character")',
            b: 'js document.getSelection().modify("extend","backward","character"); document.getSelection().modify("extend","backward","word"); document.getSelection().modify("extend","forward","character")',
            j: 'js document.getSelection().modify("extend","forward","line")',
            // "j": 'js document.getSelection().modify("extend","forward","paragraph")', // not implemented in Firefox
            k: 'js document.getSelection().modify("extend","backward","line")',
            $: 'js document.getSelection().modify("extend","forward","lineboundary")',
            "0": 'js document.getSelection().modify("extend","backward","lineboundary")',
            "=": "js let n = document.getSelection().anchorNode.parentNode; let s = window.getSelection(); let r = document.createRange(); s.removeAllRanges(); r.selectNodeContents(n); s.addRange(r)",
            o: "js tri.visual.reverseSelection(document.getSelection())",
            "🕷🕷INHERITS🕷🕷": "nmaps",
        };
        this.hintmaps = {
            "<Backspace>": "hint.popKey",
            "<Escape>": "hint.reset",
            "<C-[>": "hint.reset",
            "<Tab>": "hint.focusNextHint",
            "<S-Tab>": "hint.focusPreviousHint",
            "<ArrowUp>": "hint.focusTopHint",
            "<ArrowDown>": "hint.focusBottomHint",
            "<ArrowLeft>": "hint.focusLeftHint",
            "<ArrowRight>": "hint.focusRightHint",
            "<Enter>": "hint.selectFocusedHint",
            "<Space>": "hint.selectFocusedHint",
        };
        /**
         * Browser-wide binds accessible in all modes and on pages where Tridactyl "cannot run".
         * <!-- Note to developers: binds here need to also be listed in manifest.json -->
         */
        this.browsermaps = {
            "<C-,>": "escapehatch",
            "<C-6>": "tab #",
            "<CS-6>": "tab #",
        };
        /**
         * Whether to allow pages (not necessarily github) to override `/`, which is a default Firefox binding.
         */
        this.leavegithubalone = "false";
        /**
         * Which keys to protect from pages that try to override them. Requires [[leavegithubalone]] to be set to false.
         */
        this.blacklistkeys = ["/"];
        /**
         * Autocommands that run when certain events happen, and other conditions are met.
         *
         * Related ex command: `autocmd`.
         */
        this.autocmds = {
            /**
             * Commands that will be run as soon as Tridactyl loads into a page.
             *
             * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command.
             */
            DocStart: {
            // "addons.mozilla.org": "mode ignore",
            },
            /**
             * Commands that will be run when pages are loaded.
             *
             * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command.
             */
            DocLoad: {
                "^https://github.com/tridactyl/tridactyl/issues/new$": "issue",
            },
            /**
             * Commands that will be run when pages are unloaded.
             *
             * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command.
             */
            DocEnd: {
            // "emacs.org": "sanitise history",
            },
            /**
             * Commands that will be run when Tridactyl first runs each time you start your browser.
             *
             * Each key corresponds to a javascript regex that matches the hostname of the computer Firefox is running on. Note that fetching the hostname could be a little slow, if you want to execute something unconditionally, use ".*" as Tridactyl special-cases this pattern to avoid hostname lookups.
             */
            TriStart: {
                ".*": "source_quiet",
            },
            /**
             * Commands that will be run when you enter a tab.
             *
             * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command.
             */
            TabEnter: {
            // "gmail.com": "mode ignore",
            },
            /**
             * Commands that will be run when you leave a tab.
             *
             * Each key corresponds to a URL fragment which, if contained within the page URL, will run the corresponding command.
             */
            TabLeft: {
            // Actually, this doesn't work because tabclose closes the current tab
            // Too bad :/
            // "emacs.org": "tabclose",
            },
            /**
             * Commands that will be run when fullscreen state changes.
             */
            FullscreenChange: {},
            /**
             * Commands that will be run when fullscreen state is entered.
             */
            FullscreenEnter: {},
            /**
             * Commands that will be run when fullscreen state is left.
             */
            FullscreenLeft: {},
        };
        /**
         * Map for translating keys directly into other keys in normal-ish modes. For example, if you have an entry in this config option mapping `п` to `g`, then you could type `пп` instead of `gg` or `пi` instead of `gi` or `;п` instead of `;g`. This is primarily useful for international users who don't want to deal with rebuilding their bindings every time tridactyl ships a new default keybind. It's not as good as shipping properly internationalized sets of default bindings, but it's probably as close as we're going to get on a small open-source project like this.
         *
         * Note that the current implementation does not allow you to "chain" keys, for example, "a"=>"b" and "b"=>"c" for "a"=>"c". You can, however, swap or rotate keys, so "a"=>"b" and "b"=>"a" will work the way you'd expect, as will "a"=>"b" and "b"=>"c" and "c"=>"a".
         */
        this.keytranslatemap = {
        // Examples (I think >_>):
        // "д": "l", // Russian language
        // "é" : "w", // BÉPO
        // "h": "j", // Dvorak
        // "n": "j", // Colemak
        // etc
        };
        /**
         * Whether to use the keytranslatemap in various maps.
         */
        this.keytranslatemodes = {
            nmaps: "true",
            imaps: "false",
            inputmaps: "false",
            ignoremaps: "false",
            exmaps: "false",
            hintmaps: "false",
        };
        /**
         * Automatically place these sites in the named container.
         *
         * Each key corresponds to a URL fragment which, if contained within the page URL, the site will be opened in a container tab instead.
         */
        this.autocontain = o({
        // "github.com": "microsoft",
        // "youtube.com": "google",
        });
        /**
         * Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary.
         *
         * Relaxed mode is less aggressive and instead treats container domains as a default when opening a new tab.
         */
        this.autocontainmode = "strict";
        /**
         * Aliases for the commandline.
         *
         * You can make a new one with `command alias ex-command`.
         */
        this.exaliases = {
            alias: "command",
            au: "autocmd",
            aucon: "autocontain",
            audel: "autocmddelete",
            audelete: "autocmddelete",
            blacklistremove: "autocmddelete DocStart",
            b: "tab",
            clsh: "clearsearchhighlight",
            nohlsearch: "clearsearchhighlight",
            noh: "clearsearchhighlight",
            o: "open",
            w: "winopen",
            t: "tabopen",
            tabnew: "tabopen",
            tabm: "tabmove",
            tabo: "tabonly",
            tn: "tabnext_gt",
            bn: "tabnext_gt",
            tnext: "tabnext_gt",
            bnext: "tabnext_gt",
            tp: "tabprev",
            tN: "tabprev",
            bp: "tabprev",
            bN: "tabprev",
            tprev: "tabprev",
            bprev: "tabprev",
            tabfirst: "tab 1",
            tablast: "tab 0",
            bfirst: "tabfirst",
            blast: "tablast",
            tfirst: "tabfirst",
            tlast: "tablast",
            buffer: "tab",
            bufferall: "taball",
            bd: "tabclose",
            bdelete: "tabclose",
            quit: "tabclose",
            q: "tabclose",
            qa: "qall",
            sanitize: "sanitise",
            "saveas!": "saveas --cleanup --overwrite",
            tutorial: "tutor",
            h: "help",
            unmute: "mute unmute",
            authors: "credits",
            openwith: "hint -W",
            "!": "exclaim",
            "!s": "exclaim_quiet",
            containerremove: "containerdelete",
            colours: "colourscheme",
            colorscheme: "colourscheme",
            colors: "colourscheme",
            man: "help",
            "!js": "fillcmdline_tmp 3000 !js is deprecated. Please use js instead",
            "!jsb": "fillcmdline_tmp 3000 !jsb is deprecated. Please use jsb instead",
            get_current_url: "js document.location.href",
            current_url: "composite get_current_url | fillcmdline_notrail ",
            stop: "js window.stop()",
            zo: "zoom",
            installnative: "nativeinstall",
            nativeupdate: "updatenative",
            mkt: "mktridactylrc",
            "mkt!": "mktridactylrc -f",
            "mktridactylrc!": "mktridactylrc -f",
            mpvsafe: "js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('mpv ' + url))",
            exto: "extoptions",
            extpreferences: "extoptions",
            extp: "extpreferences",
            prefset: "setpref",
            prefremove: "removepref",
            tabclosealltoright: "tabcloseallto right",
            tabclosealltoleft: "tabcloseallto left",
            reibadailty: "jumble",
        };
        /**
         * Used by `]]` and `[[` to look for links containing these words.
         *
         * Edit these if you want to add, e.g. other language support.
         */
        this.followpagepatterns = {
            next: "^(next|newer)\\b|»|>>|more",
            prev: "^(prev(ious)?|older)\\b|«|<<",
        };
        /**
         * The default search engine used by `open search`. If empty string, your browser's default search engine will be used. If set to something, Tridactyl will first look at your [[searchurls]] and then at the search engines for which you have defined a keyword on `about:preferences#search`.
         */
        this.searchengine = "";
        /**
         * Definitions of search engines for use via `open [keyword]`.
         *
         * `%s` will be replaced with your whole query and `%s1`, `%s2`, ..., `%sn` will be replaced with the first, second and nth word of your query. If there are none of these patterns in your search urls, your query will simply be appended to the searchurl.
         *
         * Examples:
         * - When running `open gi cute puppies`, with a `gi` searchurl defined with `set searchurls.gi https://www.google.com/search?q=%s&tbm=isch`, tridactyl will navigate to `https://www.google.com/search?q=cute puppies&tbm=isch`.
         * - When running `tabopen translate en ja Tridactyl`, with a `translate` searchurl defined with `set searchurls.translate https://translate.google.com/#view=home&op=translate&sl=%s1&tl=%s2&text=%s3`, tridactyl will navigate to `https://translate.google.com/#view=home&op=translate&sl=en&tl=ja&text=Tridactyl`.
         *
         * [[setnull]] can be used to "delete" the default search engines. E.g. `setnull searchurls.google`.
         */
        this.searchurls = {
            google: "https://www.google.com/search?q=",
            googlelucky: "https://www.google.com/search?btnI=I'm+Feeling+Lucky&q=",
            scholar: "https://scholar.google.com/scholar?q=",
            googleuk: "https://www.google.co.uk/search?q=",
            bing: "https://www.bing.com/search?q=",
            duckduckgo: "https://duckduckgo.com/?q=",
            yahoo: "https://search.yahoo.com/search?p=",
            twitter: "https://twitter.com/search?q=",
            wikipedia: "https://en.wikipedia.org/wiki/Special:Search/",
            youtube: "https://www.youtube.com/results?search_query=",
            amazon: "https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=",
            amazonuk: "https://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=",
            startpage: "https://startpage.com/do/search?language=english&cat=web&query=",
            github: "https://github.com/search?utf8=✓&q=",
            searx: "https://searx.me/?category_general=on&q=",
            cnrtl: "http://www.cnrtl.fr/lexicographie/",
            osm: "https://www.openstreetmap.org/search?query=",
            mdn: "https://developer.mozilla.org/en-US/search?q=",
            gentoo_wiki: "https://wiki.gentoo.org/index.php?title=Special%3ASearch&profile=default&fulltext=Search&search=",
            qwant: "https://www.qwant.com/?q=",
        };
        /**
         * URL the newtab will redirect to.
         *
         * All usual rules about things you can open with `open` apply, with the caveat that you'll get interesting results if you try to use something that needs `nativeopen`: so don't try `about:newtab` or a `file:///` URI. You should instead use a data URI - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs - or host a local webserver (e.g. Caddy).
         */
        this.newtab = "";
        /**
         * Whether `:viewsource` will use our own page that you can use Tridactyl binds on, or Firefox's default viewer, which you cannot use Tridactyl on.
         */
        this.viewsource = "tridactyl";
        /**
         * Pages opened with `gH`. In order to set this value, use `:set homepages ["example.org", "example.net", "example.com"]` and so on.
         */
        this.homepages = [];
        /**
         * Characters to use in hint mode.
         *
         * They are used preferentially from left to right.
         */
        this.hintchars = "hjklasdfgyuiopqwertnmzxcvb";
        /**
         * The type of hinting to use. `vimperator` will allow you to filter links based on their names by typing non-hint chars. It is recommended that you use this in conjuction with the [[hintchars]] setting, which you should probably set to e.g, `5432167890`. ´vimperator-reflow´ additionally updates the hint labels after filtering.
         */
        this.hintfiltermode = "simple";
        /**
         * Whether to optimise for the shortest possible names for each hint, or to use a simple numerical ordering. If set to `numeric`, overrides `hintchars` setting.
         */
        this.hintnames = "short";
        /**
         * Whether to display the names for hints in uppercase.
         */
        this.hintuppercase = "true";
        /**
         * The delay in milliseconds in `vimperator` style hint modes after selecting a hint before you are returned to normal mode.
         *
         * The point of this is to prevent accidental execution of normal mode binds due to people typing more than is necessary to choose a hint.
         */
        this.hintdelay = 300;
        /**
         * Controls whether hints should be shifted in quick-hints mode.
         *
         * Here's what it means: let's say you have hints from a to z but are only
         * interested in every second hint. You first press `a`, then `c`.
         * Tridactyl will realize that you skipped over `b`, and so that the next
         * hint you're going to trigger is probably `e`. Tridactyl will shift all
         * hint names so that `e` becomes `c`, `d` becomes `b`, `c` becomes `a` and
         * so on.
         * This means that once you pressed `c`, you can keep on pressing `c` to
         * trigger every second hint. Only makes sense with hintnames = short.
         */
        this.hintshift = "false";
        /**
         * Controls whether hints should be followed automatically.
         *
         * If set to `false`, hints will only be followed upon confirmation. This applies to cases when there is only a single match or only one link on the page.
         */
        this.hintautoselect = "true";
        /**
         * Controls whether the page can focus elements for you via js
         *
         * NB: will break fancy editors such as CodeMirror on Jupyter. Simply use `seturl` to whitelist pages you need it on.
         *
         * Best used in conjunction with browser.autofocus in `about:config`
         */
        this.allowautofocus = "true";
        /**
         * Uses a loop to prevent focus until you interact with a page. Only recommended for use via `seturl` for problematic sites as it can be a little heavy on CPU if running on all tabs. Should be used in conjuction with [[allowautofocus]]
         */
        this.preventautofocusjackhammer = "false";
        /**
         * Whether to use Tridactyl's (bad) smooth scrolling.
         */
        this.smoothscroll = "false";
        /**
         * How viscous you want smooth scrolling to feel.
         */
        this.scrollduration = 100;
        /**
         * Where to open tabs opened with `tabopen` - to the right of the current tab, or at the end of the tabs.
         */
        this.tabopenpos = "next";
        /**
         * When enabled (the default), running tabclose will close the tabs whether they are pinned or not. When disabled, tabclose will fail with an error if a tab is pinned.
         */
        this.tabclosepinned = "true";
        /**
         * Controls which tab order to use when opening the tab/buffer list. Either mru = sort by most recent tab or default = by tab index
         */
        this.tabsort = "default";
        /**
         * Where to open tabs opened with hinting - as if it had been middle clicked, to the right of the current tab, or at the end of the tabs.
         */
        this.relatedopenpos = "related";
        /**
         * The name of the voice to use for text-to-speech. You can get the list of installed voices by running the following snippet: `js alert(window.speechSynthesis.getVoices().reduce((a, b) => a + " " + b.name))`
         */
        this.ttsvoice = "default"; // chosen from the listvoices list or "default"
        /**
         * Controls text-to-speech volume. Has to be a number between 0 and 1.
         */
        this.ttsvolume = 1;
        /**
         * Controls text-to-speech speed. Has to be a number between 0.1 and 10.
         */
        this.ttsrate = 1;
        /**
         * Controls text-to-speech pitch. Has to be between 0 and 2.
         */
        this.ttspitch = 1;
        /**
         * When set to "nextinput", pressing `<Tab>` after gi selects the next input.
         *
         * When set to "firefox", `<Tab>` behaves like normal, focusing the next tab-indexed element regardless of type.
         */
        this.gimode = "nextinput";
        /**
         * Decides where to place the cursor when selecting non-empty input fields
         */
        this.cursorpos = "end";
        /**
         * The theme to use.
         *
         * Permitted values: run `:composite js tri.styling.THEMES | fillcmdline` to find out.
         */
        this.theme = "default";
        /**
         * Storage for custom themes
         *
         * Maps theme names to CSS. Predominantly used automatically by [[colourscheme]] to store themes read from disk, as documented by [[colourscheme]]. Setting this manually is untested but might work provided that [[colourscheme]] is then used to change the theme to the right theme name.
         */
        this.customthemes = {};
        /**
         * Whether to display the mode indicator or not.
         */
        this.modeindicator = "true";
        /**
         * Whether to display the mode indicator in various modes. Ignored if modeindicator set to false.
         */
        this.modeindicatormodes = {
            normal: "true",
            insert: "true",
            input: "true",
            ignore: "true",
            ex: "true",
            hint: "true",
            visual: "true",
        };
        /**
         * Milliseconds before registering a scroll in the jumplist
         */
        this.jumpdelay = 3000;
        /**
         * Logging levels. Unless you're debugging Tridactyl, it's unlikely you'll ever need to change these.
         */
        this.logging = {
            cmdline: "warning",
            containers: "warning",
            controller: "warning",
            excmd: "error",
            hinting: "warning",
            messaging: "warning",
            native: "warning",
            performance: "warning",
            state: "warning",
            styling: "warning",
            autocmds: "warning",
        };
        /**
         * Disables the commandline iframe. Dangerous setting, use [[seturl]] to set it. If you ever set this setting to "true" globally and then want to set it to false again, you can do this by opening Tridactyl's preferences page from about:addons.
         */
        this.noiframe = "false";
        /**
         * @deprecated A list of URLs on which to not load the iframe. Use `seturl [URL] noiframe true` instead, as shown in [[noiframe]].
         */
        this.noiframeon = [];
        /**
         * Insert / input mode edit-in-$EDITOR command to run
         * This has to be a command that stays in the foreground for the whole editing session
         * "auto" will attempt to find a sane editor in your path.
         * Please send your requests to have your favourite terminal moved further up the list to /dev/null.
         *          (but we are probably happy to add your terminal to the list if it isn't already there.)
         *
         * Example values:
         * - linux: `xterm -e vim`
         * - windows: `start cmd.exe /c \"vim\"`.
         *
         * Also see [:editor](/static/docs/modules/_src_excmds_.html#editor).
         */
        this.editorcmd = "auto";
        /**
         * Command that should be run by the [[rssexec]] ex command. Has the
         * following format:
         * - %u: url
         * - %t: title
         * - %y: type (rss, atom, xml...)
         * Warning: This is a very large footgun. %u will be inserted without any
         * kind of escaping, hence you must obey the following rules if you care
         * about security:
         * - Do not use a composite command. If you need a composite command,
         * create an alias.
         * - Do not use `js` or `jsb`. If you need to use them, create an alias.
         * - Do not insert any %u, %t or %y in shell commands run by the native
         * messenger. Use pipes instead.
         *
         * Here's an example of how to save an rss url in a file on your disk
         * safely:
         * `alias save_rss jsb -p tri.native.run("cat >> ~/.config.newsboat/urls", JS_ARG)`
         * `set rsscmd save_rss %u`
         * This is safe because the url is passed to jsb as an argument rather than
         * being expanded inside of the string it will execute and because it is
         * piped to the shell command rather than being expanded inside of it.
         */
        this.rsscmd = "yank %u";
        /**
         * The browser executable to look for in commands such as `restart`. Not as mad as it seems if you have multiple versions of Firefox...
         */
        this.browser = "firefox";
        /**
         * Which clipboard to store items in. Requires the native messenger to be installed.
         */
        this.yankto = "clipboard";
        /**
         * Which clipboard to retrieve items from. Requires the native messenger to be installed.
         *
         * Permitted values: `clipboard`, or `selection`.
         */
        this.putfrom = "clipboard";
        /**
         * Clipboard command to try to get the selection from (e.g. `xsel` or `xclip`)
         */
        this.externalclipboardcmd = "auto";
        /**
         * Whether downloads (e.g. via ;s hint modes) appear in your download history.
         *
         * NB: will cause downloads to fail silently if Tridactyl is not allowed to run in private windows (regardless of whether you are trying to call it in a private window).
         */
        this.downloadsskiphistory = "false";
        /**
         * Set this to something weird if you want to have fun every time Tridactyl tries to update its native messenger.
         *
         * %TAG will be replaced with your version of Tridactyl for stable builds, or "master" for beta builds
         *
         * NB: Windows has its own platform-specific default.
         */
        this.nativeinstallcmd = "curl -fsSl https://raw.githubusercontent.com/tridactyl/native_messenger/master/installers/install.sh -o /tmp/trinativeinstall.sh && sh /tmp/trinativeinstall.sh %TAG";
        /**
         * Used by :updatecheck and related built-in functionality to automatically check for updates and prompt users to upgrade.
         */
        this.update = {
            /**
             * Whether Tridactyl should check for available updates at startup.
             */
            nag: true,
            /**
             * How many days to wait after an update is first available until telling people.
             */
            nagwait: 7,
            /**
             * The version we last nagged you about. We only nag you once per version.
             */
            lastnaggedversion: "1.14.0",
            /**
             * Time we last checked for an update, milliseconds since unix epoch.
             */
            lastchecktime: 0,
            /**
             * Minimum interval between automatic update checks, in seconds.
             */
            checkintervalsecs: 60 * 60 * 24,
        };
        /**
         * Profile directory to use with native messenger with e.g, `guiset`.
         */
        this.profiledir = "auto";
        // Container settings
        /**
         * If enabled, tabopen opens a new tab in the currently active tab's container.
         */
        this.tabopencontaineraware = "false";
        /**
         * If moodeindicator is enabled, containerindicator will color the border of the mode indicator with the container color.
         */
        this.containerindicator = "true";
        /**
         * Autocontain directives create a container if it doesn't exist already.
         */
        this.auconcreatecontainer = "true";
        /**
         * Number of most recent results to ask Firefox for. We display the top 20 or so most frequently visited ones.
         */
        this.historyresults = 50;
        /**
         * When displaying bookmarks in history completions, how many page views to pretend they have.
         */
        this.bmarkweight = 100;
        /**
         * General completions options - NB: options are set according to our internal completion source name - see - `src/completions/[name].ts` in the Tridactyl source.
         */
        this.completions = {
            Tab: {
                /**
                 * Whether to automatically select the closest matching completion
                 */
                autoselect: "true",
            },
            TabAll: {
                autoselect: "true",
            },
            Rss: {
                autoselect: "true",
            },
            Bmark: {
                autoselect: "true",
            },
            Sessions: {
                autoselect: "true",
            },
        };
        /**
         * Number of results that should be shown in completions. -1 for unlimited
         */
        this.findresults = -1;
        /**
         * Number of characters to use as context for the matches shown in completions
         */
        this.findcontextlen = 100;
        /**
         * Whether find should be case-sensitive
         */
        this.findcase = "smart";
        /**
         * Whether Tridactyl should jump to the first match when using `:find`
         */
        this.incsearch = "false";
        /**
         * How many characters should be typed before triggering incsearch/completions
         */
        this.minincsearchlen = 3;
        /**
         * Deprecated.
         * Change this to "clobber" to ruin the "Content Security Policy" of all sites a bit and make Tridactyl run a bit better on some of them, e.g. raw.github*
         */
        this.csp = "untouched";
        /**
         * JavaScript RegExp used to recognize words in text.* functions (e.g. text.transpose_words). Should match any character belonging to a word.
         */
        this.wordpattern = "[^\\s]+";
        /**
         * Activate tridactyl's performance counters. These have a
         * measurable performance impact, since every sample is a few
         * hundred bytes and we sample tridactyl densely, but they're good
         * when you're trying to optimize things.
         */
        this.perfcounters = "false";
        /**
         * How many samples to store from the perf counters.
         *
         * Each performance entry is two numbers (16 bytes), an entryType
         * of either "mark" or "measure" (js strings are utf-16 ad we have
         * two marks for each measure, so amortize to about 10 bytes per
         * entry), and a string name that for Tridactyl object will be
         * about 40 (utf-16) characters (80 bytes), plus object overhead
         * roughly proportional to the string-length of the name of the
         * constructor (in this case something like 30 bytes), for a total
         * of what we'll call 128 bytes for ease of math.
         *
         * We want to store, by default, about 1MB of performance
         * statistics, so somewhere around 10k samples.
         *
         */
        this.perfsamples = "10000";
        /**
         * Show (partial) command in the mode indicator.
         * Corresponds to 'showcmd' option of vi.
         */
        this.modeindicatorshowkeys = "false";
        /**
         * Whether a trailing slash is appended when we get the parent of a url with
         * gu (or other means).
         */
        this.urlparenttrailingslash = "true";
        /**
         * Whether to enter visual mode when text is selected. Visual mode can always be entered with `:mode visual`.
         */
        this.visualenterauto = "true";
        /**
         * Whether to return to visual mode when text is deselected.
         */
        this.visualexitauto = "true";
        /**
         * Whether to open and close the sidebar quickly to get focus back to the page when <C-,> is pressed.
         *
         * Disable if the fact that it closes TreeStyleTabs gets on your nerves too much : )
         *
         * NB: when disabled, <C-,> can't get focus back from the address bar, but it can still get it back from lots of other places (e.g. Flash-style video players)
         */
        this.escapehatchsidebarhack = "true";
    }
}
const platform_defaults = {
    win: {
        browsermaps: {
            "<C-6>": null,
            "<A-6>": "buffer #",
        },
        nmaps: {
            "<C-6>": "buffer #",
        },
        imaps: {
            "<C-6>": "buffer #",
        },
        inputmaps: {
            "<C-6>": "buffer #",
        },
        ignoremaps: {
            "<C-6>": "buffer #",
        },
        nativeinstallcmd: `powershell -ExecutionPolicy Bypass -NoProfile -Command "\
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12;\
(New-Object System.Net.WebClient).DownloadFile('https://raw.githubusercontent.com/tridactyl/native_messenger/master/installers/windows.ps1', '%TEMP%/tridactyl_installnative.ps1');\
& '%TEMP%/tridactyl_installnative.ps1' -Tag %TAG;\
Remove-Item '%TEMP%/tridactyl_installnative.ps1'"`,
    },
    linux: {
        nmaps: {
            ";x": 'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool click 1")}',
            ";X": 'hint -F e => { const pos = tri.dom.getAbsoluteCentre(e); tri.excmds.exclaim_quiet("xdotool mousemove --sync " + window.devicePixelRatio * pos.x + " " + window.devicePixelRatio * pos.y + "; xdotool keydown ctrl+shift; xdotool click 1; xdotool keyup ctrl+shift")}',
        },
    },
};
/** @hidden
 * Merges two objects and removes all keys with null values at all levels
 */
const mergeDeepCull = ramda__WEBPACK_IMPORTED_MODULE_4__.default(mergeDeep, removeNull);
/** @hidden */
const DEFAULTS = mergeDeepCull(o(new default_config()), platform_defaults[_src_lib_platform__WEBPACK_IMPORTED_MODULE_1__.getPlatformOs()]);
/** Given an object and a target, extract the target if it exists, else return undefined

    @param target path of properties as an array
    @hidden
 */
function getDeepProperty(obj, target) {
    if (obj !== undefined && obj !== null && target.length) {
        if (obj["🕷🕷INHERITS🕷🕷"] === undefined) {
            return getDeepProperty(obj[target[0]], target.slice(1));
        }
        else {
            return getDeepProperty(mergeDeepCull(get(obj["🕷🕷INHERITS🕷🕷"]), obj)[target[0]], target.slice(1));
        }
    }
    else {
        if (obj === undefined || obj === null)
            return obj;
        if (obj["🕷🕷INHERITS🕷🕷"] !== undefined) {
            return mergeDeepCull(get(obj["🕷🕷INHERITS🕷🕷"]), obj);
        }
        else {
            return obj;
        }
    }
}
/** Create the key path target if it doesn't exist and set the final property to value.

    If the path is an empty array, replace the obj.

    @param target path of properties as an array
    @hidden
 */
function setDeepProperty(obj, value, target) {
    if (target.length > 1) {
        // If necessary antecedent objects don't exist, create them.
        if (obj[target[0]] === undefined) {
            obj[target[0]] = o({});
        }
        return setDeepProperty(obj[target[0]], value, target.slice(1));
    }
    else {
        obj[target[0]] = value;
    }
}
/** @hidden
 * Merges two objects and any child objects they may have
 */
function mergeDeep(o1, o2) {
    if (o1 === null)
        return Object.assign({}, o2);
    const r = Array.isArray(o1) ? o1.slice() : Object.create(o1);
    Object.assign(r, o1, o2);
    if (o2 === undefined)
        return r;
    Object.keys(o1)
        .filter(key => typeof o1[key] === "object" && typeof o2[key] === "object")
        .forEach(key => r[key] == null
        ? null
        : Object.assign(r[key], mergeDeep(o1[key], o2[key])));
    return r;
}
/** @hidden
 * Gets a site-specific setting.
 */
function getURL(url, target) {
    function _getURL(conf, url, target) {
        if (!conf.subconfigs)
            return undefined;
        // For each key
        return (Object.keys(conf.subconfigs)
            // Keep only the ones that have a match
            .filter(k => url.match(k) &&
            getDeepProperty(conf.subconfigs[k], target) !==
                undefined)
            // Sort them from lowest to highest priority, default to a priority of 10
            .sort((k1, k2) => (conf.subconfigs[k1].priority || 10) -
            (conf.subconfigs[k2].priority || 10))
            // Merge their corresponding value if they're objects, otherwise return the last value
            .reduce((acc, curKey) => {
            const curVal = getDeepProperty(conf.subconfigs[curKey], target);
            if (acc instanceof Object && curVal instanceof Object)
                return mergeDeep(acc, curVal);
            return curVal;
        }, undefined));
    }
    const user = _getURL(USERCONFIG, url, target);
    const deflt = _getURL(DEFAULTS, url, target);
    if (user === undefined || user === null)
        return deflt;
    if (typeof user !== "object" || typeof deflt !== "object")
        return user;
    return mergeDeepCull(deflt, user);
}
/** Get the value of the key target.

    If the user has not specified a key, use the corresponding key from
    defaults, if one exists, else undefined.
    @hidden
 */
function get(target_typed, ...target) {
    if (target_typed === undefined) {
        target = [];
    }
    else {
        target = [target_typed].concat(target);
    }
    // Window.tri might not be defined when called from the untrusted page context
    let loc = window.location;
    if (window.tri && window.tri.contentLocation)
        loc = window.tri.contentLocation;
    // If there's a site-specifing setting, it overrides global settings
    const site = getURL(loc.href, target);
    const user = getDeepProperty(USERCONFIG, target);
    const defult = getDeepProperty(DEFAULTS, target);
    // Merge results if there's a default value and it's not an Array or primitive.
    if (typeof defult === "object") {
        return mergeDeepCull(mergeDeepCull(defult, user), site);
    }
    else {
        if (site !== undefined) {
            return site;
        }
        else if (user !== undefined) {
            return user;
        }
        else {
            return defult;
        }
    }
}
/** Get the value of the key target.

    Please only use this with targets that will be used at runtime - it skips static checks. Prefer [[get]].
 */
function getDynamic(...target) {
    return get(target[0], ...target.slice(1));
}
/** Get the value of the key target.

    Please only use this with targets that will be used at runtime - it skips static checks. Prefer [[getAsync]].
 */
async function getAsyncDynamic(...target) {
    return getAsync(target[0], ...target.slice(1));
}
/** Get the value of the key target, but wait for config to be loaded from the
    database first if it has not been at least once before.

    This is useful if you are a content script and you've just been loaded.
    @hidden
 */
async function getAsync(target_typed, ...target) {
    if (INITIALISED) {
        // TODO: consider storing keys directly
        const browserconfig = await browser.storage.local.get(CONFIGNAME);
        USERCONFIG = browserconfig[CONFIGNAME] || o({});
        return get(target_typed, ...target);
    }
    else {
        return new Promise(resolve => WAITERS.push(() => resolve(get(target_typed, ...target))));
    }
}
/*
 * Replaces the configuration in your sync storage with your current configuration. Does not merge: it overwrites.
 *
 * Does not synchronise custom themes due to storage constraints.
 */
async function push() {
    const local_conf = await browser.storage.local.get(CONFIGNAME);
    // eslint-disable-next-line @typescript-eslint/dot-notation
    delete local_conf[CONFIGNAME]["customthemes"];
    return browser.storage.sync.set(local_conf);
}
/*
 * Replaces the local configuration with the configuration from your sync storage. Does not merge: it overwrites.
 */
async function pull() {
    return browser.storage.local.set(await browser.storage.sync.get(CONFIGNAME));
}
/** @hidden
 * Like set(), but for a specific pattern.
 */
function setURL(pattern, ...args) {
    try {
        new RegExp(pattern);
        return set("subconfigs", pattern, ...args);
    }
    catch (err) {
        if (err instanceof SyntaxError)
            throw new SyntaxError(`invalid pattern: ${err.message}`);
        throw err;
    }
}
/** Full target specification, then value

    e.g.
        set("nmaps", "o", "open")
        set("search", "default", "google")
        set("aucmd", "BufRead", "memrise.com", "open memrise.com")

    @hidden
 */
async function set(...args) {
    if (args.length < 2) {
        throw new Error("You must provide at least two arguments!");
    }
    const target = args.slice(0, args.length - 1);
    const value = args[args.length - 1];
    if (INITIALISED) {
        // wait for storage to settle, otherwise we could clobber a previous incomplete set()
        setDeepProperty(USERCONFIG, value, target);
        return save();
    }
    else {
        setDeepProperty(USERCONFIG, value, target);
    }
}
/** @hidden
 * Delete the key at USERCONFIG[pattern][target]
 */
function unsetURL(pattern, ...target) {
    return unset("subconfigs", pattern, ...target);
}
/** Delete the key at target in USERCONFIG if it exists
 * @hidden */
function unset(...target) {
    const parent = getDeepProperty(USERCONFIG, target.slice(0, -1));
    if (parent !== undefined)
        delete parent[target[target.length - 1]];
    return save();
}
/** Save the config back to storage API.

    Config is not synchronised between different instances of this module until
    sometime after this happens.

    @hidden
 */
async function save() {
    const settingsobj = o({});
    settingsobj[CONFIGNAME] = USERCONFIG;
    return browser.storage.local.set(settingsobj);
}
/** Updates the config to the latest version.
    Proposed semantic for config versionning:
     - x.y -> x+1.0 : major architectural changes
     - x.y -> x.y+1 : renaming settings/changing their types
    There's no need for an updater if you're only adding a new setting/changing
    a default setting

    When adding updaters, don't forget to set("configversion", newversionnumber)!
    @hidden
 */
async function update() {
    // Updates a value both in the main config and in sub (=site specific) configs
    const updateAll = (setting, fn) => {
        const val = getDeepProperty(USERCONFIG, setting);
        if (val) {
            set(...setting, fn(val));
        }
        const subconfigs = getDeepProperty(USERCONFIG, ["subconfigs"]);
        if (subconfigs) {
            Object.keys(subconfigs)
                .map(pattern => [pattern, getURL(pattern, setting)])
                .filter(([_pattern, value]) => value)
                .forEach(([pattern, value]) => setURL(pattern, ...setting, fn(value)));
        }
    };
    if (!get("configversion"))
        set("configversion", "0.0");
    let updated = false;
    switch (get("configversion")) {
        case "0.0": {
            try {
                // Before we had a config system, we had nmaps, and we put them in the
                // root namespace because we were young and bold.
                const legacy_nmaps = await browser.storage.sync.get("nmaps");
                if (Object.keys(legacy_nmaps).length > 0) {
                    USERCONFIG.nmaps = Object.assign(legacy_nmaps.nmaps, USERCONFIG.nmaps);
                }
            }
            finally {
                set("configversion", "1.0");
            }
        }
        case "1.0": {
            const vimiumgi = getDeepProperty(USERCONFIG, ["vimium-gi"]);
            if (vimiumgi === true || vimiumgi === "true")
                set("gimode", "nextinput");
            else if (vimiumgi === false || vimiumgi === "false")
                set("gimode", "firefox");
            unset("vimium-gi");
            set("configversion", "1.1");
        }
        case "1.1": {
            const leveltostr = {
                0: "never",
                1: "error",
                2: "warning",
                3: "info",
                4: "debug",
            };
            const logging = getDeepProperty(USERCONFIG, ["logging"]);
            // logging is not necessarily defined if the user didn't change default values
            if (logging)
                Object.keys(logging).forEach(l => set("logging", l, leveltostr[logging[l]]));
            set("configversion", "1.2");
        }
        case "1.2": {
            ;
            ["ignoremaps", "inputmaps", "imaps", "nmaps"]
                .map(mapname => [
                mapname,
                getDeepProperty(USERCONFIG, [mapname]),
            ])
                // mapobj is undefined if the user didn't define any bindings
                .filter(([_mapname, mapobj]) => mapobj)
                .forEach(([mapname, mapobj]) => {
                // For each mapping
                Object.keys(mapobj)
                    // Keep only the ones with im_* functions
                    .filter(key => {
                    var _a;
                    return ((_a = mapobj[key]) === null || _a === void 0 ? void 0 : _a.search("^im_|([^a-zA-Z0-9_-])im_")) >= 0;
                })
                    // Replace the prefix
                    .forEach(key => setDeepProperty(USERCONFIG, mapobj[key].replace(new RegExp("^im_|([^a-zA-Z0-9_-])im_"), "$1text."), [mapname, key]));
            });
            set("configversion", "1.3");
        }
        case "1.3": {
            ;
            [
                "priority",
                "hintdelay",
                "scrollduration",
                "ttsvolume",
                "ttsrate",
                "ttspitch",
                "jumpdelay",
                "historyresults",
            ].forEach(setting => updateAll([setting], parseInt));
            set("configversion", "1.4");
        }
        case "1.4": {
            ;
            (getDeepProperty(USERCONFIG, ["noiframeon"]) || []).forEach(site => {
                setURL(site, "noiframe", "true");
            });
            set("configversion", "1.5");
        }
        case "1.5": {
            unset("exaliases", "tab");
            set("configversion", "1.6");
        }
        case "1.6": {
            const updateSetting = mapObj => {
                if (!mapObj)
                    return mapObj;
                if (mapObj[" "] !== undefined) {
                    mapObj["<Space>"] = mapObj[" "];
                    delete mapObj[" "];
                }
                ;
                [
                    "<A- >",
                    "<C- >",
                    "<M- >",
                    "<S- >",
                    "<AC- >",
                    "<AM- >",
                    "<AS- >",
                    "<CM- >",
                    "<CS- >",
                    "<MS- >",
                ].forEach(binding => {
                    if (mapObj[binding] !== undefined) {
                        const key = binding.replace(" ", "Space");
                        mapObj[key] = mapObj[binding];
                        delete mapObj[binding];
                    }
                });
                return mapObj;
            };
            [
                "nmaps",
                "exmaps",
                "imaps",
                "inputmaps",
                "ignoremaps",
            ].forEach(settingName => updateAll([settingName], updateSetting));
            set("configversion", "1.7");
        }
        case "1.7": {
            const autocontain = getDeepProperty(USERCONFIG, ["autocontain"]);
            unset("autocontain");
            if (autocontain !== undefined) {
                Object.entries(autocontain).forEach(([domain, container]) => {
                    set("autocontain", `^https?://([^/]*\\.|)*${domain}/`, container);
                });
            }
            set("configversion", "1.8");
        }
        case "1.8": {
            const updateSetting = mapObj => {
                if (!mapObj)
                    return mapObj;
                return ramda__WEBPACK_IMPORTED_MODULE_6__.default(val => {
                    if (val === "")
                        return null;
                    return val;
                }, mapObj);
            };
            [
                "nmaps",
                "exmaps",
                "imaps",
                "inputmaps",
                "ignoremaps",
                "hintmaps",
                "vmaps",
            ].forEach(settingName => updateAll([settingName], updateSetting));
            set("configversion", "1.9");
        }
        case "1.9": {
            const local = (await browser.storage.local.get(CONFIGNAME))[CONFIGNAME];
            const sync = (await browser.storage.sync.get(CONFIGNAME))[CONFIGNAME];
            // Possible combinations:
            // storage:storageloc_setting => winning storageloc setting
            // l:l, s:* => l
            // l:undefined, s:l =>  l
            // l:undefined, s:s => s
            // l: undefined, s:undefined => s
            // l:s, s:* =>  s
            const current_storageloc = (local === null || local === void 0 ? void 0 : local.storageloc) !== undefined
                ? local.storageloc
                : (sync === null || sync === void 0 ? void 0 : sync.storageloc) !== undefined
                    ? sync.storageloc
                    : "sync";
            if (current_storageloc == "sync") {
                await pull();
            }
            else if (current_storageloc != "local") {
                throw new Error("storageloc was set to something weird: " +
                    current_storageloc +
                    ", automatic migration of settings was not possible.");
            }
            set("configversion", "2.0");
            updated = true; // NB: when adding a new updater, move this line to the end of it
        }
    }
    return updated;
}
/** Read all user configuration from storage API then notify any waiting asynchronous calls

    asynchronous calls generated by getAsync.
    @hidden
 */
async function init() {
    const localConfig = await browser.storage.local.get(CONFIGNAME);
    schlepp(localConfig[CONFIGNAME]);
    INITIALISED = true;
    for (const waiter of WAITERS) {
        waiter();
    }
}
/** @hidden */
const changeListeners = new Map();
/** @hidden
 * @param name The name of a "toplevel" config setting (i.e. "nmaps", not "nmaps.j")
 * @param listener A function to call when the value of $name is modified in the config. Takes the previous and new value as parameters.
 */
function addChangeListener(name, listener) {
    let arr = changeListeners.get(name);
    if (!arr) {
        arr = [];
        changeListeners.set(name, arr);
    }
    arr.push(listener);
}
/** @hidden
 * Removes event listeners set with addChangeListener
 */
function removeChangeListener(name, listener) {
    const arr = changeListeners.get(name);
    if (!arr)
        return;
    const i = arr.indexOf(listener);
    if (i >= 0)
        arr.splice(i, 1);
}
/** Parse the config into a string representation of a .tridactylrc config file.
    Tries to parse the config into sectionable chunks based on keywords.
    Binds, aliases, autocmds and logging settings each have their own section while the rest are dumped into "General Settings".

    @returns string The parsed config file.

 */
function parseConfig() {
    let p = {
        conf: [],
        binds: [],
        aliases: [],
        subconfigs: [],
        aucmds: [],
        aucons: [],
        logging: [],
        nulls: [],
    };
    p = parseConfigHelper(USERCONFIG, p);
    const s = {
        general: ``,
        binds: ``,
        aliases: ``,
        aucmds: ``,
        aucons: ``,
        subconfigs: ``,
        logging: ``,
        nulls: ``,
    };
    if (p.conf.length > 0)
        s.general = `" General Settings\n${p.conf.join("\n")}\n\n`;
    if (p.binds.length > 0)
        s.binds = `" Binds\n${p.binds.join("\n")}\n\n`;
    if (p.aliases.length > 0)
        s.aliases = `" Aliases\n${p.aliases.join("\n")}\n\n`;
    if (p.aucmds.length > 0)
        s.aucmds = `" Autocmds\n${p.aucmds.join("\n")}\n\n`;
    if (p.aucons.length > 0)
        s.aucons = `" Autocontainers\n${p.aucons.join("\n")}\n\n`;
    if (p.subconfigs.length > 0)
        s.subconfigs = `" Subconfig Settings\n${p.subconfigs.join("\n")}\n\n`;
    if (p.logging.length > 0)
        s.logging = `" Logging\n${p.logging.join("\n")}\n\n`;
    if (p.nulls.length > 0)
        s.nulls = `" Removed settings\n${p.nulls.join("\n")}\n\n`;
    const ftdetect = `" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl\n" vim: set filetype=tridactyl`;
    return `${s.general}${s.binds}${s.subconfigs}${s.aliases}${s.aucmds}${s.aucons}${s.logging}${s.nulls}${ftdetect}`;
}
const parseConfigHelper = (pconf, parseobj, prefix = []) => {
    for (const i of Object.keys(pconf)) {
        if (typeof pconf[i] !== "object") {
            if (prefix[0] === "subconfigs") {
                prefix.shift();
                const pattern = prefix.shift();
                parseobj.subconfigs.push(`seturl ${pattern} ${[...prefix, i].join(".")} ${pconf[i]}`);
            }
            else {
                parseobj.conf.push(`set ${[...prefix, i].join(".")} ${pconf[i]}`);
            }
        }
        else if (pconf[i] === null) {
            parseobj.nulls.push(`setnull ${[...prefix, i].join(".")}`);
        }
        else {
            for (const e of Object.keys(pconf[i])) {
                if (_src_lib_binding__WEBPACK_IMPORTED_MODULE_0__.modeMaps.includes(i)) {
                    let cmd = "bind";
                    if (prefix[0] === "subconfigs")
                        cmd = cmd + "url " + prefix[1];
                    if (i !== "nmaps") {
                        const mode = _src_lib_binding__WEBPACK_IMPORTED_MODULE_0__.maps2mode.get(i);
                        cmd += ` --mode=${mode}`;
                    }
                    if (pconf[i][e] === null) {
                        parseobj.binds.push(`un${cmd} ${e}`);
                        continue;
                    }
                    if (pconf[i][e].length > 0) {
                        parseobj.binds.push(`${cmd} ${e} ${pconf[i][e]}`);
                    }
                    else {
                        parseobj.binds.push(`un${cmd} ${e}`);
                    }
                }
                else if (pconf[i][e] === null) {
                    parseobj.nulls.push(`setnull ${i}.${e}`);
                }
                else if (i === "exaliases") {
                    // Only really useful if mapping the entire config and not just pconf.
                    if (e === "alias") {
                        parseobj.aliases.push(`command ${e} ${pconf[i][e]}`);
                    }
                    else {
                        parseobj.aliases.push(`alias ${e} ${pconf[i][e]}`);
                    }
                }
                else if (i === "autocmds") {
                    for (const a of Object.keys(pconf[i][e])) {
                        parseobj.aucmds.push(`autocmd ${e} ${a} ${pconf[i][e][a]}`);
                    }
                }
                else if (i === "autocontain") {
                    parseobj.aucons.push(`autocontain ${e} ${pconf[i][e]}`);
                }
                else if (i === "logging") {
                    // Map the int values in e to a log level
                    let level;
                    if (pconf[i][e] === 0)
                        level = "never";
                    if (pconf[i][e] === 1)
                        level = "error";
                    if (pconf[i][e] === 2)
                        level = "warning";
                    if (pconf[i][e] === 3)
                        level = "info";
                    if (pconf[i][e] === 4)
                        level = "debug";
                    parseobj.logging.push(`set logging.${e} ${level}`);
                }
                else if (i === "customthemes") {
                    // Skip custom themes for now because writing their CSS is hard
                    // parseobj.themes.push(`colourscheme ${e}`) // TODO: check if userconfig.theme == e and write this, otherwise don't.
                }
                else {
                    parseConfigHelper(pconf[i], parseobj, [...prefix, i]);
                    break;
                }
            }
        }
    }
    return parseobj;
};
// Listen for changes to the storage and update the USERCONFIG if appropriate.
// TODO: BUG! Sync and local storage are merged at startup, but not by this thing.
browser.storage.onChanged.addListener((changes, areaname) => {
    if (CONFIGNAME in changes) {
        const { newValue, oldValue } = changes[CONFIGNAME];
        const old = oldValue || {};
        function triggerChangeListeners(key, value = newValue[key]) {
            const arr = changeListeners.get(key);
            if (arr) {
                const v = old[key] === undefined ? DEFAULTS[key] : old[key];
                arr.forEach(f => f(v, value));
            }
        }
        if (areaname === "sync") {
            // Probably do something here with push/pull?
        }
        else if (newValue !== undefined) {
            // A key has been :unset if it exists in USERCONFIG and doesn't in changes and if its value in USERCONFIG is different from the one it has in default_config
            const unsetKeys = Object.keys(old).filter(k => newValue[k] === undefined &&
                JSON.stringify(old[k]) !== JSON.stringify(DEFAULTS[k]));
            // A key has changed if it is defined in USERCONFIG and its value in USERCONFIG is different from the one in `changes` or if the value in defaultConf is different from the one in `changes`
            const changedKeys = Object.keys(newValue).filter(k => JSON.stringify(old[k] !== undefined ? old[k] : DEFAULTS[k]) !== JSON.stringify(newValue[k]));
            // TODO: this should be a deep comparison but this is better than nothing
            changedKeys.forEach(key => (USERCONFIG[key] = newValue[key]));
            unsetKeys.forEach(key => delete USERCONFIG[key]);
            // Trigger listeners
            unsetKeys.forEach(key => triggerChangeListeners(key, DEFAULTS[key]));
            changedKeys.forEach(key => triggerChangeListeners(key));
        }
        else {
            // newValue is undefined when calling browser.storage.AREANAME.clear()
            // If newValue is undefined and AREANAME is the same value as STORAGELOC, the user wants to clean their config
            USERCONFIG = o({});
            Object.keys(old)
                .filter(key => old[key] !== DEFAULTS[key])
                .forEach(key => triggerChangeListeners(key));
        }
    }
});
init();


/***/ }),

/***/ "./src/lib/containers.ts":
/*!*******************************!*\
  !*** ./src/lib/containers.ts ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DefaultContainer": () => (/* binding */ DefaultContainer),
/* harmony export */   "create": () => (/* binding */ create),
/* harmony export */   "remove": () => (/* binding */ remove),
/* harmony export */   "update": () => (/* binding */ update),
/* harmony export */   "getFromId": () => (/* binding */ getFromId),
/* harmony export */   "exists": () => (/* binding */ exists),
/* harmony export */   "fromString": () => (/* binding */ fromString),
/* harmony export */   "getAll": () => (/* binding */ getAll),
/* harmony export */   "getId": () => (/* binding */ getId),
/* harmony export */   "fuzzyMatch": () => (/* binding */ fuzzyMatch)
/* harmony export */ });
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");
/* harmony import */ var fuse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fuse.js */ "./node_modules/fuse.js/dist/fuse.esm.js");
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");



const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_2__.Logger("containers");
// As per Mozilla specification: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextualIdentities/ContextualIdentity
const ContainerColor = [
    "blue",
    "turquoise",
    "green",
    "yellow",
    "orange",
    "red",
    "pink",
    "purple",
];
// As per Mozilla specification: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextualIdentities/ContextualIdentity
const ContainerIcon = [
    "fingerprint",
    "briefcase",
    "dollar",
    "cart",
    "circle",
    "gift",
    "vacation",
    "food",
    "fruit",
    "pet",
    "tree",
    "chill",
];
const DefaultContainer = Object.freeze(fromString("default", "invisible", "noicond", "firefox-default"));
/** Creates a container from the specified parameters.Does not allow multiple containers with the same name.
    @param name  The container name.
    @param color  The container color, must be one of: "blue", "turquoise", "green", "yellow", "orange", "red", "pink" or "purple". If nothing is supplied, it selects one at random.
    @param icon  The container icon, must be one of: "fingerprint", "briefcase", "dollar", "cart", "circle", "gift", "vacation", "food", "fruit", "pet", "tree", "chill"
 */
async function create(name, color = "random", icon = "fingerprint") {
    if (color === "random")
        color = chooseRandomColor();
    const container = fromString(name, color, icon);
    // browser.contextualIdentities.create does not accept a cookieStoreId property.
    delete container.cookieStoreId;
    logger.debug(container);
    if (await exists(name)) {
        logger.debug(`[Container.create] container already exists ${container}`);
        throw new Error(`[Container.create] container already exists, aborting.`);
    }
    else {
        const res = await browser.contextualIdentities.create(container);
        return res.cookieStoreId;
    }
}
/** Removes specified container. No fuzzy matching is intentional here. If there are multiple containers with the same name (allowed by other container plugins), it chooses the one with the lowest cookieStoreId
    @param name The container name
 */
async function remove(name) {
    logger.debug(name);
    const id = await getId(name);
    const res = await browser.contextualIdentities.remove(id);
    logger.debug("[Container.remove] removed container:", res.cookieStoreId);
}
/** Updates the specified container.
    TODO: pass an object to this when tridactyl gets proper flag parsing
    NOTE: while browser.contextualIdentities.create does check for valid color/icon combos, browser.contextualIdentities.update does not.
    @param containerId Expects a cookieStringId e.g. "firefox-container-n".
    @param name the new name of the container
    @param color the new color of the container
    @param icon the new icon of the container
 */
function update(containerId, updateObj) {
    const { name, color, icon } = updateObj;
    if (!isValidColor(color)) {
        logger.debug(updateObj);
        throw new Error("[Container.update] invalid container color: " + color);
    }
    if (!isValidIcon(icon)) {
        logger.debug(updateObj);
        throw new Error("[Container.update] invalid container icon: " + icon);
    }
    browser.contextualIdentities.update(containerId, { name, color, icon });
}
/** Gets a container object from a supplied container id string. If no container corresponds to containerId, returns a default empty container.
    @param containerId Expects a cookieStringId e.g. "firefox-container-n"
 */
async function getFromId(containerId) {
    try {
        return await _src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.browserBg.contextualIdentities.get(containerId);
    }
    catch (e) {
        return DefaultContainer;
    }
}
/** Fetches all containers from Firefox's contextual identities API and checks if one exists with the specified name.
    Note: This operation is entirely case-insensitive.
    @param string cname
    @returns boolean Returns true when cname matches an existing container or on query error.
 */
async function exists(cname) {
    let exists = false;
    try {
        const containers = await getAll();
        const res = containers.filter(c => c.name.toLowerCase() === cname.toLowerCase());
        if (res.length > 0) {
            exists = true;
        }
    }
    catch (e) {
        exists = true; // Make sure we don't accidentally break the constraint on query error.
        logger.error("[Container.exists] Error querying contextualIdentities:", e);
    }
    return exists;
}
/** Takes string parameters and returns them as a pseudo container object
    for use in other functions in the library.
    @param name
    @param color
    @param icon
 */
function fromString(name, color, icon, id = "") {
    return {
        name,
        color,
        icon,
        cookieStoreId: id,
    }; // rules are made to be broken
}
/**
 *  @returns An array representation of all containers.
 */
async function getAll() {
    return browser.contextualIdentities.query({});
}
/** Fetches the cookieStoreId of a given container

 Note: all checks are case insensitive.

 @param name The container name
 @returns The cookieStoreId of the first match of the query.
 */
async function getId(name) {
    try {
        const containers = await getAll();
        const res = containers.filter(c => c.name.toLowerCase() === name.toLowerCase());
        if (res.length !== 1) {
            throw new Error("");
        }
        else {
            return res[0].cookieStoreId;
        }
    }
    catch (e) {
        logger.error("[Container.getId] could not find a container with that name.");
    }
}
/** Tries some simple ways to match containers to your input.
    Fuzzy matching is entirely case-insensitive.
    @param partialName The (partial) name of the container.
 */
async function fuzzyMatch(partialName) {
    const fuseOptions = {
        id: "cookieStoreId",
        shouldSort: true,
        threshold: 0.5,
        location: 0,
        distance: 100,
        mimMatchCharLength: 3,
        keys: ["name"],
    };
    const containers = await getAll();
    const fuse = new fuse_js__WEBPACK_IMPORTED_MODULE_1__.default(containers, fuseOptions);
    const res = fuse.search(partialName);
    if (res.length >= 1)
        return res[0].item.cookieStoreId;
    else {
        throw new Error("[Container.fuzzyMatch] no container matched that string");
    }
}
/** Helper function for create, returns a random valid IdentityColor for use if no color is applied at creation.*/
function chooseRandomColor() {
    const max = Math.floor(ContainerColor.length);
    const n = Math.floor(Math.random() * max);
    return ContainerColor[n];
}
function isValidColor(color) {
    return ContainerColor.indexOf(color) > -1;
}
function isValidIcon(icon) {
    return ContainerIcon.indexOf(icon) > -1;
}


/***/ }),

/***/ "./src/lib/convert.ts":
/*!****************************!*\
  !*** ./src/lib/convert.ts ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "toBoolean": () => (/* binding */ toBoolean),
/* harmony export */   "toNumber": () => (/* binding */ toNumber)
/* harmony export */ });
function toBoolean(s) {
    if (s === "true")
        return true;
    else if (s === "false")
        return false;
    else
        throw new Error("Not a boolean");
}
function toNumber(s) {
    const n = Number(s);
    if (isNaN(n))
        throw new Error("Not a number! " + s);
    else
        return n;
}


/***/ }),

/***/ "./src/lib/css_util.ts":
/*!*****************************!*\
  !*** ./src/lib/css_util.ts ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "findCssRules": () => (/* binding */ findCssRules),
/* harmony export */   "potentialRules": () => (/* binding */ potentialRules),
/* harmony export */   "metaRules": () => (/* binding */ metaRules),
/* harmony export */   "changeSingleCss": () => (/* binding */ changeSingleCss),
/* harmony export */   "changeCss": () => (/* binding */ changeCss)
/* harmony export */ });
/* harmony import */ var css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! css */ "./node_modules/css/index.js");
/* tslint:disable:no-string-literal */

// Layout (of bits we care about:
// {stylesheet: {
//          rules: [{
//                      type: "rule", selectors: [string], declarations: [
//                          {type: "declaration", property: string, value: string}
/** Find rules in sheet that match selector */
function findCssRules(selectors, sheet) {
    const filtSheet = [...sheet.stylesheet.rules.entries()].filter(x => {
        const rule = x[1];
        return (rule.type === "rule" &&
            "selectors" in rule &&
            // Make sure that there are as many selectors in the current rule
            // as there are in the rule we're looking for
            rule.selectors.length === selectors.length &&
            // Also make sure that each of the selectors of the current rule
            // are present in the rule we're looking for
            !rule.selectors.find(selector => !selectors.includes(selector)));
    });
    return filtSheet.map(x => x[0]);
}
/** Rulename -> { name: <selector>, options: { <option-name>: <css-string> } }
 *
 *  Multi-level map of rulename, options available for rule and css for each option.
 *
 *  *findCssRules and changeSingleCss rely on the selector not containing a comma.*
 *
 *  TODO: make this more flexible with cleverer matching of selectors, merging of options
 *
 */
const potentialRules = {
    statuspanel: {
        name: `#statuspanel`,
        options: {
            none: `display: none !important;`,
            right: `right: 0; display: inline;`,
            left: ``,
            "top-left": `top: 2em; z-index: 2; display: inline;`,
            "top-right": `top: 2em; z-index: 2; right: 0; display: inline;`,
        },
    },
    hoverlink: {
        name: `statuspanel[type="overLink"], #statuspanel[type="overLink"]`,
        options: {
            none: `display: none !important;`,
            right: `right: 0; display: inline;`,
            left: ``,
            "top-left": `top: 2em; z-index: 2; display: inline;`,
            "top-right": `top: 2em; z-index: 2; right: 0; display: inline;`,
        },
    },
    tabstoolbar: {
        name: `#TabsToolbar`,
        options: {
            none: `visibility: collapse;`,
            show: ``,
        },
    },
    tabstoolbarunfocused: {
        name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #TabsToolbar`,
        options: {
            hide: `visibility: collapse;`,
            show: ``,
        },
    },
    tabcounter: {
        name: `tabs`,
        options: {
            off: ``,
            on: `counter-reset: tab-counter;`,
        },
    },
    tabcounters: {
        name: `.tab-label::before`,
        options: {
            hide: ``,
            show: ` counter-increment: tab-counter;
                    content: counter(tab-counter) " - ";`,
        },
    },
    navtoolboxunfocused: {
        name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within)`,
        options: {
            hide: `max-height: 1px; min-height: calc(0px); overflow: hidden;`,
            show: ``,
        },
    },
    navbarunfocused: {
        name: `:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #nav-bar`,
        // tridactyl auto show zone doesn't seem to make a difference
        options: {
            hide: `max-height: 0;
                    min-height: 0!important;
                    --tridactyl-auto-show-zone: 10px;
                    margin-bottom: calc(-1 * var(--tridactyl-auto-show-zone));
                    opacity: 0;`,
            show: ``,
        },
    },
    // Annoying black line at top in fullscreen
    navbarafter: {
        name: `#navigator-toolbox::after`,
        options: {
            hide: `display: none !important;`,
            show: ``,
        },
    },
    // All children except add-on panels
    navbarnonaddonchildren: {
        name: `:root:not([customizing]) #nav-bar > :not(#customizationui-widget-panel)`,
        options: {
            hide: `display: none !important;`,
            show: ``,
        },
    },
    // Set navbar height to 0
    navbarnoheight: {
        name: `:root:not([customizing]) #nav-bar`,
        options: {
            hide: ``,
            show: `max-height: 0; min-height: 0 !important;`,
        },
    },
    // This inherits transparency if we aren't careful
    menubar: {
        name: `#navigator-toolbox:not(:hover):not(:focus-within) #toolbar-menubar > *`,
        options: {
            grey: `background-color: rgb(232, 232, 231);`,
            default: ``,
        },
    },
    // Window dectorations
    titlebar: {
        name: `#titlebar`,
        options: {
            hide: `display: none !important;`,
            show: ``,
        },
    },
    padwhenmaximised: {
        name: `#main-window[sizemode="maximized"] #content-deck`,
        options: {
            some: `padding-top: 8px;`,
            none: ``,
        },
    },
};
//  Vimperator's options for reference:
//  <tags>'go' 'guioptions'</tags>
//  <spec>'guioptions' 'go'</spec>
//
//  m          Menubar
//  T          Toolbar
//  B          Bookmark bar
//  A          Add-on bar
//  n          Tab number
//  b          Bottom scrollbar
//  r          Right scrollbar
//  l          Left scrollbar
//
//  was just a simple show/hide if the characters appeared in the setting
/** Rules that index into potentialRules or metaRules
 *
 *  Please don't add cycles to this table :)
 */
const metaRules = {
    gui: {
        none: {
            hoverlink: "none",
            tabs: "none",
            navbar: "autohide",
            menubar: "grey",
            padwhenmaximised: "some",
        },
        full: {
            hoverlink: "left",
            tabs: "always",
            navbar: "always",
            menubar: "default",
            padwhenmaximised: "none",
        },
    },
    tabs: {
        none: {
            tabstoolbar: "none",
            navtoolboxunfocused: "hide",
        },
        always: {
            tabstoolbar: "show",
            tabstoolbarunfocused: "show",
            navtoolboxunfocused: "show",
        },
        autohide: {
            tabstoolbar: "show",
            tabstoolbarunfocused: "hide",
            navtoolboxunfocused: "hide",
        },
        count: {
            tabcounter: "on",
            tabcounters: "show",
        },
        nocount: {
            tabcounter: "off",
            tabcounters: "hide",
        },
    },
    navbar: {
        autohide: {
            navbarunfocused: "hide",
            navtoolboxunfocused: "hide",
            navbarafter: "hide",
            navbarnonaddonchildren: "show",
            navbarnoheight: "hide",
        },
        always: {
            navbarunfocused: "show",
            navtoolboxunfocused: "show",
            navbarafter: "show",
            navbarnonaddonchildren: "show",
            navbarnoheight: "hide",
        },
        none: {
            navbarunfocused: "show",
            navtoolboxunfocused: "show",
            navbarafter: "hide",
            navbarnonaddonchildren: "hide",
            navbarnoheight: "show",
        },
    },
};
/** Add desired non-meta rule to stylesheet replacing existing rule with the same selector if present */
function changeSingleCss(rulename, optionname, sheet) {
    const selector = potentialRules[rulename].name;
    const newRule = `${selector} {
        ${potentialRules[rulename].options[optionname]}
    }`;
    const miniSheet = css__WEBPACK_IMPORTED_MODULE_0__.parse(newRule).stylesheet.rules[0];
    // Find pre-existing rules
    const oldRuleIndexes = findCssRules("selectors" in miniSheet ? miniSheet.selectors : [], sheet);
    if (oldRuleIndexes.length > 0) {
        sheet.stylesheet.rules[oldRuleIndexes[0]] = miniSheet;
    }
    else {
        sheet.stylesheet.rules = sheet.stylesheet.rules.concat(miniSheet);
    }
    return sheet;
}
/** Apply rule to stylesheet. rulename, optionname identify a rule. They may be meta rules */
function changeCss(rulename, optionname, sheet) {
    if (rulename in metaRules) {
        const metarule = metaRules[rulename][optionname];
        for (const rule of Object.keys(metarule)) {
            // have a metarule call itself for hours of fun
            sheet = changeCss(rule, metarule[rule], sheet);
        }
    }
    else
        sheet = changeSingleCss(rulename, optionname, sheet);
    return sheet;
}


/***/ }),

/***/ "./src/lib/editor.ts":
/*!***************************!*\
  !*** ./src/lib/editor.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "delete_char": () => (/* binding */ delete_char),
/* harmony export */   "delete_backward_char": () => (/* binding */ delete_backward_char),
/* harmony export */   "tab_insert": () => (/* binding */ tab_insert),
/* harmony export */   "transpose_chars": () => (/* binding */ transpose_chars),
/* harmony export */   "transpose_words": () => (/* binding */ transpose_words),
/* harmony export */   "upcase_word": () => (/* binding */ upcase_word),
/* harmony export */   "downcase_word": () => (/* binding */ downcase_word),
/* harmony export */   "capitalize_word": () => (/* binding */ capitalize_word),
/* harmony export */   "kill_line": () => (/* binding */ kill_line),
/* harmony export */   "backward_kill_line": () => (/* binding */ backward_kill_line),
/* harmony export */   "kill_whole_line": () => (/* binding */ kill_whole_line),
/* harmony export */   "kill_word": () => (/* binding */ kill_word),
/* harmony export */   "backward_kill_word": () => (/* binding */ backward_kill_word),
/* harmony export */   "beginning_of_line": () => (/* binding */ beginning_of_line),
/* harmony export */   "end_of_line": () => (/* binding */ end_of_line),
/* harmony export */   "forward_char": () => (/* binding */ forward_char),
/* harmony export */   "backward_char": () => (/* binding */ backward_char),
/* harmony export */   "forward_word": () => (/* binding */ forward_word),
/* harmony export */   "backward_word": () => (/* binding */ backward_word),
/* harmony export */   "insert_text": () => (/* binding */ insert_text),
/* harmony export */   "rot13": () => (/* binding */ rot13),
/* harmony export */   "jumble": () => (/* binding */ jumble)
/* harmony export */ });
/* harmony import */ var _src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/editor_utils */ "./src/lib/editor_utils.ts");
/** # Editor Functions
 *
 * This file contains functions to manipulate the content of textareas/input fields/contenteditable elements.
 *
 * If you want to bind them to keyboard shortcuts, be sure to prefix them with "text.". For example, if you want to bind control-a to `beginning_of_line` in all modes, use:
 *
 * ```
 * bind --mode=ex <C-a> text.beginning_of_line
 * bind --mode=input <C-a> text.beginning_of_line
 * bind --mode=insert <C-a> text.begining_of_line
 * ```
 *
 * Also keep in mind that if you want to bind something in insert mode, you'll probably also want to bind it in input mode (insert mode is entered by clicking on text areas while input mode is entered by using `gi`).
 *
 * If you're looking for command-line only functions, go [there](/static/docs/modules/_src_commandline_frame_.html).
 *
 * Contrary to the main tridactyl help page, this one doesn't tell you whether a specific function is bound to something. For now, you'll have to make do with with `:bind` and `:viewconfig`.
 *
 */
/** ignore this line */

/**
 * Behaves like readline's [delete_char](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14), i.e. deletes the character to the right of the caret.
 **/
const delete_char = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart, selectionEnd) => {
    if (selectionStart !== selectionEnd) {
        // If the user selected text, then we need to delete that instead of a single char
        text =
            text.substring(0, selectionStart) + text.substring(selectionEnd);
    }
    else {
        text =
            text.substring(0, selectionStart) +
                text.substring(selectionStart + 1);
    }
    return [text, selectionStart, null];
}));
/**
 * Behaves like readline's [delete_backward_char](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14), i.e. deletes the character to the left of the caret.
 **/
const delete_backward_char = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart, selectionEnd) => {
    if (selectionStart !== selectionEnd) {
        text =
            text.substring(0, selectionStart) + text.substring(selectionEnd);
    }
    else {
        text =
            text.substring(0, selectionStart - 1) +
                text.substring(selectionStart);
    }
    selectionStart -= 1;
    return [text, selectionStart, null];
}));
/**
 * Behaves like readline's [tab_insert](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14), i.e. inserts a tab character to the left of the caret.
 **/
const tab_insert = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart, selectionEnd) => {
    if (selectionStart !== selectionEnd) {
        text =
            text.substring(0, selectionStart) +
                "\t" +
                text.substring(selectionEnd);
    }
    else {
        text =
            text.substring(0, selectionStart) +
                "\t" +
                text.substring(selectionStart);
    }
    selectionStart += 1;
    return [text, selectionStart, null];
});
/**
 * Behaves like readline's [transpose_chars](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14), i.e. transposes the character to the left of the caret with the character to the right of the caret and then moves the caret one character to the right. If there are no characters to the right or to the left of the caret, uses the two characters the closest to the caret.
 **/
const transpose_chars = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart) => {
    if (text.length < 2)
        return [null, null, null];
    // When at the beginning of the text, transpose the first and second characters
    if (selectionStart === 0)
        selectionStart = 1;
    // When at the end of the text, transpose the last and second-to-last characters
    if (selectionStart >= text.length)
        selectionStart = text.length - 1;
    text =
        text.substring(0, selectionStart - 1) +
            text.substring(selectionStart, selectionStart + 1) +
            text.substring(selectionStart - 1, selectionStart) +
            text.substring(selectionStart + 1);
    selectionStart += 1;
    return [text, selectionStart, null];
});
/** @hidden
 * Applies a function to the word the caret is in, or to the next word if the caret is not in a word, or to the previous word if the current word is empty.
 */
function applyWord(text, selectionStart, selectionEnd, fn) {
    if (text.length === 0)
        return [null, null, null];
    // If the caret is at the end of the text, move it just before the last character
    if (selectionStart >= text.length) {
        selectionStart = text.length - 1;
    }
    const boundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, false);
    const beginning = text.substring(0, boundaries[0]) +
        fn(text.substring(boundaries[0], boundaries[1]));
    text = beginning + text.substring(boundaries[1]);
    selectionStart = beginning.length + 1;
    return [text, selectionStart, null];
}
/**
 * Behaves like readline's [transpose_words](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14). Basically equivalent to [[im_transpose_chars]], but using words as defined by the wordpattern setting.
 **/
const transpose_words = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    if (selectionStart >= text.length) {
        selectionStart = text.length - 1;
    }
    // Find the word the caret is in
    let firstBoundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, false);
    let secondBoundaries = firstBoundaries;
    // If there is a word after the word the caret is in, use it for the transselectionStartition, otherwise use the word before it
    const nextWord = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wordAfterPos)(text, firstBoundaries[1]);
    if (nextWord > -1) {
        secondBoundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, nextWord, false);
    }
    else {
        firstBoundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, firstBoundaries[0] - 1, true);
    }
    const firstWord = text.substring(firstBoundaries[0], firstBoundaries[1]);
    const secondWord = text.substring(secondBoundaries[0], secondBoundaries[1]);
    const beginning = text.substring(0, firstBoundaries[0]) +
        secondWord +
        text.substring(firstBoundaries[1], secondBoundaries[0]);
    selectionStart = beginning.length;
    return [
        beginning + firstWord + text.substring(secondBoundaries[1]),
        selectionStart,
        null,
    ];
}));
/**
 * Behaves like readline's [upcase_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14). Makes the word the caret is in uppercase.
 **/
const upcase_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart, selectionEnd) => applyWord(text, selectionStart, selectionEnd, word => word.toUpperCase())));
/**
 * Behaves like readline's [downcase_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14). Makes the word the caret is in lowercase.
 **/
const downcase_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart, selectionEnd) => applyWord(text, selectionStart, selectionEnd, word => word.toLowerCase())));
/**
 * Behaves like readline's [capitalize_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC14). Makes the initial character of the word the caret is in uppercase.
 **/
const capitalize_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart, selectionEnd) => applyWord(text, selectionStart, selectionEnd, word => word[0].toUpperCase() + word.substring(1))));
/**
 * Behaves like readline's [kill_line](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC15), i.e. deletes every character to the right of the caret until reaching either the end of the text or the newline character (\n).
 **/
const kill_line = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    let newLine = text.substring(selectionStart).search("\n");
    if (newLine !== -1) {
        // If the caret is right before the newline, kill the newline
        if (newLine === 0)
            newLine = 1;
        text =
            text.substring(0, selectionStart) +
                text.substring(selectionStart + newLine);
    }
    else {
        text = text.substring(0, selectionStart);
    }
    return [text, selectionStart, null];
}));
/**
 * Behaves like readline's [backward_kill_line](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC15), i.e. deletes every character to the left of the caret until either the beginning of the text is found or a newline character ("\n") is reached.
 **/
const backward_kill_line = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    // If the caret is at the beginning of a line, join the lines
    if (selectionStart > 0 && text[selectionStart - 1] === "\n") {
        return [
            text.substring(0, selectionStart - 1) +
                text.substring(selectionStart),
            selectionStart,
            null,
        ];
    }
    let newLine;
    // Find the closest newline
    for (newLine = selectionStart; newLine > 0 && text[newLine - 1] !== "\n"; --newLine)
        ;
    // Remove everything between the newline and the caret
    return [
        text.substring(0, newLine) + text.substring(selectionStart),
        newLine,
        null,
    ];
}));
/**
 * Behaves like readline's [kill_whole_line](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC15). Deletes every character between the two newlines the caret is in. If a newline can't be found on the left of the caret, everything is deleted until the beginning of the text is reached. If a newline can't be found on the right, everything is deleted until the end of the text is found.
 **/
const kill_whole_line = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    let firstNewLine;
    let secondNewLine;
    // Find the newline before the caret
    for (firstNewLine = selectionStart; firstNewLine > 0 && text[firstNewLine - 1] !== "\n"; --firstNewLine)
        ;
    // Find the newline after the caret
    for (secondNewLine = selectionStart; secondNewLine < text.length && text[secondNewLine - 1] !== "\n"; ++secondNewLine)
        ;
    // Remove everything between the newline and the caret
    return [
        text.substring(0, firstNewLine) + text.substring(secondNewLine),
        firstNewLine,
        null,
    ];
}));
/**
 * Behaves like readline's [kill_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC15). Deletes every character from the caret to the end of a word, with words being defined by the wordpattern setting.
 **/
const kill_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    const boundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, false);
    if (selectionStart < boundaries[1]) {
        boundaries[0] = selectionStart;
        // Remove everything between the newline and the caret
        return [
            text.substring(0, boundaries[0]) +
                text.substring(boundaries[1]),
            boundaries[0],
            null,
        ];
    }
    else {
        return [null, selectionStart, null];
    }
}));
/**
 * Behaves like readline's [backward_kill_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC15). Deletes every character from the caret to the beginning of a word with word being defined by the wordpattern setting.
 **/
const backward_kill_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    const boundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, true);
    if (selectionStart > boundaries[0]) {
        boundaries[1] = selectionStart;
        // Remove everything between the newline and the caret
        return [
            text.substring(0, boundaries[0]) +
                text.substring(boundaries[1]),
            boundaries[0],
            null,
        ];
    }
    else {
        return [null, selectionStart, null];
    }
}));
/**
 * Behaves like readline's [beginning_of_line](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret to the right of the first newline character found at the left of the caret. If no newline can be found, move the caret to the beginning of the text.
 **/
const beginning_of_line = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    while (text[selectionStart - 1] !== undefined &&
        text[selectionStart - 1] !== "\n")
        selectionStart -= 1;
    return [null, selectionStart, null];
}));
/**
 * Behaves like readline's [end_of_line](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret to the left of the first newline character found at the right of the caret. If no newline can be found, move the caret to the end of the text.
 **/
const end_of_line = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    while (text[selectionStart] !== undefined &&
        text[selectionStart] !== "\n")
        selectionStart += 1;
    return [null, selectionStart, null];
}));
/**
 * Behaves like readline's [forward_char](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret one character to the right.
 **/
const forward_char = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart) => [
    null,
    selectionStart + 1,
    null,
]);
/**
 * Behaves like readline's [backward_char](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret one character to the left.
 **/
const backward_char = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart) => [null, selectionStart - 1, null]);
/**
 * Behaves like readline's [forward_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret one word to the right, with words being defined by the wordpattern setting.
 **/
const forward_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.needs_text)((text, selectionStart) => {
    if (selectionStart === text.length)
        return [null, null, null];
    const boundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, false);
    return [null, boundaries[1], null];
}));
/**
 * Behaves like readline's [backward_word](http://web.mit.edu/gnu/doc/html/rlman_1.html#SEC12). Moves the caret one word to the left, with words being defined by the wordpattern setting.
 **/
const backward_word = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart) => {
    if (selectionStart === 0)
        return [null, null, null];
    const boundaries = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.getWordBoundaries)(text, selectionStart, true);
    return [null, boundaries[0], null];
});
/**
 * Insert text in the current input.
 **/
const insert_text = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart, selectionEnd, arg) => [
    text.slice(0, selectionStart) + arg + text.slice(selectionEnd),
    selectionStart + arg.length,
    null,
]);
const rot13 = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart, selectionEnd) => [
    (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.rot13_helper)(text.slice(0, selectionStart) + text.slice(selectionEnd)),
    selectionStart,
    null,
]);
const jumble = (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.wrap_input)((text, selectionStart, selectionEnd) => [
    (0,_src_lib_editor_utils__WEBPACK_IMPORTED_MODULE_0__.jumble_helper)(text.slice(0, selectionStart) + text.slice(selectionEnd)),
    selectionStart,
    null,
]);


/***/ }),

/***/ "./src/lib/editor_utils.ts":
/*!*********************************!*\
  !*** ./src/lib/editor_utils.ts ***!
  \*********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "applyToElem": () => (/* binding */ applyToElem),
/* harmony export */   "getSimpleValues": () => (/* binding */ getSimpleValues),
/* harmony export */   "getContentEditableValues": () => (/* binding */ getContentEditableValues),
/* harmony export */   "setSimpleValues": () => (/* binding */ setSimpleValues),
/* harmony export */   "setContentEditableValues": () => (/* binding */ setContentEditableValues),
/* harmony export */   "wrap_input": () => (/* binding */ wrap_input),
/* harmony export */   "needs_text": () => (/* binding */ needs_text),
/* harmony export */   "getLineAndColNumber": () => (/* binding */ getLineAndColNumber),
/* harmony export */   "getWordBoundaries": () => (/* binding */ getWordBoundaries),
/* harmony export */   "wordAfterPos": () => (/* binding */ wordAfterPos),
/* harmony export */   "rot13_helper": () => (/* binding */ rot13_helper),
/* harmony export */   "charesar": () => (/* binding */ charesar),
/* harmony export */   "jumble_helper": () => (/* binding */ jumble_helper),
/* harmony export */   "shuffle": () => (/* binding */ shuffle)
/* harmony export */ });
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
// We have a single dependency on config: getting the value of the WORDPATTERN setting
// Perhaps we could find a way to get rid of it?

/**
 * Applies a function to an element. If the element is an HTMLInputElement and its type isn't "text", it is first turned into a "text" element. This is necessary because some elements (e.g. "email") do not have a selectionStart/selectionEnd.
 * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange .
 **/
function applyToElem(e, fn) {
    let result;
    if (e instanceof HTMLInputElement && e.type !== "text") {
        const t = e.type;
        e.type = "text";
        result = fn(e);
        e.type = t;
    }
    else {
        result = fn(e);
    }
    return result;
}
/**
 * Returns values necessary for editor functions to work on textarea/input elements
 *
 * @param e the element
 * @return [string, number, number] The content of the element, the position of the caret, the position of the end of the visual selection
 */
function getSimpleValues(e) {
    return applyToElem(e, e => [e.value, e.selectionStart, e.selectionEnd]);
}
/**
 * Returns values necessary for editor functions to work on contentEditable elements
 *
 * @param e a contentEditable element
 * @return [string, number, number] The content of the element, the position of the caret, the position of the end of the visual selection
 */
function getContentEditableValues(e) {
    const selection = e.ownerDocument.getSelection();
    // The selection might actually not be in e so we need to make sure it is
    let n = selection.anchorNode;
    while (n && n !== e)
        n = n.parentNode;
    // The selection isn't for e, so we can't do anything
    if (!n)
        return [null, null, null];
    // selection might span multiple elements, might not start with the first element in e or end with the last element in e so the easiest way to compute caret position from beginning of e is to first compute distance from caret to end of e, then move beginning of selection to beginning of e and then use distance from end of selection to compute distance from beginning of selection
    const r = selection.getRangeAt(0).cloneRange();
    const selectionLength = r.toString().length;
    r.setEnd(e, e.childNodes.length);
    const lengthFromCaretToEndOfText = r.toString().length;
    r.setStart(e, 0);
    const s = r.toString();
    const caretPos = s.length - lengthFromCaretToEndOfText;
    return [s, caretPos, caretPos + selectionLength];
}
/**
 * Change text in regular textarea/input fields. Note: this destroys the field's history (i.e. C-z won't work).
 *
 * @param e The element
 * @param text The new content of the element, null if it shouldn't change
 * @param start The new position of the caret, null if the caret shouldn't move
 * @param end The end of the visual selection, null if you just want to move the caret
 */
function setSimpleValues(e, text, start, end) {
    return applyToElem(e, e => {
        if (text !== null)
            e.value = text;
        if (start !== null) {
            if (end === null)
                end = start;
            e.selectionStart = start;
            e.selectionEnd = end;
        }
    });
}
/**
 * Change text in contentEditable elements in a non-destructive way (i.e. C-z will undo changes).
 * @param e The content editable element
 * @param text The new content the element should have. null if you just want to move the caret around
 * @param start The new caret position. null if you just want to change text.
 * @param end The end of the visual selection. null if you just want to move the caret.
 */
function setContentEditableValues(e, text, start, end) {
    const selection = e.ownerDocument.getSelection();
    if (selection.rangeCount < 1) {
        const r = new Range();
        r.setStart(e, 0);
        r.setEnd(e, e.childNodes.length);
        selection.addRange(r);
    }
    if (text !== null) {
        const range = selection.getRangeAt(0);
        const anchorNode = selection.anchorNode;
        const focusNode = selection.focusNode;
        range.setStart(anchorNode, 0);
        range.setEndAfter(focusNode, focusNode.length);
        e.ownerDocument.execCommand("insertText", false, text);
    }
    if (start !== null) {
        if (end === null)
            end = start;
        let range = selection.getRangeAt(0);
        range.setStart(range.startContainer, start);
        range = selection.getRangeAt(0);
        range.setEnd(range.startContainer, end);
    }
}
/**
 * Take an editor function as parameter and return it wrapped in a function that will handle grabbing text and caret position from the HTML element it takes as parameter
 *
 * @param editor_function A function that takes a [string, selectionStart, selectionEnd] tuple as argument and returns a [string, selectionStart, selectionEnd] tuple corresponding to the new state of the text.
 *
 * @return boolean Whether the editor function was actually called or not
 *
 **/
function wrap_input(fn) {
    return (e, arg) => {
        let getValues = getSimpleValues;
        let setValues = setSimpleValues;
        if (e.isContentEditable) {
            getValues = getContentEditableValues;
            setValues = setContentEditableValues;
        }
        const [origText, origStart, origEnd] = getValues(e);
        if (origText === null || origStart === null)
            return false;
        setValues(e, ...fn(origText, origStart, origEnd, arg));
        return true;
    };
}
/**
 * Take an editor function as parameter and wrap it in a function that will handle error conditions
 */
// eslint-disable-next-line @typescript-eslint/no-unused-vars-experimental
function needs_text(fn, arg) {
    return (text, selectionStart, selectionEnd, arg) => {
        if (text.length === 0 ||
            selectionStart === null ||
            selectionStart === undefined)
            return [null, null, null];
        return fn(text, selectionStart, typeof selectionEnd === "number" ? selectionEnd : selectionStart, arg);
    };
}
/**
 * Returns line and column number.
 */
function getLineAndColNumber(text, start) {
    const lines = text.split("\n");
    let totalChars = 0;
    for (let i = 0; i < lines.length; ++i) {
        // +1 because we also need to take '\n' into account
        if (totalChars + lines[i].length + 1 > start) {
            return [text, i + 1, start - totalChars];
        }
        totalChars += lines[i].length + 1;
    }
    return [text, lines.length, 1];
}
/**
 * Detects the boundaries of a word in text according to the wordpattern setting. If POSITION is in a word, the boundaries of this word are returned. If POSITION is out of a word and BEFORE is true, the word before POSITION is returned. If BEFORE is false, the word after the caret is returned.
 */
function getWordBoundaries(text, position, before) {
    if (position < 0 || position > text.length)
        throw new Error(`getWordBoundaries: position (${position}) should be within text ("${text}") boundaries (0, ${text.length})`);
    const pattern = new RegExp(_src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("wordpattern"), "g");
    let boundary1 = position < text.length ? position : text.length;
    const direction = before ? -1 : 1;
    // if the caret is not in a word, try to find the word before or after it
    // For `before`, we should check the char before the caret
    if (before && boundary1 > 0)
        boundary1 -= 1;
    while (boundary1 >= 0 &&
        boundary1 < text.length &&
        !text[boundary1].match(pattern)) {
        boundary1 += direction;
    }
    if (boundary1 < 0)
        boundary1 = 0;
    else if (boundary1 >= text.length)
        boundary1 = text.length - 1;
    // if a word couldn't be found in this direction, try the other one
    while (boundary1 >= 0 &&
        boundary1 < text.length &&
        !text[boundary1].match(pattern)) {
        boundary1 -= direction;
    }
    if (boundary1 < 0)
        boundary1 = 0;
    else if (boundary1 >= text.length)
        boundary1 = text.length - 1;
    if (!text[boundary1].match(pattern)) {
        // there is no word in text
        throw new Error(`getWordBoundaries: no characters matching wordpattern (${pattern.source}) in text (${text})`);
    }
    // now that we know the caret is in a word (it could be in the middle depending on POSITION!), try to find its beginning/end
    while (boundary1 >= 0 &&
        boundary1 < text.length &&
        !!text[boundary1].match(pattern)) {
        boundary1 += direction;
    }
    // boundary1 is now outside of the word, bring it back inside of it
    boundary1 -= direction;
    let boundary2 = boundary1;
    // now that we know the caret is at the beginning/end of a word, we need to find the other boundary
    while (boundary2 >= 0 &&
        boundary2 < text.length &&
        !!text[boundary2].match(pattern)) {
        boundary2 -= direction;
    }
    // boundary2 is outside of the word, bring it back in
    boundary2 += direction;
    // Add 1 to the end boundary because the end of a word is marked by the character after said word
    if (boundary1 > boundary2)
        return [boundary2, boundary1 + 1];
    return [boundary1, boundary2 + 1];
}
/** @hidden
 * Finds the next word as defined by the wordpattern setting after POSITION. If POSITION is in a word, POSITION is moved forward until it is out of the word.
 * @return number The position of the next word in text or -1 if the next word can't be found.
 */
function wordAfterPos(text, position) {
    if (position < 0)
        throw new Error(`wordAfterPos: position (${position}) is less that 0`);
    const pattern = new RegExp(_src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("wordpattern"), "g");
    // move position out of the current word
    while (position < text.length && !!text[position].match(pattern))
        position += 1;
    // try to find characters that match wordpattern
    while (position < text.length && !text[position].match(pattern))
        position += 1;
    if (position >= text.length)
        return -1;
    return position;
}
/** @hidden
 * Rots by 13.
 */
const rot13_helper = (s, n = 13) => {
    let sa = s.split("");
    sa = sa.map(x => charesar(x, n));
    return sa.join("");
};
const charesar = (c, n = 13) => {
    const cn = c.charCodeAt(0);
    if (cn >= 65 && cn <= 90)
        return String.fromCharCode(((cn - 65 + n) % 26) + 65);
    if (cn >= 97 && cn <= 122)
        return String.fromCharCode(((cn - 97 + n) % 26) + 97);
    return c;
};
/** @hidden
 * Shuffles only letters except for the first and last letter in a word, where "word"
 * is a sequence of one of: only lowercase letters OR 5 or more uppercase letters OR an uppercase letter followed
 * by only lowercase letters.
 */
const jumble_helper = (text) => {
    const wordSplitRegex = new RegExp("([^a-zA-Z]|[A-Z][a-z]+)");
    return text.split(wordSplitRegex).map(jumbleWord).join("");
};
function jumbleWord(word) {
    if (word.length < 4 || isAcronym()) {
        return word;
    }
    const innerText = word.slice(1, -1);
    return word.charAt(0) + shuffle(innerText) + word.charAt(word.length - 1);
    function isAcronym() {
        return word.length < 5 && word.toUpperCase() === word;
    }
}
/**
 * Shuffles input string
 * @param text string to be shuffled
 */
const shuffle = (text) => {
    const arr = text.split("");
    for (let i = arr.length - 1; i >= 0; i--) {
        const j = Math.floor(Math.random() * i + 1);
        const t = arr[i];
        arr[i] = arr[j];
        arr[j] = t;
    }
    return arr.join("");
};


/***/ }),

/***/ "./src/lib/extension_info.ts":
/*!***********************************!*\
  !*** ./src/lib/extension_info.ts ***!
  \***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "KNOWN_EXTENSIONS": () => (/* binding */ KNOWN_EXTENSIONS),
/* harmony export */   "getExtensionEnabled": () => (/* binding */ getExtensionEnabled),
/* harmony export */   "getExtensionInstalled": () => (/* binding */ getExtensionInstalled),
/* harmony export */   "init": () => (/* binding */ init),
/* harmony export */   "listExtensions": () => (/* binding */ listExtensions)
/* harmony export */ });
/** Extensions and compatibility

 Looks us and communicates with other installed extensions so we can
 be compatible with them.

 */
/** Friendly-names of extensions that are used in different places so
    that we can refer to them with more readable and less magic ids.
 */
const KNOWN_EXTENSIONS = {
    temp_containers: "{c607c8df-14a7-4f28-894f-29e8722976af}",
    multi_account_containers: "@testpilot-containers",
};
/** List of currently installed extensions.
 */
const installedExtensions = {};
function updateExtensionInfo(extension) {
    installedExtensions[extension.id] = extension;
}
function getExtensionEnabled(id) {
    if (getExtensionInstalled(id)) {
        return installedExtensions[id].enabled;
    }
    else {
        return false;
    }
}
function getExtensionInstalled(id) {
    return id in installedExtensions;
}
async function hasManagementPermission() {
    return browser.permissions.contains({
        permissions: ["management"],
    });
}
/** Read installed extensions to populate the list at startup time.
 */
async function init() {
    // If we don't have the permission, bail out. Our list of
    // installed extensions will be left uninitialized, so all of our
    // external interfaces will pretend that no other extensions
    // exist. This SHOULD result in tridactyl acting the same as it
    // did before the extension interoperability feature was added in
    // the first place, which isn't a great loss.
    const hasPermission = await hasManagementPermission();
    if (!hasPermission) {
        return;
    }
    // Code borrowed from
    // https://github.com/stoically/temporary-containers/blob/master/src/background/management.js
    let extensions = [];
    try {
        extensions = await browser.management.getAll();
    }
    catch (e) {
        return;
    }
    for (const extension of extensions) {
        installedExtensions[extension.id] = extension;
    }
    browser.management.onInstalled.addListener(updateExtensionInfo);
    browser.management.onEnabled.addListener(updateExtensionInfo);
    browser.management.onDisabled.addListener(updateExtensionInfo);
    browser.management.onUninstalled.addListener(updateExtensionInfo);
}
/** Return a list of extensions installed by the user.
 */
async function listExtensions() {
    await init();
    return Object.keys(installedExtensions)
        .map(key => installedExtensions[key])
        .filter(obj => obj.optionsUrl.length > 0);
}


/***/ }),

/***/ "./src/lib/itertools.ts":
/*!******************************!*\
  !*** ./src/lib/itertools.ts ***!
  \******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "head": () => (/* binding */ head),
/* harmony export */   "tail": () => (/* binding */ tail),
/* harmony export */   "filter": () => (/* binding */ filter),
/* harmony export */   "find": () => (/* binding */ find),
/* harmony export */   "zip": () => (/* binding */ zip),
/* harmony export */   "range": () => (/* binding */ range),
/* harmony export */   "enumerate": () => (/* binding */ enumerate),
/* harmony export */   "izip": () => (/* binding */ izip),
/* harmony export */   "iterEq": () => (/* binding */ iterEq),
/* harmony export */   "zeros": () => (/* binding */ zeros),
/* harmony export */   "islice": () => (/* binding */ islice),
/* harmony export */   "chain": () => (/* binding */ chain),
/* harmony export */   "permutationsWithReplacement": () => (/* binding */ permutationsWithReplacement),
/* harmony export */   "map": () => (/* binding */ map),
/* harmony export */   "unique": () => (/* binding */ unique),
/* harmony export */   "uniqueBy": () => (/* binding */ uniqueBy),
/* harmony export */   "dropwhile": () => (/* binding */ dropwhile),
/* harmony export */   "takewhile": () => (/* binding */ takewhile)
/* harmony export */ });
/* harmony import */ var _src_lib_number_mod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/number.mod */ "./src/lib/number.mod.ts");

function head(iterable) {
    const iterator = iterable[Symbol.iterator]();
    const result = iterator.next();
    if (result.done)
        throw RangeError("Empty iterator has no head/tail");
    else
        return result.value;
}
/** Get the last item of an array or iterable */
function tail(iter) {
    if (Array.isArray(iter)) {
        if (iter.length < 1)
            throw RangeError("Empty iterator has no head/tail");
        return iter[iter.length - 1];
    }
    else {
        // Re-use error handling in head()
        let last = head(iter);
        for (last of iter)
            ;
        return last;
    }
}
function* filter(iter, predicate) {
    for (const v of iter) {
        if (predicate(v))
            yield v;
    }
}
function find(iter, predicate) {
    return head(filter(iter, predicate));
}
/** Zip some arrays together

    If you need variable length args, you need izip for now.

*/
function zip(...arrays) {
    // Make an array of length values
    // TODO: Explain how this works
    return [...Array(arrays[0].length)].map((_, i) => arrays.map(a => a[i]));
}
function* range(length) {
    if (length < 0)
        return;
    for (let index = 0; index < length; index++) {
        yield index;
    }
}
function* enumerate(iterable) {
    let index = 0;
    for (const element of iterable) {
        yield [index, element];
        index++;
    }
}
/* Zip arbitrary iterators together */
function* izip(...arrays) {
    const iterators = arrays.map(e => e[Symbol.iterator]());
    const box = Array(arrays.length);
    for (let v of iterators[0]) {
        box[0] = v;
        let i;
        try {
            for ([i, v] of enumerate(iterators.slice(1))) {
                box[i + 1] = head(v);
            }
            yield [...box];
        }
        catch (e) {
            return;
        }
    }
}
/* Test if two iterables are equal */
function iterEq(...arrays) {
    for (const a of zip(...arrays)) {
        if (!a.reduce((x, y) => x === y))
            return false;
    }
    return true;
}
function zeros(n) {
    return new Array(n).fill(0);
}
/** islice(iter, stop) = Give the first `stop` elements
    islice(iter, start, stop)
        skip `start` elements, then give `stop - start` elements,
        unless `stop` is null, then emit indefinitely

    If the iterator runs out early so will this.
*/
function* islice(iterable, start, stop) {
    const iter = iterable[Symbol.iterator]();
    // If stop is not defined then they're using the two argument variant
    if (stop === undefined) {
        stop = start;
        start = 0;
    }
    // Skip elements until start
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    for (const _ of range(start)) {
        const res = iter.next();
        if (res.done)
            return;
    }
    // Emit elements
    if (stop === null) {
        yield* iter;
    }
    else {
        for (let i = start; i < stop; i++) {
            const res = iter.next();
            if (res.done)
                return;
            else
                yield res.value;
        }
    }
}
function* chain(...iterables) {
    for (const iter of iterables) {
        yield* iter[Symbol.iterator]();
    }
}
/** All permutations of n items from array */
function* permutationsWithReplacement(arr, n) {
    const len = arr.length;
    const counters = zeros(n);
    let index = 1;
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    for (const _ of range(Math.pow(len, n))) {
        yield counters.map(i => arr[i]);
        for (const i of range(counters.length)) {
            if (index.mod(Math.pow(len, counters.length - 1 - i)) === 0)
                counters[i] = (counters[i] + 1).mod(len);
        }
        index++;
    }
}
function* map(arr, func) {
    for (const v of arr)
        yield func(v);
}
// Returns an array of unique elements.
function unique(arr) {
    return arr.reduce((acc, cur) => {
        if (!acc.includes(cur))
            acc.push(cur);
        return acc;
    }, []);
}
/** Yield values that are unique under hasher(value) */
function* uniqueBy(arr, hasher) {
    const hashes = new Set();
    for (const e of arr) {
        const hash = hasher(e);
        if (!hashes.has(hash)) {
            yield e;
            hashes.add(hash);
        }
    }
}
/** Drop from iterable until predicate is false */
function* dropwhile(iterable, predicate) {
    let allmatched = true;
    for (const elem of iterable) {
        if (!(allmatched && predicate(elem))) {
            allmatched = false;
            yield elem;
        }
    }
}
/** Take from iterable until predicate is false */
function* takewhile(iterable, predicate) {
    for (const elem of iterable) {
        if (predicate(elem)) {
            yield elem;
        }
        else {
            return;
        }
    }
}


/***/ }),

/***/ "./src/lib/keyseq.ts":
/*!***************************!*\
  !*** ./src/lib/keyseq.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "MinimalKey": () => (/* binding */ MinimalKey),
/* harmony export */   "stripOnlyModifiers": () => (/* binding */ stripOnlyModifiers),
/* harmony export */   "parse": () => (/* binding */ parse),
/* harmony export */   "completions": () => (/* binding */ completions),
/* harmony export */   "bracketexprToKey": () => (/* binding */ bracketexprToKey),
/* harmony export */   "mapstrToKeyseq": () => (/* binding */ mapstrToKeyseq),
/* harmony export */   "commandKey2jsKey": () => (/* binding */ commandKey2jsKey),
/* harmony export */   "mozMapToMinimalKey": () => (/* binding */ mozMapToMinimalKey),
/* harmony export */   "minimalKeyToMozMap": () => (/* binding */ minimalKeyToMozMap),
/* harmony export */   "mapstrMapToKeyMap": () => (/* binding */ mapstrMapToKeyMap),
/* harmony export */   "translateKeysInPlace": () => (/* binding */ translateKeysInPlace),
/* harmony export */   "keyMap": () => (/* binding */ keyMap),
/* harmony export */   "hasModifiers": () => (/* binding */ hasModifiers),
/* harmony export */   "hasNonShiftModifiers": () => (/* binding */ hasNonShiftModifiers),
/* harmony export */   "isSimpleKey": () => (/* binding */ isSimpleKey),
/* harmony export */   "translateKeysUsingKeyTranslateMap": () => (/* binding */ translateKeysUsingKeyTranslateMap)
/* harmony export */ });
/* harmony import */ var _src_lib_itertools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/itertools */ "./src/lib/itertools.ts");
/* harmony import */ var _src_lib_nearley_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/nearley_utils */ "./src/lib/nearley_utils.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/propOr.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/invertObj.js");
/* harmony import */ var _src_grammars_bracketexpr_generated__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/grammars/.bracketexpr.generated */ "./src/grammars/.bracketexpr.generated.ts");
/** Key-sequence parser

    If `map` is a Map of `MinimalKey[]` to objects (exstrs or callbacks)
    and `keyseq` is an array of [[MinimalKey]] compatible objects...

     - `parse(keyseq, map)` returns the mapped object and a count OR a prefix
       of `MinimalKey[]` (possibly empty) that, if more keys are pressed, could
       map to an object.
     - `completions(keyseq, map)` returns the fragment of `map` that keyseq is
       a valid prefix of.
     - `mapstrToKeySeq` generates KeySequences for the rest of the API.

    No key sequence in a `map` may be a prefix of another key sequence in that
    map. This is a point of difference from Vim that removes any time-dependence
    in the parser. Vimperator, Pentadactyl, saka-key, etc, all share this
    limitation.

    If a key is represented by a single character then the shift modifier state
    is ignored unless other modifiers are also present.

*/
/** */





const bracketexpr_grammar = _src_grammars_bracketexpr_generated__WEBPACK_IMPORTED_MODULE_3__.default;
const bracketexpr_parser = new _src_lib_nearley_utils__WEBPACK_IMPORTED_MODULE_1__.Parser(bracketexpr_grammar);
class MinimalKey {
    constructor(key, modifiers) {
        this.key = key;
        this.altKey = false;
        this.ctrlKey = false;
        this.metaKey = false;
        this.shiftKey = false;
        if (modifiers !== undefined) {
            for (const mod of Object.keys(modifiers)) {
                this[mod] = modifiers[mod];
            }
        }
    }
    /** Does this key match a given MinimalKey extending object? */
    match(keyevent) {
        // 'in' doesn't include prototypes, so it's safe for this object.
        for (const attr in this) {
            // Don't check shiftKey for normal keys.
            if (attr === "shiftKey" && this.key.length === 1)
                continue;
            if (this[attr] !== keyevent[attr])
                return false;
        }
        return true;
    }
    toMapstr() {
        let str = "";
        let needsBrackets = this.key.length > 1;
        // Format modifiers
        const modifiers = new Map([
            ["A", "altKey"],
            ["C", "ctrlKey"],
            ["M", "metaKey"],
            ["S", "shiftKey"],
        ]);
        for (const [letter, attr] of modifiers.entries()) {
            if (this[attr]) {
                str += letter;
                needsBrackets = true;
            }
        }
        if (str) {
            str += "-";
        }
        let key = this.key;
        if (key === " ") {
            key = "Space";
            needsBrackets = true;
        }
        // Format the rest
        str += key;
        if (needsBrackets) {
            str = "<" + str + ">";
        }
        return str;
    }
}
function splitNumericPrefix(keyseq) {
    // If the first key is in 1:9, partition all numbers until you reach a non-number.
    if (!hasModifiers(keyseq[0]) &&
        [1, 2, 3, 4, 5, 6, 7, 8, 9].includes(Number(keyseq[0].key))) {
        const prefix = [keyseq[0]];
        for (const ke of keyseq.slice(1)) {
            if (!hasModifiers(ke) &&
                [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].includes(Number(ke.key)))
                prefix.push(ke);
            else
                break;
        }
        const rest = keyseq.slice(prefix.length);
        return [prefix, rest];
    }
    else {
        return [[], keyseq];
    }
}
function stripOnlyModifiers(keyseq) {
    return keyseq.filter(key => !["Control", "Shift", "Alt", "AltGraph", "Meta"].includes(key.key));
}
function parse(keyseq, map) {
    // Remove bare modifiers
    keyseq = stripOnlyModifiers(keyseq);
    // If the keyseq is now empty, abort.
    if (keyseq.length === 0)
        return { keys: [], isMatch: false };
    // Split into numeric prefix and non-numeric suffix
    let numericPrefix;
    [numericPrefix, keyseq] = splitNumericPrefix(keyseq);
    // If keyseq is a prefix of a key in map, proceed, else try dropping keys
    // from keyseq until it is empty or is a prefix.
    let possibleMappings = completions(keyseq, map);
    while (possibleMappings.size === 0 && keyseq.length > 0) {
        keyseq.shift();
        numericPrefix = [];
        possibleMappings = completions(keyseq, map);
    }
    if (possibleMappings.size > 0) {
        // Check if any of the mappings is a perfect match (this will only
        // happen if some sequences in the KeyMap are prefixes of other seqs).
        try {
            const perfect = (0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_0__.find)(possibleMappings, ([k, _v]) => k.length === keyseq.length);
            return {
                value: perfect[1],
                exstr: perfect[1] + numericPrefixToExstrSuffix(numericPrefix),
                isMatch: true,
                numericPrefix: numericPrefix.length
                    ? Number(numericPrefix.map(ke => ke.key).join(""))
                    : undefined,
                keys: [],
            };
        }
        catch (e) {
            if (!(e instanceof RangeError))
                throw e;
        }
    }
    // keyseq is the longest suffix of keyseq that is the prefix of a
    // command, numericPrefix is a numeric prefix of that. We want to
    // preserve that whole thing, so concat them back together before
    // returning.
    return { keys: numericPrefix.concat(keyseq), isMatch: keyseq.length > 0 };
}
/** True if seq1 is a prefix or equal to seq2 */
function prefixes(seq1, seq2) {
    if (seq1.length > seq2.length) {
        return false;
    }
    else {
        for (const [key1, key2] of (0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_0__.izip)(seq1, seq2)) {
            if (!key2.match(key1))
                return false;
        }
        return true;
    }
}
/** returns the fragment of `map` that keyseq is a valid prefix of. */
function completions(keyseq, map) {
    return new Map((0,_src_lib_itertools__WEBPACK_IMPORTED_MODULE_0__.filter)(map.entries(), ([ks, _maptarget]) => prefixes(keyseq, ks)));
}
// }}}
// {{{ mapStrToKeySeq stuff
/** Expand special key aliases that Vim provides to canonical values

    Vim aliases are case insensitive.
*/
function expandAliases(key) {
    // Vim compatibility aliases
    const aliases = {
        cr: "Enter",
        esc: "Escape",
        return: "Enter",
        enter: "Enter",
        space: " ",
        bar: "|",
        del: "Delete",
        bs: "Backspace",
        lt: "<",
    };
    if (key.toLowerCase() in aliases)
        return aliases[key.toLowerCase()];
    else
        return key;
}
/** String starting with a `<` to MinimalKey and remainder.

    Bracket expressions generally start with a `<` contain no angle brackets or
    whitespace and end with a `>.` These special-cased expressions are also
    permitted: `<{modifier}<>`, `<{modifier}>>`, and `<{modifier}->`.

    If the string passed does not match this definition, it is treated as a
    literal `<.`

    Backus Naur approximation:

    ```
        - bracketexpr ::= '<' modifier? key '>'
        - modifier ::= 'm'|'s'|'a'|'c' '-'
        - key ::= '<'|'>'|/[^\s<>-]+/
    ```

    See `src/grammars/bracketExpr.ne` for the canonical definition.

    Modifiers are case insensitive.

    Some case insensitive vim compatibility aliases are also defined, see
    [[expandAliases]].

    Compatibility breaks:

    Shift + key must use the correct capitalisation of key:
        `<S-j> != J, <S-J> == J`.

    In Vim `<A-x> == <M-x>` on most systems. Not so here: we can't detect
    platform, so just have to use what the browser gives us.

    Vim has a predefined list of special key sequences, we don't: there are too
    many (and they're non-standard) [1].

    In the future, we may just use the names as defined in keyNameList.h [2].

    In Vim, you're still allowed to use `<lt>` within angled brackets:
        `<M-<> == <M-lt> == <M-<lt>>`
    Here only the first two will work.

    Restrictions:

    It is not possible to map to a keyevent that actually sends the key value
    of any of the aliases or to any multi-character sequence containing a space
    or `>.` It is unlikely that browsers will ever do either of those things.

    [1]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
    [2]: https://searchfox.org/mozilla-central/source/dom/events/KeyNameList.h

*/
function bracketexprToKey(inputStr) {
    if (inputStr.indexOf(">") > 0) {
        try {
            const [[modifiers, key], remainder,] = bracketexpr_parser.feedUntilError(inputStr);
            return [new MinimalKey(expandAliases(key), modifiers), remainder];
        }
        catch (e) {
            // No valid bracketExpr
            return [new MinimalKey("<"), inputStr.slice(1)];
        }
    }
    else {
        // No end bracket to match == no valid bracketExpr
        return [new MinimalKey("<"), inputStr.slice(1)];
    }
}
/** Generate KeySequences for the rest of the API.

    A map expression is something like:

    ```
    j scrollline 10
    <C-f> scrollpage 0.5
    <C-d> scrollpage 0.5
    <C-/><C-n> mode normal
    ```

    A mapstr is the bit before the space.

    mapstrToKeyseq turns a mapstr into a keySequence that looks like this:

    ```
    [MinimalKey {key: 'j'}]
    [MinimalKey {key: 'f', ctrlKey: true}]
    [MinimalKey {key: 'd', ctrlKey: true}]
    [MinimalKey {key: '/', ctrlKey: true}, MinimalKey {key: 'n', ctrlKey: true}]
    ```

    (All four {modifier}Key flags are actually provided on all MinimalKeys)
*/
function mapstrToKeyseq(mapstr) {
    const keyseq = [];
    let key;
    // Reduce mapstr by one character or one bracket expression per iteration
    while (mapstr.length) {
        if (mapstr[0] === "<") {
            ;
            [key, mapstr] = bracketexprToKey(mapstr);
            keyseq.push(key);
        }
        else {
            keyseq.push(new MinimalKey(mapstr[0]));
            mapstr = mapstr.slice(1);
        }
    }
    return keyseq;
}
const commandKey2jsKey = {
    Comma: ",",
    Period: ".",
    Up: "ArrowUp",
    Down: "ArrowDown",
    Left: "ArrowLeft",
    Right: "ArrowRight",
    Space: " ",
};
/*
 * Convert a Commands API shortcut string to a MinimalKey. NB: no error checking done, media keys probably unsupported.
 */
function mozMapToMinimalKey(mozmap) {
    const arr = mozmap.split("+");
    const modifiers = {
        altKey: arr.includes("Alt"),
        ctrlKey: arr.includes("MacCtrl"),
        shiftKey: arr.includes("Shift"),
        metaKey: arr.includes("Command"),
    };
    let key = arr[arr.length - 1];
    key = ramda__WEBPACK_IMPORTED_MODULE_4__.default(key.toLowerCase(), key, commandKey2jsKey);
    // TODO: support mediakeys: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#Media_keys
    return new MinimalKey(key, modifiers);
}
/*
 * Convert a minimal key to a Commands API compatible bind. NB: no error checking done.
 *
 * Ctrl-key behaviour on Mac may be surprising.
 */
function minimalKeyToMozMap(key) {
    const mozMap = [];
    key.altKey && mozMap.push("Alt");
    key.ctrlKey && mozMap.push("MacCtrl");
    key.shiftKey && mozMap.push("Shift");
    key.metaKey && mozMap.push("Command");
    const jsKey2commandKey = ramda__WEBPACK_IMPORTED_MODULE_5__.default(commandKey2jsKey);
    mozMap.push(ramda__WEBPACK_IMPORTED_MODULE_4__.default(key.key.toUpperCase(), key.key, jsKey2commandKey));
    return mozMap.join("+");
}
/** Convert a map of mapstrs (e.g. from config) to a KeyMap */
function mapstrMapToKeyMap(mapstrMap) {
    const newKeyMap = new Map();
    for (const [mapstr, target] of mapstrMap.entries()) {
        newKeyMap.set(mapstrToKeyseq(mapstr), target);
    }
    return newKeyMap;
}
let KEYMAP_CACHE = {};
function translateKeysInPlace(keys, conf) {
    // If so configured, translate keys using the key translation map
    if (_src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("keytranslatemodes")[conf] === "true") {
        const translationmap = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("keytranslatemap");
        translateKeysUsingKeyTranslateMap(keys, translationmap);
    }
}
/**
 * Return a "*maps" config converted into sequences of minimalkeys (e.g. "nmaps")
 */
function keyMap(conf) {
    if (KEYMAP_CACHE[conf])
        return KEYMAP_CACHE[conf];
    // Fail silently and pass keys through to page if Tridactyl hasn't loaded yet
    if (!_src_lib_config__WEBPACK_IMPORTED_MODULE_2__.INITIALISED)
        return new Map();
    const mapobj = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get(conf);
    if (mapobj === undefined)
        throw new Error("No binds defined for this mode. Reload page with <C-r> and add binds, e.g. :bind --mode=[mode] <Esc> mode normal");
    // Convert to KeyMap
    const maps = new Map(Object.entries(mapobj));
    KEYMAP_CACHE[conf] = mapstrMapToKeyMap(maps);
    return KEYMAP_CACHE[conf];
}
// }}}
// {{{ Utility functions for dealing with KeyboardEvents
function hasModifiers(keyEvent) {
    return (keyEvent.ctrlKey ||
        keyEvent.altKey ||
        keyEvent.metaKey ||
        keyEvent.shiftKey);
}
/** shiftKey is true for any capital letter, most numbers, etc. Generally care about other modifiers. */
function hasNonShiftModifiers(keyEvent) {
    return keyEvent.ctrlKey || keyEvent.altKey || keyEvent.metaKey;
}
/** A simple key event is a non-special key (length 1) that is not modified by ctrl, alt, or shift. */
function isSimpleKey(keyEvent) {
    return !(keyEvent.key.length > 1 || hasNonShiftModifiers(keyEvent));
}
function numericPrefixToExstrSuffix(numericPrefix) {
    if (numericPrefix.length > 0) {
        return " " + numericPrefix.map(k => k.key).join("");
    }
    else {
        return "";
    }
}
/**
 * Translates the given set of keyEvents (in place) as specified by
 * the given key translation map. All keys *and* values in the key
 * translation map must be length-1 strings.
 */
function translateKeysUsingKeyTranslateMap(keyEvents, keytranslatemap) {
    for (let index = 0; index < keyEvents.length; index++) {
        const keyEvent = keyEvents[index];
        const newkey = keytranslatemap[keyEvent.key];
        // KeyboardEvents can't have been translated, MinimalKeys may
        // have been. We can't add anything to the MinimalKey without
        // breaking a ton of other stuff, so instead we'll just assume
        // that the only way we've gotten a MinimalKey is if the key
        // has already been translated. We err way on the side of
        // safety becase translating anything more than once would
        // almost certainly mean oscillations and other super-weird
        // breakage.
        const neverTranslated = keyEvent instanceof KeyboardEvent;
        if (neverTranslated && newkey !== undefined) {
            // We can't update the keyEvent in place. However, the
            // entire pipeline works with MinimalKeys all the way
            // through, so we just swap the key event out for a new
            // MinimalKey with the right key and modifiers copied from
            // the original.
            keyEvents[index] = new MinimalKey(newkey, {
                altKey: keyEvent.altKey,
                ctrlKey: keyEvent.ctrlKey,
                metaKey: keyEvent.metaKey,
                shiftKey: keyEvent.shiftKey,
            });
        }
    }
}
// }}}
browser.storage.onChanged.addListener((changes) => {
    if ("userconfig" in changes) {
        KEYMAP_CACHE = {};
    }
});


/***/ }),

/***/ "./src/lib/logging.ts":
/*!****************************!*\
  !*** ./src/lib/logging.ts ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Logger": () => (/* binding */ Logger),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/**
 * Helper functions for logging
 */

const LevelToNum = new Map();
LevelToNum.set("never", 0);
LevelToNum.set("error", 1);
LevelToNum.set("warning", 2);
LevelToNum.set("info", 3);
LevelToNum.set("debug", 4);
class Logger {
    /**
     * Config-aware Logger class.
     *
     * @param logModule     the logging module name: this is ued to look up the
     *                      configured/default level in the user config
     */
    constructor(logModule) {
        this.logModule = logModule;
    }
    /**
     * Config-aware logging function.
     *
     * @param level         the level of the logging - if <= configured, the message
     *                      will be shown
     *
     * @return              logging function: this is returned as a function to
     *                      retain the call site
     */
    log(level) {
        const configedLevel = _src_lib_config__WEBPACK_IMPORTED_MODULE_0__.get("logging", this.logModule);
        if (LevelToNum.get(level) <= LevelToNum.get(configedLevel)) {
            // hand over to console.log, error or debug as needed
            switch (level) {
                case "error":
                    // TODO: replicate this for other levels, don't steal focus
                    // work out how to import messaging/webext without breaking everything
                    return async (...message) => {
                        console.error(...message);
                        return browser.runtime.sendMessage({
                            type: "controller_background",
                            command: "acceptExCmd",
                            args: [
                                "fillcmdline_nofocus # " + message.join(" "),
                            ],
                        });
                    };
                case "warning":
                    return console.warn;
                case "info":
                    return console.log;
                case "debug":
                    return console.debug;
            }
        }
        // do nothing with the message
        // eslint-disable-next-line @typescript-eslint/no-empty-function
        return function () { };
    }
    // These are all getters so that logger.debug = console.debug and
    // logger.debug('blah') translates into console.debug('blah') with the
    // filename and line correct.
    get debug() {
        return this.log("debug");
    }
    get info() {
        return this.log("info");
    }
    get warning() {
        return this.log("warning");
    }
    get error() {
        return this.log("error");
    }
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Logger);


/***/ }),

/***/ "./src/lib/math.ts":
/*!*************************!*\
  !*** ./src/lib/math.ts ***!
  \*************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "log": () => (/* binding */ log),
/* harmony export */   "linspace": () => (/* binding */ linspace),
/* harmony export */   "buckets": () => (/* binding */ buckets),
/* harmony export */   "bucketize": () => (/* binding */ bucketize)
/* harmony export */ });
function log(x, base) {
    return Math.log(x) / Math.log(base);
}
// Copied from Numeric Javascript under the MIT license
// https://github.com/sloisel/numeric/blob/656fa1254be540f428710738ca9c1539625777f1/src/numeric.js#L922
function linspace(a, b, n) {
    if (typeof n === "undefined")
        n = Math.max(Math.round(b - a) + 1, 1);
    if (n < 2) {
        return n === 1 ? [a] : [];
    }
    let i;
    const ret = Array(n);
    n--;
    for (i = n; i >= 0; i--) {
        ret[i] = (i * b + (n - i) * a) / n;
    }
    return ret;
}
function buckets(values, numBuckets) {
    const min = values.reduce((a, b) => Math.min(a, b));
    const max = values.reduce((a, b) => Math.max(a, b));
    return linspace(min, max, numBuckets);
}
function bucketize(values, buckets) {
    // Init result storage
    const result = new Map();
    for (const bucketval of buckets) {
        result.set(bucketval, 0);
    }
    // We place a value in a bucket by going through the buckets from
    // smallest to largest, finding the smallest bucket that's larger
    // than or equal to than the value. This will have the following
    // results:
    //
    // * A value that's larger than all bucket values will not be
    //   placed at all.
    // * A value with exactly the value of the largest bucket will be
    //   placed in the largest bucket.
    // * A value with exactly the value of the smallest bucket will be
    //   placed in the smallest bucket.
    // * A value that's smaller than all bucket values will be placed
    //   in the smallest bucket.
    //
    // If we build our buckets as linspace(min(values), max(values)),
    // then this means that the largest bucket is guaranteed to have
    // exactly one element in it.
    const placeValue = (val) => {
        for (const bucketval of buckets) {
            if (bucketval >= val) {
                result.set(bucketval, result.get(bucketval) + 1);
                return;
            }
        }
    };
    // Bucketize every value.
    for (const val of values) {
        placeValue(val);
    }
    // Return just the counts in each bucket
    return result;
}


/***/ }),

/***/ "./src/lib/messaging.ts":
/*!******************************!*\
  !*** ./src/lib/messaging.ts ***!
  \******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "attributeCaller": () => (/* binding */ attributeCaller),
/* harmony export */   "setupListener": () => (/* binding */ setupListener),
/* harmony export */   "message": () => (/* binding */ message),
/* harmony export */   "messageActiveTab": () => (/* binding */ messageActiveTab),
/* harmony export */   "messageTab": () => (/* binding */ messageTab),
/* harmony export */   "messageOwnTab": () => (/* binding */ messageOwnTab),
/* harmony export */   "messageAllTabs": () => (/* binding */ messageAllTabs),
/* harmony export */   "addListener": () => (/* binding */ addListener)
/* harmony export */ });
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");


const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_1__.default("messaging");
// Calls methods on obj that match .command and sends responses back
function attributeCaller(obj) {
    function handler(message, sender, sendResponse) {
        logger.debug(message);
        // Args may be undefined, but you can't spread undefined...
        if (message.args === undefined)
            message.args = [];
        // Call command on obj
        try {
            const response = obj[message.command](...message.args);
            // Return response to sender
            if (response instanceof Promise) {
                logger.debug("Returning promise...", response);
                sendResponse(response);
                // Docs say you should be able to return a promise, but that
                // doesn't work.
                /* return response */
            }
            else if (response !== undefined) {
                logger.debug("Returning synchronously...", response);
                sendResponse(response);
            }
        }
        catch (e) {
            logger.error(`Error processing ${message.command}(${message.args})`, e);
            return Promise.reject(e);
        }
    }
    return handler;
}
function backgroundHandler(root, message) {
    return root[message.type][message.command](...message.args);
}
function setupListener(root) {
    browser.runtime.onMessage.addListener((message) => {
        if (message.type in root) {
            if (!(message.command in root[message.type]))
                throw new Error(`missing handler in protocol ${message.type} ${message.command}`);
            if (!Array.isArray(message.args))
                throw new Error(`wrong arguments in protocol ${message.type} ${message.command}`);
            return Promise.resolve(backgroundHandler(root, message));
        }
    });
}
// type StripPromise<T> = T extends Promise<infer U> ? U : T
/** Send a message to non-content scripts */
async function message(type, command, ...args) {
    const message = {
        type,
        command,
        args,
    };
    // Typescript didn't like this
    // return browser.runtime.sendMessage<typeof message, StripPromise<ReturnType<F>>>(message)
    return browser.runtime.sendMessage(message);
}
/** Message the active tab of the currentWindow */
async function messageActiveTab(type, command, args) {
    return messageTab(await (0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.activeTabId)(), type, command, args);
}
async function messageTab(tabId, type, command, args) {
    const message = {
        type,
        command,
        args,
    };
    return _src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.browserBg.tabs.sendMessage(tabId, message);
}
let _ownTabId;
async function messageOwnTab(type, command, args) {
    if (_ownTabId === undefined) {
        _ownTabId = await (0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.ownTabId)();
    }
    if (_ownTabId === undefined)
        throw new Error("Can't message own tab: _ownTabId is undefined");
    return messageTab(_ownTabId, type, command, args);
}
async function messageAllTabs(type, command, args) {
    const responses = [];
    for (const tab of await _src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.browserBg.tabs.query({})) {
        try {
            responses.push(await messageTab(tab.id, type, command, args));
        }
        catch (e) {
            // Skip errors caused by tabs we aren't running on
            if (e.message !=
                "Could not establish connection. Receiving end does not exist.") {
                logger.error(e);
            }
        }
    }
    return responses;
}
const listeners = new Map();
/** Register a listener to be called for each message with type */
function addListener(type, callback) {
    if (!listeners.get(type)) {
        listeners.set(type, new Set());
    }
    listeners.get(type).add(callback);
    return () => {
        listeners.get(type).delete(callback);
    };
}
if ((0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_0__.getContext)() === "background") {
    // Warning: lib/webext.ts:ownTab() relies on this listener being added in order to work
    addListener("owntab_background", (message, sender, sendResponse) => {
        const x = Object.assign(Object.create(null), sender.tab);
        x.mutedInfo = Object.assign(Object.create(null), sender.tab.mutedInfo);
        x.sharingState = Object.assign(Object.create(null), sender.tab.sharingState);
        sendResponse(Promise.resolve(x));
    });
}
/** Recv a message from runtime.onMessage and send to all listeners */
function onMessage(message, sender, sendResponse) {
    if (listeners.get(message.type)) {
        for (const listener of listeners.get(message.type)) {
            listener(message, sender, sendResponse);
        }
    }
}
browser.runtime.onMessage.addListener(onMessage);


/***/ }),

/***/ "./src/lib/native.ts":
/*!***************************!*\
  !*** ./src/lib/native.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getrcpath": () => (/* binding */ getrcpath),
/* harmony export */   "getrc": () => (/* binding */ getrc),
/* harmony export */   "getNativeMessengerVersion": () => (/* binding */ getNativeMessengerVersion),
/* harmony export */   "getBestEditor": () => (/* binding */ getBestEditor),
/* harmony export */   "nativegate": () => (/* binding */ nativegate),
/* harmony export */   "inpath": () => (/* binding */ inpath),
/* harmony export */   "firstinpath": () => (/* binding */ firstinpath),
/* harmony export */   "editor": () => (/* binding */ editor),
/* harmony export */   "read": () => (/* binding */ read),
/* harmony export */   "write": () => (/* binding */ write),
/* harmony export */   "writerc": () => (/* binding */ writerc),
/* harmony export */   "mkdir": () => (/* binding */ mkdir),
/* harmony export */   "temp": () => (/* binding */ temp),
/* harmony export */   "move": () => (/* binding */ move),
/* harmony export */   "listDir": () => (/* binding */ listDir),
/* harmony export */   "winFirefoxRestart": () => (/* binding */ winFirefoxRestart),
/* harmony export */   "run": () => (/* binding */ run),
/* harmony export */   "runAsync": () => (/* binding */ runAsync),
/* harmony export */   "pyeval": () => (/* binding */ pyeval),
/* harmony export */   "getenv": () => (/* binding */ getenv),
/* harmony export */   "clipboard": () => (/* binding */ clipboard),
/* harmony export */   "ff_cmdline": () => (/* binding */ ff_cmdline),
/* harmony export */   "parseProfilesIni": () => (/* binding */ parseProfilesIni),
/* harmony export */   "getFirefoxDir": () => (/* binding */ getFirefoxDir),
/* harmony export */   "getProfileUncached": () => (/* binding */ getProfileUncached),
/* harmony export */   "getProfile": () => (/* binding */ getProfile),
/* harmony export */   "getProfileName": () => (/* binding */ getProfileName),
/* harmony export */   "getProfileDir": () => (/* binding */ getProfileDir),
/* harmony export */   "parsePrefs": () => (/* binding */ parsePrefs),
/* harmony export */   "loadPrefs": () => (/* binding */ loadPrefs),
/* harmony export */   "getPrefs": () => (/* binding */ getPrefs),
/* harmony export */   "getPref": () => (/* binding */ getPref),
/* harmony export */   "getConfElsePref": () => (/* binding */ getConfElsePref),
/* harmony export */   "getConfElsePrefElseDefault": () => (/* binding */ getConfElsePrefElseDefault),
/* harmony export */   "writePref": () => (/* binding */ writePref),
/* harmony export */   "removePref": () => (/* binding */ removePref),
/* harmony export */   "unfixamo": () => (/* binding */ unfixamo)
/* harmony export */ });
/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! semver-compare */ "./node_modules/semver-compare/index.js");
/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(semver_compare__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");
/**
 * Background functions for the native messenger interface
 */




const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_3__.default("native");
const NATIVE_NAME = "tridactyl";
/**
 * Posts using the one-time message API; native is killed after message returns
 */
async function sendNativeMsg(cmd, opts, quiet = false) {
    const send = Object.assign({ cmd }, opts);
    let resp;
    logger.info(`Sending message: ${JSON.stringify(send)}`);
    try {
        resp = await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.sendNativeMessage(NATIVE_NAME, send);
        logger.info(`Received response:`, resp);
        return resp;
    }
    catch (e) {
        if (!quiet) {
            throw new Error("Failed to send message to native messenger. If it is correctly installed (run `:native`), please report this bug on https://github.com/tridactyl/tridactyl/issues .");
        }
    }
}
async function getrcpath(separator = "auto") {
    const res = await sendNativeMsg("getconfigpath", {});
    if (res.code !== 0)
        throw new Error("getrcpath error: " + res.code);
    if (separator == "unix" &&
        (await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os == "win") {
        return res.content.replace(/\\/g, "/");
    }
    else {
        return res.content;
    }
}
async function getrc() {
    const res = await sendNativeMsg("getconfig", {});
    if (res.content && !res.error) {
        logger.info(`Successfully retrieved fs config:\n${res.content}`);
        return res.content;
    }
    else {
        // Have to make this a warning as async exceptions apparently don't get caught
        logger.info(`Error in retrieving config: ${res.error}`);
    }
}
let NATIVE_VERSION_CACHE;
async function getNativeMessengerVersion(quiet = false) {
    if (NATIVE_VERSION_CACHE !== undefined) {
        return NATIVE_VERSION_CACHE;
    }
    const res = await sendNativeMsg("version", {}, quiet);
    if (res === undefined) {
        if (quiet)
            return undefined;
        throw new Error(`Error retrieving version: ${res.error}`);
    }
    if (res.version && !res.error) {
        logger.info(`Native version: ${res.version}`);
        NATIVE_VERSION_CACHE = res.version.toString();
        // Wipe cache after 500ms
        setTimeout(() => (NATIVE_VERSION_CACHE = undefined), 500);
        return NATIVE_VERSION_CACHE;
    }
}
async function getBestEditor() {
    const gui_candidates = [];
    const term_emulators = [];
    const tui_editors = [];
    const last_resorts = [];
    const os = (await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os;
    const arg_quote = os === "win" ? '"' : "'";
    const vim_positioning_arg = ` ${arg_quote}+normal!%lGzv%c|${arg_quote}`;
    if (os === "mac") {
        gui_candidates.push(...[
            "/Applications/MacVim.app/Contents/bin/mvim -f" +
                vim_positioning_arg,
            "/usr/local/bin/vimr --wait --nvim +only",
        ]);
        // if anyone knows of any "sensible" terminals that let you send them commands to run,
        // please let us know in issue #451!
        term_emulators.push(...[
            "/Applications/cool-retro-term.app/Contents/MacOS/cool-retro-term -e",
        ]);
        last_resorts.push(...["open -nWt"]);
    }
    else {
        // Tempted to put this behind another config setting: prefergui
        gui_candidates.push(...["gvim -f" + vim_positioning_arg]);
        // These terminal emulators can't normally be run on Windows, usually because they require X11.
        if (os === "linux" || os === "openbsd") {
            term_emulators.push(...[
                // we generally try to give the terminal the class "tridactyl_editor" so that
                // it can be made floating, e.g in i3:
                // for_window [class="tridactyl_editor"] floating enable border pixel 1
                "st -c tridactyl_editor",
                "xterm -class tridactyl_editor -e",
                "uxterm -class tridactyl_editor -e",
                "urxvt -e",
                'termite --class tridactyl_editor -e "%c"',
                "sakura --class tridactyl_editor -e",
                "lilyterm -e",
                "mlterm -N tridactyl_editor -e",
                "roxterm -e",
                "cool-retro-term -e",
                // Terminator doesn't appear to honour -c, but the option is
                // documented in its manpage and seems to cause no errors when supplied.
                'terminator -u -c tridactyl_editor -e "%c"',
            ]);
        }
        if (os === "win") {
            term_emulators.push(...["conemu -run", "mintty --class tridactyl_editor -e"]);
        }
        // These terminal emulators are cross-platform.
        term_emulators.push(...[
            "alacritty --class tridactyl_editor -e",
        ]);
        last_resorts.push(...[
            "emacs",
            "gedit",
            "kate",
            "sublime",
            "atom -w",
            "code -nw",
            "abiword",
            "notepad",
        ]);
    }
    tui_editors.push(...[
        "vim" + vim_positioning_arg,
        "nvim" + vim_positioning_arg,
        "nano %f",
        "emacs -nw %f",
    ]);
    // Try GUI editors.
    const guicmd = await firstinpath(gui_candidates);
    if (guicmd) {
        return guicmd;
    }
    // Try TUI editors.
    const termcmd = await firstinpath(term_emulators);
    const tuicmd = await firstinpath(tui_editors);
    if (termcmd && tuicmd) {
        if (termcmd.includes("%c")) {
            return tuicmd.replace("%c", tuicmd);
        }
        else {
            return termcmd + " " + tuicmd;
        }
    }
    // If all else fails, try some stupid stuff to scare users into setting
    // their editorcmd.
    return await firstinpath(last_resorts);
}
/**
 * Used internally to gate off functions that use the native messenger. Gives a
 * helpful error message in the command line if the native messenger is not
 * installed, or is the wrong version.
 *
 * @arg version: A string representing the minimal required version.
 * @arg interactive: True if a message should be displayed on version mismatch.
 * @return false if the required version is higher than the currently available
 * native messenger version.
 */
async function nativegate(version = "0", interactive = true, desiredOS = ["mac", "win", "linux", "openbsd"]) {
    if (!desiredOS.includes((await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os)) {
        if (interactive) {
            logger.error("# Tridactyl's native messenger doesn't support your operating system, yet.");
        }
        return false;
    }
    try {
        const actualVersion = await getNativeMessengerVersion();
        if (actualVersion !== undefined) {
            if (semver_compare__WEBPACK_IMPORTED_MODULE_0__(version, actualVersion) > 0) {
                if (interactive)
                    logger.error("# Please update to native messenger " +
                        version +
                        ", for example by running `:updatenative`.");
                // TODO: add update procedure and document here.
                return false;
            }
            return true;
        }
        else if (interactive)
            logger.error("# Native messenger not found. Please run `:installnative` and follow the instructions.");
        return false;
    }
    catch (e) {
        if (interactive)
            logger.error("# Native messenger not found. Please run `:installnative` and follow the instructions.");
        return false;
    }
}
async function inpath(cmd) {
    const pathcmd = (await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os === "win"
        ? "where "
        : "which ";
    return (await run(pathcmd + cmd.split(" ")[0])).code === 0;
}
async function firstinpath(cmdarray) {
    let ind = 0;
    let cmd = cmdarray[ind];
    // Try to find a text editor
    while (!(await inpath(cmd.split(" ")[0]))) {
        ind++;
        cmd = cmdarray[ind];
        if (cmd === undefined)
            break;
    }
    return cmd;
}
async function editor(file, line, col, content) {
    if (content !== undefined)
        await write(file, content);
    const editorcmd = (_src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("editorcmd") === "auto"
        ? await getBestEditor()
        : _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("editorcmd"))
        .replace(/%l/, line)
        .replace(/%c/, col);
    let exec;
    if (editorcmd.indexOf("%f") !== -1) {
        exec = await run(editorcmd.replace(/%f/, file));
    }
    else {
        exec = await run(editorcmd + " " + file);
    }
    if (exec.code != 0)
        return exec;
    return read(file);
}
async function read(file) {
    return sendNativeMsg("read", { file }).catch(e => {
        throw new Error(`Failed to read ${file}. ${e}`);
    });
}
async function write(file, content) {
    return sendNativeMsg("write", { file, content }).catch(e => {
        throw new Error(`Failed to write '${content}' to '${file}'. ${e}`);
    });
}
async function writerc(file, force, content) {
    return sendNativeMsg("writerc", { file, force, content }).catch(e => {
        throw new Error(`Failed to write '${content}' to '${file}'. ${e}`);
    });
}
async function mkdir(dir, exist_ok) {
    return sendNativeMsg("mkdir", { dir, exist_ok }).catch(e => {
        throw new Error(`Failed to create directory '${dir}'. ${e}`);
    });
}
async function temp(content, prefix) {
    return sendNativeMsg("temp", { content, prefix }).catch(e => {
        throw new Error(`Failed to write '${content}' to temp file '${prefix}'. ${e}`);
    });
}
async function move(from, to, overwrite, cleanup) {
    const requiredNativeMessengerVersion = "0.3.0";
    if ((await nativegate(requiredNativeMessengerVersion, false))) {
        return sendNativeMsg("move", { from, to, overwrite, cleanup }).catch(e => {
            throw new Error(`Failed to move '${from}' to '${to}'. ${e}.`);
        });
    }
    else {
        // older "saveas" scenario for native-messenger < 0.3.0
        return sendNativeMsg("move", { from, to }).catch(e => {
            throw new Error(`Failed to move '${from}' to '${to}'. ${e}.`);
        });
    }
}
async function listDir(dir) {
    return sendNativeMsg("list_dir", { path: dir }).catch(e => {
        throw new Error(`Failed to read directory '${dir}'. ${e}`);
    });
}
async function winFirefoxRestart(profiledir, browsercmd) {
    const required_version = "0.1.6";
    if (!(await nativegate(required_version, false))) {
        throw new Error(`'restart' on Windows needs native messenger version >= ${required_version}.`);
    }
    return sendNativeMsg("win_firefox_restart", { profiledir, browsercmd });
}
async function run(command, content = "") {
    const msg = await sendNativeMsg("run", { command, content });
    logger.info(msg);
    return msg;
}
async function runAsync(command) {
    const required_version = "0.3.1";
    if (!await nativegate(required_version, false)) {
        throw new Error(`runAsync needs native messenger version >= ${required_version}.`);
    }
    logger.info(await sendNativeMsg("run_async", { command }));
}
/** Evaluates a string in the native messenger. This has to be python code. If
 *  you want to run shell strings, use run() instead.
 *
 *  Only works for native messenger versions < 0.2.0.
 */
async function pyeval(command) {
    return sendNativeMsg("eval", { command });
}
async function getenv(variable) {
    const required_version = "0.1.2";
    if (!(await nativegate(required_version, false))) {
        throw new Error(`'getenv' needs native messenger version >= ${required_version}.`);
    }
    return (await sendNativeMsg("env", { var: variable })).content;
}
/** Calls an external program, to either set or get the content of the X selection.
 *  When setting the selection or if getting it failed, will return an empty string.
 **/
async function clipboard(action, str) {
    let clipcmd = await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("externalclipboardcmd");
    if (clipcmd === "auto")
        clipcmd = await firstinpath(["xsel", "xclip"]);
    if (clipcmd === undefined) {
        throw new Error("Couldn't find an external clipboard executable");
    }
    if (action === "get") {
        const result = await run(clipcmd + " -o");
        if (result.code !== 0) {
            throw new Error(`External command failed with code ${result.code}: ${clipcmd}`);
        }
        return result.content;
    }
    else if (action === "set") {
        const required_version = "0.1.7";
        if (await nativegate(required_version, false)) {
            const result = await run(`${clipcmd} -i`, str);
            if (result.code !== 0)
                throw new Error(`External command failed with code ${result.code}: ${clipcmd}`);
            return "";
        }
        else {
            // Fall back to hacky old fashioned way
            // We're going to pretend that we don't know about stdin, and we need to insert str, which we can't trust, into the clipcmd
            // In order to do this safely we'll use here documents:
            // http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07_04
            // Find a delimiter that isn't in str
            let heredoc = "TRIDACTYL";
            while (str.search(heredoc) !== -1)
                heredoc += Math.round(Math.random() * 10);
            // Use delimiter to insert str into clipcmd's stdin
            // We use sed to remove the newline added by the here document
            clipcmd = `sed -z 's/.$//' <<'${heredoc}' | ${clipcmd} -i \n${str}\n${heredoc}`;
            await run(clipcmd);
            return "";
        }
    }
    throw new Error("Unknown action!");
}
/**
 * This returns the commandline that was used to start Firefox.
 * You'll get both the binary (not necessarily an absolute path) and flags.
 */
async function ff_cmdline() {
    let output;
    if ((await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os === "win") {
        if (!(await nativegate("0.3.3", false))) {
            const browser_name = await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("browser");
            output = await run(`powershell -NoProfile -Command "\
$processes = Get-CimInstance -Property ProcessId,ParentProcessId,Name,CommandLine -ClassName Win32_Process;\
if (-not ($processes | where { $_.Name -match '^${browser_name}' })) { exit 1; };\
$ppid = ($processes | where { $_.ProcessId -EQ $PID }).ParentProcessId;\
$pproc = $processes | where { $_.ProcessId -EQ $ppid };\
while ($pproc.Name -notmatch '^${browser_name}') {\
    $ppid = $pproc.ParentProcessId;\
    $pproc = $processes | where { $_.ProcessId -EQ $ppid };\
};\
Write-Output $pproc.CommandLine;\
"`);
        }
        else {
            output = await run(`powershell -NoProfile -Command "\
Get-CimInstance -Property CommandLine,ProcessId -ClassName Win32_Process \
| where { $_.ProcessId -EQ ${(await sendNativeMsg("ppid", {})).content} } \
| select -ExpandProperty CommandLine | Write-Output\
"`);
        }
    }
    else {
        const actualVersion = await getNativeMessengerVersion();
        // Backwards-compat for Python native messenger
        if (semver_compare__WEBPACK_IMPORTED_MODULE_0__("0.2.0", actualVersion) > 0) {
            output = await pyeval(
            // Using ' and + rather than ` because we don't want newlines
            'handleMessage({"cmd": "run", ' +
                '"command": "ps -p " + str(os.getppid()) + " -oargs="})["content"]');
        }
        else {
            const ppid = (await sendNativeMsg("ppid", {})).content.trim();
            output = await run("ps -p " + ppid + " -oargs=");
        }
        output.content = output.content.replace("\n", "");
    }
    return output.content.trim().split(" ");
}
async function parseProfilesIni(content, basePath) {
    const lines = content.split("\n");
    let current = "General";
    const result = {};
    for (const line of lines) {
        let match = /^\[([^\]]+)\]$/.exec(line);
        if (match !== null) {
            current = match[1];
            result[current] = {};
        }
        else {
            match = /^([^=]+)=([^=]+)$/.exec(line);
            if (match !== null) {
                result[current][match[1]] = match[2];
            }
        }
    }
    for (const profileName of Object.keys(result)) {
        const profile = result[profileName];
        // New profiles.ini have a useless section at the top
        if (profile.Path == undefined) {
            delete result[profileName];
            continue;
        }
        // On windows, profiles.ini paths will be expressed with `/`, but we're
        // on windows, so we need `\`
        if ((await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os === "win") {
            profile.Path = profile.Path.replace("/", "\\");
        }
        // profile.IsRelative can be 0, 1 or undefined
        if (profile.IsRelative === "1") {
            profile.relativePath = profile.Path;
            profile.absolutePath = basePath + profile.relativePath;
        }
        else if (profile.IsRelative === "0") {
            if (profile.Path.substring(0, basePath.length) !== basePath) {
                throw new Error(`Error parsing profiles ini: basePath "${basePath}" doesn't match profile path ${profile.Path}`);
            }
            profile.relativePath = profile.Path.substring(basePath.length);
            profile.absolutePath = profile.Path;
        }
    }
    return result;
}
async function getFirefoxDir() {
    switch ((await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os) {
        case "win":
            return getenv("APPDATA").then(path => path + "\\Mozilla\\Firefox\\");
        case "mac":
            return getenv("HOME").then(path => path + "/Library/Application Support/Firefox/");
        default:
            return getenv("HOME").then(path => path + "/.mozilla/firefox/");
    }
}
async function getProfileUncached() {
    const ffDir = await getFirefoxDir();
    const iniPath = ffDir + "profiles.ini";
    let iniObject = {};
    let iniSucceeded = false;
    const iniContent = await read(iniPath);
    if (iniContent.code === 0 && iniContent.content.length > 0) {
        try {
            iniObject = await parseProfilesIni(iniContent.content, ffDir);
            iniSucceeded = true;
        }
        catch (e) { }
    }
    const curProfileDir = _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("profiledir");
    // First, try to see if the 'profiledir' setting matches a profile in profile.ini
    if (curProfileDir !== "auto") {
        if (iniSucceeded) {
            for (const profileName of Object.keys(iniObject)) {
                const profile = iniObject[profileName];
                if (profile.absolutePath === curProfileDir) {
                    return profile;
                }
            }
        }
        return {
            Name: undefined,
            IsRelative: "0",
            Path: curProfileDir,
            relativePath: undefined,
            absolutePath: curProfileDir,
        };
    }
    // Then, try to find a profile path in the arguments given to Firefox
    const cmdline = await ff_cmdline().catch(() => "");
    let profile = cmdline.indexOf("--profile");
    if (profile === -1)
        profile = cmdline.indexOf("-profile");
    if (profile >= 0 && profile < cmdline.length - 1) {
        const profilePath = cmdline[profile + 1];
        if (iniSucceeded) {
            for (const profileName of Object.keys(iniObject)) {
                const profile = iniObject[profileName];
                if (profile.absolutePath === profilePath) {
                    return profile;
                }
            }
        }
        // We're running in a profile that isn't stored in profiles.ini
        // Let's fill in the default info profile.ini profiles have anyway
        return {
            Name: undefined,
            IsRelative: "0",
            Path: profilePath,
            relativePath: undefined,
            absolutePath: profilePath,
        };
    }
    if (iniSucceeded) {
        // Try to find a profile name in firefox's arguments
        let p = cmdline.indexOf("-p");
        if (p === -1)
            p = cmdline.indexOf("-P");
        if (p >= 0 && p < cmdline.length - 1) {
            const pName = cmdline[p + 1];
            for (const profileName of Object.keys(iniObject)) {
                const profile = iniObject[profileName];
                if (profile.Name === pName) {
                    return profile;
                }
            }
            throw new Error(`native.ts:getProfile() : '${cmdline[p]}' found in command line arguments but no matching profile name found in "${iniPath}"`);
        }
    }
    // Still nothing, try to find a profile in use
    let hacky_profile_finder = `find "${ffDir}" -maxdepth 2 -name lock`;
    if ((await _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getPlatformInfo()).os === "mac")
        hacky_profile_finder = `find "${ffDir}" -maxdepth 2 -name .parentlock`;
    const profilecmd = await run(hacky_profile_finder);
    if (profilecmd.code === 0 && profilecmd.content.length !== 0) {
        // Remove trailing newline
        profilecmd.content = profilecmd.content.trim();
        // If there's only one profile in use, use that to find the right profile
        if (profilecmd.content.split("\n").length === 1) {
            const path = profilecmd.content.split("/").slice(0, -1).join("/");
            if (iniSucceeded) {
                for (const profileName of Object.keys(iniObject)) {
                    const profile = iniObject[profileName];
                    if (profile.absolutePath === path) {
                        return profile;
                    }
                }
            }
            return {
                Name: undefined,
                IsRelative: "0",
                Path: path,
                relativePath: undefined,
                absolutePath: path,
            };
        }
    }
    if (iniSucceeded) {
        // Multiple profiles used but no -p or --profile, this means that we're using the default profile
        for (const profileName of Object.keys(iniObject)) {
            const profile = iniObject[profileName];
            if (profile.Default === 1 || profile.Default === "1") {
                return profile;
            }
        }
    }
    throw new Error(`Couldn't deduce which profile you want. See ':help profiledir'`);
}
// Disk operations are extremely slow on windows, let's cache our profile info
let cachedProfile;
async function getProfile() {
    if (cachedProfile === undefined)
        cachedProfile = await getProfileUncached();
    return cachedProfile;
}
// It makes sense to pre-fetch this value in the background script because it's
// long-lived. Other contexts are created and destroyed all the time so we
// don't want to pre-fetch in these.
if ((0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.getContext)() === "background") {
    getProfile();
}
_src_lib_config__WEBPACK_IMPORTED_MODULE_1__.addChangeListener("profiledir", () => {
    cachedProfile = undefined;
    getProfile();
});
function getProfileName() {
    return getProfile().then(p => p.Name);
}
async function getProfileDir() {
    const profiledir = _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("profiledir");
    if (profiledir !== "auto")
        return Promise.resolve(profiledir);
    return getProfile().then(p => p.absolutePath);
}
function parsePrefs(prefFileContent) {
    //  This RegExp currently only deals with " but for correctness it should
    //  also deal with ' and `
    //  We could also just give up on parsing and eval() the whole thing
    const regex = new RegExp(/^(user_|sticky_|lock)?[pP]ref\("([^"]+)",\s*"?([^\)]+?)"?\);$/);
    // Fragile parsing
    return prefFileContent.split("\n").reduce((prefs, line) => {
        const matches = regex.exec(line);
        if (!matches) {
            return prefs;
        }
        const key = matches[2];
        let value = matches[3];
        // value = " means that it should be an empty string
        if (value === '"')
            value = "";
        prefs[key] = value;
        return prefs;
    }, {});
}
/** When given the name of a firefox preference file, will load said file and
 *  return a promise for an object the keys of which correspond to preference
 *  names and the values of which correspond to preference values.
 *  When the file couldn't be loaded or doesn't contain any preferences, will
 *  return a promise for an empty object.
 */
async function loadPrefs(filename) {
    const result = await read(filename);
    if (result.code !== 0)
        return {};
    return parsePrefs(result.content);
}
let cached_prefs = null;
/** Returns a promise for an object that should contain every about:config
 *  setting.
 *
 *  Performance is slow so we need to cache the results.
 */
async function getPrefs() {
    if (cached_prefs !== null)
        return cached_prefs;
    const profile = (await getProfileDir()) + "/";
    const prefFiles = [
        // Debian has these
        "/usr/share/firefox/browser/defaults/preferences/firefox.js",
        "/usr/share/firefox/browser/defaults/preferences/debugger.js",
        "/usr/share/firefox/browser/defaults/preferences/devtools-startup-prefs.js",
        "/usr/share/firefox/browser/defaults/preferences/devtools.js",
        "/usr/share/firefox/browser/defaults/preferences/firefox-branding.js",
        "/usr/share/firefox/browser/defaults/preferences/vendor.js",
        "/usr/share/firefox/browser/defaults/preferences/firefox.js",
        "/etc/firefox/firefox.js",
        // Pref files can be found here:
        // https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences
        profile + "grepref.js",
        profile + "services/common/services-common.js",
        profile + "defaults/pref/services-sync.js",
        profile + "browser/app/profile/channel-prefs.js",
        profile + "browser/app/profile/firefox.js",
        profile + "browser/app/profile/firefox-branding.js",
        profile + "browser/defaults/preferences/firefox-l10n.js",
        profile + "prefs.js",
        profile + "user.js",
    ];
    const promises = [];
    // Starting all promises before awaiting because we want the calls to be
    // made in parallel
    for (const file of prefFiles) {
        promises.push(loadPrefs(file));
    }
    cached_prefs = promises.reduce(async (a, b) => Object.assign(await a, await b));
    return cached_prefs;
}
/** Returns the value for the corresponding about:config setting */
async function getPref(name) {
    return (await getPrefs())[name];
}
/** Fetches a config option from the config. If the option is undefined, fetch
 *  a preference from preferences. It would make more sense for this function to
 *  be in config.ts but this would require importing this file in config.ts and
 *  Webpack doesn't like circular dependencies.
 */
async function getConfElsePref(confName, prefName) {
    let option = await _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.getAsyncDynamic(confName);
    if (option === undefined) {
        try {
            option = await getPref(prefName);
        }
        catch (e) { }
    }
    return option;
}
/** Fetches a config option from the config. If the option is undefined, fetch
 *  prefName from the preferences. If prefName is undefined too, return a
 *  default.
 */
async function getConfElsePrefElseDefault(confName, prefName, def) {
    const option = await getConfElsePref(confName, prefName);
    if (option === undefined)
        return def;
    return option;
}
/** Writes a preference to user.js */
async function writePref(name, value) {
    if (cached_prefs)
        cached_prefs[name] = value;
    const file = (await getProfileDir()) + "/user.js";
    // No need to check the return code because read returns "" when failing to
    // read a file
    const text = (await read(file)).content;
    const prefPos = text.indexOf(`pref("${name}",`);
    if (prefPos < 0) {
        write(file, `${text}\nuser_pref("${name}", ${value});\n`);
    }
    else {
        let substr = text.substring(prefPos);
        const prefEnd = substr.indexOf(";\n");
        substr = text.substring(prefPos, prefPos + prefEnd);
        write(file, text.replace(substr, `pref("${name}", ${value})`));
    }
}
/** Removes a preference from user.js */
async function removePref(name) {
    const file = (await getProfileDir()) + "/user.js";
    // No need to check the return code because read returns "" when failing to
    // read a file
    const text = (await read(file)).content;
    const prefPos = text.indexOf(`user_pref("${name}",`);
    if (prefPos >= 0) {
        let substr = text.substring(prefPos);
        const prefEnd = substr.indexOf(";\n") + 1;
        substr = text.substring(prefPos, prefPos + prefEnd);
        write(file, text.replace(substr, ``));
    }
}
/** Obey Mozilla's orders https://github.com/tridactyl/tridactyl/issues/1800 */
async function unfixamo() {
    try {
        if (localStorage.unfixedamo2 === "true") {
            // this version of unfixamo already ran for the tridactyl instance in this profile
            return;
        }
        const profile = (await getProfileDir()) + "/";
        const userjs = await loadPrefs(profile + "user.js");
        const tridactylPref = "tridactyl.unfixedamo";
        const tridactylPref2 = "tridactyl.unfixedamo_removed";
        const restricted = "extensions.webextensions.restrictedDomains";
        const amoblocker = "privacy.resistFingerprinting.block_mozAddonManager";
        const restrictedDomains = '"accounts-static.cdn.mozilla.net,accounts.firefox.com,addons.cdn.mozilla.net,addons.mozilla.org,api.accounts.firefox.com,content.cdn.mozilla.net,discovery.addons.mozilla.org,install.mozilla.org,oauth.accounts.firefox.com,profile.accounts.firefox.com,support.mozilla.org,sync.services.mozilla.com"';
        // Exit if we've already run this once
        if (userjs[tridactylPref2] === "true")
            return;
        if (userjs[restricted] === "" ||
            userjs[restricted] === restrictedDomains) {
            await removePref(tridactylPref); // Clean up after first attempt if it exists
            await removePref(restricted);
            await removePref(amoblocker);
            await writePref(tridactylPref2, "true");
            _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.tabs.create({
                url: _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.browserBg.runtime.getURL("static/unfixamo.html"),
            });
        }
        return;
    }
    catch (e) {
        // if an exception is thrown, this means that the native messenger
        // isn't installed
    }
    finally {
        // Note: we store unfixedamo in localStorage and not in config because
        //       users might clear their config with :sanitize
        localStorage.unfixedamo2 = "true";
    }
}


/***/ }),

/***/ "./src/lib/nearley_utils.ts":
/*!**********************************!*\
  !*** ./src/lib/nearley_utils.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Parser": () => (/* binding */ Parser)
/* harmony export */ });
/* harmony import */ var nearley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! nearley */ "./node_modules/nearley/lib/nearley.js");
/* harmony import */ var nearley__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nearley__WEBPACK_IMPORTED_MODULE_0__);

/** Friendlier interface around nearley parsers */
class Parser {
    /* public results */
    constructor(grammar) {
        this.parser = new nearley__WEBPACK_IMPORTED_MODULE_0__.Parser(nearley__WEBPACK_IMPORTED_MODULE_0__.Grammar.fromCompiled(grammar));
        this.initial_state = this.parser.save();
        /* this.results = this.parser.results */
    }
    feedUntilError(input) {
        let lastResult;
        let consumedIndex = 0;
        try {
            for (const val of input) {
                this.parser.feed(val);
                lastResult = this.parser.results[0];
                consumedIndex++;
            }
        }
        finally {
            this.reset();
            if (lastResult === undefined) {
                throw new Error("Error: no result!");
            }
            else {
                return [lastResult, input.slice(consumedIndex)];
            }
        }
    }
    reset() {
        this.parser.restore(this.initial_state);
    }
}


/***/ }),

/***/ "./src/lib/number.clamp.ts":
/*!*********************************!*\
  !*** ./src/lib/number.clamp.ts ***!
  \*********************************/
/***/ (() => {

/*
 * Clamp a number n between two values lo, hi
 * such that if n is in [lo, hi], we return n
 * otherwise if n < lo, return lo
 * else return hi.
 */
Number.prototype.clamp = function (lo, hi) {
    return Math.max(lo, Math.min(this, hi));
};


/***/ }),

/***/ "./src/lib/number.mod.ts":
/*!*******************************!*\
  !*** ./src/lib/number.mod.ts ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "knuth_mod": () => (/* binding */ knuth_mod),
/* harmony export */   "my_mod": () => (/* binding */ my_mod),
/* harmony export */   "euclid_mod": () => (/* binding */ euclid_mod)
/* harmony export */ });
/** Number theory-friendly modulo implementation

    If divisor is positive, return value will be too.
*/
Number.prototype.mod = function (n) {
    return knuth_mod(this, n);
};
/** Takes sign of divisor -- incl. returning -0 */
function knuth_mod(dividend, divisor) {
    return dividend - divisor * Math.floor(dividend / divisor);
}
/** Equivalent to knuth_mod but doesn't return -0 */
function my_mod(dividend, divisor) {
    return ((dividend % divisor) + divisor) % divisor;
}
/** Always gives a positive result.

    Equivalent to knuth_mod when divisor is +ve
    Equivalent to % when dividend is +ve
*/
function euclid_mod(dividend, divisor) {
    const abs_divisor = Math.abs(divisor);
    const quotient = Math.floor(dividend / abs_divisor);
    return dividend - abs_divisor * quotient;
}


/***/ }),

/***/ "./src/lib/patience.ts":
/*!*****************************!*\
  !*** ./src/lib/patience.ts ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "sleep": () => (/* binding */ sleep),
/* harmony export */   "backoff": () => (/* binding */ backoff)
/* harmony export */ });
// Borrowed from
// https://tech.mybuilder.com/handling-retries-and-back-off-attempts-with-javascript-promises/
const sleep = (duration) => new Promise(res => setTimeout(res, duration));
const backoff = (fn, retries = 5, delay = 50) => fn().catch(err => {
    retries > 1
        ? sleep(delay).then(() => backoff(fn, retries - 1, delay * 2))
        : Promise.reject(err);
});


/***/ }),

/***/ "./src/lib/platform.ts":
/*!*****************************!*\
  !*** ./src/lib/platform.ts ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getPlatformOs": () => (/* binding */ getPlatformOs)
/* harmony export */ });
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/keys.js");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/filter.js");

// Synchronous version of runtime.getPlatformInfo()
// Not as exhaustive as the real thing
// Will return undefined if it can't work it out
function getPlatformOs() {
    const platform = navigator.platform;
    const mapping = {
        "win": "Win",
        "openbsd": "BSD",
        "mac": "Mac",
        "linux": "Linux",
    };
    return ramda__WEBPACK_IMPORTED_MODULE_0__.default(ramda__WEBPACK_IMPORTED_MODULE_1__.default(x => platform.includes(x), mapping))[0];
}


/***/ }),

/***/ "./src/lib/url_util.ts":
/*!*****************************!*\
  !*** ./src/lib/url_util.ts ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "incrementUrl": () => (/* binding */ incrementUrl),
/* harmony export */   "getUrlRoot": () => (/* binding */ getUrlRoot),
/* harmony export */   "getUrlParent": () => (/* binding */ getUrlParent),
/* harmony export */   "getDownloadFilenameForUrl": () => (/* binding */ getDownloadFilenameForUrl),
/* harmony export */   "deleteQuery": () => (/* binding */ deleteQuery),
/* harmony export */   "setQueryValue": () => (/* binding */ setQueryValue),
/* harmony export */   "replaceQueryValue": () => (/* binding */ replaceQueryValue),
/* harmony export */   "graftUrlPath": () => (/* binding */ graftUrlPath),
/* harmony export */   "interpolateSearchItem": () => (/* binding */ interpolateSearchItem),
/* harmony export */   "getAbsoluteURL": () => (/* binding */ getAbsoluteURL)
/* harmony export */ });
/** URL handling utlity functions
 */
/** Increment the last number in a URL.
 *
 * (perhaps this could be made so you can select the "nth" number in a
 * URL rather than just the last one?)
 *
 * @param url       the URL to increment
 * @param count     increment step to advance by (can be negative)
 * @return          the incremented URL, or null if cannot be incremented
 */
function incrementUrl(url, count) {
    // Find the final number in a URL
    const matches = url.match(/(.*?)(\d+)(\D*)$/);
    // no number in URL - nothing to do here
    if (matches === null) {
        return null;
    }
    const [, pre, number, post] = matches;
    const newNumber = parseInt(number, 10) + count;
    let newNumberStr = String(newNumber > 0 ? newNumber : 0);
    // Re-pad numbers that were zero-padded to be the same length:
    // 0009 + 1 => 0010
    if (number.match(/^0/)) {
        while (newNumberStr.length < number.length) {
            newNumberStr = "0" + newNumberStr;
        }
    }
    return pre + newNumberStr + post;
}
/** Get the root of a URL
 *
 * @param url   the url to find the root of
 * @return      the root of the URL, or the original URL when the URL isn't
 *              suitable for finding the root of.
 */
function getUrlRoot(url) {
    // exclude these special protocols for now;
    if (/(about|mailto):/.test(url.protocol)) {
        return null;
    }
    // this works even for file:/// where the root is ""
    return new URL(url.protocol + "//" + (url.host || ""));
}
/** Get the parent of the current URL. Parent is determined as:
 *
 * * if there is a hash fragment, strip that, or
 * * If there is a query string, strip that, or
 * * Remove one level from the path if there is one, or
 * * Remove one subdomain from the front if there is one
 *
 * @param url               the URL to get the parent of
 * @param trailingSlash     whether the returned URL has a trailing slash
 * @param count             how many "generations" you wish to go back (1 = parent, 2 = grandparent, etc.)
 * @return                  the parent of the URL, or null if there is no parent
 */
function getUrlParent(url, trailingSlash, count = 1) {
    // Helper function.
    function gup(parent, trailingSlash, count) {
        if (count < 1) {
            // remove trailing slash(s) if desired
            if (!trailingSlash) {
                // remove 1 or more trailing slashes
                parent.pathname = parent.pathname.replace(/\/+$/, "");
            }
            return parent;
        }
        // strip, in turn, hash/fragment and query/search
        if (parent.hash) {
            parent.hash = "";
            return gup(parent, trailingSlash, count - 1);
        }
        if (parent.search) {
            parent.search = "";
            return gup(parent, trailingSlash, count - 1);
        }
        // empty path is '/'
        if (parent.pathname !== "/") {
            // Remove trailing slashes and everything to the next slash:
            parent.pathname = parent.pathname.replace(/\/[^\/]*?\/*$/, "/");
            return gup(parent, trailingSlash, count - 1);
        }
        // strip off the first subdomain if there is one
        {
            const domains = parent.host.split(".");
            // more than domain + TLD
            if (domains.length > 2) {
                // domains.pop()
                parent.host = domains.slice(1).join(".");
                return gup(parent, trailingSlash, count - 1);
            }
        }
        // nothing to trim off URL, so no parent
        return null;
    }
    // exclude these special protocols where parents don't really make sense
    if (/(about|mailto):/.test(url.protocol)) {
        return null;
    }
    const parent = new URL(url);
    return gup(parent, trailingSlash, count);
}
/** Very incomplete lookup of extension for common mime types that might be
 * encountered when saving elements on a page. There are NPM libs for this,
 * but this should cover 99% of basic cases
 *
 * @param mime  mime type to get extension for (eg 'image/png')
 *
 * @return an extension for that mimetype, or undefined if that type is not
 * supported
 */
function getExtensionForMimetype(mime) {
    const types = {
        "image/png": ".png",
        "image/jpeg": ".jpg",
        "image/gif": ".gif",
        "image/x-icon": ".ico",
        "image/svg+xml": ".svg",
        "image/tiff": ".tiff",
        "image/webp": ".webp",
        "text/plain": ".txt",
        "text/html": ".html",
        "text/css": ".css",
        "text/csv": ".csv",
        "text/calendar": ".ics",
        "application/octet-stream": ".bin",
        "application/javascript": ".js",
        "application/xhtml+xml": ".xhtml",
        "font/otf": ".otf",
        "font/woff": ".woff",
        "font/woff2": ".woff2",
        "font/ttf": ".ttf",
    };
    return types[mime] || "";
}
/** Get a suitable default filename for a given URL
 *
 * If the URL:
 *  - is a data URL, construct from the data and mimetype
 *  - has a path, use the last part of that (eg image.png, index.html)
 *  - otherwise, use the hostname of the URL
 *  - if that fails, "download"
 *
 * @param URL   the URL to make a filename for
 * @return      the filename according to the above rules
 */
function getDownloadFilenameForUrl(url) {
    // for a data URL, we have no really useful naming data intrinsic to the
    // data, so we construct one using the data and guessing an extension
    // from any mimetype
    if (url.protocol === "data:") {
        // data:[<mediatype>][;base64],<data>
        const [prefix, data] = url.pathname.split(",", 2);
        const [mediatype, b64] = prefix.split(";", 2);
        // take a 15-char prefix of the data as a reasonably unique name
        // sanitize in a very rough manner
        let filename = data
            .slice(0, 15)
            .replace(/[^a-zA-Z0-9_\-]/g, "_")
            .replace(/_{2,}/g, "_");
        // add a base64 prefix and the extension
        filename =
            (b64 ? b64 + "-" : "") +
                filename +
                getExtensionForMimetype(mediatype);
        return filename;
    }
    // if there's a useful path, use that directly
    if (url.pathname !== "/") {
        const paths = url.pathname.split("/").slice(1);
        // pop off empty pat bh tails
        // e.g. https://www.mozilla.org/en-GB/firefox/new/
        while (paths.length && !paths[paths.length - 1]) {
            paths.pop();
        }
        if (paths.length) {
            return paths.slice(-1)[0];
        }
    }
    // if there's no path, use the domain (otherwise the FF-provided
    // default is just "download"
    return url.hostname || "download";
}
/**
 * Get an Array of the queries in a URL.
 *
 * These could be like "query" or "query=val"
 */
function getUrlQueries(url) {
    let qys = [];
    if (url.search) {
        // get each query separately, leave the "?" off
        qys = url.search.slice(1).split("&");
    }
    return qys;
}
/**
 * Update a URL with a new array of queries
 */
function setUrlQueries(url, qys) {
    url.search = "";
    if (qys.length) {
        // rebuild string with the filtered list
        url.search = "?" + qys.join("&");
    }
}
/**
 * Delete a query (and its value) in a URL
 *
 * If a query appears multiple times (which is a bit odd),
 * all instances are removed
 *
 * @param url           the URL to act on
 * @param query         the query to delete
 *
 * @return              the modified URL
 */
function deleteQuery(url, matchQuery) {
    const newUrl = new URL(url.href);
    const qys = getUrlQueries(url);
    const new_qys = qys.filter(q => q.split("=")[0] !== matchQuery);
    setUrlQueries(newUrl, new_qys);
    return newUrl;
}
/**
 * Sets the value of a query in a URL with a specific one
 *
 * @param url           the URL to act on
 * @param matchQuery    the query key to set the value for
 * @param value         the value to use
 */
function setQueryValue(url, matchQuery, value) {
    const newUrl = new URL(url.href);
    // get each query separately, leave the "?" off
    const qys = getUrlQueries(url);
    // if the query exists just replace it
    if (qys.map(q => q.split("=")[0]).includes(matchQuery)) {
        return replaceQueryValue(url, matchQuery, value);
    }
    // the query does not exist so add it
    qys.push(matchQuery + "=" + value);
    setUrlQueries(newUrl, qys);
    return newUrl;
}
/**
 * Replace the value of a query in a URL with a new one
 *
 * @param url           the URL to act on
 * @param matchQuery    the query key to replace the value for
 * @param newVal        the new value to use
 */
function replaceQueryValue(url, matchQuery, newVal) {
    const newUrl = new URL(url.href);
    // get each query separately, leave the "?" off
    const qys = getUrlQueries(url);
    const new_qys = qys.map(q => {
        const [key] = q.split("=");
        // found a matching query key
        if (q.split("=")[0] === matchQuery) {
            // return key=val or key as needed
            if (newVal) {
                return key + "=" + newVal;
            }
            else {
                return key;
            }
        }
        // don't touch it
        return q;
    });
    setUrlQueries(newUrl, new_qys);
    return newUrl;
}
/**
 * Graft a new path onto some parent of the current URL
 *
 * E.g. grafting "by-name/foobar" onto the 2nd parent path:
 *      example.com/items/by-id/42 -> example.com/items/by-name/foobar
 *
 * @param url       the URL to modify
 * @param newTail   the new "grafted" URL path tail
 * @param level     the graft point in terms of path levels
 *                      >= 0: start at / and count right
 *                      <0: start at the current path and count left
 */
function graftUrlPath(url, newTail, level) {
    const newUrl = new URL(url.href);
    // path parts, ignore first /
    const pathParts = url.pathname.split("/").splice(1);
    // more levels than we can handle
    // (remember, if level <0, we start at -1)
    if ((level >= 0 && level > pathParts.length) ||
        (level < 0 && -level - 1 > pathParts.length)) {
        return null;
    }
    const graftPoint = level >= 0 ? level : pathParts.length + level + 1;
    // lop off parts after the graft point
    pathParts.splice(graftPoint, pathParts.length - graftPoint);
    // extend part array with new parts
    pathParts.push(...newTail.split("/"));
    newUrl.pathname = pathParts.join("/");
    return newUrl;
}
/**
 * Interpolates a query or other search item into a URL
 *
 * If the URL pattern contains "%s", the query is interpolated there. If not,
 * it is appended to the end of the pattern.
 *
 * If the interpolation point is in the query string of the URL, it is
 * percent encoded, otherwise it is is inserted verbatim.
 *
 * @param urlPattern        a URL to interpolate/append a query to
 * @param query             a query to interpolate/append into the URL
 *
 * @return                  the URL with the query encoded (if needed) and
 *                          inserted at the relevant point
 */
function interpolateSearchItem(urlPattern, query) {
    const hasInterpolationPoint = urlPattern.href.includes("%s");
    let queryWords = query.split(" ");
    // percent-encode if theres a %s in the query string, or if we're apppending
    // and there's a query string
    if ((hasInterpolationPoint && urlPattern.search.includes("%s")) ||
        urlPattern.search !== "") {
        query = encodeURIComponent(query);
        queryWords = queryWords.map(w => encodeURIComponent(w));
    }
    // replace or append as needed
    if (hasInterpolationPoint) {
        const resultingURL = new URL(urlPattern.href.replace(/%s\d+/g, function (x) {
            const index = parseInt(x.slice(2), 10) - 1;
            if (index >= queryWords.length) {
                return "";
            }
            return queryWords[index];
        }));
        return new URL(resultingURL.href.replace("%s", query));
    }
    else {
        return new URL(urlPattern.href + query);
    }
}
/**
 * @param url May be either an absolute or a relative URL.
 * @param baseURI The URL the absolute URL should be relative to. This is
 * usually the URL of the current page.
 */
function getAbsoluteURL(url, baseURI = document.baseURI) {
    // We can choose between using complicated RegEx and string manipulation,
    // or just letting the browser do it for us. The latter is probably safer,
    // which should make it worth the (small) overhead of constructing an URL
    // just for this.
    return new URL(url, baseURI).href;
}


/***/ }),

/***/ "./src/lib/webext.ts":
/*!***************************!*\
  !*** ./src/lib/webext.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "inContentScript": () => (/* binding */ inContentScript),
/* harmony export */   "getTriVersion": () => (/* binding */ getTriVersion),
/* harmony export */   "getPrettyTriVersion": () => (/* binding */ getPrettyTriVersion),
/* harmony export */   "notBackground": () => (/* binding */ notBackground),
/* harmony export */   "getContext": () => (/* binding */ getContext),
/* harmony export */   "browserBg": () => (/* binding */ browserBg),
/* harmony export */   "activeTab": () => (/* binding */ activeTab),
/* harmony export */   "activeTabId": () => (/* binding */ activeTabId),
/* harmony export */   "activeTabContainerId": () => (/* binding */ activeTabContainerId),
/* harmony export */   "ownTab": () => (/* binding */ ownTab),
/* harmony export */   "ownTabId": () => (/* binding */ ownTabId),
/* harmony export */   "ownWinTriIndex": () => (/* binding */ ownWinTriIndex),
/* harmony export */   "getWinIdFromIndex": () => (/* binding */ getWinIdFromIndex),
/* harmony export */   "ownTabContainer": () => (/* binding */ ownTabContainer),
/* harmony export */   "activeTabContainer": () => (/* binding */ activeTabContainer),
/* harmony export */   "firefoxVersionAtLeast": () => (/* binding */ firefoxVersionAtLeast),
/* harmony export */   "openInNewTab": () => (/* binding */ openInNewTab),
/* harmony export */   "openInNewWindow": () => (/* binding */ openInNewWindow),
/* harmony export */   "queryAndURLwrangler": () => (/* binding */ queryAndURLwrangler),
/* harmony export */   "openInTab": () => (/* binding */ openInTab)
/* harmony export */ });
/* harmony import */ var _src_lib_convert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/convert */ "./src/lib/convert.ts");
/* harmony import */ var _src_lib_browser_proxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/browser_proxy */ "./src/lib/browser_proxy.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_url_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/url_util */ "./src/lib/url_util.ts");
/* harmony import */ var _src_lib_patience__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @src/lib/patience */ "./src/lib/patience.ts");





function inContentScript() {
    return getContext() === "content";
}
function getTriVersion() {
    const manifest = browser.runtime.getManifest();
    return manifest.version_name;
}
function getPrettyTriVersion() {
    const manifest = browser.runtime.getManifest();
    return manifest.name + " " + getTriVersion();
}
function notBackground() {
    return getContext() !== "background";
}
/** WebExt code can be run from three contexts:

    Content script
    Extension page
    Background page
*/
function getContext() {
    if (!browser.tabs) {
        return "content";
    }
    else if (browser.runtime.getURL("_generated_background_page.html") ===
        window.location.href) {
        return "background";
    }
    else {
        return "extension";
    }
}
// Make this library work for both content and background.
const browserBg = inContentScript() ? _src_lib_browser_proxy__WEBPACK_IMPORTED_MODULE_1__.default : browser;
/** The first active tab in the currentWindow.
 *
 * TODO: Highlander theory: Can there ever be more than one?
 *
 */
async function activeTab() {
    return (await browserBg.tabs.query({
        active: true,
        currentWindow: true,
    }))[0];
}
async function activeTabId() {
    return (await activeTab()).id;
}
async function activeTabContainerId() {
    return (await activeTab()).cookieStoreId;
}
async function ownTab() {
    // Warning: this relies on the owntab_background listener being set in messaging.ts in order to work
    return browser.runtime.sendMessage({ type: "owntab_background" });
}
async function ownTabId() {
    return (await ownTab()).id;
}
async function windows() {
    return (await browserBg.windows.getAll())
        .map(w => w.id)
        .sort((a, b) => a - b);
}
/* Returns Tridactyl's window index. */
async function ownWinTriIndex() {
    return (await windows()).indexOf((await ownTab()).windowId);
}
/* Returns mozilla's internal window id from Tridactyl's index. */
async function getWinIdFromIndex(index) {
    return (await windows())[index];
}
async function ownTabContainer() {
    return browserBg.contextualIdentities.get((await ownTab()).cookieStoreId);
}
async function activeTabContainer() {
    const containerId = await activeTabContainerId();
    if (containerId !== "firefox-default")
        return browserBg.contextualIdentities.get(containerId);
    else
        throw new Error("firefox-default is not a valid contextualIdentity (activeTabContainer)");
}
/** Compare major firefox versions */
async function firefoxVersionAtLeast(desiredmajor) {
    const versionstr = (await browserBg.runtime.getBrowserInfo()).version;
    const actualmajor = _src_lib_convert__WEBPACK_IMPORTED_MODULE_0__.toNumber(versionstr.split(".")[0]);
    return actualmajor >= desiredmajor;
}
/** Simpler tabs.create option.

    If related = true && relatedopenpos = 'related' then open a new tab with
    some URL as if that URL had been middle clicked on the current tab. If
    relatedopenpos = 'next', open it as the next tab. If 'last', open it last
    and don't tell Firefox who opened it.

    Similarly for tabopenpos, but only tell FF that the newtab is related to
    the activeTab if tabopenpos == 'related'.

    i.e. place that tab just after the current tab and set openerTabId
*/
async function openInNewTab(url, kwargs = {
    active: true,
    related: false,
    cookieStoreId: undefined,
}, waitForDOM = false) {
    const thisTab = await activeTab();
    const options = {
        active: false,
        url,
        cookieStoreId: kwargs.cookieStoreId,
    };
    // Be nice to behrmann, #342
    let pos;
    if (kwargs.related)
        pos = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("relatedopenpos");
    else
        pos = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("tabopenpos");
    switch (pos) {
        case "next":
            options.index = thisTab.index + 1;
            if (kwargs.related && (await firefoxVersionAtLeast(57)))
                options.openerTabId = thisTab.id;
            break;
        case "last":
            // Infinity can't be serialised, apparently.
            options.index = (await browserBg.tabs.query({
                currentWindow: true,
            })).length;
            break;
        case "related":
            if (await firefoxVersionAtLeast(57)) {
                options.openerTabId = thisTab.id;
            }
            else {
                options.index = thisTab.index + 1;
            }
            break;
    }
    const tabCreateWrapper = async (options) => {
        const tab = await browserBg.tabs.create(options);
        const answer = new Promise(resolve => {
            // This can't run in content scripts, obviously
            // surely we never call this from a content script?
            if (waitForDOM) {
                const listener = (message, sender) => {
                    var _a;
                    if (message === "dom_loaded_background" &&
                        ((_a = sender === null || sender === void 0 ? void 0 : sender.tab) === null || _a === void 0 ? void 0 : _a.id) === tab.id) {
                        browserBg.runtime.onMessage.removeListener(listener);
                        resolve(tab);
                    }
                };
                browserBg.runtime.onMessage.addListener(listener);
            }
            else {
                resolve(tab);
            }
        });
        // Return on slow- / extremely quick- loading pages anyway
        return Promise.race([
            answer,
            (async () => {
                await (0,_src_lib_patience__WEBPACK_IMPORTED_MODULE_4__.sleep)(750);
                return tab;
            })(),
        ]);
    };
    if (kwargs.active === false) {
        // load in background
        return tabCreateWrapper(options);
    }
    else {
        // load in background and then activate, per issue #1993
        return tabCreateWrapper(options).then(newtab => browserBg.tabs.update(newtab.id, { active: true }));
    }
}
// lazily copied from excmds.ts' winopen - forceURI really ought to be moved to lib/webext
// Should consider changing interface of this to match openInNewTab or vice versa
function openInNewWindow(createData = {}) {
    browserBg.windows.create(createData);
}
// Returns object if we should use the search engine instead
async function queryAndURLwrangler(query) {
    let address = query.join(" ");
    if (address === "") {
        address = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("newtab");
    }
    // Special ritual for about:newtab: we can access it but only if we don't ask for it
    if (address === "about:newtab") {
        return undefined;
    }
    const index = address.indexOf(" ");
    let firstWord = address;
    if (index > -1)
        firstWord = address.substr(0, index);
    if (firstWord === "") {
        // No query, no newtab set, the user is asking for Tridactyl's newtab page, which we deal with in :tabopen / :open directly
        return undefined;
    }
    // Perhaps the user typed a URL?
    if (/^[a-zA-Z0-9+.-]+:[^\s:]/.test(address)) {
        try {
            return new URL(address).href;
        }
        catch (e) {
            // Not a problem, we'll treat address as a regular search query
        }
    }
    // `+ 1` because we want to get rid of the space
    const rest = address.substr(firstWord.length + 1);
    const searchurls = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("searchurls");
    if (searchurls[firstWord]) {
        const url = _src_lib_url_util__WEBPACK_IMPORTED_MODULE_3__.interpolateSearchItem(new URL(searchurls[firstWord]), rest);
        // firstWord is a searchurl, so let's use that
        return url.href;
    }
    const searchEngines = await browserBg.search.get();
    let engine = searchEngines.find(engine => engine.alias === firstWord);
    // Maybe firstWord is the name of a firefox search engine?
    if (engine !== undefined) {
        return { engine: engine.name, query: rest };
    }
    // Maybe it's a domain without protocol
    try {
        const url = new URL("http://" + address);
        // Ignore unlikely domains
        if (url.hostname.indexOf(".") > 0 || url.port || url.password) {
            return url.href;
        }
    }
    catch (e) { }
    // Let's default to the user's search engine then
    // if firstWord is "search", remove it from the query.
    // This allows users to search for a URL or a word they defined as searchurl
    let queryString = address;
    if (firstWord === "search") {
        queryString = rest;
    }
    const enginename = _src_lib_config__WEBPACK_IMPORTED_MODULE_2__.get("searchengine");
    // firstWord is neither a searchurl nor a search engine, let's see if a search engine has been defined in Tridactyl
    if (enginename) {
        if (searchurls[enginename]) {
            const url = _src_lib_url_util__WEBPACK_IMPORTED_MODULE_3__.interpolateSearchItem(new URL(searchurls[enginename]), queryString);
            return url.href;
        }
        engine = searchEngines.find(engine => engine.alias === enginename);
        if (engine !== undefined) {
            return { engine: engine.name, query: queryString };
        }
    }
    // No search engine has been defined in Tridactyl, let's use firefox's default search engine
    return { query: queryString };
}
async function openInTab(tab, opts = {}, strarr) {
    const maybeURL = await queryAndURLwrangler(strarr);
    if (typeof maybeURL === "string") {
        return browserBg.tabs.update(tab.id, Object.assign({ url: maybeURL }, opts));
    }
    if (typeof maybeURL === "object") {
        return browserBg.search.search(Object.assign({ tabId: tab.id }, maybeURL));
    }
    // Fall back to our new tab page
    return browserBg.tabs.update(tab.id, Object.assign({ url: "/static/newtab.html" }, opts));
}


/***/ }),

/***/ "./src/parsers/genericmode.ts":
/*!************************************!*\
  !*** ./src/parsers/genericmode.ts ***!
  \************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "parser": () => (/* binding */ parser)
/* harmony export */ });
/* harmony import */ var _src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/keyseq */ "./src/lib/keyseq.ts");
/** Tridactyl helper mode */

function parser(conf, keys) {
    const maps = _src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__.keyMap(conf);
    _src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__.translateKeysInPlace(keys, conf);
    return _src_lib_keyseq__WEBPACK_IMPORTED_MODULE_0__.parse(keys, maps);
}


/***/ }),

/***/ "./src/perf.ts":
/*!*********************!*\
  !*** ./src/perf.ts ***!
  \*********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "measured": () => (/* binding */ measured),
/* harmony export */   "measuredAsync": () => (/* binding */ measuredAsync),
/* harmony export */   "Marker": () => (/* binding */ Marker),
/* harmony export */   "listenForCounters": () => (/* binding */ listenForCounters),
/* harmony export */   "StatsLogger": () => (/* binding */ StatsLogger),
/* harmony export */   "renderStatsHistogram": () => (/* binding */ renderStatsHistogram),
/* harmony export */   "StatsFilter": () => (/* binding */ StatsFilter)
/* harmony export */ });
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_lib_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/config */ "./src/lib/config.ts");
/* harmony import */ var _src_lib_math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/math */ "./src/lib/math.ts");
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");
/**
 * Library used for measuring performance. The basic steps are as follows:
 *
 * 1. Set up a persistent StatsLogger object to store samples.
 * 2. Invoke listenForCounters with the StatsLogger to start logging
 *    performance counters to the stats logger.
 * 3. If you have other scripts (content, iframes, web workers, etc),
 *    set up to receive stats from those other sources:
 *    * Set the stats logger up with an attributeCaller receiving messages as
 *      "performance_background".
 *    * For each other context, invoke listenForCounters without arguments and
 *      hold on to the resulting object.
 * 4. Instrument methods using the @measured or @measuredAsync
 *    decorators (for class methods) or by using Marker objects in
 *    your functions.
 * 5. Collect data!
 * 6. Use getEntries to retrieve data from the statsLogger.
 */




const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_3__.Logger("performance");
/**
 * Decorator for performance measuring. If performance is enabled,
 * wraps the function call with performance marks and a measure that
 * can be used for profiling. The mark's ownerName will be the name of
 * the containing class and the functionName will be the name of the
 * function. For example:
 *
 * class Foo {
 *   @Perf.measured
 *   function doFoos() { stuff() }
 * }
 *
 * These counters can be obtained using listenForCounters and a
 * StatsLogger.
 *
 */
function measured(cls, propertyKey, descriptor) {
    if (!performanceApiAvailable())
        return;
    const originalMethod = descriptor.value;
    descriptor.value = function (...args) {
        const marker = new Marker(cls.constructor.name, propertyKey).start();
        const result = originalMethod.apply(this, args);
        marker.end();
        return result;
    };
    return descriptor;
}
/**
 * Like the @measured decorator, but properly handles async functions
 * by chaining a resolution onto the promise that marks completion
 * when the function resolves its promise.
 */
function measuredAsync(cls, propertyKey, descriptor) {
    if (!performanceApiAvailable())
        return;
    const originalMethod = descriptor.value;
    descriptor.value = async function (...args) {
        const marker = new Marker(cls.constructor.name, propertyKey).start();
        const result = await originalMethod.apply(this, args);
        marker.end();
        return result;
    };
    return descriptor;
}
/**
 * Convenience object for collecting timing information. Create it and
 * call start() to create a mark entry for the start of the duration
 * to measure. Later, call end() to create a mark entry for the end of
 * the duration and a measure entry for the duration from the start
 * mark to the end mark. Marks are given a unique identifier to ensure
 * that async, multi-threaded, or reentrant code doesn't have collisions.
 *
 * WARNING! Will SILENTLY DEACTIVATE ITSELF if the "perfcounters"
 * config option is not set to "true"! This is done to minimize the
 * performance overhead of instrumentation when performance counters
 * are turned off.
 *
 * The ownerName and functionName are encoded into the name of the
 * performance entry in a way that allows entries to be retrieved
 * using StatsFilters.
 *
 */
class Marker {
    constructor(ownerName, functionName, active = performanceApiAvailable() &&
        _src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("perfcounters") === "true", metricName = new MetricName(ownerName, functionName)) {
        this.active = active;
        this.metricName = metricName;
    }
    start() {
        if (!this.active)
            return this;
        logger.debug("Marking startpoint of performance counter for %o", this.metricName);
        performance.mark(this.metricName.startName);
        return this;
    }
    end() {
        if (!this.active)
            return this;
        logger.debug("Marking endpoint of performance counter for %o", this.metricName);
        performance.mark(this.metricName.endName);
        performance.measure(this.metricName.fullName, this.metricName.startName, this.metricName.endName);
        return this;
    }
}
/**
 * Start listening for performance counters. Note that you _must_
 * attach the returned PerformanceObserver to some long-lived object
 * like the window; there's some kind of bug that causes
 * PerformanceObservers to be incorrectly garbage-collected even if
 * they're still attached and observing.
 *
 * @param statsLogger If given, stats will be logged directly to the
 * given stats logger. If absent, stats will be sent to the
 * performance_background receiver using messaging.
 */
function listenForCounters(statsLogger) {
    let callback;
    if (statsLogger === undefined) {
        callback = (list) => {
            sendStats(list.getEntries());
        };
    }
    else {
        callback = (list) => {
            statsLogger.pushList(list.getEntries());
        };
    }
    const perfObserver = new PerformanceObserver(callback);
    perfObserver.observe({ entryTypes: ["mark", "measure"] });
    return perfObserver;
}
/**
 * Stores a bounded-size buffer of performance entries and provides
 * convenience functions for accessing subsets of the buffer. Very
 * simple circular buffer.
 */
class StatsLogger {
    constructor() {
        // TODO: Consider mapping each name to a symbol and storing the
        // mapped symbol instead of the name so we're storing more like 50
        // bytes per sample instead of 130 @_@
        this.buffer = [];
        this.idx = 0;
        this.buffersize = 10000;
        this.lastError = 0;
    }
    /**
     * Target for receiving stats entries from other threads - there
     * was some issue with encoding that I couldn't figure out so I
     * just kludged it.
     */
    receiveStatsJson(entriesJson) {
        this.pushList(JSON.parse(entriesJson));
    }
    /**
     * Ingests the given performance entries into the buffer.
     */
    pushList(entries) {
        for (const entry of entries) {
            this.pushEntry(entry);
        }
    }
    /**
     * Returns only entries that match _all_ of the given filter
     * configs.
     */
    getEntries(...filterConfigs) {
        // Explicit stream fusion, wheeeee.
        //
        // Well, sort of. We're not fusing all the way up to the regex
        // match, so that's a ton of duplicated work. Not that it
        // matters, since this should only ever be invoked when a
        // developer asks for data.
        const filters = filterConfigs.map(fc => new StatsFilter(fc));
        const filterFun = e => filters.every(f => f.matches(e));
        return this.buffer.filter(filterFun);
    }
    updateBuffersize() {
        // Changing the buffer length while this is running will
        // probably result in weirdness, but that shouldn't be a major
        // issue - it's not like we need these to be in order or
        // otherwise coherent, we're just trying to store a big pile
        // of recent-ish samples.
        const perfsamples = Number(_src_lib_config__WEBPACK_IMPORTED_MODULE_1__.get("perfsamples"));
        // Check for NaN or non-integer
        if (Number.isInteger(perfsamples)) {
            this.buffersize = perfsamples;
        }
        else {
            // This function could be called a hundred times a second
            // and would error out every single time if someone has
            // given an invalid config, so rate-limit the error log -
            // one every five seconds.
            if (performance.now() - this.lastError > 5000) {
                this.lastError = performance.now();
                logger.error("perfsamples must be an integer, is %O", perfsamples);
            }
        }
    }
    pushEntry(entry) {
        logger.debug("Pushing performance entry %o into performance counters", entry);
        // Drop samples that aren't for tridactyl, since performance
        // events are global and there are some badly-behaved
        // libraries spamming them all over our own data.
        if (!entry.name.startsWith(TRI_PERFORMANCE_NAME_PREFIX))
            return;
        // We depend on arrays auto-vivifying when elements past the
        // end are set to make this easy.
        this.buffer[this.idx] = entry;
        this.incrementIdx();
    }
    incrementIdx() {
        this.idx = (this.idx + 1) % this.buffersize;
    }
}
/**
 * Pretty-prints a pile of performance samples of type measure (others
 * won't work because they have duration zero or undefined) as a
 * horizontal ASCII histogram. Useful if you just want basic
 * statistics about performance and don't want to spend a bunch of
 * time mucking about in python or julia.
 *
 * A very small example of what you'll get:
 *
 *   0     ####
 *   125   ##########
 *   250   ###############
 *   375   ######
 *   500   ##
 *
 * @param samples A set of samples to plot.
 * @param buckets The number of bins to divide the samples into.
 * @param width The width of the chart.
 */
function renderStatsHistogram(samples, buckets = 15, width = 80) {
    const durs = samples.map(sample => sample.duration);
    const min = durs.reduce((a, b) => Math.min(a, b));
    const max = durs.reduce((a, b) => Math.max(a, b));
    const bucketvals = _src_lib_math__WEBPACK_IMPORTED_MODULE_2__.linspace(min, max, buckets);
    const bucketed = _src_lib_math__WEBPACK_IMPORTED_MODULE_2__.bucketize(durs, bucketvals);
    const maxcount = Array.from(bucketed.values()).reduce((a, b) => Math.max(a, b), 0);
    const labelwidth = 20;
    const barwidth = width - labelwidth;
    const tobarwidth = n => (barwidth * n) / maxcount;
    const result = [];
    for (const [bucketval, bucketcount] of bucketed.entries()) {
        const bar = "#".repeat(tobarwidth(bucketcount));
        const label = bucketval.toString().padEnd(labelwidth);
        result.push(label + bar);
    }
    return result.join("\n");
}
/**
 * Implements filtering of performance entries using the
 * StatsFilterConfig. Exposed so users of the library can do more
 * filtering themselves if they want to.
 */
class StatsFilter {
    constructor(config) {
        this.config = config;
    }
    matches(entry) {
        const metricNameInfo = extractMetricName(entry.name);
        if (this.config.kind === "functionName" &&
            this.config.functionName !== metricNameInfo.functionName) {
            return false;
        }
        if (this.config.kind === "ownerName" &&
            this.config.ownerName !== metricNameInfo.ownerName) {
            return false;
        }
        if (this.config.kind === "eventType" &&
            this.config.eventType !== entry.entryType) {
            return false;
        }
        return true;
    }
}
const TRI_PERFORMANCE_NAME_PREFIX = "tri";
function performanceApiAvailable() {
    return performance.mark !== undefined;
}
const extractRegExp = new RegExp(`^${TRI_PERFORMANCE_NAME_PREFIX}` +
    // owner name
    `/([^/]+)` +
    // function name
    `/([^:]+)` +
    // unique suffix
    `:([^:]+)`);
function extractMetricName(counterName) {
    const matchresult = extractRegExp.exec(counterName);
    if (!matchresult)
        return;
    const [ownerName, functionName, uniqueSuffix] = matchresult.slice(1);
    return {
        ownerName,
        functionName,
        uniqueSuffix,
    };
}
class MetricName {
    constructor(ownerName, functionName) {
        const uniqueSuffix = Math.floor(Math.random() * Math.floor(1e6)).toString();
        this.fullName = `${TRI_PERFORMANCE_NAME_PREFIX}/${ownerName}/${functionName}:${uniqueSuffix}`;
        this.startName = `${this.fullName}:start`;
        this.endName = `${this.fullName}:end`;
    }
}
function sendStats(list) {
    _src_lib_messaging__WEBPACK_IMPORTED_MODULE_0__.message("performance_background", "receiveStatsJson", JSON.stringify(list));
}


/***/ }),

/***/ "./src/state.ts":
/*!**********************!*\
  !*** ./src/state.ts ***!
  \**********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getAsync": () => (/* binding */ getAsync),
/* harmony export */   "default": () => (/* binding */ state)
/* harmony export */ });
/* harmony import */ var _src_lib_logging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @src/lib/logging */ "./src/lib/logging.ts");
/* harmony import */ var _src_lib_messaging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @src/lib/messaging */ "./src/lib/messaging.ts");
/* harmony import */ var _src_lib_webext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @src/lib/webext */ "./src/lib/webext.ts");
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/pick.js");
/**
 * Tridactyl shared state
 *
 * __NB__: Here be dragons.
 *
 * In the background script, "state" can be used as a normal object. Just "import state from "@src/state"
 *
 * In the content scripts, "state" can be set as a normal object and changes will propagate to the background script.
 *
 * In the content scripts, "state" must be read using "import * as State from "@src/state" and "State.getAsync(property)". If you read it directly with `state` you should get an error at runtime. Certain methods like `concat` will not throw an error but their behaviour is not defined and should be avoided.
 */




const logger = new _src_lib_logging__WEBPACK_IMPORTED_MODULE_0__.default("state");
class State {
    constructor() {
        this.lastSearchQuery = undefined;
        this.cmdHistory = [];
        this.prevInputs = [
            {
                inputId: undefined,
                tab: undefined,
                jumppos: undefined,
            },
        ];
        this.last_ex_str = "echo";
    }
}
// Store these keys in the local browser storage to persist between restarts
const PERSISTENT_KEYS = ["cmdHistory"];
// Don't change these from const or you risk breaking the Proxy below.
const defaults = Object.freeze(new State());
const overlay = {};
browser.storage.local
    .get("state")
    .then(res => {
    if ("state" in res) {
        logger.debug("Loaded initial state:", res.state);
        Object.assign(overlay, res.state);
    }
})
    .catch((...args) => logger.error(...args));
const state = new Proxy(overlay, {
    /** Give defaults if overlay doesn't have the key */
    get(target, property) {
        if ((0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.notBackground)())
            throw new Error("State object must be accessed with getAsync in content");
        if (property in target) {
            return target[property];
        }
        else {
            return defaults[property];
        }
    },
    set(target, property, value) {
        logger.debug("State changed!", property, value);
        if ((0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.notBackground)()) {
            browser.runtime.sendMessage({
                type: "state",
                command: "stateUpdate",
                args: { property, value },
            });
            return true;
        }
        // Do we need a global storage lock?
        target[property] = value;
        // Persist "sets" to storage in the background for some keys
        if (PERSISTENT_KEYS.includes(property)) {
            // Ensure we don't accidentally store anything sensitive
            if (browser.extension.inIncognitoContext) {
                console.error("Attempted to write to storage in private window.");
                return false;
            }
            browser.storage.local.set({
                state: ramda__WEBPACK_IMPORTED_MODULE_3__.default(PERSISTENT_KEYS, target),
            });
        }
        return true;
    },
});
async function getAsync(property) {
    if ((0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.notBackground)())
        return browser.runtime.sendMessage({
            type: "state",
            command: "stateGet",
            args: [{ prop: property }],
        });
    else
        return state[property];
}
// Skip this in mock testing - the mock doesn't like notBackground
// Keep instances of state.ts synchronised with each other
_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.notBackground &&
    !(0,_src_lib_webext__WEBPACK_IMPORTED_MODULE_2__.notBackground)() &&
    _src_lib_messaging__WEBPACK_IMPORTED_MODULE_1__.addListener("state", (message, sender, sendResponse) => {
        if (message.command == "stateUpdate") {
            const property = message.args.property;
            const value = message.args.value;
            logger.debug("State changed!", property, value);
            state[property] = value;
        }
        else if (message.command == "stateGet") {
            sendResponse(state[message.args[0].prop]);
        }
        else
            throw new Error("Unsupported message to state, type " + message.command);
    });



/***/ }),

/***/ "?b867":
/*!********************!*\
  !*** fs (ignored) ***!
  \********************/
/***/ (() => {

/* (ignored) */

/***/ }),

/***/ "?cdbe":
/*!**********************!*\
  !*** path (ignored) ***!
  \**********************/
/***/ (() => {

/* (ignored) */

/***/ }),

/***/ "?282e":
/*!**********************!*\
  !*** path (ignored) ***!
  \**********************/
/***/ (() => {

/* (ignored) */

/***/ }),

/***/ "?488f":
/*!*********************!*\
  !*** url (ignored) ***!
  \*********************/
/***/ (() => {

/* (ignored) */

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			loaded: false,
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/node module decorator */
/******/ 	(() => {
/******/ 		__webpack_require__.nmd = (module) => {
/******/ 			module.paths = [];
/******/ 			if (!module.children) module.children = [];
/******/ 			return module;
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module is referenced by other modules so it can't be inlined
/******/ 	var __webpack_exports__ = __webpack_require__("./src/commandline_frame.ts");
/******/ 	
/******/ })()
;
//# sourceMappingURL=commandline_frame.js.map