@mailwoman/registry 10.7.0 → 11.0.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 (399) hide show
  1. package/README.md +93 -98
  2. package/data/manifests/artifacts.json +32 -0
  3. package/data/manifests/coverage.json +56 -0
  4. package/data/manifests/sources.lock.json +48 -0
  5. package/data/normalized/iata-airports.json +126749 -0
  6. package/data/normalized/iso3166-1.json +2035 -0
  7. package/definitions/namespaces.json +63 -0
  8. package/definitions/sections.json +73 -0
  9. package/docs/data-policy.md +81 -0
  10. package/docs/performance.md +146 -0
  11. package/docs/rgy1.md +144 -0
  12. package/lib/artifacts/country-airport-collision.ts +26 -0
  13. package/lib/artifacts/iata-airport/membership.ts +26 -0
  14. package/lib/artifacts/iata-airport/records.ts +26 -0
  15. package/lib/artifacts/iso3166-1/alpha2-membership.ts +26 -0
  16. package/lib/artifacts/iso3166-1/alpha3-membership.ts +26 -0
  17. package/lib/artifacts/iso3166-1/records.ts +26 -0
  18. package/lib/errors.ts +44 -0
  19. package/lib/iata/airports/records.ts +174 -0
  20. package/lib/iata/airports/validate.ts +49 -0
  21. package/lib/index.ts +25 -15
  22. package/lib/inspect.ts +56 -0
  23. package/lib/iso3166/alpha2.ts +48 -0
  24. package/lib/iso3166/alpha3.ts +51 -0
  25. package/lib/iso3166/records.ts +149 -0
  26. package/lib/iso3166/relations.ts +30 -0
  27. package/lib/key.ts +146 -0
  28. package/lib/normalize.ts +31 -0
  29. package/lib/overlap/country-airport.ts +108 -0
  30. package/lib/rgy1/base64.ts +24 -0
  31. package/lib/rgy1/reader.ts +316 -0
  32. package/lib/rgy1/sections.generated.ts +79 -0
  33. package/lib/rgy1/views.ts +267 -0
  34. package/lib/types.ts +88 -74
  35. package/lib/wasm.ts +285 -0
  36. package/out/artifacts/country-airport-collision.d.ts +15 -0
  37. package/out/artifacts/country-airport-collision.d.ts.map +1 -0
  38. package/out/artifacts/country-airport-collision.js +21 -0
  39. package/out/artifacts/country-airport-collision.js.map +1 -0
  40. package/out/artifacts/iata-airport/membership.d.ts +15 -0
  41. package/out/artifacts/iata-airport/membership.d.ts.map +1 -0
  42. package/out/artifacts/iata-airport/membership.js +21 -0
  43. package/out/artifacts/iata-airport/membership.js.map +1 -0
  44. package/out/artifacts/iata-airport/records.d.ts +15 -0
  45. package/out/artifacts/iata-airport/records.d.ts.map +1 -0
  46. package/out/artifacts/iata-airport/records.js +21 -0
  47. package/out/artifacts/iata-airport/records.js.map +1 -0
  48. package/out/artifacts/iso3166-1/alpha2-membership.d.ts +15 -0
  49. package/out/artifacts/iso3166-1/alpha2-membership.d.ts.map +1 -0
  50. package/out/artifacts/iso3166-1/alpha2-membership.js +21 -0
  51. package/out/artifacts/iso3166-1/alpha2-membership.js.map +1 -0
  52. package/out/artifacts/iso3166-1/alpha3-membership.d.ts +15 -0
  53. package/out/artifacts/iso3166-1/alpha3-membership.d.ts.map +1 -0
  54. package/out/artifacts/iso3166-1/alpha3-membership.js +21 -0
  55. package/out/artifacts/iso3166-1/alpha3-membership.js.map +1 -0
  56. package/out/artifacts/iso3166-1/records.d.ts +15 -0
  57. package/out/artifacts/iso3166-1/records.d.ts.map +1 -0
  58. package/out/artifacts/iso3166-1/records.js +21 -0
  59. package/out/artifacts/iso3166-1/records.js.map +1 -0
  60. package/out/errors.d.ts +38 -0
  61. package/out/errors.d.ts.map +1 -0
  62. package/out/errors.js +35 -0
  63. package/out/errors.js.map +1 -0
  64. package/out/iata/airports/records.d.ts +44 -0
  65. package/out/iata/airports/records.d.ts.map +1 -0
  66. package/out/iata/airports/records.js +137 -0
  67. package/out/iata/airports/records.js.map +1 -0
  68. package/out/iata/airports/validate.d.ts +27 -0
  69. package/out/iata/airports/validate.d.ts.map +1 -0
  70. package/out/iata/airports/validate.js +42 -0
  71. package/out/iata/airports/validate.js.map +1 -0
  72. package/out/index.d.ts +19 -15
  73. package/out/index.d.ts.map +1 -1
  74. package/out/index.js +14 -15
  75. package/out/index.js.map +1 -1
  76. package/out/inspect.d.ts +38 -0
  77. package/out/inspect.d.ts.map +1 -0
  78. package/out/inspect.js +33 -0
  79. package/out/inspect.js.map +1 -0
  80. package/out/iso3166/alpha2.d.ts +24 -0
  81. package/out/iso3166/alpha2.d.ts.map +1 -0
  82. package/out/iso3166/alpha2.js +41 -0
  83. package/out/iso3166/alpha2.js.map +1 -0
  84. package/out/iso3166/alpha3.d.ts +29 -0
  85. package/out/iso3166/alpha3.d.ts.map +1 -0
  86. package/out/iso3166/alpha3.js +44 -0
  87. package/out/iso3166/alpha3.js.map +1 -0
  88. package/out/iso3166/records.d.ts +38 -0
  89. package/out/iso3166/records.d.ts.map +1 -0
  90. package/out/iso3166/records.js +105 -0
  91. package/out/iso3166/records.js.map +1 -0
  92. package/out/iso3166/relations.d.ts +20 -0
  93. package/out/iso3166/relations.d.ts.map +1 -0
  94. package/out/iso3166/relations.js +27 -0
  95. package/out/iso3166/relations.js.map +1 -0
  96. package/out/key.d.ts +68 -0
  97. package/out/key.d.ts.map +1 -0
  98. package/out/key.js +122 -0
  99. package/out/key.js.map +1 -0
  100. package/out/normalize.d.ts +25 -0
  101. package/out/normalize.d.ts.map +1 -0
  102. package/out/normalize.js +21 -0
  103. package/out/normalize.js.map +1 -0
  104. package/out/overlap/country-airport.d.ts +57 -0
  105. package/out/overlap/country-airport.d.ts.map +1 -0
  106. package/out/overlap/country-airport.js +71 -0
  107. package/out/overlap/country-airport.js.map +1 -0
  108. package/out/rgy1/base64.d.ts +15 -0
  109. package/out/rgy1/base64.d.ts.map +1 -0
  110. package/out/rgy1/base64.js +22 -0
  111. package/out/rgy1/base64.js.map +1 -0
  112. package/out/rgy1/reader.d.ts +103 -0
  113. package/out/rgy1/reader.d.ts.map +1 -0
  114. package/out/rgy1/reader.js +230 -0
  115. package/out/rgy1/reader.js.map +1 -0
  116. package/out/rgy1/sections.generated.d.ts +54 -0
  117. package/out/rgy1/sections.generated.d.ts.map +1 -0
  118. package/out/rgy1/sections.generated.js +69 -0
  119. package/out/rgy1/sections.generated.js.map +1 -0
  120. package/out/rgy1/views.d.ts +96 -0
  121. package/out/rgy1/views.d.ts.map +1 -0
  122. package/out/rgy1/views.js +218 -0
  123. package/out/rgy1/views.js.map +1 -0
  124. package/out/sdk/fetch.d.ts +53 -0
  125. package/out/sdk/fetch.d.ts.map +1 -0
  126. package/out/sdk/fetch.js +107 -0
  127. package/out/sdk/fetch.js.map +1 -0
  128. package/out/sdk/fetch.run.d.ts +14 -0
  129. package/out/sdk/fetch.run.d.ts.map +1 -0
  130. package/out/sdk/fetch.run.js +20 -0
  131. package/out/sdk/fetch.run.js.map +1 -0
  132. package/out/sdk/sources.d.ts +111 -0
  133. package/out/sdk/sources.d.ts.map +1 -0
  134. package/out/sdk/sources.js +98 -0
  135. package/out/sdk/sources.js.map +1 -0
  136. package/out/tools/artifact-path.d.ts +10 -0
  137. package/out/tools/artifact-path.d.ts.map +1 -0
  138. package/out/tools/artifact-path.js +12 -0
  139. package/out/tools/artifact-path.js.map +1 -0
  140. package/out/tools/bench.run.d.ts +19 -0
  141. package/out/tools/bench.run.d.ts.map +1 -0
  142. package/out/tools/bench.run.js +204 -0
  143. package/out/tools/bench.run.js.map +1 -0
  144. package/out/tools/build-wasm.run.d.ts +18 -0
  145. package/out/tools/build-wasm.run.d.ts.map +1 -0
  146. package/out/tools/build-wasm.run.js +71 -0
  147. package/out/tools/build-wasm.run.js.map +1 -0
  148. package/out/tools/generate-sections.run.d.ts +13 -0
  149. package/out/tools/generate-sections.run.d.ts.map +1 -0
  150. package/out/tools/generate-sections.run.js +136 -0
  151. package/out/tools/generate-sections.run.js.map +1 -0
  152. package/out/tools/generate.run.d.ts +18 -0
  153. package/out/tools/generate.run.d.ts.map +1 -0
  154. package/out/tools/generate.run.js +118 -0
  155. package/out/tools/generate.run.js.map +1 -0
  156. package/out/tools/normalize.d.ts +155 -0
  157. package/out/tools/normalize.d.ts.map +1 -0
  158. package/out/tools/normalize.js +303 -0
  159. package/out/tools/normalize.js.map +1 -0
  160. package/out/tools/normalize.run.d.ts +14 -0
  161. package/out/tools/normalize.run.d.ts.map +1 -0
  162. package/out/tools/normalize.run.js +29 -0
  163. package/out/tools/normalize.run.js.map +1 -0
  164. package/out/types.d.ts +90 -76
  165. package/out/types.d.ts.map +1 -1
  166. package/out/types.js +20 -4
  167. package/out/types.js.map +1 -1
  168. package/out/wasm.d.ts +98 -0
  169. package/out/wasm.d.ts.map +1 -0
  170. package/out/wasm.js +137 -0
  171. package/out/wasm.js.map +1 -0
  172. package/package.json +49 -28
  173. package/sdk/fetch.run.ts +24 -0
  174. package/sdk/fetch.ts +146 -0
  175. package/sdk/sources.ts +162 -0
  176. package/tools/artifact-path.ts +12 -0
  177. package/tools/bench.run.ts +265 -0
  178. package/tools/build-wasm.run.ts +82 -0
  179. package/tools/generate-sections.run.ts +152 -0
  180. package/tools/generate.run.ts +146 -0
  181. package/tools/normalize.run.ts +36 -0
  182. package/tools/normalize.ts +474 -0
  183. package/wasm/registry-simd.wasm +0 -0
  184. package/wasm/registry.wasm +0 -0
  185. package/lib/address-key.ts +0 -46
  186. package/lib/geocode-handler.ts +0 -37
  187. package/lib/geojson.ts +0 -73
  188. package/lib/ingest.ts +0 -349
  189. package/lib/learned-scorer.ts +0 -134
  190. package/lib/map-html.ts +0 -287
  191. package/lib/models/crosssource-gbt-en-us.ts +0 -43
  192. package/lib/models/dedup-gbt-en-us.ts +0 -47
  193. package/lib/models/org-crosssource-gbt-en-us.ts +0 -43
  194. package/lib/reconcile.ts +0 -239
  195. package/lib/resolve.ts +0 -570
  196. package/out/address-key.d.ts +0 -34
  197. package/out/address-key.d.ts.map +0 -1
  198. package/out/address-key.js +0 -41
  199. package/out/address-key.js.map +0 -1
  200. package/out/geocode-handler.d.ts +0 -20
  201. package/out/geocode-handler.d.ts.map +0 -1
  202. package/out/geocode-handler.js +0 -29
  203. package/out/geocode-handler.js.map +0 -1
  204. package/out/geojson.d.ts +0 -28
  205. package/out/geojson.d.ts.map +0 -1
  206. package/out/geojson.js +0 -63
  207. package/out/geojson.js.map +0 -1
  208. package/out/ingest.d.ts +0 -173
  209. package/out/ingest.d.ts.map +0 -1
  210. package/out/ingest.js +0 -185
  211. package/out/ingest.js.map +0 -1
  212. package/out/learned-scorer.d.ts +0 -61
  213. package/out/learned-scorer.d.ts.map +0 -1
  214. package/out/learned-scorer.js +0 -91
  215. package/out/learned-scorer.js.map +0 -1
  216. package/out/map-html.d.ts +0 -39
  217. package/out/map-html.d.ts.map +0 -1
  218. package/out/map-html.js +0 -220
  219. package/out/map-html.js.map +0 -1
  220. package/out/models/crosssource-gbt-en-us.d.ts +0 -45
  221. package/out/models/crosssource-gbt-en-us.d.ts.map +0 -1
  222. package/out/models/crosssource-gbt-en-us.js +0 -40
  223. package/out/models/crosssource-gbt-en-us.js.map +0 -1
  224. package/out/models/dedup-gbt-en-us.d.ts +0 -44
  225. package/out/models/dedup-gbt-en-us.d.ts.map +0 -1
  226. package/out/models/dedup-gbt-en-us.js +0 -44
  227. package/out/models/dedup-gbt-en-us.js.map +0 -1
  228. package/out/models/org-crosssource-gbt-en-us.d.ts +0 -45
  229. package/out/models/org-crosssource-gbt-en-us.d.ts.map +0 -1
  230. package/out/models/org-crosssource-gbt-en-us.js +0 -40
  231. package/out/models/org-crosssource-gbt-en-us.js.map +0 -1
  232. package/out/reconcile.d.ts +0 -96
  233. package/out/reconcile.d.ts.map +0 -1
  234. package/out/reconcile.js +0 -127
  235. package/out/reconcile.js.map +0 -1
  236. package/out/resolve.d.ts +0 -264
  237. package/out/resolve.d.ts.map +0 -1
  238. package/out/resolve.js +0 -282
  239. package/out/resolve.js.map +0 -1
  240. package/out/tools/coverage-reconciliation.d.ts +0 -67
  241. package/out/tools/coverage-reconciliation.d.ts.map +0 -1
  242. package/out/tools/coverage-reconciliation.js +0 -113
  243. package/out/tools/coverage-reconciliation.js.map +0 -1
  244. package/out/tools/cross/dataset-correlation.d.ts +0 -61
  245. package/out/tools/cross/dataset-correlation.d.ts.map +0 -1
  246. package/out/tools/cross/dataset-correlation.js +0 -244
  247. package/out/tools/cross/dataset-correlation.js.map +0 -1
  248. package/out/tools/cross/source-threshold-sweep.d.ts +0 -60
  249. package/out/tools/cross/source-threshold-sweep.d.ts.map +0 -1
  250. package/out/tools/cross/source-threshold-sweep.js +0 -264
  251. package/out/tools/cross/source-threshold-sweep.js.map +0 -1
  252. package/out/tools/dedup-ceiling.d.ts +0 -62
  253. package/out/tools/dedup-ceiling.d.ts.map +0 -1
  254. package/out/tools/dedup-ceiling.js +0 -171
  255. package/out/tools/dedup-ceiling.js.map +0 -1
  256. package/out/tools/eval-geocoder.d.ts +0 -68
  257. package/out/tools/eval-geocoder.d.ts.map +0 -1
  258. package/out/tools/eval-geocoder.js +0 -13
  259. package/out/tools/eval-geocoder.js.map +0 -1
  260. package/out/tools/geocoder/namesake-probe.d.ts +0 -33
  261. package/out/tools/geocoder/namesake-probe.d.ts.map +0 -1
  262. package/out/tools/geocoder/namesake-probe.js +0 -60
  263. package/out/tools/geocoder/namesake-probe.js.map +0 -1
  264. package/out/tools/geocoder/vs-provided-coords.d.ts +0 -53
  265. package/out/tools/geocoder/vs-provided-coords.d.ts.map +0 -1
  266. package/out/tools/geocoder/vs-provided-coords.js +0 -161
  267. package/out/tools/geocoder/vs-provided-coords.js.map +0 -1
  268. package/out/tools/gold-set-sample.d.ts +0 -67
  269. package/out/tools/gold-set-sample.d.ts.map +0 -1
  270. package/out/tools/gold-set-sample.js +0 -81
  271. package/out/tools/gold-set-sample.js.map +0 -1
  272. package/out/tools/learned/scorer/clustering-eval.d.ts +0 -77
  273. package/out/tools/learned/scorer/clustering-eval.d.ts.map +0 -1
  274. package/out/tools/learned/scorer/clustering-eval.js +0 -207
  275. package/out/tools/learned/scorer/clustering-eval.js.map +0 -1
  276. package/out/tools/learned/scorer/crossstate-eval.d.ts +0 -65
  277. package/out/tools/learned/scorer/crossstate-eval.d.ts.map +0 -1
  278. package/out/tools/learned/scorer/crossstate-eval.js +0 -168
  279. package/out/tools/learned/scorer/crossstate-eval.js.map +0 -1
  280. package/out/tools/learned/scorer/eval.d.ts +0 -64
  281. package/out/tools/learned/scorer/eval.d.ts.map +0 -1
  282. package/out/tools/learned/scorer/eval.js +0 -275
  283. package/out/tools/learned/scorer/eval.js.map +0 -1
  284. package/out/tools/matcher-scale.d.ts +0 -40
  285. package/out/tools/matcher-scale.d.ts.map +0 -1
  286. package/out/tools/matcher-scale.js +0 -111
  287. package/out/tools/matcher-scale.js.map +0 -1
  288. package/out/tools/nppes/dedup-benchmark.d.ts +0 -82
  289. package/out/tools/nppes/dedup-benchmark.d.ts.map +0 -1
  290. package/out/tools/nppes/dedup-benchmark.js +0 -226
  291. package/out/tools/nppes/dedup-benchmark.js.map +0 -1
  292. package/out/tools/nppes/org-name.d.ts +0 -15
  293. package/out/tools/nppes/org-name.d.ts.map +0 -1
  294. package/out/tools/nppes/org-name.js +0 -6
  295. package/out/tools/nppes/org-name.js.map +0 -1
  296. package/out/tools/nppes/overmerge-packet.d.ts +0 -43
  297. package/out/tools/nppes/overmerge-packet.d.ts.map +0 -1
  298. package/out/tools/nppes/overmerge-packet.js +0 -54
  299. package/out/tools/nppes/overmerge-packet.js.map +0 -1
  300. package/out/tools/nppes/report.d.ts +0 -97
  301. package/out/tools/nppes/report.d.ts.map +0 -1
  302. package/out/tools/nppes/report.js +0 -178
  303. package/out/tools/nppes/report.js.map +0 -1
  304. package/out/tools/nppes/sample.d.ts +0 -101
  305. package/out/tools/nppes/sample.d.ts.map +0 -1
  306. package/out/tools/nppes/sample.js +0 -127
  307. package/out/tools/nppes/sample.js.map +0 -1
  308. package/out/tools/nppes/scoring.d.ts +0 -37
  309. package/out/tools/nppes/scoring.d.ts.map +0 -1
  310. package/out/tools/nppes/scoring.js +0 -81
  311. package/out/tools/nppes/scoring.js.map +0 -1
  312. package/out/tools/nppes/settings.d.ts +0 -41
  313. package/out/tools/nppes/settings.d.ts.map +0 -1
  314. package/out/tools/nppes/settings.js +0 -79
  315. package/out/tools/nppes/settings.js.map +0 -1
  316. package/out/tools/nppes/truth-grains.d.ts +0 -63
  317. package/out/tools/nppes/truth-grains.d.ts.map +0 -1
  318. package/out/tools/nppes/truth-grains.js +0 -139
  319. package/out/tools/nppes/truth-grains.js.map +0 -1
  320. package/out/tools/shared.d.ts +0 -325
  321. package/out/tools/shared.d.ts.map +0 -1
  322. package/out/tools/shared.js +0 -453
  323. package/out/tools/shared.js.map +0 -1
  324. package/out/tools/train/cross-gbt.d.ts +0 -89
  325. package/out/tools/train/cross-gbt.d.ts.map +0 -1
  326. package/out/tools/train/cross-gbt.js +0 -132
  327. package/out/tools/train/cross-gbt.js.map +0 -1
  328. package/out/tools/train/gbt.d.ts +0 -85
  329. package/out/tools/train/gbt.d.ts.map +0 -1
  330. package/out/tools/train/gbt.js +0 -155
  331. package/out/tools/train/gbt.js.map +0 -1
  332. package/out/tools/train/org-cross-gbt.d.ts +0 -85
  333. package/out/tools/train/org-cross-gbt.d.ts.map +0 -1
  334. package/out/tools/train/org-cross-gbt.js +0 -122
  335. package/out/tools/train/org-cross-gbt.js.map +0 -1
  336. package/out/tools/txhhsc-to-oarow.d.ts +0 -42
  337. package/out/tools/txhhsc-to-oarow.d.ts.map +0 -1
  338. package/out/tools/txhhsc-to-oarow.js +0 -78
  339. package/out/tools/txhhsc-to-oarow.js.map +0 -1
  340. package/out/tools/viz/browser.d.ts +0 -31
  341. package/out/tools/viz/browser.d.ts.map +0 -1
  342. package/out/tools/viz/browser.js +0 -26
  343. package/out/tools/viz/browser.js.map +0 -1
  344. package/out/tools/viz/cross-dataset-map.d.ts +0 -39
  345. package/out/tools/viz/cross-dataset-map.d.ts.map +0 -1
  346. package/out/tools/viz/cross-dataset-map.js +0 -84
  347. package/out/tools/viz/cross-dataset-map.js.map +0 -1
  348. package/out/tools/viz/geocode-first-surface.d.ts +0 -36
  349. package/out/tools/viz/geocode-first-surface.d.ts.map +0 -1
  350. package/out/tools/viz/geocode-first-surface.js +0 -234
  351. package/out/tools/viz/geocode-first-surface.js.map +0 -1
  352. package/out/tools/viz/render/map.d.ts +0 -42
  353. package/out/tools/viz/render/map.d.ts.map +0 -1
  354. package/out/tools/viz/render/map.js +0 -40
  355. package/out/tools/viz/render/map.js.map +0 -1
  356. package/out/tools/viz/render.d.ts +0 -46
  357. package/out/tools/viz/render.d.ts.map +0 -1
  358. package/out/tools/viz/render.js +0 -49
  359. package/out/tools/viz/render.js.map +0 -1
  360. package/out/tools/viz/source-provenance-map.d.ts +0 -57
  361. package/out/tools/viz/source-provenance-map.d.ts.map +0 -1
  362. package/out/tools/viz/source-provenance-map.js +0 -82
  363. package/out/tools/viz/source-provenance-map.js.map +0 -1
  364. package/out/tools/viz/yardstick-figure.d.ts +0 -22
  365. package/out/tools/viz/yardstick-figure.d.ts.map +0 -1
  366. package/out/tools/viz/yardstick-figure.js +0 -106
  367. package/out/tools/viz/yardstick-figure.js.map +0 -1
  368. package/tools/coverage-reconciliation.ts +0 -192
  369. package/tools/cross/dataset-correlation.ts +0 -380
  370. package/tools/cross/source-threshold-sweep.ts +0 -416
  371. package/tools/dedup-ceiling.ts +0 -225
  372. package/tools/eval-geocoder.ts +0 -77
  373. package/tools/geocoder/namesake-probe.ts +0 -91
  374. package/tools/geocoder/vs-provided-coords.ts +0 -232
  375. package/tools/gold-set-sample.ts +0 -147
  376. package/tools/learned/scorer/clustering-eval.ts +0 -349
  377. package/tools/learned/scorer/crossstate-eval.ts +0 -280
  378. package/tools/learned/scorer/eval.ts +0 -429
  379. package/tools/matcher-scale.ts +0 -185
  380. package/tools/nppes/dedup-benchmark.ts +0 -364
  381. package/tools/nppes/org-name.ts +0 -15
  382. package/tools/nppes/overmerge-packet.ts +0 -98
  383. package/tools/nppes/report.ts +0 -380
  384. package/tools/nppes/sample.ts +0 -250
  385. package/tools/nppes/scoring.ts +0 -115
  386. package/tools/nppes/settings.ts +0 -102
  387. package/tools/nppes/truth-grains.ts +0 -181
  388. package/tools/shared.ts +0 -743
  389. package/tools/train/cross-gbt.ts +0 -214
  390. package/tools/train/gbt.ts +0 -261
  391. package/tools/train/org-cross-gbt.ts +0 -189
  392. package/tools/txhhsc-to-oarow.ts +0 -118
  393. package/tools/viz/browser.ts +0 -41
  394. package/tools/viz/cross-dataset-map.ts +0 -133
  395. package/tools/viz/geocode-first-surface.ts +0 -305
  396. package/tools/viz/render/map.ts +0 -61
  397. package/tools/viz/render.ts +0 -103
  398. package/tools/viz/source-provenance-map.ts +0 -154
  399. package/tools/viz/yardstick-figure.ts +0 -197
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The strict airport-code predicate over the `iata-airport-membership` bitset. An import of it retains that
7
+ * 2,197-byte bitset and the reader, and no airport record, coordinate or name.
8
+ */
9
+ import { iataAirportMembershipArtifact } from "#artifacts/iata-airport/membership";
10
+ import { ParseFailure, shapeFailure } from "#errors";
11
+ import { encode3 } from "#key";
12
+ import { Artifact } from "#rgy1/reader";
13
+ import { BitsetView } from "#rgy1/views";
14
+ let bitset = null;
15
+ /**
16
+ * Returns the airport membership bitset, parsing the artifact on first use.
17
+ */
18
+ export function airportMembership() {
19
+ bitset ??= BitsetView.of(Artifact.parse(iataAirportMembershipArtifact()));
20
+ return bitset;
21
+ }
22
+ /**
23
+ * Whether `input` is an IATA airport code in its canonical spelling, in the built profile.
24
+ *
25
+ * The open profile holds airports, heliports and seaplane bases from OurAirports
26
+ * and no metropolitan code, so `PAR` is refused here although IATA assigns it to Paris.
27
+ */
28
+ export function isAirportCode(input) {
29
+ return airportMembership().test(encode3(input));
30
+ }
31
+ /**
32
+ * The branded airport code, or the reason the input was refused.
33
+ */
34
+ export function parseAirportCode(input) {
35
+ const shape = shapeFailure(input, 3, true);
36
+ if (shape)
37
+ return { ok: false, reason: shape, input };
38
+ if (!isAirportCode(input))
39
+ return { ok: false, reason: ParseFailure.NotFound, input };
40
+ return { ok: true, value: input };
41
+ }
42
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../lib/iata/airports/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAClF,OAAO,EAAe,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,IAAI,MAAM,GAAsB,IAAI,CAAA;AAEpC;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAChC,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAA;IAEzE,OAAO,MAAM,CAAA;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IAC1C,OAAO,iBAAiB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC7C,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IAE1C,IAAI,KAAK;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IAErD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAA;IAErF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAClC,CAAC"}
package/out/index.d.ts CHANGED
@@ -3,21 +3,25 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `@mailwoman/registry` — the geocode-first record-matching application.
6
+ * `@mailwoman/registry`: standardized identifiers and their relationships, compiled from pinned open sources.
7
7
  *
