@jointhedots/gear 1.0.21 → 1.1.5

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 (334) hide show
  1. package/browser-modules/asap-raw.js +79 -0
  2. package/browser-modules/asap.js +57 -0
  3. package/browser-modules/buffer.js +3 -1
  4. package/browser-modules/child_process.js +145 -0
  5. package/browser-modules/events.js +200 -0
  6. package/browser-modules/side-effects.js +8 -0
  7. package/browser-modules/stream.js +323 -0
  8. package/browser-modules/util.js +170 -0
  9. package/browser-modules/worker_threads.js +85 -0
  10. package/esm/builder/build-app-bundle.js +190 -0
  11. package/esm/builder/build-app-bundle.js.map +1 -0
  12. package/esm/builder/build-app-host.js +173 -0
  13. package/esm/builder/build-app-host.js.map +1 -0
  14. package/esm/builder/build-application.js +233 -71
  15. package/esm/builder/build-application.js.map +1 -1
  16. package/esm/builder/build-library.js +29 -39
  17. package/esm/builder/build-library.js.map +1 -1
  18. package/esm/builder/build-target.js +63 -105
  19. package/esm/builder/build-target.js.map +1 -1
  20. package/esm/builder/emit-dts.js +110 -87
  21. package/esm/builder/emit-dts.js.map +1 -1
  22. package/esm/builder/esbuild-plugins.js +182 -59
  23. package/esm/builder/esbuild-plugins.js.map +1 -1
  24. package/esm/builder/helpers/path-helpers.js +95 -0
  25. package/esm/builder/helpers/path-helpers.js.map +1 -0
  26. package/esm/cli.js +0 -1
  27. package/esm/cli.js.map +1 -1
  28. package/esm/commands/init.js +1 -0
  29. package/esm/commands/init.js.map +1 -1
  30. package/esm/commands/make.js +52 -9
  31. package/esm/commands/make.js.map +1 -1
  32. package/esm/commands/publish.js +1 -0
  33. package/esm/commands/publish.js.map +1 -1
  34. package/esm/commands/run.js +1 -0
  35. package/esm/commands/run.js.map +1 -1
  36. package/esm/commands/serve.js +42 -9
  37. package/esm/commands/serve.js.map +1 -1
  38. package/esm/model/component.js +6 -11
  39. package/esm/model/component.js.map +1 -1
  40. package/esm/model/helpers/create-manifests.js +69 -0
  41. package/esm/model/helpers/create-manifests.js.map +1 -0
  42. package/esm/model/helpers/discover-workspace.js +258 -0
  43. package/esm/model/helpers/discover-workspace.js.map +1 -0
  44. package/esm/model/helpers/logger.js +116 -0
  45. package/esm/model/helpers/logger.js.map +1 -0
  46. package/esm/model/storage.js +82 -24
  47. package/esm/model/storage.js.map +1 -1
  48. package/esm/model/workspace.js +107 -148
  49. package/esm/model/workspace.js.map +1 -1
  50. package/esm/publish/publish_aws_s3.js +1 -0
  51. package/esm/publish/publish_aws_s3.js.map +1 -1
  52. package/esm/utils/file.js +37 -6
  53. package/esm/utils/file.js.map +1 -1
  54. package/esm/utils/graph-ordering.js +86 -0
  55. package/esm/utils/graph-ordering.js.map +1 -0
  56. package/esm/utils/normalized-name.js +94 -0
  57. package/esm/utils/normalized-name.js.map +1 -0
  58. package/node_modules/@jspm/core/.github/workflows/ci.yml +64 -0
  59. package/node_modules/@jspm/core/LICENSE +796 -0
  60. package/node_modules/@jspm/core/README.md +11 -0
  61. package/node_modules/@jspm/core/chompfile.toml +28 -0
  62. package/node_modules/@jspm/core/generate-node-libs.mjs +10 -0
  63. package/node_modules/@jspm/core/nodelibs/@empty.dew.js +7 -0
  64. package/node_modules/@jspm/core/nodelibs/@empty.js +3 -0
  65. package/node_modules/@jspm/core/nodelibs/browser/_stream_duplex.js +13 -0
  66. package/node_modules/@jspm/core/nodelibs/browser/_stream_passthrough.js +12 -0
  67. package/node_modules/@jspm/core/nodelibs/browser/_stream_readable.js +14 -0
  68. package/node_modules/@jspm/core/nodelibs/browser/_stream_transform.js +12 -0
  69. package/node_modules/@jspm/core/nodelibs/browser/_stream_writable.js +13 -0
  70. package/node_modules/@jspm/core/nodelibs/browser/assert/strict.js +29 -0
  71. package/node_modules/@jspm/core/nodelibs/browser/assert.js +2574 -0
  72. package/node_modules/@jspm/core/nodelibs/browser/async_hooks.js +14 -0
  73. package/node_modules/@jspm/core/nodelibs/browser/buffer.js +10 -0
  74. package/node_modules/@jspm/core/nodelibs/browser/child_process.js +17 -0
  75. package/node_modules/@jspm/core/nodelibs/browser/chunk-B6-G-Ftj.js +158 -0
  76. package/node_modules/@jspm/core/nodelibs/browser/chunk-B738Er4n.js +5524 -0
  77. package/node_modules/@jspm/core/nodelibs/browser/chunk-BlJi4mNy.js +448 -0
  78. package/node_modules/@jspm/core/nodelibs/browser/chunk-BsRZ0PEC.js +74 -0
  79. package/node_modules/@jspm/core/nodelibs/browser/chunk-C4rKjYLo.js +20 -0
  80. package/node_modules/@jspm/core/nodelibs/browser/chunk-CbQqNoLO.js +32 -0
  81. package/node_modules/@jspm/core/nodelibs/browser/chunk-CcCWfKp1.js +360 -0
  82. package/node_modules/@jspm/core/nodelibs/browser/chunk-CjPlbOtt.js +47 -0
  83. package/node_modules/@jspm/core/nodelibs/browser/chunk-CkFCi-G1.js +36 -0
  84. package/node_modules/@jspm/core/nodelibs/browser/chunk-D3uu3VYh.js +33 -0
  85. package/node_modules/@jspm/core/nodelibs/browser/chunk-DEMDiNwt.js +275 -0
  86. package/node_modules/@jspm/core/nodelibs/browser/chunk-DHWh-hmB.js +1344 -0
  87. package/node_modules/@jspm/core/nodelibs/browser/chunk-DtDiafJB.js +96 -0
  88. package/node_modules/@jspm/core/nodelibs/browser/chunk-DtcTpLWz.js +826 -0
  89. package/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js +1923 -0
  90. package/node_modules/@jspm/core/nodelibs/browser/chunk-b0rmRow7.js +246 -0
  91. package/node_modules/@jspm/core/nodelibs/browser/chunk-tHuMsdT0.js +8 -0
  92. package/node_modules/@jspm/core/nodelibs/browser/cluster.js +33 -0
  93. package/node_modules/@jspm/core/nodelibs/browser/console.js +103 -0
  94. package/node_modules/@jspm/core/nodelibs/browser/constants.js +419 -0
  95. package/node_modules/@jspm/core/nodelibs/browser/crypto.js +109730 -0
  96. package/node_modules/@jspm/core/nodelibs/browser/dgram.js +11 -0
  97. package/node_modules/@jspm/core/nodelibs/browser/diagnostics_channel.js +153 -0
  98. package/node_modules/@jspm/core/nodelibs/browser/dns/promises.js +26 -0
  99. package/node_modules/@jspm/core/nodelibs/browser/dns.js +101 -0
  100. package/node_modules/@jspm/core/nodelibs/browser/domain.js +77 -0
  101. package/node_modules/@jspm/core/nodelibs/browser/events.js +491 -0
  102. package/node_modules/@jspm/core/nodelibs/browser/fs/promises.js +50 -0
  103. package/node_modules/@jspm/core/nodelibs/browser/fs.js +4139 -0
  104. package/node_modules/@jspm/core/nodelibs/browser/http.js +3513 -0
  105. package/node_modules/@jspm/core/nodelibs/browser/http2.js +88 -0
  106. package/node_modules/@jspm/core/nodelibs/browser/https.js +873 -0
  107. package/node_modules/@jspm/core/nodelibs/browser/module.js +58 -0
  108. package/node_modules/@jspm/core/nodelibs/browser/net.js +20 -0
  109. package/node_modules/@jspm/core/nodelibs/browser/os.js +94 -0
  110. package/node_modules/@jspm/core/nodelibs/browser/path/posix.js +40 -0
  111. package/node_modules/@jspm/core/nodelibs/browser/path/win32.js +27 -0
  112. package/node_modules/@jspm/core/nodelibs/browser/path.js +20 -0
  113. package/node_modules/@jspm/core/nodelibs/browser/perf_hooks.js +30 -0
  114. package/node_modules/@jspm/core/nodelibs/browser/process-production.js +274 -0
  115. package/node_modules/@jspm/core/nodelibs/browser/process.js +277 -0
  116. package/node_modules/@jspm/core/nodelibs/browser/punycode.js +436 -0
  117. package/node_modules/@jspm/core/nodelibs/browser/querystring.js +118 -0
  118. package/node_modules/@jspm/core/nodelibs/browser/readline.js +15 -0
  119. package/node_modules/@jspm/core/nodelibs/browser/repl.js +21 -0
  120. package/node_modules/@jspm/core/nodelibs/browser/stream/consumers.js +61 -0
  121. package/node_modules/@jspm/core/nodelibs/browser/stream/promises.js +12 -0
  122. package/node_modules/@jspm/core/nodelibs/browser/stream/web.js +35 -0
  123. package/node_modules/@jspm/core/nodelibs/browser/stream.js +6574 -0
  124. package/node_modules/@jspm/core/nodelibs/browser/string_decoder.js +2 -0
  125. package/node_modules/@jspm/core/nodelibs/browser/sys.js +9 -0
  126. package/node_modules/@jspm/core/nodelibs/browser/timers/promises.js +17 -0
  127. package/node_modules/@jspm/core/nodelibs/browser/timers.js +256 -0
  128. package/node_modules/@jspm/core/nodelibs/browser/tls.js +34 -0
  129. package/node_modules/@jspm/core/nodelibs/browser/tty.js +20 -0
  130. package/node_modules/@jspm/core/nodelibs/browser/url.js +2361 -0
  131. package/node_modules/@jspm/core/nodelibs/browser/util/types.js +51 -0
  132. package/node_modules/@jspm/core/nodelibs/browser/util.js +1345 -0
  133. package/node_modules/@jspm/core/nodelibs/browser/v8.js +21 -0
  134. package/node_modules/@jspm/core/nodelibs/browser/vm.js +139 -0
  135. package/node_modules/@jspm/core/nodelibs/browser/wasi.js +160 -0
  136. package/node_modules/@jspm/core/nodelibs/browser/worker_threads.js +140 -0
  137. package/node_modules/@jspm/core/nodelibs/browser/zlib.js +6545 -0
  138. package/node_modules/@jspm/core/nodelibs/deno/_stream_duplex.ts +5 -0
  139. package/node_modules/@jspm/core/nodelibs/deno/_stream_passthrough.ts +1 -0
  140. package/node_modules/@jspm/core/nodelibs/deno/_stream_readable.ts +5 -0
  141. package/node_modules/@jspm/core/nodelibs/deno/_stream_transform.ts +1 -0
  142. package/node_modules/@jspm/core/nodelibs/deno/_stream_writable.ts +5 -0
  143. package/node_modules/@jspm/core/nodelibs/deno/assert/strict.ts +2 -0
  144. package/node_modules/@jspm/core/nodelibs/deno/assert.ts +2 -0
  145. package/node_modules/@jspm/core/nodelibs/deno/async_hooks.ts +2 -0
  146. package/node_modules/@jspm/core/nodelibs/deno/buffer.ts +5 -0
  147. package/node_modules/@jspm/core/nodelibs/deno/child_process.ts +2 -0
  148. package/node_modules/@jspm/core/nodelibs/deno/cluster.ts +2 -0
  149. package/node_modules/@jspm/core/nodelibs/deno/console.ts +2 -0
  150. package/node_modules/@jspm/core/nodelibs/deno/constants.ts +2 -0
  151. package/node_modules/@jspm/core/nodelibs/deno/crypto.ts +2 -0
  152. package/node_modules/@jspm/core/nodelibs/deno/dgram.ts +2 -0
  153. package/node_modules/@jspm/core/nodelibs/deno/diagnostics_channel.ts +2 -0
  154. package/node_modules/@jspm/core/nodelibs/deno/dns/promises.ts +2 -0
  155. package/node_modules/@jspm/core/nodelibs/deno/dns.ts +2 -0
  156. package/node_modules/@jspm/core/nodelibs/deno/domain.ts +2 -0
  157. package/node_modules/@jspm/core/nodelibs/deno/events.ts +2 -0
  158. package/node_modules/@jspm/core/nodelibs/deno/fs/promises.ts +2 -0
  159. package/node_modules/@jspm/core/nodelibs/deno/fs.ts +2 -0
  160. package/node_modules/@jspm/core/nodelibs/deno/http.ts +2 -0
  161. package/node_modules/@jspm/core/nodelibs/deno/http2.ts +2 -0
  162. package/node_modules/@jspm/core/nodelibs/deno/https.ts +2 -0
  163. package/node_modules/@jspm/core/nodelibs/deno/inspector.ts +2 -0
  164. package/node_modules/@jspm/core/nodelibs/deno/module.ts +2 -0
  165. package/node_modules/@jspm/core/nodelibs/deno/net.ts +2 -0
  166. package/node_modules/@jspm/core/nodelibs/deno/os.ts +2 -0
  167. package/node_modules/@jspm/core/nodelibs/deno/path/posix.ts +2 -0
  168. package/node_modules/@jspm/core/nodelibs/deno/path/win32.ts +2 -0
  169. package/node_modules/@jspm/core/nodelibs/deno/path.ts +2 -0
  170. package/node_modules/@jspm/core/nodelibs/deno/perf_hooks.ts +2 -0
  171. package/node_modules/@jspm/core/nodelibs/deno/process-production.ts +4 -0
  172. package/node_modules/@jspm/core/nodelibs/deno/process.ts +2 -0
  173. package/node_modules/@jspm/core/nodelibs/deno/punycode.ts +2 -0
  174. package/node_modules/@jspm/core/nodelibs/deno/querystring.ts +2 -0
  175. package/node_modules/@jspm/core/nodelibs/deno/readline/promises.ts +2 -0
  176. package/node_modules/@jspm/core/nodelibs/deno/readline.ts +2 -0
  177. package/node_modules/@jspm/core/nodelibs/deno/repl.ts +2 -0
  178. package/node_modules/@jspm/core/nodelibs/deno/stream/consumers.ts +2 -0
  179. package/node_modules/@jspm/core/nodelibs/deno/stream/promises.ts +2 -0
  180. package/node_modules/@jspm/core/nodelibs/deno/stream/web.ts +2 -0
  181. package/node_modules/@jspm/core/nodelibs/deno/stream.ts +2 -0
  182. package/node_modules/@jspm/core/nodelibs/deno/string_decoder.ts +2 -0
  183. package/node_modules/@jspm/core/nodelibs/deno/timers/promises.ts +2 -0
  184. package/node_modules/@jspm/core/nodelibs/deno/timers.ts +2 -0
  185. package/node_modules/@jspm/core/nodelibs/deno/tls.ts +2 -0
  186. package/node_modules/@jspm/core/nodelibs/deno/tty.ts +2 -0
  187. package/node_modules/@jspm/core/nodelibs/deno/url.ts +2 -0
  188. package/node_modules/@jspm/core/nodelibs/deno/util/types.ts +2 -0
  189. package/node_modules/@jspm/core/nodelibs/deno/util.ts +2 -0
  190. package/node_modules/@jspm/core/nodelibs/deno/v8.ts +2 -0
  191. package/node_modules/@jspm/core/nodelibs/deno/vm.ts +2 -0
  192. package/node_modules/@jspm/core/nodelibs/deno/wasi.ts +2 -0
  193. package/node_modules/@jspm/core/nodelibs/deno/worker_threads.ts +2 -0
  194. package/node_modules/@jspm/core/nodelibs/deno/zlib.ts +2 -0
  195. package/node_modules/@jspm/core/nodelibs/node/_http_agent.js +2 -0
  196. package/node_modules/@jspm/core/nodelibs/node/_http_client.js +2 -0
  197. package/node_modules/@jspm/core/nodelibs/node/_http_common.js +2 -0
  198. package/node_modules/@jspm/core/nodelibs/node/_http_incoming.js +2 -0
  199. package/node_modules/@jspm/core/nodelibs/node/_http_outgoing.js +2 -0
  200. package/node_modules/@jspm/core/nodelibs/node/_http_server.js +2 -0
  201. package/node_modules/@jspm/core/nodelibs/node/_stream_duplex.js +2 -0
  202. package/node_modules/@jspm/core/nodelibs/node/_stream_passthrough.js +2 -0
  203. package/node_modules/@jspm/core/nodelibs/node/_stream_readable.js +2 -0
  204. package/node_modules/@jspm/core/nodelibs/node/_stream_transform.js +2 -0
  205. package/node_modules/@jspm/core/nodelibs/node/_stream_wrap.js +2 -0
  206. package/node_modules/@jspm/core/nodelibs/node/_stream_writable.js +2 -0
  207. package/node_modules/@jspm/core/nodelibs/node/_tls_common.js +2 -0
  208. package/node_modules/@jspm/core/nodelibs/node/_tls_wrap.js +2 -0
  209. package/node_modules/@jspm/core/nodelibs/node/assert/strict.js +2 -0
  210. package/node_modules/@jspm/core/nodelibs/node/assert.js +2 -0
  211. package/node_modules/@jspm/core/nodelibs/node/async_hooks.js +2 -0
  212. package/node_modules/@jspm/core/nodelibs/node/buffer.js +2 -0
  213. package/node_modules/@jspm/core/nodelibs/node/child_process.js +2 -0
  214. package/node_modules/@jspm/core/nodelibs/node/cluster.js +2 -0
  215. package/node_modules/@jspm/core/nodelibs/node/console.js +2 -0
  216. package/node_modules/@jspm/core/nodelibs/node/constants.js +2 -0
  217. package/node_modules/@jspm/core/nodelibs/node/crypto.js +2 -0
  218. package/node_modules/@jspm/core/nodelibs/node/dgram.js +2 -0
  219. package/node_modules/@jspm/core/nodelibs/node/diagnostics_channel.js +2 -0
  220. package/node_modules/@jspm/core/nodelibs/node/dns/promises.js +2 -0
  221. package/node_modules/@jspm/core/nodelibs/node/dns.js +2 -0
  222. package/node_modules/@jspm/core/nodelibs/node/domain.js +2 -0
  223. package/node_modules/@jspm/core/nodelibs/node/events.js +2 -0
  224. package/node_modules/@jspm/core/nodelibs/node/fs/promises.js +2 -0
  225. package/node_modules/@jspm/core/nodelibs/node/fs.js +2 -0
  226. package/node_modules/@jspm/core/nodelibs/node/http.js +2 -0
  227. package/node_modules/@jspm/core/nodelibs/node/http2.js +2 -0
  228. package/node_modules/@jspm/core/nodelibs/node/https.js +2 -0
  229. package/node_modules/@jspm/core/nodelibs/node/inspector/promises.js +2 -0
  230. package/node_modules/@jspm/core/nodelibs/node/inspector.js +2 -0
  231. package/node_modules/@jspm/core/nodelibs/node/module.js +2 -0
  232. package/node_modules/@jspm/core/nodelibs/node/net.js +2 -0
  233. package/node_modules/@jspm/core/nodelibs/node/os.js +2 -0
  234. package/node_modules/@jspm/core/nodelibs/node/path/posix.js +2 -0
  235. package/node_modules/@jspm/core/nodelibs/node/path/win32.js +2 -0
  236. package/node_modules/@jspm/core/nodelibs/node/path.js +2 -0
  237. package/node_modules/@jspm/core/nodelibs/node/perf_hooks.js +2 -0
  238. package/node_modules/@jspm/core/nodelibs/node/process-production.js +4 -0
  239. package/node_modules/@jspm/core/nodelibs/node/process.js +2 -0
  240. package/node_modules/@jspm/core/nodelibs/node/punycode.js +2 -0
  241. package/node_modules/@jspm/core/nodelibs/node/querystring.js +2 -0
  242. package/node_modules/@jspm/core/nodelibs/node/readline/promises.js +2 -0
  243. package/node_modules/@jspm/core/nodelibs/node/readline.js +2 -0
  244. package/node_modules/@jspm/core/nodelibs/node/repl.js +2 -0
  245. package/node_modules/@jspm/core/nodelibs/node/stream/consumers.js +2 -0
  246. package/node_modules/@jspm/core/nodelibs/node/stream/promises.js +2 -0
  247. package/node_modules/@jspm/core/nodelibs/node/stream/web.js +2 -0
  248. package/node_modules/@jspm/core/nodelibs/node/stream.js +2 -0
  249. package/node_modules/@jspm/core/nodelibs/node/string_decoder.js +2 -0
  250. package/node_modules/@jspm/core/nodelibs/node/sys.js +2 -0
  251. package/node_modules/@jspm/core/nodelibs/node/timers/promises.js +2 -0
  252. package/node_modules/@jspm/core/nodelibs/node/timers.js +2 -0
  253. package/node_modules/@jspm/core/nodelibs/node/tls.js +2 -0
  254. package/node_modules/@jspm/core/nodelibs/node/trace_events.js +2 -0
  255. package/node_modules/@jspm/core/nodelibs/node/tty.js +2 -0
  256. package/node_modules/@jspm/core/nodelibs/node/url.js +2 -0
  257. package/node_modules/@jspm/core/nodelibs/node/util/types.js +2 -0
  258. package/node_modules/@jspm/core/nodelibs/node/util.js +2 -0
  259. package/node_modules/@jspm/core/nodelibs/node/v8.js +2 -0
  260. package/node_modules/@jspm/core/nodelibs/node/vm.js +2 -0
  261. package/node_modules/@jspm/core/nodelibs/node/wasi.js +2 -0
  262. package/node_modules/@jspm/core/nodelibs/node/worker_threads.js +2 -0
  263. package/node_modules/@jspm/core/nodelibs/node/zlib.js +2 -0
  264. package/node_modules/@jspm/core/package.json +75 -0
  265. package/node_modules/@jspm/core/rollup.config.mjs +55 -0
  266. package/node_modules/@jspm/core/src-browser/__tty.js +11 -0
  267. package/node_modules/@jspm/core/src-browser/_stream_duplex.js +3 -0
  268. package/node_modules/@jspm/core/src-browser/_stream_passthrough.js +2 -0
  269. package/node_modules/@jspm/core/src-browser/_stream_readable.js +5 -0
  270. package/node_modules/@jspm/core/src-browser/_stream_transform.js +2 -0
  271. package/node_modules/@jspm/core/src-browser/_stream_writable.js +3 -0
  272. package/node_modules/@jspm/core/src-browser/assert/strict.js +26 -0
  273. package/node_modules/@jspm/core/src-browser/assert.js +19 -0
  274. package/node_modules/@jspm/core/src-browser/async_hooks.js +21 -0
  275. package/node_modules/@jspm/core/src-browser/buffer.js +5 -0
  276. package/node_modules/@jspm/core/src-browser/child_process.js +27 -0
  277. package/node_modules/@jspm/core/src-browser/cluster.js +38 -0
  278. package/node_modules/@jspm/core/src-browser/console.js +25 -0
  279. package/node_modules/@jspm/core/src-browser/constants.js +209 -0
  280. package/node_modules/@jspm/core/src-browser/crypto.js +63 -0
  281. package/node_modules/@jspm/core/src-browser/dgram.js +15 -0
  282. package/node_modules/@jspm/core/src-browser/diagnostics_channel.js +6 -0
  283. package/node_modules/@jspm/core/src-browser/dns/promises.js +45 -0
  284. package/node_modules/@jspm/core/src-browser/dns.js +121 -0
  285. package/node_modules/@jspm/core/src-browser/domain.js +4 -0
  286. package/node_modules/@jspm/core/src-browser/events.js +105 -0
  287. package/node_modules/@jspm/core/src-browser/fs/promises.js +34 -0
  288. package/node_modules/@jspm/core/src-browser/fs.js +209 -0
  289. package/node_modules/@jspm/core/src-browser/http.js +10 -0
  290. package/node_modules/@jspm/core/src-browser/http2.js +86 -0
  291. package/node_modules/@jspm/core/src-browser/https.js +10 -0
  292. package/node_modules/@jspm/core/src-browser/module.js +75 -0
  293. package/node_modules/@jspm/core/src-browser/net.js +33 -0
  294. package/node_modules/@jspm/core/src-browser/os.js +35 -0
  295. package/node_modules/@jspm/core/src-browser/path/posix.js +38 -0
  296. package/node_modules/@jspm/core/src-browser/path/win32.js +42 -0
  297. package/node_modules/@jspm/core/src-browser/path.js +17 -0
  298. package/node_modules/@jspm/core/src-browser/perf_hooks.js +30 -0
  299. package/node_modules/@jspm/core/src-browser/process-production.js +279 -0
  300. package/node_modules/@jspm/core/src-browser/process.js +282 -0
  301. package/node_modules/@jspm/core/src-browser/punycode.js +8 -0
  302. package/node_modules/@jspm/core/src-browser/querystring.js +6 -0
  303. package/node_modules/@jspm/core/src-browser/readline.js +23 -0
  304. package/node_modules/@jspm/core/src-browser/repl.js +26 -0
  305. package/node_modules/@jspm/core/src-browser/stream/consumers.js +57 -0
  306. package/node_modules/@jspm/core/src-browser/stream/promises.js +4 -0
  307. package/node_modules/@jspm/core/src-browser/stream/web.js +33 -0
  308. package/node_modules/@jspm/core/src-browser/stream.js +26 -0
  309. package/node_modules/@jspm/core/src-browser/string_decoder.js +3 -0
  310. package/node_modules/@jspm/core/src-browser/sys.js +3 -0
  311. package/node_modules/@jspm/core/src-browser/timers/promises.js +12 -0
  312. package/node_modules/@jspm/core/src-browser/timers.js +13 -0
  313. package/node_modules/@jspm/core/src-browser/tls.js +46 -0
  314. package/node_modules/@jspm/core/src-browser/tty.js +3 -0
  315. package/node_modules/@jspm/core/src-browser/url.js +154 -0
  316. package/node_modules/@jspm/core/src-browser/util/types.js +48 -0
  317. package/node_modules/@jspm/core/src-browser/util.js +30 -0
  318. package/node_modules/@jspm/core/src-browser/v8.js +35 -0
  319. package/node_modules/@jspm/core/src-browser/vm.js +9 -0
  320. package/node_modules/@jspm/core/src-browser/wasi.js +15 -0
  321. package/node_modules/@jspm/core/src-browser/worker_threads.js +139 -0
  322. package/node_modules/@jspm/core/src-browser/zlib.js +71 -0
  323. package/node_modules/@jspm/core/test/chrome-worker_threads.test.js +14 -0
  324. package/node_modules/@jspm/core/test/cowsay.wasm +0 -0
  325. package/node_modules/@jspm/core/test/exports.test.js +99 -0
  326. package/node_modules/@jspm/core/test/fs.test.js +13 -0
  327. package/node_modules/@jspm/core/test/os.test.js +7 -0
  328. package/node_modules/@jspm/core/test/process.test.js +15 -0
  329. package/node_modules/@jspm/core/test/server.js +177 -0
  330. package/node_modules/@jspm/core/test/test.html +29 -0
  331. package/node_modules/@jspm/core/test/wasi.test.js +13 -0
  332. package/package.json +39 -24
  333. package/esm/utils/helpers.js +0 -32
  334. package/esm/utils/helpers.js.map +0 -1
