wikiparser-node 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +17 -1
  2. package/bundle/bundle.es7.js +30 -30
  3. package/bundle/bundle.lsp.js +39 -0
  4. package/bundle/bundle.min.js +30 -30
  5. package/config/.schema.json +14 -1
  6. package/config/enwiki.json +1 -814
  7. package/config/llwiki.json +2 -35
  8. package/config/minimum.json +2 -0
  9. package/config/moegirl.json +2 -44
  10. package/config/zhwiki.json +25 -489
  11. package/coverage/badge.svg +1 -0
  12. package/dist/addon/table.js +1 -1
  13. package/dist/addon/token.js +18 -14
  14. package/dist/addon/transclude.js +5 -1
  15. package/dist/base.d.mts +177 -0
  16. package/dist/base.d.ts +68 -1
  17. package/dist/base.js +70 -64
  18. package/dist/base.mjs +74 -0
  19. package/dist/index.d.ts +6 -0
  20. package/dist/index.js +23 -3
  21. package/dist/internal.d.ts +41 -41
  22. package/dist/lib/element.js +5 -1
  23. package/dist/lib/lsp.d.ts +68 -0
  24. package/dist/lib/lsp.js +613 -0
  25. package/dist/lib/node.js +9 -16
  26. package/dist/lib/range.js +13 -6
  27. package/dist/lib/ranges.js +5 -2
  28. package/dist/lib/rect.d.ts +3 -5
  29. package/dist/lib/rect.js +13 -10
  30. package/dist/lib/text.js +9 -7
  31. package/dist/lib/title.js +4 -0
  32. package/dist/mixin/attributesParent.d.ts +1 -1
  33. package/dist/parser/braces.js +1 -0
  34. package/dist/parser/externalLinks.js +1 -1
  35. package/dist/parser/hrAndDoubleUnderscore.js +1 -1
  36. package/dist/parser/magicLinks.js +1 -1
  37. package/dist/parser/selector.js +10 -2
  38. package/dist/src/atom.js +1 -0
  39. package/dist/src/attribute.d.ts +6 -4
  40. package/dist/src/attribute.js +3 -4
  41. package/dist/src/attributes.js +3 -4
  42. package/dist/src/heading.js +3 -1
  43. package/dist/src/html.js +3 -4
  44. package/dist/src/link/base.js +1 -0
  45. package/dist/src/link/file.js +3 -0
  46. package/dist/src/link/index.js +5 -6
  47. package/dist/src/link/redirectTarget.d.ts +2 -3
  48. package/dist/src/link/redirectTarget.js +1 -2
  49. package/dist/src/magicLink.js +1 -1
  50. package/dist/src/nowiki/comment.d.ts +1 -1
  51. package/dist/src/nowiki/comment.js +2 -1
  52. package/dist/src/nowiki/quote.js +8 -12
  53. package/dist/src/onlyinclude.js +1 -0
  54. package/dist/src/table/index.d.ts +0 -3
  55. package/dist/src/table/index.js +2 -1
  56. package/dist/src/table/trBase.js +3 -2
  57. package/dist/util/debug.js +22 -2
  58. package/dist/util/diff.js +5 -0
  59. package/dist/util/html.js +3 -1
  60. package/dist/util/lint.js +16 -4
  61. package/dist/util/sharable.js +5 -4
  62. package/dist/util/sharable.mjs +4 -4
  63. package/dist/util/string.js +12 -1
  64. package/extensions/dist/base.js +88 -4
  65. package/extensions/dist/lsp.js +53 -0
  66. package/extensions/dist/test-page.js +89 -0
  67. package/extensions/es7/base.js +96 -3
  68. package/extensions/typings.d.ts +16 -5
  69. package/package.json +41 -22
@@ -204,6 +204,7 @@
204
204
  },
205
205
  "variable": [
206
206
  "!",
207
+ "=",
207
208
  "currentmonth",
208
209
  "currentmonth1",
209
210
  "currentmonthname",
@@ -601,41 +602,7 @@
601
602
  }
602
603
  ],