8
- * {@link resolveEntities} runs the whole matcher (block → score → cluster) over normalized
9
- * contact/organization {@link SourceRecord}s and returns canonical {@link ResolvedEntity entities};
10
- * {@link toGeoJSON} exports them for QGIS. This is the clinic-funding use case mailwoman was built
11
- * for, finally standing on a calibrated, label-free matcher.
8
+ * The root entry re-exports the narrow modules. Every export is a function or a type, and no module decodes an
9
+ * artifact until its first call, so importing the root costs the modules the bundler keeps and no table.
10
+ * Import a subpath such as `@mailwoman/registry/iso3166/alpha2` when a bundle must retain one table only.
12
11
  */
13
- export * from "#address-key";
14
- export * from "#geojson";
15
- export * from "#ingest";
16
- export * from "#geocode-handler";
17
- export * from "#learned-scorer";
18
- export * from "#map-html";
19
- export * from "#models/dedup-gbt-en-us";
20
- export * from "#reconcile";
21
- export * from "#resolve";
22
- export * from "#types";
12
+ export type { ParseFailure, Parsed } from "#errors";
13
+ export { getAirportByIATA, airportsInCountry, airportRecordCount, airportRecordsHeader } from "#iata/airports/records";
14
+ export { isAirportCode, parseAirportCode } from "#iata/airports/validate";
15
+ export type { ArtifactInspection } from "#inspect";
16
+ export { inspectArtifact } from "#inspect";
17
+ export { isCountryCodeAlpha2, parseCountryCodeAlpha2 } from "#iso3166/alpha2";
18
+ export { isCountryCodeAlpha3, parseCountryCodeAlpha3 } from "#iso3166/alpha3";
19
+ export { countryRecordCount, countryRecordsHeader, getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric, } from "#iso3166/records";
20
+ export { alpha2ForAlpha3, alpha2ForNumeric, alpha3ForAlpha2 } from "#iso3166/relations";
21
+ export type { Normalization } from "#normalize";
22
+ export { canonicalSpelling } from "#normalize";
23
+ export type { CodeMatch } from "#overlap/country-airport";
24
+ export { interpretCountryOrAirportCode, isCountryAirportCollision } from "#overlap/country-airport";
25
+ export type { AirportRecord, CountryRecord, IATA, ICAO, ISO } from "#types";
26
+ export { AirportCountryStatus, CountryStatus } from "#types";
23
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACtH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EACN,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACnG,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA"}
package/out/index.js CHANGED
@@ -3,21 +3,20 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `@mailwoman/registry` — the geocode-first record-matching application.
6
+ * `@mailwoman/registry`: standardized identifiers and their relationships, compiled from pinned open sources.
7
7
  *