@@ -0,0 +1,277 @@
1
+ function unimplemented(name) {
2
+ throw new Error('Node.js process ' + name + ' is not supported by JSPM core outside of Node.js');
3
+ }
4
+
5
+ var queue = [];
6
+ var draining = false;
7
+ var currentQueue;
8
+ var queueIndex = -1;
9
+
10
+ function cleanUpNextTick() {
11
+ if (!draining || !currentQueue)
12
+ return;
13
+ draining = false;
14
+ if (currentQueue.length) {
15
+ queue = currentQueue.concat(queue);
16
+ }
17
+ else {
18
+ queueIndex = -1;
19
+ }
20
+ if (queue.length)
21
+ drainQueue();
22
+ }
23
+
24
+ function drainQueue() {
25
+ if (draining)
26
+ return;
27
+ var timeout = setTimeout(cleanUpNextTick, 0);
28
+ draining = true;
29
+
30
+ var len = queue.length;
31
+ while(len) {
32
+ currentQueue = queue;
33
+ queue = [];
34
+ while (++queueIndex < len) {
35
+ if (currentQueue)
36
+ currentQueue[queueIndex].run();
37
+ }
38
+ queueIndex = -1;
39
+ len = queue.length;
40
+ }
41
+ currentQueue = null;
42
+ draining = false;
43
+ clearTimeout(timeout);
44
+ }
45
+
46
+ function nextTick (fun) {
47
+ var args = new Array(arguments.length - 1);
48
+ if (arguments.length > 1) {
49
+ for (var i = 1; i < arguments.length; i++)
50
+ args[i - 1] = arguments[i];
51
+ }
52
+ queue.push(new Item(fun, args));
53
+ if (queue.length === 1 && !draining)
54
+ setTimeout(drainQueue, 0);
55
+ }
56
+ // v8 likes predictible objects
57
+ function Item(fun, array) {
58
+ this.fun = fun;
59
+ this.array = array;
60
+ }
61
+ Item.prototype.run = function () {
62
+ this.fun.apply(null, this.array);
63
+ };
64
+
65
+ var title = 'browser';
66
+ var arch = 'x64';
67
+ var platform = 'browser';
68
+ var env = {
69
+ PATH: '/usr/bin',
70
+ LANG: typeof navigator !== 'undefined' ? navigator.language + '.UTF-8' : undefined,
71
+ PWD: '/',
72
+ HOME: '/home',
73
+ TMP: '/tmp',
74
+ };
75
+ var argv = ['/usr/bin/node'];
76
+ var execArgv = [];
77
+ var version = 'v16.8.0';
78
+ var versions = {};
79
+
80
+ var emitWarning = function(message, type) {
81
+ console.warn((type ? (type + ': ') : '') + message);
82
+ };
83
+
84
+ var binding = function(name) { unimplemented('binding'); };
85
+
86
+ var umask = function(mask) { return 0; };
87
+
88
+ var cwd = function() { return '/'; };
89
+ var chdir = function(dir) {};
90
+
91
+ var release = {
92
+ name: 'node',
93
+ sourceUrl: '',
94
+ headersUrl: '',
95
+ libUrl: '',
96
+ };
97
+
98
+ function noop() {}
99
+
100
+ var browser = true;
101
+ var _rawDebug = noop;
102
+ var moduleLoadList = [];
103
+ function _linkedBinding(name) { unimplemented('_linkedBinding'); }
104
+ var domain = {};
105
+ var _exiting = false;
106
+ var config = {};
107
+ function dlopen(name) { unimplemented('dlopen'); }
108
+ function _getActiveRequests() { return []; }
109
+ function _getActiveHandles() { return []; }
110
+ var reallyExit = noop;
111
+ var _kill = noop;
112
+ var cpuUsage = function() { return {}; };
113
+ var resourceUsage = cpuUsage;
114
+ var memoryUsage = cpuUsage;
115
+ var kill = noop;
116
+ var exit = noop;
117
+ var openStdin = noop;
118
+ var allowedNodeEnvironmentFlags = {};
119
+ function assert(condition, message) {
120
+ if (!condition) throw new Error(message || 'assertion error');
121
+ }
122
+ var features = {
123
+ inspector: false,
124
+ debug: false,
125
+ uv: false,
126
+ ipv6: false,
127
+ tls_alpn: false,
128
+ tls_sni: false,
129
+ tls_ocsp: false,
130
+ tls: false,
131
+ cached_builtins: true,
132
+ };
133
+ var _fatalExceptions = noop;
134
+ var setUncaughtExceptionCaptureCallback = noop;
135
+ function hasUncaughtExceptionCaptureCallback() { return false; }var _tickCallback = noop;
136
+ var _debugProcess = noop;
137
+ var _debugEnd = noop;
138
+ var _startProfilerIdleNotifier = noop;
139
+ var _stopProfilerIdleNotifier = noop;
140
+ var stdout = undefined;
141
+ var stderr = undefined;
142
+ var stdin = undefined;
143
+ var abort = noop;
144
+ var pid = 2;
145
+ var ppid = 1;
146
+ var execPath = '/bin/usr/node';
147
+ var debugPort = 9229;
148
+ var argv0 = 'node';
149
+ var _preload_modules = [];
150
+ var setSourceMapsEnabled = noop;
151
+
152
+ var _performance = {
153
+ now: typeof performance !== 'undefined' ? performance.now.bind(performance) : undefined,
154
+ timing: typeof performance !== 'undefined' ? performance.timing : undefined,
155
+ };
156
+ if (_performance.now === undefined) {
157
+ var nowOffset = Date.now();
158
+
159
+ if (_performance.timing && _performance.timing.navigationStart) {
160
+ nowOffset = _performance.timing.navigationStart;
161
+ }
162
+ _performance.now = () => Date.now() - nowOffset;
163
+ }
164
+
165
+ function uptime() {
166
+ return _performance.now() / 1000;
167
+ }
168
+
169
+ var nanoPerSec = 1000000000;
170
+ function hrtime(previousTimestamp) {
171
+ var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);
172
+ var clocktime = _performance.now() * 1e-3;
173
+ var seconds = Math.floor(clocktime) + baseNow;
174
+ var nanoseconds = Math.floor((clocktime % 1) * 1e9);
175
+ if (previousTimestamp) {
176
+ seconds = seconds - previousTimestamp[0];
177
+ nanoseconds = nanoseconds - previousTimestamp[1];
178
+ if (nanoseconds < 0) {
179
+ seconds--;
180
+ nanoseconds += nanoPerSec;
181
+ }
182
+ }
183
+ return [seconds, nanoseconds];
184
+ }hrtime.bigint = function(time) {
185
+ var diff = hrtime(time);
186
+ if (typeof BigInt === 'undefined') {
187
+ return diff[0] * nanoPerSec + diff[1];
188
+ }
189
+ return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);
190
+ };
191
+
192
+ var _maxListeners = 10;
193
+ var _events = {};
194
+ var _eventsCount = 0;
195
+ function on () { return process }var addListener = on;
196
+ var once = on;
197
+ var off = on;
198
+ var removeListener = on;
199
+ var removeAllListeners = on;
200
+ var emit = noop;
201
+ var prependListener = on;
202
+ var prependOnceListener = on;
203
+ function listeners (name) { return []; }
204
+ var process = {
205
+ version,
206
+ versions,
207
+ arch,
208
+ platform,
209
+ browser,
210
+ release,
211
+ _rawDebug,
212
+ moduleLoadList,
213
+ binding,
214
+ _linkedBinding,
215
+ _events,
216
+ _eventsCount,
217
+ _maxListeners,
218
+ on,
219
+ addListener,
220
+ once,
221
+ off,
222
+ removeListener,
223
+ removeAllListeners,
224
+ emit,
225
+ prependListener,
226
+ prependOnceListener,
227
+ listeners,
228
+ domain,
229
+ _exiting,
230
+ config,
231
+ dlopen,
232
+ uptime,
233
+ _getActiveRequests,
234
+ _getActiveHandles,
235
+ reallyExit,
236
+ _kill,
237
+ cpuUsage,
238
+ resourceUsage,
239
+ memoryUsage,
240
+ kill,
241
+ exit,
242
+ openStdin,
243
+ allowedNodeEnvironmentFlags,
244
+ assert,
245
+ features,
246
+ _fatalExceptions,
247
+ setUncaughtExceptionCaptureCallback,
248
+ hasUncaughtExceptionCaptureCallback,
249
+ emitWarning,
250
+ nextTick,
251
+ _tickCallback,
252
+ _debugProcess,
253
+ _debugEnd,
254
+ _startProfilerIdleNotifier,
255
+ _stopProfilerIdleNotifier,
256
+ stdout,
257
+ stdin,
258
+ stderr,
259
+ abort,
260
+ umask,
261
+ chdir,
262
+ cwd,
263
+ env,
264
+ title,
265
+ argv,
266
+ execArgv,
267
+ pid,
268
+ ppid,
269
+ execPath,
270
+ debugPort,
271
+ hrtime,
272
+ argv0,
273
+ _preload_modules,
274
+ setSourceMapsEnabled,
275
+ };
276
+
277
+ export { _debugEnd, _debugProcess, _events, _eventsCount, _exiting, _fatalExceptions, _getActiveHandles, _getActiveRequests, _kill, _linkedBinding, _maxListeners, _preload_modules, _rawDebug, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, _tickCallback, abort, addListener, allowedNodeEnvironmentFlags, arch, argv, argv0, assert, binding, browser, chdir, config, cpuUsage, cwd, debugPort, process as default, dlopen, domain, emit, emitWarning, env, execArgv, execPath, exit, features, hasUncaughtExceptionCaptureCallback, hrtime, kill, listeners, memoryUsage, moduleLoadList, nextTick, off, on, once, openStdin, pid, platform, ppid, prependListener, prependOnceListener, reallyExit, release, removeAllListeners, removeListener, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, stderr, stdin, stdout, title, umask, uptime, version, versions };
@@ -0,0 +1,436 @@
1
+ var exports$1 = {},
2
+ _dewExec = false;
3
+ function dew() {
4
+ if (_dewExec) return exports$1;
5
+ _dewExec = true;
6
+ /** Highest positive signed 32-bit float value */
7
+ const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
8
+
9
+ /** Bootstring parameters */
10
+ const base = 36;
11
+ const tMin = 1;
12
+ const tMax = 26;
13
+ const skew = 38;
14
+ const damp = 700;
15
+ const initialBias = 72;
16
+ const initialN = 128; // 0x80
17
+ const delimiter = "-"; // '\x2D'
18
+
19
+ /** Regular expressions */
20
+ const regexPunycode = /^xn--/;
21
+ const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
22
+ const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
23
+
24
+ /** Error messages */
25
+ const errors = {
26
+ "overflow": "Overflow: input needs wider integers to process",
27
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
28
+ "invalid-input": "Invalid input"
29
+ };
30
+
31
+ /** Convenience shortcuts */
32
+ const baseMinusTMin = base - tMin;
33
+ const floor = Math.floor;
34
+ const stringFromCharCode = String.fromCharCode;
35
+
36
+ /*--------------------------------------------------------------------------*/
37
+
38
+ /**
39
+ * A generic error utility function.
40
+ * @private
41
+ * @param {String} type The error type.
42
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
43
+ */
44
+ function error(type) {
45
+ throw new RangeError(errors[type]);
46
+ }
47
+
48
+ /**
49
+ * A generic `Array#map` utility function.
50
+ * @private
51
+ * @param {Array} array The array to iterate over.
52
+ * @param {Function} callback The function that gets called for every array
53
+ * item.
54
+ * @returns {Array} A new array of values returned by the callback function.
55
+ */
56
+ function map(array, callback) {
57
+ const result = [];
58
+ let length = array.length;
59
+ while (length--) {
60
+ result[length] = callback(array[length]);
61
+ }
62
+ return result;
63
+ }
64
+
65
+ /**
66
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
67
+ * addresses.
68
+ * @private
69
+ * @param {String} domain The domain name or email address.
70
+ * @param {Function} callback The function that gets called for every
71
+ * character.
72
+ * @returns {String} A new string of characters returned by the callback
73
+ * function.
74
+ */
75
+ function mapDomain(domain, callback) {
76
+ const parts = domain.split("@");
77
+ let result = "";
78
+ if (parts.length > 1) {
79
+ // In email addresses, only the domain name should be punycoded. Leave
80
+ // the local part (i.e. everything up to `@`) intact.
81
+ result = parts[0] + "@";
82
+ domain = parts[1];
83
+ }
84
+ // Avoid `split(regex)` for IE8 compatibility. See #17.
85
+ domain = domain.replace(regexSeparators, ".");
86
+ const labels = domain.split(".");
87
+ const encoded = map(labels, callback).join(".");
88
+ return result + encoded;
89
+ }
90
+
91
+ /**
92
+ * Creates an array containing the numeric code points of each Unicode
93
+ * character in the string. While JavaScript uses UCS-2 internally,
94
+ * this function will convert a pair of surrogate halves (each of which
95
+ * UCS-2 exposes as separate characters) into a single code point,
96
+ * matching UTF-16.
97
+ * @see `punycode.ucs2.encode`
98
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
99
+ * @memberOf punycode.ucs2
100
+ * @name decode
101
+ * @param {String} string The Unicode input string (UCS-2).
102
+ * @returns {Array} The new array of code points.
103
+ */
104
+ function ucs2decode(string) {
105
+ const output = [];
106
+ let counter = 0;
107
+ const length = string.length;
108
+ while (counter < length) {
109
+ const value = string.charCodeAt(counter++);
110
+ if (value >= 55296 && value <= 56319 && counter < length) {
111
+ // It's a high surrogate, and there is a next character.
112
+ const extra = string.charCodeAt(counter++);
113
+ if ((extra & 64512) == 56320) {
114
+ // Low surrogate.
115
+ output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
116
+ } else {
117
+ // It's an unmatched surrogate; only append this code unit, in case the
118
+ // next code unit is the high surrogate of a surrogate pair.
119
+ output.push(value);
120
+ counter--;
121
+ }
122
+ } else {
123
+ output.push(value);
124
+ }
125
+ }
126
+ return output;
127
+ }
128
+
129
+ /**
130
+ * Creates a string based on an array of numeric code points.
131
+ * @see `punycode.ucs2.decode`
132
+ * @memberOf punycode.ucs2
133
+ * @name encode
134
+ * @param {Array} codePoints The array of numeric code points.
135
+ * @returns {String} The new Unicode string (UCS-2).
136
+ */
137
+ const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
138
+
139
+ /**
140
+ * Converts a basic code point into a digit/integer.
141
+ * @see `digitToBasic()`
142
+ * @private
143
+ * @param {Number} codePoint The basic numeric code point value.
144
+ * @returns {Number} The numeric value of a basic code point (for use in
145
+ * representing integers) in the range `0` to `base - 1`, or `base` if
146
+ * the code point does not represent a value.
147
+ */
148
+ const basicToDigit = function (codePoint) {
149
+ if (codePoint >= 48 && codePoint < 58) {
150
+ return 26 + (codePoint - 48);
151
+ }
152
+ if (codePoint >= 65 && codePoint < 91) {
153
+ return codePoint - 65;
154
+ }
155
+ if (codePoint >= 97 && codePoint < 123) {
156
+ return codePoint - 97;
157
+ }
158
+ return base;
159
+ };
160
+
161
+ /**
162
+ * Converts a digit/integer into a basic code point.
163
+ * @see `basicToDigit()`
164
+ * @private
165
+ * @param {Number} digit The numeric value of a basic code point.
166
+ * @returns {Number} The basic code point whose value (when used for
167
+ * representing integers) is `digit`, which needs to be in the range
168
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
169
+ * used; else, the lowercase form is used. The behavior is undefined
170
+ * if `flag` is non-zero and `digit` has no uppercase form.
171
+ */
172
+ const digitToBasic = function (digit, flag) {
173
+ // 0..25 map to ASCII a..z or A..Z
174
+ // 26..35 map to ASCII 0..9
175
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
176
+ };
177
+
178
+ /**
179
+ * Bias adaptation function as per section 3.4 of RFC 3492.
180
+ * https://tools.ietf.org/html/rfc3492#section-3.4
181
+ * @private
182
+ */
183
+ const adapt = function (delta, numPoints, firstTime) {
184
+ let k = 0;
185
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
186
+ delta += floor(delta / numPoints);
187
+ for /* no initialization */
188
+ (; delta > baseMinusTMin * tMax >> 1; k += base) {
189
+ delta = floor(delta / baseMinusTMin);
190
+ }
191
+ return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
192
+ };
193
+
194
+ /**
195
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
196
+ * symbols.
197
+ * @memberOf punycode
198
+ * @param {String} input The Punycode string of ASCII-only symbols.
199
+ * @returns {String} The resulting string of Unicode symbols.
200
+ */
201
+ const decode = function (input) {
202
+ // Don't use UCS-2.
203
+ const output = [];
204
+ const inputLength = input.length;
205
+ let i = 0;
206
+ let n = initialN;
207
+ let bias = initialBias;
208
+
209
+ // Handle the basic code points: let `basic` be the number of input code
210
+ // points before the last delimiter, or `0` if there is none, then copy
211
+ // the first basic code points to the output.
212
+
213
+ let basic = input.lastIndexOf(delimiter);
214
+ if (basic < 0) {
215
+ basic = 0;
216
+ }
217
+ for (let j = 0; j < basic; ++j) {
218
+ // if it's not a basic code point
219
+ if (input.charCodeAt(j) >= 128) {
220
+ error("not-basic");
221
+ }
222
+ output.push(input.charCodeAt(j));
223
+ }
224
+
225
+ // Main decoding loop: start just after the last delimiter if any basic code
226
+ // points were copied; start at the beginning otherwise.
227
+
228
+ for /* no final expression */
229
+ (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
230
+ // `index` is the index of the next character to be consumed.
231
+ // Decode a generalized variable-length integer into `delta`,
232
+ // which gets added to `i`. The overflow checking is easier
233
+ // if we increase `i` as we go, then subtract off its starting
234
+ // value at the end to obtain `delta`.
235
+ const oldi = i;
236
+ for /* no condition */
237
+ (let w = 1, k = base;; k += base) {
238
+ if (index >= inputLength) {
239
+ error("invalid-input");
240
+ }
241
+ const digit = basicToDigit(input.charCodeAt(index++));
242
+ if (digit >= base) {
243
+ error("invalid-input");
244
+ }
245
+ if (digit > floor((maxInt - i) / w)) {
246
+ error("overflow");
247
+ }
248
+ i += digit * w;
249
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
250
+ if (digit < t) {
251
+ break;
252
+ }
253
+ const baseMinusT = base - t;
254
+ if (w > floor(maxInt / baseMinusT)) {
255
+ error("overflow");
256
+ }
257
+ w *= baseMinusT;
258
+ }
259
+ const out = output.length + 1;
260
+ bias = adapt(i - oldi, out, oldi == 0);
261
+
262
+ // `i` was supposed to wrap around from `out` to `0`,
263
+ // incrementing `n` each time, so we'll fix that now:
264
+ if (floor(i / out) > maxInt - n) {
265
+ error("overflow");
266
+ }
267
+ n += floor(i / out);
268
+ i %= out;
269
+
270
+ // Insert `n` at position `i` of the output.
271
+ output.splice(i++, 0, n);
272
+ }
273
+ return String.fromCodePoint(...output);
274
+ };
275
+
276
+ /**
277
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
278
+ * Punycode string of ASCII-only symbols.
279
+ * @memberOf punycode
280
+ * @param {String} input The string of Unicode symbols.
281
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
282
+ */
283
+ const encode = function (input) {
284
+ const output = [];
285
+
286
+ // Convert the input in UCS-2 to an array of Unicode code points.
287
+ input = ucs2decode(input);
288
+
289
+ // Cache the length.
290
+ const inputLength = input.length;
291
+
292
+ // Initialize the state.
293
+ let n = initialN;
294
+ let delta = 0;
295
+ let bias = initialBias;
296
+
297
+ // Handle the basic code points.
298
+ for (const currentValue of input) {
299
+ if (currentValue < 128) {
300
+ output.push(stringFromCharCode(currentValue));
301
+ }
302
+ }
303
+ const basicLength = output.length;
304
+ let handledCPCount = basicLength;
305
+
306
+ // `handledCPCount` is the number of code points that have been handled;
307
+ // `basicLength` is the number of basic code points.
308
+
309
+ // Finish the basic string with a delimiter unless it's empty.
310
+ if (basicLength) {
311
+ output.push(delimiter);
312
+ }
313
+
314
+ // Main encoding loop:
315
+ while (handledCPCount < inputLength) {
316
+ // All non-basic code points < n have been handled already. Find the next
317
+ // larger one:
318
+ let m = maxInt;
319
+ for (const currentValue of input) {
320
+ if (currentValue >= n && currentValue < m) {
321
+ m = currentValue;
322
+ }
323
+ }
324
+
325
+ // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
326
+ // but guard against overflow.
327
+ const handledCPCountPlusOne = handledCPCount + 1;
328
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
329
+ error("overflow");
330
+ }
331
+ delta += (m - n) * handledCPCountPlusOne;
332
+ n = m;
333
+ for (const currentValue of input) {
334
+ if (currentValue < n && ++delta > maxInt) {
335
+ error("overflow");
336
+ }
337
+ if (currentValue === n) {
338
+ // Represent delta as a generalized variable-length integer.
339
+ let q = delta;
340
+ for /* no condition */
341
+ (let k = base;; k += base) {
342
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
343
+ if (q < t) {
344
+ break;
345
+ }
346
+ const qMinusT = q - t;
347
+ const baseMinusT = base - t;
348
+ output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
349
+ q = floor(qMinusT / baseMinusT);
350
+ }
351
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
352
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
353
+ delta = 0;
354
+ ++handledCPCount;
355
+ }
356
+ }
357
+ ++delta;
358
+ ++n;
359
+ }
360
+ return output.join("");
361
+ };
362
+
363
+ /**
364
+ * Converts a Punycode string representing a domain name or an email address
365
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
366
+ * it doesn't matter if you call it on a string that has already been
367
+ * converted to Unicode.
368
+ * @memberOf punycode
369
+ * @param {String} input The Punycoded domain name or email address to
370
+ * convert to Unicode.
371
+ * @returns {String} The Unicode representation of the given Punycode
372
+ * string.
373
+ */
374
+ const toUnicode = function (input) {
375
+ return mapDomain(input, function (string) {
376
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
377
+ });
378
+ };
379
+
380
+ /**
381
+ * Converts a Unicode string representing a domain name or an email address to
382
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
383
+ * i.e. it doesn't matter if you call it with a domain that's already in
384
+ * ASCII.
385
+ * @memberOf punycode
386
+ * @param {String} input The domain name or email address to convert, as a
387
+ * Unicode string.
388
+ * @returns {String} The Punycode representation of the given domain name or
389
+ * email address.
390
+ */
391
+ const toASCII = function (input) {
392
+ return mapDomain(input, function (string) {
393
+ return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
394
+ });
395
+ };
396
+
397
+ /*--------------------------------------------------------------------------*/
398
+
399
+ /** Define the public API */
400
+ const punycode = {
401
+ /**
402
+ * A string representing the current Punycode.js version number.
403
+ * @memberOf punycode
404
+ * @type String
405
+ */
406
+ "version": "2.3.1",
407
+ /**
408
+ * An object of methods to convert from JavaScript's internal character
409
+ * representation (UCS-2) to Unicode code points, and back.
410
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
411
+ * @memberOf punycode
412
+ * @type Object
413
+ */
414
+ "ucs2": {
415
+ "decode": ucs2decode,
416
+ "encode": ucs2encode
417
+ },
418
+ "decode": decode,
419
+ "encode": encode,
420
+ "toASCII": toASCII,
421
+ "toUnicode": toUnicode
422
+ };
423
+ exports$1 = punycode;
424
+ return exports$1;
425
+ }
426
+
427
+ const exports = dew();
428
+
429
+ var decode = exports.decode;
430
+ var encode = exports.encode;
431
+ var toASCII = exports.toASCII;
432
+ var toUnicode = exports.toUnicode;
433
+ var ucs2 = exports.ucs2;
434
+ var version = exports.version;
435
+
436
+ export { decode, exports as default, encode, toASCII, toUnicode, ucs2, version };