603
604
  "protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",
604
- "interwiki": [
605
- "arxiv",
606
- "aswiki",
607
- "cache",
608
- "cmoegirl",
609
- "commons",
610
- "doi",
611
- "google",
612
- "googlegroups",
613
- "gsnews",
614
- "imdb",
615
- "jawiki",
616
- "komica",
617
- "mediawikiwiki",
618
- "metawikimedia",
619
- "moegirl",
620
- "mw",
621
- "sifaswiki",
622
- "sifwiki",
623
- "wikia",
624
- "wikibooks",
625
- "wikidata",
626
- "wikimedia",
627
- "wikinews",
628
- "wikiinfo",
629
- "wikipedia",
630
- "wikiquote",
631
- "wikisource",
632
- "wikispecies",
633
- "wikiversity",
634
- "wikivoyage",
635
- "wikt",
636
- "wiktionary",
637
- "zhwiki"
638
- ],
605
+ "interwiki": [],
639
606
  "img": {
640
607
  "thumbnail": "thumbnail",
641
608
  "thumb": "thumbnail",
@@ -84,6 +84,8 @@
84
84
  "module": 828
85
85
  },
86
86
  "variable": [
87
+ "!",
88
+ "=",
87
89
  "pageid",
88
90
  "articlepath",
89
91
  "server",
@@ -244,6 +244,7 @@
244
244
  },
245
245
  "variable": [
246
246
  "!",
247
+ "=",
247
248
  "currentmonth",
248
249
  "currentmonth1",
249
250
  "currentmonthname",
@@ -693,50 +694,7 @@
693
694
  }
694
695
  ],
695
696
  "protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",
696
- "interwiki": [
697
- "commons",
698
- "mediawikiwiki",
699
- "metawikimedia",
700
- "mw",
701
- "wikibooks",
702
- "wikidata",
703
- "wikimedia",
704
- "wikinews",
705
- "wikipedia",
706
- "wikiquote",
707
- "wikisource",
708
- "wikispecies",
709
- "wikiversity",
710
- "wikivoyage",
711
- "wikt",
712
- "wiktionary",
713
- "cc",
714
- "cm",
715
- "en",
716
- "enmoe",
717
- "enwp",
718
- "fandom",
719
- "ghia",
720
- "huiji",
721
- "ja",
722
- "jamoe",
723
- "jawp",
724
- "library",
725
- "meta",
726
- "phab",
727
- "pmid",
728
- "shoutwiki",
729
- "translatewiki",
730
- "zh",
731
- "zhmoe",
732
- "zhmoegirl",
733
- "zhtest",
734
- "zhwp",
735
- "文库",
736
- "萌娘共享",
737
- "萌娘文库",
738
- "萌百"
739
- ],
697
+ "interwiki": [],
740
698
  "img": {
741
699
  "thumbnail": "thumbnail",
742
700
  "thumb": "thumbnail",
@@ -759,29 +759,7 @@
759
759
  ],