8
- * {@link resolveEntities} runs the whole matcher (block → score → cluster) over normalized
9
- * contact/organization {@link SourceRecord}s and returns canonical {@link ResolvedEntity entities};
10
- * {@link toGeoJSON} exports them for QGIS. This is the clinic-funding use case mailwoman was built
11
- * for, finally standing on a calibrated, label-free matcher.
8
+ * The root entry re-exports the narrow modules. Every export is a function or a type, and no module decodes an
9
+ * artifact until its first call, so importing the root costs the modules the bundler keeps and no table.
10
+ * Import a subpath such as `@mailwoman/registry/iso3166/alpha2` when a bundle must retain one table only.
12
11
  */
13
- export * from "#address-key";
14
- export * from "#geojson";
15
- export * from "#ingest";
16
- export * from "#geocode-handler";
17
- export * from "#learned-scorer";
18
- export * from "#map-html";
19
- export * from "#models/dedup-gbt-en-us";
20
- export * from "#reconcile";
21
- export * from "#resolve";
22
- export * from "#types";
12
+ export { getAirportByIATA, airportsInCountry, airportRecordCount, airportRecordsHeader } from "#iata/airports/records";
13
+ export { isAirportCode, parseAirportCode } from "#iata/airports/validate";
14
+ export { inspectArtifact } from "#inspect";
15
+ export { isCountryCodeAlpha2, parseCountryCodeAlpha2 } from "#iso3166/alpha2";
16
+ export { isCountryCodeAlpha3, parseCountryCodeAlpha3 } from "#iso3166/alpha3";
17
+ export { countryRecordCount, countryRecordsHeader, getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric, } from "#iso3166/records";
18
+ export { alpha2ForAlpha3, alpha2ForNumeric, alpha3ForAlpha2 } from "#iso3166/relations";
19
+ export { canonicalSpelling } from "#normalize";
20
+ export { interpretCountryOrAirportCode, isCountryAirportCollision } from "#overlap/country-airport";
21
+ export { AirportCountryStatus, CountryStatus } from "#types";
23
22
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACtH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EACN,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEnG,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Coverage and provenance inspection: what an artifact's profile holds, read from its header and directory.
7
+ */
8
+ import { type Artifact, type ArtifactHeader } from "#rgy1/reader";
9
+ /**
10
+ * What an artifact declares about itself.
11
+ */
12
+ export interface ArtifactInspection {
13
+ artifact: string;
14
+ profile: string;
15
+ namespaces: string[];
16
+ sources: ArtifactHeader["sources"];
17
+ coverage: Record<string, number>;
18
+ /**
19
+ * What a miss means under this profile.
20
+ *
21
+ * The source holds no such code, and the issuing authority may have assigned it.
22
+ */
23
+ missMeans: "not-found-in-snapshot";
24
+ status?: string;
25
+ kinds?: string[];
26
+ generator: string;
27
+ sections: Array<{
28
+ kind: number;
29
+ count: number;
30
+ bytes: number;
31
+ aux: number;
32
+ }>;
33
+ }
34
+ /**
35
+ * Reads an artifact's header and directory into a plain inspection record.
36
+ */
37
+ export declare function inspectArtifact(bytes: Uint8Array | Artifact): ArtifactInspection;
38
+ //# sourceMappingURL=inspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../lib/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAA4B,MAAM,cAAc,CAAA;AAE3F;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC;;;;OAIG;IACH,SAAS,EAAE,uBAAuB,CAAA;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC5E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,kBAAkB,CAqBhF"}
package/out/inspect.js ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Coverage and provenance inspection: what an artifact's profile holds, read from its header and directory.
7
+ */
8
+ import { Artifact as RGY1Artifact } from "#rgy1/reader";
9
+ /**
10
+ * Reads an artifact's header and directory into a plain inspection record.
11
+ */
12
+ export function inspectArtifact(bytes) {
13
+ const artifact = bytes instanceof RGY1Artifact ? bytes : RGY1Artifact.parse(bytes);
14
+ const { header } = artifact;
15
+ return {
16
+ artifact: header.artifact,
17
+ profile: header.profile,
18
+ namespaces: header.namespaces,
19
+ sources: header.sources,
20
+ coverage: header.coverage,
21
+ missMeans: "not-found-in-snapshot",
22
+ ...(header.status ? { status: header.status } : {}),
23
+ ...(header.kinds ? { kinds: header.kinds } : {}),
24
+ generator: header.generator,
25
+ sections: artifact.sections.map((section) => ({
26
+ kind: section.kind,
27
+ count: section.count,
28
+ bytes: section.length,
29
+ aux: section.aux,
30
+ })),
31
+ };
32
+ }
33
+ //# sourceMappingURL=inspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.js","sourceRoot":"","sources":["../lib/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsC,QAAQ,IAAI,YAAY,EAAE,MAAM,cAAc,CAAA;AAuB3F;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA4B;IAC3D,MAAM,QAAQ,GAAG,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAClF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAA;IAE3B,OAAO;QACN,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,uBAAuB;QAClC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC7C,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,MAAM;YACrB,GAAG,EAAE,OAAO,CAAC,GAAG;SAChB,CAAC,CAAC;KACH,CAAA;AACF,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The strict alpha-2 country-code predicate over the `iso3166-1-alpha2-membership` bitset. An import of it retains
7
+ * that 85-byte bitset and the reader, and no name, airport or record.
8
+ */
9
+ import { type Parsed } from "#errors";
10
+ import type { ISO } from "#types";
11
+ /**
12
+ * Whether `input` is an officially assigned alpha-2 code in its canonical spelling, in the built profile.
13
+ *
14
+ * `GB` is one.
15
+ * `gb`, ` GB` and `GBR` are not.
16
+ *
17
+ * `canonicalSpelling` is the step that accepts the case or the whitespace.
18
+ */
19
+ export declare function isCountryCodeAlpha2(input: string): input is ISO.CountryCode_3166_1_Alpha2;
20
+ /**
21
+ * The branded alpha-2 code, or the reason the input was refused.
22
+ */
23
+ export declare function parseCountryCodeAlpha2(input: string): Parsed<ISO.CountryCode_3166_1_Alpha2>;
24
+ //# sourceMappingURL=alpha2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha2.d.ts","sourceRoot":"","sources":["../../lib/iso3166/alpha2.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,MAAM,EAA8B,MAAM,SAAS,CAAA;AAIjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAUjC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG,CAAC,yBAAyB,CAEzF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAQ3F"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The strict alpha-2 country-code predicate over the `iso3166-1-alpha2-membership` bitset. An import of it retains
7
+ * that 85-byte bitset and the reader, and no name, airport or record.
8
+ */
9
+ import { iso31661Alpha2MembershipArtifact } from "#artifacts/iso3166-1/alpha2-membership";
10
+ import { ParseFailure, shapeFailure } from "#errors";
11
+ import { encode2 } from "#key";
12
+ import { Artifact } from "#rgy1/reader";
13
+ import { BitsetView } from "#rgy1/views";
14
+ let bitset = null;
15
+ function membership() {
16
+ bitset ??= BitsetView.of(Artifact.parse(iso31661Alpha2MembershipArtifact()));
17
+ return bitset;
18
+ }
19
+ /**
20
+ * Whether `input` is an officially assigned alpha-2 code in its canonical spelling, in the built profile.
21
+ *
22
+ * `GB` is one.
23
+ * `gb`, ` GB` and `GBR` are not.
24
+ *
25
+ * `canonicalSpelling` is the step that accepts the case or the whitespace.
26
+ */
27
+ export function isCountryCodeAlpha2(input) {
28
+ return membership().test(encode2(input));
29
+ }
30
+ /**
31
+ * The branded alpha-2 code, or the reason the input was refused.
32
+ */
33
+ export function parseCountryCodeAlpha2(input) {
34
+ const shape = shapeFailure(input, 2, true);
35
+ if (shape)
36
+ return { ok: false, reason: shape, input };
37
+ if (!isCountryCodeAlpha2(input))
38
+ return { ok: false, reason: ParseFailure.NotFound, input };
39
+ return { ok: true, value: input };
40
+ }
41
+ //# sourceMappingURL=alpha2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha2.js","sourceRoot":"","sources":["../../lib/iso3166/alpha2.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAA;AACzF,OAAO,EAAe,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,IAAI,MAAM,GAAsB,IAAI,CAAA;AAEpC,SAAS,UAAU;IAClB,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAA;IAE5E,OAAO,MAAM,CAAA;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAChD,OAAO,UAAU,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa;IACnD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IAE1C,IAAI,KAAK;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IAErD,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAA;IAE3F,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAClC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The strict alpha-3 country-code predicate over the `iso3166-1-alpha3-membership` bitset. An import of it retains
7
+ * that 2,197-byte bitset and the reader, and no name, airport or record.
8
+ */
9
+ import { type Parsed } from "#errors";
10
+ import { BitsetView } from "#rgy1/views";
11
+ import type { ISO } from "#types";
12
+ /**
13
+ * Returns the alpha-3 membership bitset, parsing the artifact on first use.
14
+ */
15
+ export declare function alpha3Membership(): BitsetView;
16
+ /**
17
+ * Whether `input` is an officially assigned alpha-3 code in its canonical spelling, in the built profile.
18
+ *
19
+ * `AUS` is one.
20
+ * `aus` and `AU` are not.
21
+ *
22
+ * A former code such as `DDR` is not: the records artifact still describes it.
23
+ */
24
+ export declare function isCountryCodeAlpha3(input: string): input is ISO.CountryCode_3166_1_Alpha3;
25
+ /**
26
+ * The branded alpha-3 code, or the reason the input was refused.
27
+ */
28
+ export declare function parseCountryCodeAlpha3(input: string): Parsed<ISO.CountryCode_3166_1_Alpha3>;
29
+ //# sourceMappingURL=alpha3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha3.d.ts","sourceRoot":"","sources":["../../lib/iso3166/alpha3.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,MAAM,EAA8B,MAAM,SAAS,CAAA;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAIjC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAI7C;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,GAAG,CAAC,yBAAyB,CAEzF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAQ3F"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The strict alpha-3 country-code predicate over the `iso3166-1-alpha3-membership` bitset. An import of it retains
7
+ * that 2,197-byte bitset and the reader, and no name, airport or record.
8
+ */
9
+ import { iso31661Alpha3MembershipArtifact } from "#artifacts/iso3166-1/alpha3-membership";
10
+ import { ParseFailure, shapeFailure } from "#errors";
11
+ import { encode3 } from "#key";
12
+ import { Artifact } from "#rgy1/reader";
13
+ import { BitsetView } from "#rgy1/views";
14
+ let bitset = null;
15
+ /**
16
+ * Returns the alpha-3 membership bitset, parsing the artifact on first use.
17
+ */
18
+ export function alpha3Membership() {
19
+ bitset ??= BitsetView.of(Artifact.parse(iso31661Alpha3MembershipArtifact()));
20
+ return bitset;
21
+ }
22
+ /**
23
+ * Whether `input` is an officially assigned alpha-3 code in its canonical spelling, in the built profile.
24
+ *
25
+ * `AUS` is one.
26
+ * `aus` and `AU` are not.
27
+ *
28
+ * A former code such as `DDR` is not: the records artifact still describes it.
29
+ */
30
+ export function isCountryCodeAlpha3(input) {
31
+ return alpha3Membership().test(encode3(input));
32
+ }
33
+ /**
34
+ * The branded alpha-3 code, or the reason the input was refused.
35
+ */
36
+ export function parseCountryCodeAlpha3(input) {
37
+ const shape = shapeFailure(input, 3, true);
38
+ if (shape)
39
+ return { ok: false, reason: shape, input };
40
+ if (!isCountryCodeAlpha3(input))
41
+ return { ok: false, reason: ParseFailure.NotFound, input };
42
+ return { ok: true, value: input };
43
+ }
44
+ //# sourceMappingURL=alpha3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha3.js","sourceRoot":"","sources":["../../lib/iso3166/alpha3.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAA;AACzF,OAAO,EAAe,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,IAAI,MAAM,GAAsB,IAAI,CAAA;AAEpC;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC/B,MAAM,KAAK,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAA;IAE5E,OAAO,MAAM,CAAA;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAChD,OAAO,gBAAgB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa;IACnD,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IAE1C,IAAI,KAAK;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IAErD,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAA;IAE3F,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;AAClC,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Country record retrieval over the `iso3166-1-records` artifact: three id tables, six columns and a string pool.
7
+ *
8
+ * A record is materialized on request and cached by row, so a repeated read of one country returns one object. The
9
+ * artifact holds every status; `getCountry*` answers a record of any status and reports it, while the brands and the
10
+ * membership predicates cover officially assigned codes only.
11
+ */
12
+ import { Artifact } from "#rgy1/reader";
13
+ import { type CountryRecord } from "#types";
14
+ /**
15
+ * The record at `row`, materialized once.
16
+ */
17
+ export declare function countryRecordAt(row: number): CountryRecord | null;
18
+ /**
19
+ * The country holding an alpha-2 code in its canonical spelling, of any status, or `null`.
20
+ */
21
+ export declare function getCountryByAlpha2(code: string): CountryRecord | null;
22
+ /**
23
+ * The country holding an alpha-3 code in its canonical spelling, of any status, or `null`.
24
+ */
25
+ export declare function getCountryByAlpha3(code: string): CountryRecord | null;
26
+ /**
27
+ * The country holding a three-digit numeric code, of any status, or `null`.
28
+ */
29
+ export declare function getCountryByNumeric(code: string): CountryRecord | null;
30
+ /**
31
+ * The number of country records of every status.
32
+ */
33
+ export declare function countryRecordCount(): number;
34
+ /**
35
+ * The records artifact's header: profile, sources and coverage.
36
+ */
37
+ export declare function countryRecordsHeader(): Artifact["header"];
38
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../lib/iso3166/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAcH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,QAAQ,CAAA;AA6D1D;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAuBjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAErE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAErE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAEtE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAEzD"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Country record retrieval over the `iso3166-1-records` artifact: three id tables, six columns and a string pool.
7
+ *
8
+ * A record is materialized on request and cached by row, so a repeated read of one country returns one object. The
9
+ * artifact holds every status; `getCountry*` answers a record of any status and reports it, while the brands and the
10
+ * membership predicates cover officially assigned codes only.
11
+ */
12
+ import { iso31661RecordsArtifact } from "#artifacts/iso3166-1/records";
13
+ import { ARITY_NUMERIC, CODE_LENGTH_2, CODE_LENGTH_3, decode2, decode3, decodeNumeric, encode2, encode3, encodeNumeric, } from "#key";
14
+ import { Artifact } from "#rgy1/reader";
15
+ import { ColumnView, IDTableView, StringPoolView } from "#rgy1/views";
16
+ import { CountryStatus } from "#types";
17
+ let tables = null;
18
+ /**
19
+ * The column order the compiler writes.
20
+ * `header.columns` states the same order.
21
+ */
22
+ const COLUMN = {
23
+ alpha2Key: 0,
24
+ alpha3Key: 1,
25
+ numeric: 2,
26
+ status: 3,
27
+ name: 4,
28
+ entityID: 5,
29
+ };
30
+ function openCountryTables() {
31
+ if (tables)
32
+ return tables;
33
+ const artifact = Artifact.parse(iso31661RecordsArtifact());
34
+ tables = {
35
+ artifact,
36
+ alpha2: IDTableView.of(artifact, CODE_LENGTH_2),
37
+ alpha3: IDTableView.of(artifact, CODE_LENGTH_3),
38
+ numeric: IDTableView.of(artifact, ARITY_NUMERIC),
39
+ columns: {
40
+ alpha2Key: ColumnView.of(artifact, COLUMN.alpha2Key),
41
+ alpha3Key: ColumnView.of(artifact, COLUMN.alpha3Key),
42
+ numeric: ColumnView.of(artifact, COLUMN.numeric),
43
+ status: ColumnView.of(artifact, COLUMN.status),
44
+ name: ColumnView.of(artifact, COLUMN.name),
45
+ entityID: ColumnView.of(artifact, COLUMN.entityID),
46
+ },
47
+ pool: StringPoolView.of(artifact),
48
+ records: new Array(artifact.header.rows ?? 0),
49
+ };
50
+ return tables;
51
+ }
52
+ const STATUSES = [CountryStatus.OfficiallyAssigned, CountryStatus.FormerlyUsed];
53
+ /**
54
+ * The record at `row`, materialized once.
55
+ */
56
+ export function countryRecordAt(row) {
57
+ const tables_ = openCountryTables();
58
+ if (row < 0 || row >= tables_.records.length)
59
+ return null;
60
+ let record = tables_.records[row];
61
+ if (!record) {
62
+ const { columns, pool } = tables_;
63
+ record = Object.freeze({
64
+ entityID: pool.get(columns.entityID.integer(row)) ?? "",
65
+ alpha2: decode2(columns.alpha2Key.integer(row)),
66
+ alpha3: decode3(columns.alpha3Key.integer(row)),
67
+ numeric: decodeNumeric(columns.numeric.integer(row)),
68
+ name: pool.get(columns.name.integer(row)) ?? "",
69
+ status: STATUSES[columns.status.integer(row)] ?? CountryStatus.FormerlyUsed,
70
+ });
71
+ tables_.records[row] = record;
72
+ }
73
+ return record;
74
+ }
75
+ /**
76
+ * The country holding an alpha-2 code in its canonical spelling, of any status, or `null`.
77
+ */
78
+ export function getCountryByAlpha2(code) {
79
+ return countryRecordAt(openCountryTables().alpha2.get(encode2(code)));
80
+ }
81
+ /**
82
+ * The country holding an alpha-3 code in its canonical spelling, of any status, or `null`.
83
+ */
84
+ export function getCountryByAlpha3(code) {
85
+ return countryRecordAt(openCountryTables().alpha3.get(encode3(code)));
86
+ }
87
+ /**
88
+ * The country holding a three-digit numeric code, of any status, or `null`.
89
+ */
90
+ export function getCountryByNumeric(code) {
91
+ return countryRecordAt(openCountryTables().numeric.get(encodeNumeric(code)));
92
+ }
93
+ /**
94
+ * The number of country records of every status.
95
+ */
96
+ export function countryRecordCount() {
97
+ return openCountryTables().records.length;
98
+ }
99
+ /**
100
+ * The records artifact's header: profile, sources and coverage.
101
+ */
102
+ export function countryRecordsHeader() {
103
+ return openCountryTables().artifact.header;
104
+ }
105
+ //# sourceMappingURL=records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.js","sourceRoot":"","sources":["../../lib/iso3166/records.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The code-equivalence relations of one country entity: alpha-2, alpha-3 and numeric codes of the same record.
7
+ */
8
+ /**
9
+ * The alpha-3 code of the entity an alpha-2 code identifies, or `null`.
10
+ */
11
+ export declare function alpha3ForAlpha2(alpha2: string): string | null;
12
+ /**
13
+ * The alpha-2 code of the entity an alpha-3 code identifies, or `null`.
14
+ */
15
+ export declare function alpha2ForAlpha3(alpha3: string): string | null;
16
+ /**
17
+ * The alpha-2 code of the entity a numeric code identifies, or `null`.
18
+ */
19
+ export declare function alpha2ForNumeric(numeric: string): string | null;
20
+ //# sourceMappingURL=relations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations.d.ts","sourceRoot":"","sources":["../../lib/iso3166/relations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE/D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The code-equivalence relations of one country entity: alpha-2, alpha-3 and numeric codes of the same record.
7
+ */
8
+ import { getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric } from "#iso3166/records";
9
+ /**
10
+ * The alpha-3 code of the entity an alpha-2 code identifies, or `null`.
11
+ */
12
+ export function alpha3ForAlpha2(alpha2) {
13
+ return getCountryByAlpha2(alpha2)?.alpha3 ?? null;
14
+ }
15
+ /**
16
+ * The alpha-2 code of the entity an alpha-3 code identifies, or `null`.
17
+ */
18
+ export function alpha2ForAlpha3(alpha3) {
19
+ return getCountryByAlpha3(alpha3)?.alpha2 ?? null;
20
+ }
21
+ /**
22
+ * The alpha-2 code of the entity a numeric code identifies, or `null`.
23
+ */
24
+ export function alpha2ForNumeric(numeric) {
25
+ return getCountryByNumeric(numeric)?.alpha2 ?? null;
26
+ }
27
+ //# sourceMappingURL=relations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relations.js","sourceRoot":"","sources":["../../lib/iso3166/relations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE9F;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC7C,OAAO,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,IAAI,CAAA;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC7C,OAAO,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,IAAI,CAAA;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC/C,OAAO,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,IAAI,CAAA;AACpD,CAAC"}