760
760
  "doubleUnderscore": [
761
761
  [],
762
- [
763
- "EXPECTUNUSEDCATEGORY",
764
- "DISAMBIG",
765
- "消除歧义",
766
- "HIDDENCAT",
767
- "隐藏分类",
768
- "隱藏分類",
769
- "INDEX",
770
- "索引",
771
- "NEWSECTIONLINK",
772
- "新段落链接",
773
- "NOINDEX",
774
- "无索引",
775
- "NONEWSECTIONLINK",
776
- "无新段落链接",
777
- "STATICREDIRECT",
778
- "静态重定向",
779
- "靜態重新導向",
780
- "NOGLOBAL",
781
- "禁用全域用户页",
782
- "EXPECTED_UNCONNECTED_PAGE",
783
- "EXPECTUNUSEDTEMPLATE"
784
- ],
762
+ [],
785
763
  {
786
764
  "forcetoc": "forcetoc",
787
765
  "强显目录": "forcetoc",
@@ -811,475 +789,33 @@
811
789
  "已存档讨论": "archivedtalk",
812
790
  "notalk": "notalk",
813
791
  "禁用讨论": "notalk"
792
+ },
793
+ {
794
+ "EXPECTUNUSEDCATEGORY": "EXPECTUNUSEDCATEGORY",
795
+ "DISAMBIG": "DISAMBIG",
796
+ "消除歧义": "DISAMBIG",
797
+ "HIDDENCAT": "HIDDENCAT",
798
+ "隐藏分类": "HIDDENCAT",
799
+ "隱藏分類": "HIDDENCAT",
800
+ "INDEX": "INDEX",
801
+ "索引": "INDEX",
802
+ "NEWSECTIONLINK": "NEWSECTIONLINK",
803
+ "新段落链接": "NEWSECTIONLINK",
804
+ "NOINDEX": "NOINDEX",
805
+ "无索引": "NOINDEX",
806
+ "NONEWSECTIONLINK": "NONEWSECTIONLINK",
807
+ "无新段落链接": "NONEWSECTIONLINK",
808
+ "STATICREDIRECT": "STATICREDIRECT",
809
+ "静态重定向": "STATICREDIRECT",
810
+ "靜態重新導向": "STATICREDIRECT",
811
+ "NOGLOBAL": "NOGLOBAL",
812
+ "禁用全域用户页": "NOGLOBAL",
813
+ "EXPECTED_UNCONNECTED_PAGE": "EXPECTED_UNCONNECTED_PAGE",
814
+ "EXPECTUNUSEDTEMPLATE": "EXPECTUNUSEDTEMPLATE"
814
815
  }
815
816
  ],
816
817
  "protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",
817
- "interwiki": [
818
- "acronym",
819
- "advisory",
820
- "advogato",
821
- "aew",
822
- "appropedia",
823
- "aquariumwiki",
824
- "arborwiki",
825
- "arxiv",
826
- "baden",
827
- "battlestarwiki",
828
- "bcnbio",
829
- "beacha",
830
- "betawiki",
831
- "bibcode",
832
- "bibliowiki",
833
- "bluwiki",
834
- "botwiki",
835
- "boxrec",
836
- "bugzilla",
837
- "bulba",
838
- "c",
839
- "c2",
840
- "c2find",
841
- "cache",
842
- "ĉej",
843
- "centralwikia",
844
- "chej",
845
- "choralwiki",
846
- "citizendium",
847
- "comixpedia",
848
- "commons",
849
- "communityscheme",
850
- "communitywiki",
851
- "comune",
852
- "creativecommons",
853
- "creativecommonswiki",
854
- "cxej",
855
- "dcc",
856
- "dcdatabase",
857
- "dcma",
858
- "debian",
859
- "delicious",
860
- "devmo",
861
- "dico",
862
- "dicoado",
863
- "dictionary",
864
- "dict",
865
- "disinfopedia",
866
- "distributedproofreaders",
867
- "distributedproofreadersca",
868
- "dmoz",
869
- "dmozs",
870
- "doi",
871
- "donate",
872
- "doom_wiki",
873
- "download",
874
- "dbdump",
875
- "dpd",
876
- "dpla",
877
- "drae",
878
- "dreamhost",
879
- "drumcorpswiki",
880
- "dwjwiki",
881
- "ecoreality",
882
- "elibre",
883
- "emacswiki",
884
- "encyc",
885
- "energiewiki",
886
- "englyphwiki",
887
- "enkol",
888
- "eokulturcentro",
889
- "esolang",
890
- "etherpad",
891
- "ethnologue",
892
- "ethnologuefamily",
893
- "evowiki",
894
- "exotica",
895
- "fanimutationwiki",
896
- "fedora",
897
- "finalfantasy",
898
- "finnix",
899
- "flickruser",
900
- "flickrphoto",
901
- "floralwiki",
902
- "foldoc",
903
- "foundation",
904
- "foundationsite",
905
- "foxwiki",
906
- "freebio",
907
- "freebsdman",
908
- "freeculturewiki",
909
- "freedomdefined",
910
- "freefeel",
911
- "freekiwiki",
912
- "freenode",
913
- "freesoft",
914
- "ganfyd",
915
- "gardenology",
916
- "gausswiki",
917
- "gentoo",
918
- "genwiki",
919
- "gerrit",
920
- "git",
921
- "gitlab",
922
- "globalcontribs",
923
- "glottolog",
924
- "glottopedia",
925
- "google",
926
- "googledefine",
927
- "googlegroups",
928
- "guildwarswiki",
929
- "guildwiki",
930
- "gucprefix",
931
- "gutenberg",
932
- "gutenbergwiki",
933
- "hackerspaces",
934
- "h2wiki",
935
- "hammondwiki",
936
- "hdl",
937
- "heraldik",
938
- "horizonlabs",
939
- "hrwiki",
940
- "hrfwiki",
941
- "hupwiki",
942
- "iarchive",
943
- "imdbname",
944
- "imdbtitle",
945
- "imdbcompany",
946
- "imdbcharacter",
947
- "incubator",
948
- "infosecpedia",
949
- "infosphere",
950
- "irc",
951
- "ircs",
952
- "ircrc",
953
- "rcirc",
954
- "iso639-3",
955
- "issn",
956
- "iuridictum",
957
- "jaglyphwiki",
958
- "jefo",
959
- "jerseydatabase",
960
- "jira",
961
- "jspwiki",
962
- "jstor",
963
- "kamelo",
964
- "karlsruhe",
965
- "kinowiki",
966
- "komicawiki",
967
- "kontuwiki",
968
- "lexemes",
969
- "liberachat",
970
- "libreplanet",
971
- "lingualibre",
972
- "linguistlist",
973
- "linuxwiki",
974
- "linuxwikide",
975
- "listarchive",
976
- "liswiki",
977
- "literateprograms",
978
- "livepedia",
979
- "localwiki",
980
- "lojban",
981
- "lokalhistoriewiki",
982
- "lostpedia",
983
- "lqwiki",
984
- "luxo",
985
- "mail",
986
- "mailarchive",
987
- "mariowiki",
988
- "marveldatabase",
989
- "meatball",
990
- "mw",
991
- "mediazilla",
992
- "memoryalpha",
993
- "metawiki",
994
- "metawikimedia",
995
- "metawikipedia",
996
- "mineralienatlas",
997
- "mixnmatch",
998
- "moinmoin",
999
- "monstropedia",
1000
- "mosapedia",
1001
- "mozcom",
1002
- "mozillawiki",
1003
- "mozillazinekb",
1004
- "musicbrainz",
1005
- "mediawikiwiki",
1006
- "mwod",
1007
- "mwot",
1008
- "nkcells",
1009
- "nlab",
1010
- "nara",
1011
- "nosmoke",
1012
- "nost",
1013
- "nostalgia",
1014
- "oeis",
1015
- "oldwikisource",
1016
- "olpc",
1017
- "omegawiki",
1018
- "onelook",
1019
- "openlibrary",
1020
- "openstreetmap",
1021
- "openwetware",
1022
- "opera7wiki",
1023
- "organicdesign",
1024
- "orthodoxwiki",
1025
- "osmwiki",
1026
- "otrs",
1027
- "otrswiki",
1028
- "ourmedia",
1029
- "outreach",
1030
- "outreachwiki",
1031
- "owasp",
1032
- "panawiki",
1033
- "patwiki",
1034
- "paws",
1035
- "personaltelco",
1036
- "petscan",
1037
- "phab",
1038
- "phabricator",
1039
- "phwiki",
1040
- "phpwiki",
1041
- "planetmath",
1042
- "pmeg",
1043
- "pmid",
1044
- "pokewiki",
1045
- "pokéwiki",
1046
- "policy",
1047
- "proofwiki",
1048
- "pyrev",
1049
- "pythoninfo",
1050
- "pythonwiki",
1051
- "pywiki",
1052
- "quality",
1053
- "quarry",
1054
- "regiowiki",
1055
- "rev",
1056
- "revo",
1057
- "rfc",
1058
- "rheinneckar",
1059
- "robowiki",
1060
- "rodovid",
1061
- "rowiki",
1062
- "rt",
1063
- "s23wiki",
1064
- "scholar",
1065
- "schoolswp",
1066
- "scores",
1067
- "scoutwiki",
1068
- "scramble",
1069
- "seapig",
1070
- "seattlewiki",
1071
- "slwiki",
1072
- "semantic-mw",
1073
- "senseislibrary",
1074
- "sep11",
1075
- "sharemap",
1076
- "silcode",
1077
- "slashdot",
1078
- "sourceforge",
1079
- "spcom",
1080
- "species",
1081
- "squeak",
1082
- "stats",
1083
- "stewardry",
1084
- "strategy",
1085
- "strategywiki",
1086
- "sulutil",
1087
- "swtrain",
1088
- "svn",
1089
- "swinbrain",
1090
- "tabwiki",
1091
- "tclerswiki",
1092
- "technorati",
1093
- "tenwiki",
1094
- "testwiki",
1095
- "testwikidata",
1096
- "test2wiki",
1097
- "tfwiki",
1098
- "thelemapedia",
1099
- "theopedia",
1100
- "thinkwiki",
1101
- "ticket",
1102
- "tmbw",
1103
- "tmnet",
1104
- "tmwiki",
1105
- "toolforge",
1106
- "toollabs",
1107
- "tools",
1108
- "tswiki",
1109
- "translatewiki",
1110
- "tviv",
1111
- "tvtropes",
1112
- "twiki",
1113
- "twl",
1114
- "tyvawiki",
1115
- "umap",
1116
- "uncyclopedia",
1117
- "unihan",
1118
- "unreal",
1119
- "urbandict",
1120
- "usej",
1121
- "usemod",
1122
- "usability",
1123
- "utrs",
1124
- "vikidia",
1125
- "viaf",
1126
- "vlos",
1127
- "vkol",
1128
- "votewiki",
1129
- "vrtwiki",
1130
- "vrts",
1131
- "weirdgloop",
1132
- "werelate",
1133
- "wg",
1134
- "wikia",
1135
- "wikiasite",
1136
- "wikiapiary",
1137
- "wikibooks",
1138
- "wikichristian",
1139
- "wikicities",
1140
- "wikicity",
1141
- "wikiconference",
1142
- "wikidata",
1143
- "wikiedudashboard",
1144
- "wikif1",
1145
- "wikifur",
1146
- "wikihow",
1147
- "wikiindex",
1148
- "wikilemon",
1149
- "wikilivres",
1150
- "wikilivresru",
1151
- "wikimac-de",
1152
- "wikimedia",
1153
- "wikinews",
1154
- "wikinfo",
1155
- "wikinvest",
1156
- "wikiotics",
1157
- "wikipapers",
1158
- "wikipedia",
1159
- "wikipediawikipedia",
1160
- "wikiquote",
1161
- "wikisophia",
1162
- "wikisource",
1163
- "wikisp",
1164
- "wikispecies",
1165
- "wikispot",
1166
- "wikiskripta",
1167
- "wikitech",
1168
- "labsconsole",
1169
- "wikiti",
1170
- "wikiversity",
1171
- "wikivoyage",
1172
- "betawikiversity",
1173
- "wikiwikiweb",
1174
- "wiktionary",
1175
- "wlug",
1176
- "wmam",
1177
- "wmar",
1178
- "wmat",
1179
- "wmau",
1180
- "wmbd",
1181
- "wmbe",
1182
- "wmbr",
1183
- "wmca",
1184
- "wmch",
1185
- "wmcl",
1186
- "wmcn",
1187
- "wmco",
1188
- "wmcz",
1189
- "wmcz_docs",
1190
- "wmcz_old",
1191
- "wmdc",
1192
- "securewikidc",
1193
- "wmde",
1194
- "wmdk",
1195
- "wmee",
1196
- "wmec",
1197
- "wmes",
1198
- "wmet",
1199
- "wmfdashboard",
1200
- "wmfi",
1201
- "wmfr",
1202
- "wmge",
1203
- "wmhi",
1204
- "wmhk",
1205
- "wmhu",
1206
- "wmid",
1207
- "wmil",
1208
- "wmin",
1209
- "wmit",
1210
- "wmke",
1211
- "wmmk",
1212
- "wmmx",
1213
- "wmnl",
1214
- "wmnyc",
1215
- "wmno",
1216
- "wmpa-us",
1217
- "wmph",
1218
- "wmpl",
1219
- "wmplsite",
1220
- "wmpt",
1221
- "wmpunjabi",
1222
- "wmromd",
1223
- "wmrs",
1224
- "wmru",
1225
- "wmse",
1226
- "wmsk",
1227
- "wmtr",
1228
- "wmtw",
1229
- "wmua",
1230
- "wmuk",
1231
- "wmve",
1232
- "wmza",
1233
- "wm2005",
1234
- "wm2006",
1235
- "wm2007",
1236
- "wm2008",
1237
- "wm2009",
1238
- "wm2010",
1239
- "wm2011",
1240
- "wm2012",
1241
- "wm2013",
1242
- "wm2014",
1243
- "wm2015",
1244
- "wm2016",
1245
- "wm2017",
1246
- "wm2018",
1247
- "wmania",
1248
- "wikimania",
1249
- "wikispore",
1250
- "wmteam",
1251
- "wmf",
1252
- "wmfblog",
1253
- "wmdeblog",
1254
- "wookieepedia",
1255
- "wowwiki",
1256
- "wqy",
1257
- "wurmpedia",
1258
- "xtools",
1259
- "zrhwiki",
1260
- "zum",
1261
- "zwiki",
1262
- "m",
1263
- "meta",
1264
- "d",
1265
- "cz",
1266
- "dk",
1267
- "epo",
1268
- "jp",
1269
- "minnan",
1270
- "zh-cfr",
1271
- "cmn",
1272
- "en-simple",
1273
- "w",
1274
- "wikt",
1275
- "q",
1276
- "b",
1277
- "n",
1278
- "s",
1279
- "chapter",
1280
- "v",
1281
- "voy"
1282
- ],
818
+ "interwiki": [],
1283
819
  "img": {
1284
820
  "thumbnail": "thumbnail",
1285
821
  "thumb": "thumbnail",
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="98" height="20" role="img" aria-label="Coverage: 85%"><title>Coverage: 85%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="98" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="35" height="20" fill="#4c1"/><rect width="98" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="795" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">85%</text><text x="795" y="140" transform="scale(.1)" fill="#fff" textLength="250">85%</text></g></svg>
@@ -280,7 +280,7 @@ index_2.TableToken.prototype.removeTableCol =
280
280
  index_2.TableToken.prototype.mergeCells =
281
281
  /** @implements */
282
282
  function (xlim, ylim) {
283
- const layout = this.getLayout(), maxCol = Math.max(...layout.map(({ length }) => length)), [xmin, xmax] = xlim.map(x => x < 0 ? x + maxCol : x).sort(), [ymin, ymax] = ylim.map(y => y < 0 ? y + layout.length : y).sort(), set = new Set(layout.slice(ymin, ymax).flatMap(rowLayout => rowLayout.slice(xmin, xmax)));
283
+ const layout = this.getLayout(), maxCol = Math.max(...layout.map(({ length }) => length)), [xmin, xmax] = xlim.map(x => x < 0 ? x + maxCol : x).sort(debug_1.compare), [ymin, ymax] = ylim.map(y => y < 0 ? y + layout.length : y).sort(debug_1.compare), set = new Set(layout.slice(ymin, ymax).flatMap(rowLayout => rowLayout.slice(xmin, xmax)));
284
284
  if ([...layout[ymin - 1] ?? [], ...layout[ymax] ?? []].some(coords => set.has(coords))
285
285
  || layout.some(rowLayout => set.has(rowLayout[xmin - 1]) || set.has(rowLayout[xmax]))) {
286
286
  throw new RangeError('The area to be merged overlaps with the outer area!');