appmap 0.61.0 → 0.63.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3114) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -16
  3. data/ARCHITECTURE.md +68 -0
  4. data/CHANGELOG.md +38 -0
  5. data/Rakefile +7 -7
  6. data/exe/appmap-index +7 -0
  7. data/lib/appmap/agent.rb +0 -11
  8. data/lib/appmap/command/index.rb +25 -0
  9. data/lib/appmap/command/inspect.rb +0 -1
  10. data/lib/appmap/config.rb +8 -1
  11. data/lib/appmap/depends/api.rb +84 -0
  12. data/lib/appmap/depends/configuration.rb +59 -0
  13. data/lib/appmap/depends/node_cli.rb +44 -0
  14. data/lib/appmap/depends/rake_tasks.rb +58 -0
  15. data/lib/appmap/depends/test_file_inspector.rb +89 -0
  16. data/lib/appmap/depends/test_runner.rb +106 -0
  17. data/lib/appmap/depends/util.rb +34 -0
  18. data/lib/appmap/depends.rb +2 -0
  19. data/lib/appmap/node_cli.rb +1 -1
  20. data/lib/appmap/service/test_command_provider.rb +4 -6
  21. data/lib/appmap/version.rb +1 -1
  22. data/lib/appmap.rb +2 -0
  23. data/node_modules/@appland/appmap/CHANGELOG.md +136 -0
  24. data/node_modules/@appland/appmap/package.json +50 -0
  25. data/node_modules/@appland/appmap/src/agentInstaller/buildToolInstallerBase.js +28 -0
  26. data/node_modules/@appland/appmap/src/agentInstaller/commandStruct.js +17 -0
  27. data/node_modules/@appland/appmap/src/agentInstaller/installAgentStep.js +30 -0
  28. data/node_modules/@appland/appmap/src/agentInstaller/javaAgentInstaller.js +321 -0
  29. data/node_modules/@appland/appmap/src/agentInstaller/pythonAgentInstaller.js +174 -0
  30. data/node_modules/@appland/appmap/src/agentInstaller/rubyAgentInstaller.js +129 -0
  31. data/node_modules/@appland/appmap/src/agentInstaller/types.d.ts +76 -0
  32. data/node_modules/@appland/appmap/src/appMapCatalog.js +39 -0
  33. data/node_modules/@appland/appmap/src/appland/getAppMap.js +55 -0
  34. data/node_modules/@appland/appmap/src/appland/listAppMaps.js +58 -0
  35. data/node_modules/@appland/appmap/src/appland/settings.js +62 -0
  36. data/node_modules/@appland/appmap/src/appland/types.d.ts +16 -0
  37. data/node_modules/@appland/appmap/src/cli.js +729 -0
  38. data/node_modules/@appland/appmap/src/database.js +197 -0
  39. data/node_modules/@appland/appmap/src/depends.js +157 -0
  40. data/node_modules/@appland/appmap/src/errors/abortError.js +5 -0
  41. data/node_modules/@appland/appmap/src/errors/validationError.js +5 -0
  42. data/node_modules/@appland/appmap/src/fingerprint/algorithms.js +71 -0
  43. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/base.js +58 -0
  44. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/classDependencies.js +36 -0
  45. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/classes.js +14 -0
  46. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/eventTree.js +19 -0
  47. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/httpClientRequests.js +18 -0
  48. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/httpServerRequests.js +18 -0
  49. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/info.js +55 -0
  50. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/labels.js +10 -0
  51. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/packageDependencies.js +36 -0
  52. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/packages.js +14 -0
  53. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/sqlNormalized.js +19 -0
  54. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/sqlTables.js +24 -0
  55. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/trace.js +57 -0
  56. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/unique.js +8 -0
  57. data/node_modules/@appland/appmap/src/fingerprint/canonicalize/update.js +85 -0
  58. data/node_modules/@appland/appmap/src/fingerprint/canonicalize.js +70 -0
  59. data/node_modules/@appland/appmap/src/fingerprint/fingerprintDirectoryCommand.js +30 -0
  60. data/node_modules/@appland/appmap/src/fingerprint/fingerprintQueue.js +30 -0
  61. data/node_modules/@appland/appmap/src/fingerprint/fingerprintWatchCommand.js +64 -0
  62. data/node_modules/@appland/appmap/src/fingerprint/fingerprinter.js +186 -0
  63. data/node_modules/@appland/appmap/src/fingerprint/index.js +24 -0
  64. data/node_modules/@appland/appmap/src/functionStats.js +168 -0
  65. data/node_modules/@appland/appmap/src/inspect/fields.js +66 -0
  66. data/node_modules/@appland/appmap/src/inspect/filter.js +105 -0
  67. data/node_modules/@appland/appmap/src/inspect/home.js +64 -0
  68. data/node_modules/@appland/appmap/src/inspect/print.js +231 -0
  69. data/node_modules/@appland/appmap/src/inspect/reset.js +10 -0
  70. data/node_modules/@appland/appmap/src/inspect/types.d.ts +11 -0
  71. data/node_modules/@appland/appmap/src/inspect/undoFilter.js +10 -0
  72. data/node_modules/@appland/appmap/src/inspect.js +7 -0
  73. data/node_modules/@appland/appmap/src/inventoryCommand.js +59 -0
  74. data/node_modules/@appland/appmap/src/search/codeObjectMatcher.js +75 -0
  75. data/node_modules/@appland/appmap/src/search/constants.js +5 -0
  76. data/node_modules/@appland/appmap/src/search/findCodeObjects.js +293 -0
  77. data/node_modules/@appland/appmap/src/search/findEvents.js +184 -0
  78. data/node_modules/@appland/appmap/src/search/matchFilter.js +65 -0
  79. data/node_modules/@appland/appmap/src/search/matchSpec.js +198 -0
  80. data/node_modules/@appland/appmap/src/search/trigram.js +107 -0
  81. data/node_modules/@appland/appmap/src/search/types.d.ts +107 -0
  82. data/node_modules/@appland/appmap/src/search/utils.js +4 -0
  83. data/node_modules/@appland/appmap/src/swagger/README.md +75 -0
  84. data/node_modules/@appland/appmap/src/swagger/command.js +42 -0
  85. data/node_modules/@appland/appmap/src/swagger/method.js +173 -0
  86. data/node_modules/@appland/appmap/src/swagger/model.js +54 -0
  87. data/node_modules/@appland/appmap/src/swagger/path.js +38 -0
  88. data/node_modules/@appland/appmap/src/swagger/response.js +34 -0
  89. data/node_modules/@appland/appmap/src/swagger/schema.js +38 -0
  90. data/node_modules/@appland/appmap/src/swagger/securitySchemes.js +60 -0
  91. data/node_modules/@appland/appmap/src/swagger/settings.js +9 -0
  92. data/node_modules/@appland/appmap/src/swagger/util.js +79 -0
  93. data/node_modules/@appland/appmap/src/utils.js +165 -0
  94. data/node_modules/@appland/appmap/tests/unit/agentInstall/python.js +0 -0
  95. data/node_modules/@appland/appmap/tests/unit/agentInstall/python.spec.js +109 -0
  96. data/node_modules/@appland/appmap/tests/unit/depends.spec.js +63 -0
  97. data/node_modules/@appland/appmap/tests/unit/fingerprint/canonicalize.spec.js +42 -0
  98. data/node_modules/@appland/appmap/tests/unit/fingerprint/sql.spec.js +40 -0
  99. data/node_modules/@appland/appmap/tests/unit/fixtures/python/pip/requirements.txt +2 -0
  100. data/node_modules/@appland/appmap/tests/unit/fixtures/python/poetry/poetry.lock +2 -0
  101. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/app/controllers/organizations_controller.rb +1 -0
  102. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/app/models/configuration.rb +1 -0
  103. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/app/models/show.rb +1 -0
  104. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/app/models/user.rb +1 -0
  105. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/canonicalize/revoke_api_key.info.json +170 -0
  106. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/canonicalize/revoke_api_key.trace.json +213 -0
  107. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/canonicalize/revoke_api_key.update.json +54 -0
  108. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/revoke_api_key.appmap.json +884 -0
  109. data/node_modules/@appland/appmap/tests/unit/fixtures/ruby/user_page_scenario.appmap.json +1750 -0
  110. data/node_modules/@appland/appmap/tests/unit/inspect.spec.js +105 -0
  111. data/node_modules/@appland/models/CHANGELOG.md +90 -0
  112. data/node_modules/@appland/models/README.md +8 -0
  113. data/node_modules/@appland/models/dist/index.cjs +4250 -0
  114. data/node_modules/@appland/models/dist/index.js +4193 -0
  115. data/node_modules/@appland/models/package.json +50 -0
  116. data/node_modules/@tootallnate/once/dist/index.d.ts +14 -0
  117. data/node_modules/@tootallnate/once/dist/index.js +39 -0
  118. data/node_modules/@tootallnate/once/dist/index.js.map +1 -0
  119. data/node_modules/@tootallnate/once/package.json +45 -0
  120. data/node_modules/abab/CHANGELOG.md +45 -0
  121. data/node_modules/abab/LICENSE.md +13 -0
  122. data/node_modules/abab/README.md +51 -0
  123. data/node_modules/abab/index.d.ts +2 -0
  124. data/node_modules/abab/index.js +9 -0
  125. data/node_modules/abab/lib/atob.js +97 -0
  126. data/node_modules/abab/lib/btoa.js +58 -0
  127. data/node_modules/abab/package.json +42 -0
  128. data/node_modules/acorn/CHANGELOG.md +744 -0
  129. data/node_modules/acorn/LICENSE +21 -0
  130. data/node_modules/acorn/README.md +280 -0
  131. data/node_modules/acorn/bin/acorn +4 -0
  132. data/node_modules/acorn/dist/acorn.d.ts +211 -0
  133. data/node_modules/acorn/dist/acorn.js +5525 -0
  134. data/node_modules/acorn/dist/acorn.mjs +5494 -0
  135. data/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  136. data/node_modules/acorn/dist/bin.js +65 -0
  137. data/node_modules/acorn/package.json +46 -0
  138. data/node_modules/acorn-globals/LICENSE +19 -0
  139. data/node_modules/acorn-globals/README.md +81 -0
  140. data/node_modules/acorn-globals/index.js +179 -0
  141. data/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md +620 -0
  142. data/node_modules/acorn-globals/node_modules/acorn/LICENSE +21 -0
  143. data/node_modules/acorn-globals/node_modules/acorn/README.md +269 -0
  144. data/node_modules/acorn-globals/node_modules/acorn/bin/acorn +4 -0
  145. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts +209 -0
  146. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js +5186 -0
  147. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js.map +1 -0
  148. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs +5155 -0
  149. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  150. data/node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs.map +1 -0
  151. data/node_modules/acorn-globals/node_modules/acorn/dist/bin.js +64 -0
  152. data/node_modules/acorn-globals/node_modules/acorn/package.json +35 -0
  153. data/node_modules/acorn-globals/package.json +35 -0
  154. data/node_modules/acorn-walk/CHANGELOG.md +131 -0
  155. data/node_modules/acorn-walk/LICENSE +19 -0
  156. data/node_modules/acorn-walk/README.md +126 -0
  157. data/node_modules/acorn-walk/dist/walk.d.ts +112 -0
  158. data/node_modules/acorn-walk/dist/walk.js +463 -0
  159. data/node_modules/acorn-walk/dist/walk.js.map +1 -0
  160. data/node_modules/acorn-walk/dist/walk.mjs +443 -0
  161. data/node_modules/acorn-walk/dist/walk.mjs.map +1 -0
  162. data/node_modules/acorn-walk/package.json +34 -0
  163. data/node_modules/agent-base/README.md +145 -0
  164. data/node_modules/agent-base/dist/src/index.d.ts +78 -0
  165. data/node_modules/agent-base/dist/src/index.js +203 -0
  166. data/node_modules/agent-base/dist/src/index.js.map +1 -0
  167. data/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  168. data/node_modules/agent-base/dist/src/promisify.js +18 -0
  169. data/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  170. data/node_modules/agent-base/package.json +64 -0
  171. data/node_modules/agent-base/src/index.ts +345 -0
  172. data/node_modules/agent-base/src/promisify.ts +33 -0
  173. data/node_modules/ansi-regex/index.d.ts +37 -0
  174. data/node_modules/ansi-regex/index.js +10 -0
  175. data/node_modules/ansi-regex/license +9 -0
  176. data/node_modules/ansi-regex/package.json +55 -0
  177. data/node_modules/ansi-regex/readme.md +78 -0
  178. data/node_modules/ansi-styles/index.d.ts +345 -0
  179. data/node_modules/ansi-styles/index.js +163 -0
  180. data/node_modules/ansi-styles/license +9 -0
  181. data/node_modules/ansi-styles/package.json +56 -0
  182. data/node_modules/ansi-styles/readme.md +152 -0
  183. data/node_modules/anymatch/LICENSE +15 -0
  184. data/node_modules/anymatch/README.md +87 -0
  185. data/node_modules/anymatch/index.d.ts +19 -0
  186. data/node_modules/anymatch/index.js +104 -0
  187. data/node_modules/anymatch/package.json +48 -0
  188. data/node_modules/argparse/CHANGELOG.md +185 -0
  189. data/node_modules/argparse/LICENSE +21 -0
  190. data/node_modules/argparse/README.md +257 -0
  191. data/node_modules/argparse/index.js +3 -0
  192. data/node_modules/argparse/lib/action/append/constant.js +47 -0
  193. data/node_modules/argparse/lib/action/append.js +53 -0
  194. data/node_modules/argparse/lib/action/count.js +40 -0
  195. data/node_modules/argparse/lib/action/help.js +47 -0
  196. data/node_modules/argparse/lib/action/store/constant.js +43 -0
  197. data/node_modules/argparse/lib/action/store/false.js +27 -0
  198. data/node_modules/argparse/lib/action/store/true.js +26 -0
  199. data/node_modules/argparse/lib/action/store.js +50 -0
  200. data/node_modules/argparse/lib/action/subparsers.js +149 -0
  201. data/node_modules/argparse/lib/action/version.js +47 -0
  202. data/node_modules/argparse/lib/action.js +146 -0
  203. data/node_modules/argparse/lib/action_container.js +482 -0
  204. data/node_modules/argparse/lib/argparse.js +14 -0
  205. data/node_modules/argparse/lib/argument/error.js +50 -0
  206. data/node_modules/argparse/lib/argument/exclusive.js +54 -0
  207. data/node_modules/argparse/lib/argument/group.js +75 -0
  208. data/node_modules/argparse/lib/argument_parser.js +1161 -0
  209. data/node_modules/argparse/lib/const.js +21 -0
  210. data/node_modules/argparse/lib/help/added_formatters.js +87 -0
  211. data/node_modules/argparse/lib/help/formatter.js +795 -0
  212. data/node_modules/argparse/lib/namespace.js +76 -0
  213. data/node_modules/argparse/lib/utils.js +57 -0
  214. data/node_modules/argparse/package.json +34 -0
  215. data/node_modules/async/CHANGELOG.md +331 -0
  216. data/node_modules/async/LICENSE +19 -0
  217. data/node_modules/async/README.md +60 -0
  218. data/node_modules/async/all.js +54 -0
  219. data/node_modules/async/allLimit.js +46 -0
  220. data/node_modules/async/allSeries.js +45 -0
  221. data/node_modules/async/any.js +56 -0
  222. data/node_modules/async/anyLimit.js +47 -0
  223. data/node_modules/async/anySeries.js +46 -0
  224. data/node_modules/async/apply.js +55 -0
  225. data/node_modules/async/applyEach.js +57 -0
  226. data/node_modules/async/applyEachSeries.js +37 -0
  227. data/node_modules/async/asyncify.js +118 -0
  228. data/node_modules/async/auto.js +267 -0
  229. data/node_modules/async/autoInject.js +156 -0
  230. data/node_modules/async/bower.json +17 -0
  231. data/node_modules/async/cargo.js +63 -0
  232. data/node_modules/async/cargoQueue.js +71 -0
  233. data/node_modules/async/compose.js +55 -0
  234. data/node_modules/async/concat.js +47 -0
  235. data/node_modules/async/concatLimit.js +60 -0
  236. data/node_modules/async/concatSeries.js +41 -0
  237. data/node_modules/async/constant.js +55 -0
  238. data/node_modules/async/detect.js +61 -0
  239. data/node_modules/async/detectLimit.js +48 -0
  240. data/node_modules/async/detectSeries.js +47 -0
  241. data/node_modules/async/dir.js +43 -0
  242. data/node_modules/async/dist/async.js +4846 -0
  243. data/node_modules/async/dist/async.min.js +1 -0
  244. data/node_modules/async/dist/async.mjs +4734 -0
  245. data/node_modules/async/doDuring.js +68 -0
  246. data/node_modules/async/doUntil.js +46 -0
  247. data/node_modules/async/doWhilst.js +68 -0
  248. data/node_modules/async/during.js +78 -0
  249. data/node_modules/async/each.js +88 -0
  250. data/node_modules/async/eachLimit.js +50 -0
  251. data/node_modules/async/eachOf.js +116 -0
  252. data/node_modules/async/eachOfLimit.js +47 -0
  253. data/node_modules/async/eachOfSeries.js +39 -0
  254. data/node_modules/async/eachSeries.js +44 -0
  255. data/node_modules/async/ensureAsync.js +67 -0
  256. data/node_modules/async/every.js +54 -0
  257. data/node_modules/async/everyLimit.js +46 -0
  258. data/node_modules/async/everySeries.js +45 -0
  259. data/node_modules/async/filter.js +53 -0
  260. data/node_modules/async/filterLimit.js +45 -0
  261. data/node_modules/async/filterSeries.js +43 -0
  262. data/node_modules/async/find.js +61 -0
  263. data/node_modules/async/findLimit.js +48 -0
  264. data/node_modules/async/findSeries.js +47 -0
  265. data/node_modules/async/flatMap.js +47 -0
  266. data/node_modules/async/flatMapLimit.js +60 -0
  267. data/node_modules/async/flatMapSeries.js +41 -0
  268. data/node_modules/async/foldl.js +77 -0
  269. data/node_modules/async/foldr.js +41 -0
  270. data/node_modules/async/forEach.js +88 -0
  271. data/node_modules/async/forEachLimit.js +50 -0
  272. data/node_modules/async/forEachOf.js +116 -0
  273. data/node_modules/async/forEachOfLimit.js +47 -0
  274. data/node_modules/async/forEachOfSeries.js +39 -0
  275. data/node_modules/async/forEachSeries.js +44 -0
  276. data/node_modules/async/forever.js +68 -0
  277. data/node_modules/async/groupBy.js +54 -0
  278. data/node_modules/async/groupByLimit.js +71 -0
  279. data/node_modules/async/groupBySeries.js +36 -0
  280. data/node_modules/async/index.js +588 -0
  281. data/node_modules/async/inject.js +77 -0
  282. data/node_modules/async/internal/DoublyLinkedList.js +92 -0
  283. data/node_modules/async/internal/Heap.js +120 -0
  284. data/node_modules/async/internal/applyEach.js +29 -0
  285. data/node_modules/async/internal/asyncEachOfLimit.js +75 -0
  286. data/node_modules/async/internal/awaitify.js +27 -0
  287. data/node_modules/async/internal/breakLoop.js +10 -0
  288. data/node_modules/async/internal/consoleFunc.js +27 -0
  289. data/node_modules/async/internal/createTester.js +40 -0
  290. data/node_modules/async/internal/eachOfLimit.js +90 -0
  291. data/node_modules/async/internal/filter.js +55 -0
  292. data/node_modules/async/internal/getIterator.js +11 -0
  293. data/node_modules/async/internal/initialParams.js +14 -0
  294. data/node_modules/async/internal/isArrayLike.js +10 -0
  295. data/node_modules/async/internal/iterator.js +54 -0
  296. data/node_modules/async/internal/map.js +30 -0
  297. data/node_modules/async/internal/once.js +17 -0
  298. data/node_modules/async/internal/onlyOnce.js +15 -0
  299. data/node_modules/async/internal/parallel.js +34 -0
  300. data/node_modules/async/internal/promiseCallback.js +23 -0
  301. data/node_modules/async/internal/queue.js +291 -0
  302. data/node_modules/async/internal/range.js +14 -0
  303. data/node_modules/async/internal/reject.js +26 -0
  304. data/node_modules/async/internal/setImmediate.js +30 -0
  305. data/node_modules/async/internal/withoutIndex.js +10 -0
  306. data/node_modules/async/internal/wrapAsync.js +34 -0
  307. data/node_modules/async/log.js +41 -0
  308. data/node_modules/async/map.js +62 -0
  309. data/node_modules/async/mapLimit.js +45 -0
  310. data/node_modules/async/mapSeries.js +44 -0
  311. data/node_modules/async/mapValues.js +62 -0
  312. data/node_modules/async/mapValuesLimit.js +61 -0
  313. data/node_modules/async/mapValuesSeries.js +37 -0
  314. data/node_modules/async/memoize.js +91 -0
  315. data/node_modules/async/nextTick.js +52 -0
  316. data/node_modules/async/package.json +82 -0
  317. data/node_modules/async/parallel.js +91 -0
  318. data/node_modules/async/parallelLimit.js +41 -0
  319. data/node_modules/async/priorityQueue.js +84 -0
  320. data/node_modules/async/queue.js +167 -0
  321. data/node_modules/async/race.js +67 -0
  322. data/node_modules/async/reduce.js +77 -0
  323. data/node_modules/async/reduceRight.js +41 -0
  324. data/node_modules/async/reflect.js +78 -0
  325. data/node_modules/async/reflectAll.js +93 -0
  326. data/node_modules/async/reject.js +53 -0
  327. data/node_modules/async/rejectLimit.js +45 -0
  328. data/node_modules/async/rejectSeries.js +43 -0
  329. data/node_modules/async/retry.js +159 -0
  330. data/node_modules/async/retryable.js +77 -0
  331. data/node_modules/async/select.js +53 -0
  332. data/node_modules/async/selectLimit.js +45 -0
  333. data/node_modules/async/selectSeries.js +43 -0
  334. data/node_modules/async/seq.js +79 -0
  335. data/node_modules/async/series.js +86 -0
  336. data/node_modules/async/setImmediate.js +45 -0
  337. data/node_modules/async/some.js +56 -0
  338. data/node_modules/async/someLimit.js +47 -0
  339. data/node_modules/async/someSeries.js +46 -0
  340. data/node_modules/async/sortBy.js +88 -0
  341. data/node_modules/async/timeout.js +89 -0
  342. data/node_modules/async/times.js +50 -0
  343. data/node_modules/async/timesLimit.js +43 -0
  344. data/node_modules/async/timesSeries.js +32 -0
  345. data/node_modules/async/transform.js +81 -0
  346. data/node_modules/async/tryEach.js +78 -0
  347. data/node_modules/async/unmemoize.js +25 -0
  348. data/node_modules/async/until.js +61 -0
  349. data/node_modules/async/waterfall.js +105 -0
  350. data/node_modules/async/whilst.js +78 -0
  351. data/node_modules/async/wrapSync.js +118 -0
  352. data/node_modules/asynckit/LICENSE +21 -0
  353. data/node_modules/asynckit/README.md +233 -0
  354. data/node_modules/asynckit/bench.js +76 -0
  355. data/node_modules/asynckit/index.js +6 -0
  356. data/node_modules/asynckit/lib/abort.js +29 -0
  357. data/node_modules/asynckit/lib/async.js +34 -0
  358. data/node_modules/asynckit/lib/defer.js +26 -0
  359. data/node_modules/asynckit/lib/iterate.js +75 -0
  360. data/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  361. data/node_modules/asynckit/lib/readable_parallel.js +25 -0
  362. data/node_modules/asynckit/lib/readable_serial.js +25 -0
  363. data/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  364. data/node_modules/asynckit/lib/state.js +37 -0
  365. data/node_modules/asynckit/lib/streamify.js +141 -0
  366. data/node_modules/asynckit/lib/terminator.js +29 -0
  367. data/node_modules/asynckit/package.json +63 -0
  368. data/node_modules/asynckit/parallel.js +43 -0
  369. data/node_modules/asynckit/serial.js +17 -0
  370. data/node_modules/asynckit/serialOrdered.js +75 -0
  371. data/node_modules/asynckit/stream.js +21 -0
  372. data/node_modules/at-least-node/LICENSE +6 -0
  373. data/node_modules/at-least-node/README.md +25 -0
  374. data/node_modules/at-least-node/index.js +5 -0
  375. data/node_modules/at-least-node/package.json +32 -0
  376. data/node_modules/balanced-match/LICENSE.md +21 -0
  377. data/node_modules/balanced-match/README.md +97 -0
  378. data/node_modules/balanced-match/index.js +62 -0
  379. data/node_modules/balanced-match/package.json +48 -0
  380. data/node_modules/binary-extensions/binary-extensions.json +260 -0
  381. data/node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0
  382. data/node_modules/binary-extensions/index.d.ts +14 -0
  383. data/node_modules/binary-extensions/index.js +1 -0
  384. data/node_modules/binary-extensions/license +9 -0
  385. data/node_modules/binary-extensions/package.json +38 -0
  386. data/node_modules/binary-extensions/readme.md +41 -0
  387. data/node_modules/brace-expansion/LICENSE +21 -0
  388. data/node_modules/brace-expansion/README.md +129 -0
  389. data/node_modules/brace-expansion/index.js +201 -0
  390. data/node_modules/brace-expansion/package.json +47 -0
  391. data/node_modules/braces/CHANGELOG.md +184 -0
  392. data/node_modules/braces/LICENSE +21 -0
  393. data/node_modules/braces/README.md +593 -0
  394. data/node_modules/braces/index.js +170 -0
  395. data/node_modules/braces/lib/compile.js +57 -0
  396. data/node_modules/braces/lib/constants.js +57 -0
  397. data/node_modules/braces/lib/expand.js +113 -0
  398. data/node_modules/braces/lib/parse.js +333 -0
  399. data/node_modules/braces/lib/stringify.js +32 -0
  400. data/node_modules/braces/lib/utils.js +112 -0
  401. data/node_modules/braces/package.json +77 -0
  402. data/node_modules/browser-process-hrtime/LICENSE +9 -0
  403. data/node_modules/browser-process-hrtime/README.md +27 -0
  404. data/node_modules/browser-process-hrtime/index.d.ts +4 -0
  405. data/node_modules/browser-process-hrtime/index.js +28 -0
  406. data/node_modules/browser-process-hrtime/package.json +15 -0
  407. data/node_modules/chokidar/LICENSE +21 -0
  408. data/node_modules/chokidar/README.md +308 -0
  409. data/node_modules/chokidar/index.js +973 -0
  410. data/node_modules/chokidar/lib/constants.js +65 -0
  411. data/node_modules/chokidar/lib/fsevents-handler.js +524 -0
  412. data/node_modules/chokidar/lib/nodefs-handler.js +646 -0
  413. data/node_modules/chokidar/package.json +78 -0
  414. data/node_modules/chokidar/types/index.d.ts +187 -0
  415. data/node_modules/cli-progress/CHANGES.md +169 -0
  416. data/node_modules/cli-progress/LICENSE.md +24 -0
  417. data/node_modules/cli-progress/README.md +446 -0
  418. data/node_modules/cli-progress/cli-progress.js +21 -0
  419. data/node_modules/cli-progress/lib/eta.js +73 -0
  420. data/node_modules/cli-progress/lib/format-bar.js +11 -0
  421. data/node_modules/cli-progress/lib/format-time.js +34 -0
  422. data/node_modules/cli-progress/lib/format-value.js +22 -0
  423. data/node_modules/cli-progress/lib/formatter.js +80 -0
  424. data/node_modules/cli-progress/lib/generic-bar.js +212 -0
  425. data/node_modules/cli-progress/lib/multi-bar.js +201 -0
  426. data/node_modules/cli-progress/lib/options.js +95 -0
  427. data/node_modules/cli-progress/lib/single-bar.js +124 -0
  428. data/node_modules/cli-progress/lib/terminal.js +159 -0
  429. data/node_modules/cli-progress/package.json +46 -0
  430. data/node_modules/cli-progress/presets/index.js +11 -0
  431. data/node_modules/cli-progress/presets/legacy.js +6 -0
  432. data/node_modules/cli-progress/presets/rect.js +5 -0
  433. data/node_modules/cli-progress/presets/shades-classic.js +6 -0
  434. data/node_modules/cli-progress/presets/shades-grey.js +8 -0
  435. data/node_modules/cliui/CHANGELOG.md +121 -0
  436. data/node_modules/cliui/LICENSE.txt +14 -0
  437. data/node_modules/cliui/README.md +141 -0
  438. data/node_modules/cliui/build/index.cjs +302 -0
  439. data/node_modules/cliui/build/lib/index.js +287 -0
  440. data/node_modules/cliui/build/lib/string-utils.js +27 -0
  441. data/node_modules/cliui/index.mjs +13 -0
  442. data/node_modules/cliui/package.json +83 -0
  443. data/node_modules/color-convert/CHANGELOG.md +54 -0
  444. data/node_modules/color-convert/LICENSE +21 -0
  445. data/node_modules/color-convert/README.md +68 -0
  446. data/node_modules/color-convert/conversions.js +839 -0
  447. data/node_modules/color-convert/index.js +81 -0
  448. data/node_modules/color-convert/package.json +48 -0
  449. data/node_modules/color-convert/route.js +97 -0
  450. data/node_modules/color-name/LICENSE +8 -0
  451. data/node_modules/color-name/README.md +11 -0
  452. data/node_modules/color-name/index.js +152 -0
  453. data/node_modules/color-name/package.json +28 -0
  454. data/node_modules/colors/LICENSE +25 -0
  455. data/node_modules/colors/README.md +221 -0
  456. data/node_modules/colors/examples/normal-usage.js +82 -0
  457. data/node_modules/colors/examples/safe-string.js +79 -0
  458. data/node_modules/colors/index.d.ts +136 -0
  459. data/node_modules/colors/lib/colors.js +211 -0
  460. data/node_modules/colors/lib/custom/trap.js +46 -0
  461. data/node_modules/colors/lib/custom/zalgo.js +110 -0
  462. data/node_modules/colors/lib/extendStringPrototype.js +110 -0
  463. data/node_modules/colors/lib/index.js +13 -0
  464. data/node_modules/colors/lib/maps/america.js +10 -0
  465. data/node_modules/colors/lib/maps/rainbow.js +12 -0
  466. data/node_modules/colors/lib/maps/random.js +11 -0
  467. data/node_modules/colors/lib/maps/zebra.js +5 -0
  468. data/node_modules/colors/lib/styles.js +95 -0
  469. data/node_modules/colors/lib/system/has-flag.js +35 -0
  470. data/node_modules/colors/lib/system/supports-colors.js +151 -0
  471. data/node_modules/colors/package.json +45 -0
  472. data/node_modules/colors/safe.d.ts +48 -0
  473. data/node_modules/colors/safe.js +10 -0
  474. data/node_modules/colors/themes/generic-logging.js +12 -0
  475. data/node_modules/combined-stream/License +19 -0
  476. data/node_modules/combined-stream/Readme.md +138 -0
  477. data/node_modules/combined-stream/lib/combined_stream.js +208 -0
  478. data/node_modules/combined-stream/package.json +25 -0
  479. data/node_modules/combined-stream/yarn.lock +17 -0
  480. data/node_modules/concat-map/LICENSE +18 -0
  481. data/node_modules/concat-map/README.markdown +62 -0
  482. data/node_modules/concat-map/example/map.js +6 -0
  483. data/node_modules/concat-map/index.js +13 -0
  484. data/node_modules/concat-map/package.json +43 -0
  485. data/node_modules/concat-map/test/map.js +39 -0
  486. data/node_modules/console-table-printer/CHANGELOG.md +96 -0
  487. data/node_modules/console-table-printer/LICENSE +21 -0
  488. data/node_modules/console-table-printer/README.md +180 -0
  489. data/node_modules/console-table-printer/dist/index.d.ts +4 -0
  490. data/node_modules/console-table-printer/dist/index.js +10 -0
  491. data/node_modules/console-table-printer/dist/src/console-table-printer.d.ts +14 -0
  492. data/node_modules/console-table-printer/dist/src/console-table-printer.js +32 -0
  493. data/node_modules/console-table-printer/dist/src/internalTable/input-converter.d.ts +6 -0
  494. data/node_modules/console-table-printer/dist/src/internalTable/input-converter.js +15 -0
  495. data/node_modules/console-table-printer/dist/src/internalTable/internal-table-printer.d.ts +4 -0
  496. data/node_modules/console-table-printer/dist/src/internalTable/internal-table-printer.js +115 -0
  497. data/node_modules/console-table-printer/dist/src/internalTable/internal-table.d.ts +25 -0
  498. data/node_modules/console-table-printer/dist/src/internalTable/internal-table.js +80 -0
  499. data/node_modules/console-table-printer/dist/src/internalTable/table-pre-processors.d.ts +3 -0
  500. data/node_modules/console-table-printer/dist/src/internalTable/table-pre-processors.js +43 -0
  501. data/node_modules/console-table-printer/dist/src/models/common.d.ts +10 -0
  502. data/node_modules/console-table-printer/dist/src/models/common.js +2 -0
  503. data/node_modules/console-table-printer/dist/src/models/external-table.d.ts +26 -0
  504. data/node_modules/console-table-printer/dist/src/models/external-table.js +2 -0
  505. data/node_modules/console-table-printer/dist/src/models/internal-table.d.ts +21 -0
  506. data/node_modules/console-table-printer/dist/src/models/internal-table.js +2 -0
  507. data/node_modules/console-table-printer/dist/src/utils/colored-console-line.d.ts +8 -0
  508. data/node_modules/console-table-printer/dist/src/utils/colored-console-line.js +29 -0
  509. data/node_modules/console-table-printer/dist/src/utils/console-utils.d.ts +2 -0
  510. data/node_modules/console-table-printer/dist/src/utils/console-utils.js +8 -0
  511. data/node_modules/console-table-printer/dist/src/utils/string-utils.d.ts +4 -0
  512. data/node_modules/console-table-printer/dist/src/utils/string-utils.js +54 -0
  513. data/node_modules/console-table-printer/dist/src/utils/table-constants.d.ts +10 -0
  514. data/node_modules/console-table-printer/dist/src/utils/table-constants.js +49 -0
  515. data/node_modules/console-table-printer/dist/src/utils/table-helpers.d.ts +26 -0
  516. data/node_modules/console-table-printer/dist/src/utils/table-helpers.js +91 -0
  517. data/node_modules/console-table-printer/package.json +51 -0
  518. data/node_modules/cross-env/CHANGELOG.md +5 -0
  519. data/node_modules/cross-env/LICENSE +20 -0
  520. data/node_modules/cross-env/README.md +291 -0
  521. data/node_modules/cross-env/package.json +54 -0
  522. data/node_modules/cross-env/src/bin/cross-env-shell.js +5 -0
  523. data/node_modules/cross-env/src/bin/cross-env.js +5 -0
  524. data/node_modules/cross-env/src/command.js +32 -0
  525. data/node_modules/cross-env/src/index.js +95 -0
  526. data/node_modules/cross-env/src/is-windows.js +2 -0
  527. data/node_modules/cross-env/src/variable.js +69 -0
  528. data/node_modules/cross-spawn/CHANGELOG.md +130 -0
  529. data/node_modules/cross-spawn/LICENSE +21 -0
  530. data/node_modules/cross-spawn/README.md +96 -0
  531. data/node_modules/cross-spawn/index.js +39 -0
  532. data/node_modules/cross-spawn/lib/enoent.js +59 -0
  533. data/node_modules/cross-spawn/lib/parse.js +91 -0
  534. data/node_modules/cross-spawn/lib/util/escape.js +45 -0
  535. data/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  536. data/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  537. data/node_modules/cross-spawn/package.json +73 -0
  538. data/node_modules/crypto-js/CONTRIBUTING.md +28 -0
  539. data/node_modules/crypto-js/LICENSE +24 -0
  540. data/node_modules/crypto-js/README.md +249 -0
  541. data/node_modules/crypto-js/aes.js +234 -0
  542. data/node_modules/crypto-js/bower.json +35 -0
  543. data/node_modules/crypto-js/cipher-core.js +890 -0
  544. data/node_modules/crypto-js/core.js +797 -0
  545. data/node_modules/crypto-js/crypto-js.js +6059 -0
  546. data/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
  547. data/node_modules/crypto-js/enc-base64.js +136 -0
  548. data/node_modules/crypto-js/enc-hex.js +18 -0
  549. data/node_modules/crypto-js/enc-latin1.js +18 -0
  550. data/node_modules/crypto-js/enc-utf16.js +149 -0
  551. data/node_modules/crypto-js/enc-utf8.js +18 -0
  552. data/node_modules/crypto-js/evpkdf.js +134 -0
  553. data/node_modules/crypto-js/format-hex.js +66 -0
  554. data/node_modules/crypto-js/format-openssl.js +18 -0
  555. data/node_modules/crypto-js/hmac-md5.js +18 -0
  556. data/node_modules/crypto-js/hmac-ripemd160.js +18 -0
  557. data/node_modules/crypto-js/hmac-sha1.js +18 -0
  558. data/node_modules/crypto-js/hmac-sha224.js +18 -0
  559. data/node_modules/crypto-js/hmac-sha256.js +18 -0
  560. data/node_modules/crypto-js/hmac-sha3.js +18 -0
  561. data/node_modules/crypto-js/hmac-sha384.js +18 -0
  562. data/node_modules/crypto-js/hmac-sha512.js +18 -0
  563. data/node_modules/crypto-js/hmac.js +143 -0
  564. data/node_modules/crypto-js/index.js +18 -0
  565. data/node_modules/crypto-js/lib-typedarrays.js +76 -0
  566. data/node_modules/crypto-js/md5.js +268 -0
  567. data/node_modules/crypto-js/mode-cfb.js +80 -0
  568. data/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
  569. data/node_modules/crypto-js/mode-ctr.js +58 -0
  570. data/node_modules/crypto-js/mode-ecb.js +40 -0
  571. data/node_modules/crypto-js/mode-ofb.js +54 -0
  572. data/node_modules/crypto-js/package.json +38 -0
  573. data/node_modules/crypto-js/pad-ansix923.js +49 -0
  574. data/node_modules/crypto-js/pad-iso10126.js +44 -0
  575. data/node_modules/crypto-js/pad-iso97971.js +40 -0
  576. data/node_modules/crypto-js/pad-nopadding.js +30 -0
  577. data/node_modules/crypto-js/pad-pkcs7.js +18 -0
  578. data/node_modules/crypto-js/pad-zeropadding.js +47 -0
  579. data/node_modules/crypto-js/pbkdf2.js +145 -0
  580. data/node_modules/crypto-js/rabbit-legacy.js +190 -0
  581. data/node_modules/crypto-js/rabbit.js +192 -0
  582. data/node_modules/crypto-js/rc4.js +139 -0
  583. data/node_modules/crypto-js/ripemd160.js +267 -0
  584. data/node_modules/crypto-js/sha1.js +150 -0
  585. data/node_modules/crypto-js/sha224.js +80 -0
  586. data/node_modules/crypto-js/sha256.js +199 -0
  587. data/node_modules/crypto-js/sha3.js +326 -0
  588. data/node_modules/crypto-js/sha384.js +83 -0
  589. data/node_modules/crypto-js/sha512.js +326 -0
  590. data/node_modules/crypto-js/tripledes.js +779 -0
  591. data/node_modules/crypto-js/x64-core.js +304 -0
  592. data/node_modules/cssom/LICENSE.txt +20 -0
  593. data/node_modules/cssom/README.mdown +67 -0
  594. data/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
  595. data/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
  596. data/node_modules/cssom/lib/CSSHostRule.js +37 -0
  597. data/node_modules/cssom/lib/CSSImportRule.js +132 -0
  598. data/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
  599. data/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
  600. data/node_modules/cssom/lib/CSSMediaRule.js +41 -0
  601. data/node_modules/cssom/lib/CSSOM.js +3 -0
  602. data/node_modules/cssom/lib/CSSRule.js +43 -0
  603. data/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
  604. data/node_modules/cssom/lib/CSSStyleRule.js +190 -0
  605. data/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
  606. data/node_modules/cssom/lib/CSSSupportsRule.js +36 -0
  607. data/node_modules/cssom/lib/CSSValue.js +43 -0
  608. data/node_modules/cssom/lib/CSSValueExpression.js +344 -0
  609. data/node_modules/cssom/lib/MatcherList.js +62 -0
  610. data/node_modules/cssom/lib/MediaList.js +61 -0
  611. data/node_modules/cssom/lib/StyleSheet.js +17 -0
  612. data/node_modules/cssom/lib/clone.js +71 -0
  613. data/node_modules/cssom/lib/index.js +21 -0
  614. data/node_modules/cssom/lib/parse.js +463 -0
  615. data/node_modules/cssom/package.json +18 -0
  616. data/node_modules/cssstyle/LICENSE +20 -0
  617. data/node_modules/cssstyle/README.md +15 -0
  618. data/node_modules/cssstyle/lib/CSSStyleDeclaration.js +260 -0
  619. data/node_modules/cssstyle/lib/CSSStyleDeclaration.test.js +556 -0
  620. data/node_modules/cssstyle/lib/allExtraProperties.js +67 -0
  621. data/node_modules/cssstyle/lib/allProperties.js +462 -0
  622. data/node_modules/cssstyle/lib/allWebkitProperties.js +194 -0
  623. data/node_modules/cssstyle/lib/constants.js +6 -0
  624. data/node_modules/cssstyle/lib/implementedProperties.js +90 -0
  625. data/node_modules/cssstyle/lib/named_colors.json +152 -0
  626. data/node_modules/cssstyle/lib/parsers.js +722 -0
  627. data/node_modules/cssstyle/lib/parsers.test.js +139 -0
  628. data/node_modules/cssstyle/lib/properties/azimuth.js +67 -0
  629. data/node_modules/cssstyle/lib/properties/background.js +19 -0
  630. data/node_modules/cssstyle/lib/properties/backgroundAttachment.js +24 -0
  631. data/node_modules/cssstyle/lib/properties/backgroundColor.js +36 -0
  632. data/node_modules/cssstyle/lib/properties/backgroundImage.js +32 -0
  633. data/node_modules/cssstyle/lib/properties/backgroundPosition.js +58 -0
  634. data/node_modules/cssstyle/lib/properties/backgroundRepeat.js +32 -0
  635. data/node_modules/cssstyle/lib/properties/border.js +33 -0
  636. data/node_modules/cssstyle/lib/properties/borderBottom.js +17 -0
  637. data/node_modules/cssstyle/lib/properties/borderBottomColor.js +16 -0
  638. data/node_modules/cssstyle/lib/properties/borderBottomStyle.js +21 -0
  639. data/node_modules/cssstyle/lib/properties/borderBottomWidth.js +16 -0
  640. data/node_modules/cssstyle/lib/properties/borderCollapse.js +26 -0
  641. data/node_modules/cssstyle/lib/properties/borderColor.js +30 -0
  642. data/node_modules/cssstyle/lib/properties/borderLeft.js +17 -0
  643. data/node_modules/cssstyle/lib/properties/borderLeftColor.js +16 -0
  644. data/node_modules/cssstyle/lib/properties/borderLeftStyle.js +21 -0
  645. data/node_modules/cssstyle/lib/properties/borderLeftWidth.js +16 -0
  646. data/node_modules/cssstyle/lib/properties/borderRight.js +17 -0
  647. data/node_modules/cssstyle/lib/properties/borderRightColor.js +16 -0
  648. data/node_modules/cssstyle/lib/properties/borderRightStyle.js +21 -0
  649. data/node_modules/cssstyle/lib/properties/borderRightWidth.js +16 -0
  650. data/node_modules/cssstyle/lib/properties/borderSpacing.js +41 -0
  651. data/node_modules/cssstyle/lib/properties/borderStyle.js +38 -0
  652. data/node_modules/cssstyle/lib/properties/borderTop.js +17 -0
  653. data/node_modules/cssstyle/lib/properties/borderTopColor.js +16 -0
  654. data/node_modules/cssstyle/lib/properties/borderTopStyle.js +21 -0
  655. data/node_modules/cssstyle/lib/properties/borderTopWidth.js +17 -0
  656. data/node_modules/cssstyle/lib/properties/borderWidth.js +46 -0
  657. data/node_modules/cssstyle/lib/properties/bottom.js +14 -0
  658. data/node_modules/cssstyle/lib/properties/clear.js +16 -0
  659. data/node_modules/cssstyle/lib/properties/clip.js +47 -0
  660. data/node_modules/cssstyle/lib/properties/color.js +14 -0
  661. data/node_modules/cssstyle/lib/properties/cssFloat.js +12 -0
  662. data/node_modules/cssstyle/lib/properties/flex.js +45 -0
  663. data/node_modules/cssstyle/lib/properties/flexBasis.js +28 -0
  664. data/node_modules/cssstyle/lib/properties/flexGrow.js +19 -0
  665. data/node_modules/cssstyle/lib/properties/flexShrink.js +19 -0
  666. data/node_modules/cssstyle/lib/properties/float.js +12 -0
  667. data/node_modules/cssstyle/lib/properties/floodColor.js +14 -0
  668. data/node_modules/cssstyle/lib/properties/font.js +43 -0
  669. data/node_modules/cssstyle/lib/properties/fontFamily.js +33 -0
  670. data/node_modules/cssstyle/lib/properties/fontSize.js +38 -0
  671. data/node_modules/cssstyle/lib/properties/fontStyle.js +18 -0
  672. data/node_modules/cssstyle/lib/properties/fontVariant.js +18 -0
  673. data/node_modules/cssstyle/lib/properties/fontWeight.js +33 -0
  674. data/node_modules/cssstyle/lib/properties/height.js +24 -0
  675. data/node_modules/cssstyle/lib/properties/left.js +14 -0
  676. data/node_modules/cssstyle/lib/properties/lightingColor.js +14 -0
  677. data/node_modules/cssstyle/lib/properties/lineHeight.js +26 -0
  678. data/node_modules/cssstyle/lib/properties/margin.js +68 -0
  679. data/node_modules/cssstyle/lib/properties/marginBottom.js +13 -0
  680. data/node_modules/cssstyle/lib/properties/marginLeft.js +13 -0
  681. data/node_modules/cssstyle/lib/properties/marginRight.js +13 -0
  682. data/node_modules/cssstyle/lib/properties/marginTop.js +13 -0
  683. data/node_modules/cssstyle/lib/properties/opacity.js +14 -0
  684. data/node_modules/cssstyle/lib/properties/outlineColor.js +14 -0
  685. data/node_modules/cssstyle/lib/properties/padding.js +61 -0
  686. data/node_modules/cssstyle/lib/properties/paddingBottom.js +13 -0
  687. data/node_modules/cssstyle/lib/properties/paddingLeft.js +13 -0
  688. data/node_modules/cssstyle/lib/properties/paddingRight.js +13 -0
  689. data/node_modules/cssstyle/lib/properties/paddingTop.js +13 -0
  690. data/node_modules/cssstyle/lib/properties/right.js +14 -0
  691. data/node_modules/cssstyle/lib/properties/stopColor.js +14 -0
  692. data/node_modules/cssstyle/lib/properties/textLineThroughColor.js +14 -0
  693. data/node_modules/cssstyle/lib/properties/textOverlineColor.js +14 -0
  694. data/node_modules/cssstyle/lib/properties/textUnderlineColor.js +14 -0
  695. data/node_modules/cssstyle/lib/properties/top.js +14 -0
  696. data/node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js +14 -0
  697. data/node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js +14 -0
  698. data/node_modules/cssstyle/lib/properties/webkitBorderEndColor.js +14 -0
  699. data/node_modules/cssstyle/lib/properties/webkitBorderStartColor.js +14 -0
  700. data/node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js +14 -0
  701. data/node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js +14 -0
  702. data/node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js +14 -0
  703. data/node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js +14 -0
  704. data/node_modules/cssstyle/lib/properties/webkitTextFillColor.js +14 -0
  705. data/node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js +14 -0
  706. data/node_modules/cssstyle/lib/properties/width.js +24 -0
  707. data/node_modules/cssstyle/lib/properties.js +1833 -0
  708. data/node_modules/cssstyle/lib/utils/colorSpace.js +21 -0
  709. data/node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js +14 -0
  710. data/node_modules/cssstyle/node_modules/cssom/LICENSE.txt +20 -0
  711. data/node_modules/cssstyle/node_modules/cssom/README.mdown +67 -0
  712. data/node_modules/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
  713. data/node_modules/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
  714. data/node_modules/cssstyle/node_modules/cssom/lib/CSSHostRule.js +37 -0
  715. data/node_modules/cssstyle/node_modules/cssom/lib/CSSImportRule.js +132 -0
  716. data/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
  717. data/node_modules/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
  718. data/node_modules/cssstyle/node_modules/cssom/lib/CSSMediaRule.js +41 -0
  719. data/node_modules/cssstyle/node_modules/cssom/lib/CSSOM.js +3 -0
  720. data/node_modules/cssstyle/node_modules/cssom/lib/CSSRule.js +43 -0
  721. data/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
  722. data/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleRule.js +190 -0
  723. data/node_modules/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
  724. data/node_modules/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js +36 -0
  725. data/node_modules/cssstyle/node_modules/cssom/lib/CSSValue.js +43 -0
  726. data/node_modules/cssstyle/node_modules/cssom/lib/CSSValueExpression.js +344 -0
  727. data/node_modules/cssstyle/node_modules/cssom/lib/MatcherList.js +62 -0
  728. data/node_modules/cssstyle/node_modules/cssom/lib/MediaList.js +61 -0
  729. data/node_modules/cssstyle/node_modules/cssom/lib/StyleSheet.js +17 -0
  730. data/node_modules/cssstyle/node_modules/cssom/lib/clone.js +82 -0
  731. data/node_modules/cssstyle/node_modules/cssom/lib/index.js +21 -0
  732. data/node_modules/cssstyle/node_modules/cssom/lib/parse.js +464 -0
  733. data/node_modules/cssstyle/node_modules/cssom/package.json +18 -0
  734. data/node_modules/cssstyle/package.json +72 -0
  735. data/node_modules/data-urls/LICENSE.txt +7 -0
  736. data/node_modules/data-urls/README.md +64 -0
  737. data/node_modules/data-urls/lib/parser.js +74 -0
  738. data/node_modules/data-urls/lib/utils.js +23 -0
  739. data/node_modules/data-urls/package.json +53 -0
  740. data/node_modules/debug/LICENSE +19 -0
  741. data/node_modules/debug/README.md +455 -0
  742. data/node_modules/debug/package.json +59 -0
  743. data/node_modules/debug/src/browser.js +269 -0
  744. data/node_modules/debug/src/common.js +274 -0
  745. data/node_modules/debug/src/index.js +10 -0
  746. data/node_modules/debug/src/node.js +263 -0
  747. data/node_modules/decimal.js/CHANGELOG.md +231 -0
  748. data/node_modules/decimal.js/LICENCE.md +23 -0
  749. data/node_modules/decimal.js/README.md +246 -0
  750. data/node_modules/decimal.js/decimal.d.ts +300 -0
  751. data/node_modules/decimal.js/decimal.js +4934 -0
  752. data/node_modules/decimal.js/decimal.mjs +4898 -0
  753. data/node_modules/decimal.js/package.json +40 -0
  754. data/node_modules/deep-is/LICENSE +22 -0
  755. data/node_modules/deep-is/README.markdown +70 -0
  756. data/node_modules/deep-is/example/cmp.js +11 -0
  757. data/node_modules/deep-is/index.js +102 -0
  758. data/node_modules/deep-is/package.json +61 -0
  759. data/node_modules/deep-is/test/NaN.js +16 -0
  760. data/node_modules/deep-is/test/cmp.js +23 -0
  761. data/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
  762. data/node_modules/delayed-stream/License +19 -0
  763. data/node_modules/delayed-stream/Makefile +7 -0
  764. data/node_modules/delayed-stream/Readme.md +141 -0
  765. data/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  766. data/node_modules/delayed-stream/package.json +27 -0
  767. data/node_modules/diff/CONTRIBUTING.md +39 -0
  768. data/node_modules/diff/LICENSE +31 -0
  769. data/node_modules/diff/README.md +208 -0
  770. data/node_modules/diff/dist/diff.js +1582 -0
  771. data/node_modules/diff/lib/convert/dmp.js +32 -0
  772. data/node_modules/diff/lib/convert/xml.js +42 -0
  773. data/node_modules/diff/lib/diff/array.js +45 -0
  774. data/node_modules/diff/lib/diff/base.js +304 -0
  775. data/node_modules/diff/lib/diff/character.js +37 -0
  776. data/node_modules/diff/lib/diff/css.js +41 -0
  777. data/node_modules/diff/lib/diff/json.js +163 -0
  778. data/node_modules/diff/lib/diff/line.js +89 -0
  779. data/node_modules/diff/lib/diff/sentence.js +41 -0
  780. data/node_modules/diff/lib/diff/word.js +108 -0
  781. data/node_modules/diff/lib/index.es6.js +1553 -0
  782. data/node_modules/diff/lib/index.js +216 -0
  783. data/node_modules/diff/lib/index.mjs +1553 -0
  784. data/node_modules/diff/lib/patch/apply.js +238 -0
  785. data/node_modules/diff/lib/patch/create.js +267 -0
  786. data/node_modules/diff/lib/patch/merge.js +613 -0
  787. data/node_modules/diff/lib/patch/parse.js +167 -0
  788. data/node_modules/diff/lib/util/array.js +32 -0
  789. data/node_modules/diff/lib/util/distance-iterator.js +57 -0
  790. data/node_modules/diff/lib/util/params.js +24 -0
  791. data/node_modules/diff/package.json +87 -0
  792. data/node_modules/diff/release-notes.md +303 -0
  793. data/node_modules/diff/runtime.js +3 -0
  794. data/node_modules/domexception/LICENSE.txt +21 -0
  795. data/node_modules/domexception/README.md +31 -0
  796. data/node_modules/domexception/index.js +7 -0
  797. data/node_modules/domexception/lib/DOMException-impl.js +22 -0
  798. data/node_modules/domexception/lib/DOMException.js +205 -0
  799. data/node_modules/domexception/lib/legacy-error-codes.json +27 -0
  800. data/node_modules/domexception/lib/utils.js +115 -0
  801. data/node_modules/domexception/node_modules/webidl-conversions/LICENSE.md +12 -0
  802. data/node_modules/domexception/node_modules/webidl-conversions/README.md +79 -0
  803. data/node_modules/domexception/node_modules/webidl-conversions/lib/index.js +361 -0
  804. data/node_modules/domexception/node_modules/webidl-conversions/package.json +30 -0
  805. data/node_modules/domexception/package.json +42 -0
  806. data/node_modules/domexception/webidl2js-wrapper.js +15 -0
  807. data/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  808. data/node_modules/emoji-regex/README.md +73 -0
  809. data/node_modules/emoji-regex/es2015/index.js +6 -0
  810. data/node_modules/emoji-regex/es2015/text.js +6 -0
  811. data/node_modules/emoji-regex/index.d.ts +23 -0
  812. data/node_modules/emoji-regex/index.js +6 -0
  813. data/node_modules/emoji-regex/package.json +50 -0
  814. data/node_modules/emoji-regex/text.js +6 -0
  815. data/node_modules/escalade/dist/index.js +22 -0
  816. data/node_modules/escalade/dist/index.mjs +22 -0
  817. data/node_modules/escalade/index.d.ts +3 -0
  818. data/node_modules/escalade/license +9 -0
  819. data/node_modules/escalade/package.json +61 -0
  820. data/node_modules/escalade/readme.md +211 -0
  821. data/node_modules/escalade/sync/index.d.ts +2 -0
  822. data/node_modules/escalade/sync/index.js +18 -0
  823. data/node_modules/escalade/sync/index.mjs +18 -0
  824. data/node_modules/escodegen/LICENSE.BSD +21 -0
  825. data/node_modules/escodegen/README.md +84 -0
  826. data/node_modules/escodegen/bin/escodegen.js +77 -0
  827. data/node_modules/escodegen/bin/esgenerate.js +64 -0
  828. data/node_modules/escodegen/escodegen.js +2647 -0
  829. data/node_modules/escodegen/package.json +62 -0
  830. data/node_modules/esprima/ChangeLog +235 -0
  831. data/node_modules/esprima/LICENSE.BSD +21 -0
  832. data/node_modules/esprima/README.md +46 -0
  833. data/node_modules/esprima/bin/esparse.js +139 -0
  834. data/node_modules/esprima/bin/esvalidate.js +236 -0
  835. data/node_modules/esprima/dist/esprima.js +6709 -0
  836. data/node_modules/esprima/package.json +112 -0
  837. data/node_modules/estraverse/LICENSE.BSD +19 -0
  838. data/node_modules/estraverse/README.md +153 -0
  839. data/node_modules/estraverse/estraverse.js +801 -0
  840. data/node_modules/estraverse/gulpfile.js +70 -0
  841. data/node_modules/estraverse/package.json +40 -0
  842. data/node_modules/esutils/LICENSE.BSD +19 -0
  843. data/node_modules/esutils/README.md +174 -0
  844. data/node_modules/esutils/lib/ast.js +144 -0
  845. data/node_modules/esutils/lib/code.js +135 -0
  846. data/node_modules/esutils/lib/keyword.js +165 -0
  847. data/node_modules/esutils/lib/utils.js +33 -0
  848. data/node_modules/esutils/package.json +44 -0
  849. data/node_modules/fast-levenshtein/LICENSE.md +25 -0
  850. data/node_modules/fast-levenshtein/README.md +104 -0
  851. data/node_modules/fast-levenshtein/levenshtein.js +136 -0
  852. data/node_modules/fast-levenshtein/package.json +39 -0
  853. data/node_modules/fill-range/LICENSE +21 -0
  854. data/node_modules/fill-range/README.md +237 -0
  855. data/node_modules/fill-range/index.js +249 -0
  856. data/node_modules/fill-range/package.json +69 -0
  857. data/node_modules/form-data/License +19 -0
  858. data/node_modules/form-data/README.md.bak +356 -0
  859. data/node_modules/form-data/Readme.md +356 -0
  860. data/node_modules/form-data/index.d.ts +62 -0
  861. data/node_modules/form-data/lib/browser.js +2 -0
  862. data/node_modules/form-data/lib/form_data.js +498 -0
  863. data/node_modules/form-data/lib/populate.js +10 -0
  864. data/node_modules/form-data/package.json +68 -0
  865. data/node_modules/fs-extra/CHANGELOG.md +902 -0
  866. data/node_modules/fs-extra/LICENSE +15 -0
  867. data/node_modules/fs-extra/README.md +264 -0
  868. data/node_modules/fs-extra/lib/copy/copy.js +232 -0
  869. data/node_modules/fs-extra/lib/copy/index.js +6 -0
  870. data/node_modules/fs-extra/lib/copy-sync/copy-sync.js +166 -0
  871. data/node_modules/fs-extra/lib/copy-sync/index.js +5 -0
  872. data/node_modules/fs-extra/lib/empty/index.js +48 -0
  873. data/node_modules/fs-extra/lib/ensure/file.js +69 -0
  874. data/node_modules/fs-extra/lib/ensure/index.js +23 -0
  875. data/node_modules/fs-extra/lib/ensure/link.js +61 -0
  876. data/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
  877. data/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
  878. data/node_modules/fs-extra/lib/ensure/symlink.js +63 -0
  879. data/node_modules/fs-extra/lib/fs/index.js +130 -0
  880. data/node_modules/fs-extra/lib/index.js +27 -0
  881. data/node_modules/fs-extra/lib/json/index.js +16 -0
  882. data/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  883. data/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  884. data/node_modules/fs-extra/lib/json/output-json.js +12 -0
  885. data/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  886. data/node_modules/fs-extra/lib/mkdirs/make-dir.js +141 -0
  887. data/node_modules/fs-extra/lib/move/index.js +6 -0
  888. data/node_modules/fs-extra/lib/move/move.js +65 -0
  889. data/node_modules/fs-extra/lib/move-sync/index.js +5 -0
  890. data/node_modules/fs-extra/lib/move-sync/move-sync.js +47 -0
  891. data/node_modules/fs-extra/lib/output/index.js +40 -0
  892. data/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  893. data/node_modules/fs-extra/lib/remove/index.js +9 -0
  894. data/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
  895. data/node_modules/fs-extra/lib/util/stat.js +139 -0
  896. data/node_modules/fs-extra/lib/util/utimes.js +26 -0
  897. data/node_modules/fs-extra/package.json +70 -0
  898. data/node_modules/fs.realpath/LICENSE +43 -0
  899. data/node_modules/fs.realpath/README.md +33 -0
  900. data/node_modules/fs.realpath/index.js +66 -0
  901. data/node_modules/fs.realpath/old.js +303 -0
  902. data/node_modules/fs.realpath/package.json +26 -0
  903. data/node_modules/get-caller-file/LICENSE.md +6 -0
  904. data/node_modules/get-caller-file/README.md +41 -0
  905. data/node_modules/get-caller-file/index.d.ts +2 -0
  906. data/node_modules/get-caller-file/index.js +22 -0
  907. data/node_modules/get-caller-file/index.js.map +1 -0
  908. data/node_modules/get-caller-file/package.json +42 -0
  909. data/node_modules/glob/LICENSE +21 -0
  910. data/node_modules/glob/README.md +375 -0
  911. data/node_modules/glob/changelog.md +67 -0
  912. data/node_modules/glob/common.js +234 -0
  913. data/node_modules/glob/glob.js +788 -0
  914. data/node_modules/glob/package.json +51 -0
  915. data/node_modules/glob/sync.js +484 -0
  916. data/node_modules/glob-parent/CHANGELOG.md +110 -0
  917. data/node_modules/glob-parent/LICENSE +15 -0
  918. data/node_modules/glob-parent/README.md +137 -0
  919. data/node_modules/glob-parent/index.js +42 -0
  920. data/node_modules/glob-parent/package.json +48 -0
  921. data/node_modules/graceful-fs/LICENSE +15 -0
  922. data/node_modules/graceful-fs/README.md +133 -0
  923. data/node_modules/graceful-fs/clone.js +23 -0
  924. data/node_modules/graceful-fs/graceful-fs.js +373 -0
  925. data/node_modules/graceful-fs/legacy-streams.js +118 -0
  926. data/node_modules/graceful-fs/package.json +50 -0
  927. data/node_modules/graceful-fs/polyfills.js +346 -0
  928. data/node_modules/html-encoding-sniffer/LICENSE.txt +7 -0
  929. data/node_modules/html-encoding-sniffer/README.md +38 -0
  930. data/node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js +295 -0
  931. data/node_modules/html-encoding-sniffer/package.json +30 -0
  932. data/node_modules/http-proxy-agent/README.md +74 -0
  933. data/node_modules/http-proxy-agent/dist/agent.d.ts +32 -0
  934. data/node_modules/http-proxy-agent/dist/agent.js +145 -0
  935. data/node_modules/http-proxy-agent/dist/agent.js.map +1 -0
  936. data/node_modules/http-proxy-agent/dist/index.d.ts +21 -0
  937. data/node_modules/http-proxy-agent/dist/index.js +14 -0
  938. data/node_modules/http-proxy-agent/dist/index.js.map +1 -0
  939. data/node_modules/http-proxy-agent/package.json +57 -0
  940. data/node_modules/https-proxy-agent/README.md +137 -0
  941. data/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  942. data/node_modules/https-proxy-agent/dist/agent.js +180 -0
  943. data/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  944. data/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  945. data/node_modules/https-proxy-agent/dist/index.js +14 -0
  946. data/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  947. data/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  948. data/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  949. data/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  950. data/node_modules/https-proxy-agent/package.json +56 -0
  951. data/node_modules/iconv-lite/Changelog.md +162 -0
  952. data/node_modules/iconv-lite/LICENSE +21 -0
  953. data/node_modules/iconv-lite/README.md +156 -0
  954. data/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
  955. data/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
  956. data/node_modules/iconv-lite/encodings/index.js +22 -0
  957. data/node_modules/iconv-lite/encodings/internal.js +188 -0
  958. data/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  959. data/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  960. data/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
  961. data/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  962. data/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  963. data/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  964. data/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  965. data/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  966. data/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  967. data/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
  968. data/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  969. data/node_modules/iconv-lite/encodings/utf16.js +177 -0
  970. data/node_modules/iconv-lite/encodings/utf7.js +290 -0
  971. data/node_modules/iconv-lite/lib/bom-handling.js +52 -0
  972. data/node_modules/iconv-lite/lib/extend-node.js +217 -0
  973. data/node_modules/iconv-lite/lib/index.d.ts +24 -0
  974. data/node_modules/iconv-lite/lib/index.js +153 -0
  975. data/node_modules/iconv-lite/lib/streams.js +121 -0
  976. data/node_modules/iconv-lite/package.json +46 -0
  977. data/node_modules/inflight/LICENSE +15 -0
  978. data/node_modules/inflight/README.md +37 -0
  979. data/node_modules/inflight/inflight.js +54 -0
  980. data/node_modules/inflight/package.json +29 -0
  981. data/node_modules/inherits/LICENSE +16 -0
  982. data/node_modules/inherits/README.md +42 -0
  983. data/node_modules/inherits/inherits.js +9 -0
  984. data/node_modules/inherits/inherits_browser.js +27 -0
  985. data/node_modules/inherits/package.json +29 -0
  986. data/node_modules/is-binary-path/index.d.ts +17 -0
  987. data/node_modules/is-binary-path/index.js +7 -0
  988. data/node_modules/is-binary-path/license +9 -0
  989. data/node_modules/is-binary-path/package.json +40 -0
  990. data/node_modules/is-binary-path/readme.md +34 -0
  991. data/node_modules/is-extglob/LICENSE +21 -0
  992. data/node_modules/is-extglob/README.md +107 -0
  993. data/node_modules/is-extglob/index.js +20 -0
  994. data/node_modules/is-extglob/package.json +69 -0
  995. data/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  996. data/node_modules/is-fullwidth-code-point/index.js +50 -0
  997. data/node_modules/is-fullwidth-code-point/license +9 -0
  998. data/node_modules/is-fullwidth-code-point/package.json +42 -0
  999. data/node_modules/is-fullwidth-code-point/readme.md +39 -0
  1000. data/node_modules/is-glob/LICENSE +21 -0
  1001. data/node_modules/is-glob/README.md +206 -0
  1002. data/node_modules/is-glob/index.js +48 -0
  1003. data/node_modules/is-glob/package.json +81 -0
  1004. data/node_modules/is-number/LICENSE +21 -0
  1005. data/node_modules/is-number/README.md +187 -0
  1006. data/node_modules/is-number/index.js +18 -0
  1007. data/node_modules/is-number/package.json +82 -0
  1008. data/node_modules/is-potential-custom-element-name/LICENSE-MIT.txt +20 -0
  1009. data/node_modules/is-potential-custom-element-name/README.md +40 -0
  1010. data/node_modules/is-potential-custom-element-name/index.js +9 -0
  1011. data/node_modules/is-potential-custom-element-name/package.json +35 -0
  1012. data/node_modules/isexe/LICENSE +15 -0
  1013. data/node_modules/isexe/README.md +51 -0
  1014. data/node_modules/isexe/index.js +57 -0
  1015. data/node_modules/isexe/mode.js +41 -0
  1016. data/node_modules/isexe/package.json +31 -0
  1017. data/node_modules/isexe/test/basic.js +221 -0
  1018. data/node_modules/isexe/windows.js +42 -0
  1019. data/node_modules/js-yaml/CHANGELOG.md +557 -0
  1020. data/node_modules/js-yaml/LICENSE +21 -0
  1021. data/node_modules/js-yaml/README.md +299 -0
  1022. data/node_modules/js-yaml/bin/js-yaml.js +132 -0
  1023. data/node_modules/js-yaml/dist/js-yaml.js +3989 -0
  1024. data/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
  1025. data/node_modules/js-yaml/index.js +7 -0
  1026. data/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
  1027. data/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
  1028. data/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
  1029. data/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
  1030. data/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
  1031. data/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  1032. data/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  1033. data/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  1034. data/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  1035. data/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  1036. data/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
  1037. data/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
  1038. data/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
  1039. data/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
  1040. data/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
  1041. data/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
  1042. data/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
  1043. data/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  1044. data/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  1045. data/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  1046. data/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
  1047. data/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
  1048. data/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
  1049. data/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  1050. data/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
  1051. data/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  1052. data/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
  1053. data/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  1054. data/node_modules/js-yaml/lib/js-yaml.js +39 -0
  1055. data/node_modules/js-yaml/package.json +49 -0
  1056. data/node_modules/jsdom/LICENSE.txt +22 -0
  1057. data/node_modules/jsdom/README.md +522 -0
  1058. data/node_modules/jsdom/lib/api.js +333 -0
  1059. data/node_modules/jsdom/lib/jsdom/browser/Window.js +933 -0
  1060. data/node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js +789 -0
  1061. data/node_modules/jsdom/lib/jsdom/browser/js-globals.json +307 -0
  1062. data/node_modules/jsdom/lib/jsdom/browser/not-implemented.js +13 -0
  1063. data/node_modules/jsdom/lib/jsdom/browser/parser/html.js +223 -0
  1064. data/node_modules/jsdom/lib/jsdom/browser/parser/index.js +37 -0
  1065. data/node_modules/jsdom/lib/jsdom/browser/parser/xml.js +202 -0
  1066. data/node_modules/jsdom/lib/jsdom/browser/resources/async-resource-queue.js +114 -0
  1067. data/node_modules/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js +8 -0
  1068. data/node_modules/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js +95 -0
  1069. data/node_modules/jsdom/lib/jsdom/browser/resources/request-manager.js +33 -0
  1070. data/node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js +142 -0
  1071. data/node_modules/jsdom/lib/jsdom/browser/resources/resource-queue.js +142 -0
  1072. data/node_modules/jsdom/lib/jsdom/level2/style.js +57 -0
  1073. data/node_modules/jsdom/lib/jsdom/level3/xpath.js +1874 -0
  1074. data/node_modules/jsdom/lib/jsdom/living/aborting/AbortController-impl.js +17 -0
  1075. data/node_modules/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js +55 -0
  1076. data/node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js +60 -0
  1077. data/node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js +78 -0
  1078. data/node_modules/jsdom/lib/jsdom/living/attributes.js +312 -0
  1079. data/node_modules/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js +75 -0
  1080. data/node_modules/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js +66 -0
  1081. data/node_modules/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js +38 -0
  1082. data/node_modules/jsdom/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js +265 -0
  1083. data/node_modules/jsdom/lib/jsdom/living/documents.js +15 -0
  1084. data/node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js +58 -0
  1085. data/node_modules/jsdom/lib/jsdom/living/domparsing/InnerHTML-impl.js +29 -0
  1086. data/node_modules/jsdom/lib/jsdom/living/domparsing/XMLSerializer-impl.js +18 -0
  1087. data/node_modules/jsdom/lib/jsdom/living/domparsing/parse5-adapter-serialization.js +63 -0
  1088. data/node_modules/jsdom/lib/jsdom/living/domparsing/serialization.js +45 -0
  1089. data/node_modules/jsdom/lib/jsdom/living/events/CloseEvent-impl.js +10 -0
  1090. data/node_modules/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js +20 -0
  1091. data/node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js +21 -0
  1092. data/node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js +14 -0
  1093. data/node_modules/jsdom/lib/jsdom/living/events/Event-impl.js +197 -0
  1094. data/node_modules/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js +18 -0
  1095. data/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js +403 -0
  1096. data/node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js +9 -0
  1097. data/node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js +14 -0
  1098. data/node_modules/jsdom/lib/jsdom/living/events/InputEvent-impl.js +11 -0
  1099. data/node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js +29 -0
  1100. data/node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js +25 -0
  1101. data/node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js +49 -0
  1102. data/node_modules/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js +20 -0
  1103. data/node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js +9 -0
  1104. data/node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js +14 -0
  1105. data/node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js +26 -0
  1106. data/node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js +14 -0
  1107. data/node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js +59 -0
  1108. data/node_modules/jsdom/lib/jsdom/living/events/WheelEvent-impl.js +12 -0
  1109. data/node_modules/jsdom/lib/jsdom/living/fetch/Headers-impl.js +165 -0
  1110. data/node_modules/jsdom/lib/jsdom/living/fetch/header-list.js +54 -0
  1111. data/node_modules/jsdom/lib/jsdom/living/fetch/header-types.js +103 -0
  1112. data/node_modules/jsdom/lib/jsdom/living/file-api/Blob-impl.js +93 -0
  1113. data/node_modules/jsdom/lib/jsdom/living/file-api/File-impl.js +12 -0
  1114. data/node_modules/jsdom/lib/jsdom/living/file-api/FileList-impl.js +15 -0
  1115. data/node_modules/jsdom/lib/jsdom/living/file-api/FileReader-impl.js +130 -0
  1116. data/node_modules/jsdom/lib/jsdom/living/generated/AbortController.js +130 -0
  1117. data/node_modules/jsdom/lib/jsdom/living/generated/AbortSignal.js +159 -0
  1118. data/node_modules/jsdom/lib/jsdom/living/generated/AbstractRange.js +162 -0
  1119. data/node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js +44 -0
  1120. data/node_modules/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js +28 -0
  1121. data/node_modules/jsdom/lib/jsdom/living/generated/Attr.js +215 -0
  1122. data/node_modules/jsdom/lib/jsdom/living/generated/BarProp.js +118 -0
  1123. data/node_modules/jsdom/lib/jsdom/living/generated/BinaryType.js +12 -0
  1124. data/node_modules/jsdom/lib/jsdom/living/generated/Blob.js +198 -0
  1125. data/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js +34 -0
  1126. data/node_modules/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js +42 -0
  1127. data/node_modules/jsdom/lib/jsdom/living/generated/CDATASection.js +114 -0
  1128. data/node_modules/jsdom/lib/jsdom/living/generated/CanPlayTypeResult.js +12 -0
  1129. data/node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js +436 -0
  1130. data/node_modules/jsdom/lib/jsdom/living/generated/CloseEvent.js +164 -0
  1131. data/node_modules/jsdom/lib/jsdom/living/generated/CloseEventInit.js +56 -0
  1132. data/node_modules/jsdom/lib/jsdom/living/generated/Comment.js +122 -0
  1133. data/node_modules/jsdom/lib/jsdom/living/generated/CompositionEvent.js +217 -0
  1134. data/node_modules/jsdom/lib/jsdom/living/generated/CompositionEventInit.js +32 -0
  1135. data/node_modules/jsdom/lib/jsdom/living/generated/CustomElementConstructor.js +38 -0
  1136. data/node_modules/jsdom/lib/jsdom/living/generated/CustomElementRegistry.js +242 -0
  1137. data/node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js +200 -0
  1138. data/node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js +32 -0
  1139. data/node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js +232 -0
  1140. data/node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js +140 -0
  1141. data/node_modules/jsdom/lib/jsdom/living/generated/DOMStringMap.js +322 -0
  1142. data/node_modules/jsdom/lib/jsdom/living/generated/DOMTokenList.js +531 -0
  1143. data/node_modules/jsdom/lib/jsdom/living/generated/Document.js +3322 -0
  1144. data/node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js +325 -0
  1145. data/node_modules/jsdom/lib/jsdom/living/generated/DocumentReadyState.js +12 -0
  1146. data/node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js +246 -0
  1147. data/node_modules/jsdom/lib/jsdom/living/generated/Element.js +1609 -0
  1148. data/node_modules/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js +26 -0
  1149. data/node_modules/jsdom/lib/jsdom/living/generated/ElementDefinitionOptions.js +26 -0
  1150. data/node_modules/jsdom/lib/jsdom/living/generated/EndingType.js +12 -0
  1151. data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js +186 -0
  1152. data/node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js +80 -0
  1153. data/node_modules/jsdom/lib/jsdom/living/generated/Event.js +390 -0
  1154. data/node_modules/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js +40 -0
  1155. data/node_modules/jsdom/lib/jsdom/living/generated/EventInit.js +52 -0
  1156. data/node_modules/jsdom/lib/jsdom/living/generated/EventListener.js +35 -0
  1157. data/node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js +28 -0
  1158. data/node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js +188 -0
  1159. data/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js +252 -0
  1160. data/node_modules/jsdom/lib/jsdom/living/generated/External.js +129 -0
  1161. data/node_modules/jsdom/lib/jsdom/living/generated/File.js +176 -0
  1162. data/node_modules/jsdom/lib/jsdom/living/generated/FileList.js +305 -0
  1163. data/node_modules/jsdom/lib/jsdom/living/generated/FilePropertyBag.js +30 -0
  1164. data/node_modules/jsdom/lib/jsdom/living/generated/FileReader.js +440 -0
  1165. data/node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js +142 -0
  1166. data/node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js +36 -0
  1167. data/node_modules/jsdom/lib/jsdom/living/generated/FormData.js +421 -0
  1168. data/node_modules/jsdom/lib/jsdom/living/generated/Function.js +46 -0
  1169. data/node_modules/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js +28 -0
  1170. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js +915 -0
  1171. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js +739 -0
  1172. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js +115 -0
  1173. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js +153 -0
  1174. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js +188 -0
  1175. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js +808 -0
  1176. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js +487 -0
  1177. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js +291 -0
  1178. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js +358 -0
  1179. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js +156 -0
  1180. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js +153 -0
  1181. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js +128 -0
  1182. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js +156 -0
  1183. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js +156 -0
  1184. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js +156 -0
  1185. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js +153 -0
  1186. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js +2269 -0
  1187. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js +346 -0
  1188. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js +315 -0
  1189. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js +226 -0
  1190. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js +457 -0
  1191. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js +459 -0
  1192. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js +683 -0
  1193. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js +300 -0
  1194. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js +115 -0
  1195. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js +153 -0
  1196. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js +153 -0
  1197. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js +621 -0
  1198. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js +789 -0
  1199. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js +1696 -0
  1200. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js +194 -0
  1201. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js +175 -0
  1202. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js +164 -0
  1203. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js +496 -0
  1204. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js +166 -0
  1205. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js +509 -0
  1206. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js +802 -0
  1207. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js +156 -0
  1208. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js +261 -0
  1209. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js +338 -0
  1210. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js +202 -0
  1211. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js +266 -0
  1212. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js +839 -0
  1213. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js +192 -0
  1214. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js +351 -0
  1215. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js +533 -0
  1216. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js +371 -0
  1217. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js +153 -0
  1218. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js +261 -0
  1219. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js +115 -0
  1220. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js +158 -0
  1221. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js +209 -0
  1222. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js +166 -0
  1223. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js +424 -0
  1224. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js +957 -0
  1225. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js +188 -0
  1226. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js +310 -0
  1227. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js +115 -0
  1228. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js +200 -0
  1229. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js +153 -0
  1230. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js +635 -0
  1231. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js +339 -0
  1232. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js +725 -0
  1233. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js +386 -0
  1234. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js +329 -0
  1235. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js +126 -0
  1236. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js +1088 -0
  1237. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js +153 -0
  1238. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js +152 -0
  1239. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js +334 -0
  1240. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js +192 -0
  1241. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js +114 -0
  1242. data/node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js +310 -0
  1243. data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js +153 -0
  1244. data/node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js +44 -0
  1245. data/node_modules/jsdom/lib/jsdom/living/generated/Headers.js +379 -0
  1246. data/node_modules/jsdom/lib/jsdom/living/generated/History.js +256 -0
  1247. data/node_modules/jsdom/lib/jsdom/living/generated/InputEvent.js +164 -0
  1248. data/node_modules/jsdom/lib/jsdom/living/generated/InputEventInit.js +59 -0
  1249. data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js +413 -0
  1250. data/node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js +104 -0
  1251. data/node_modules/jsdom/lib/jsdom/living/generated/Location.js +370 -0
  1252. data/node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js +301 -0
  1253. data/node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js +94 -0
  1254. data/node_modules/jsdom/lib/jsdom/living/generated/MimeType.js +151 -0
  1255. data/node_modules/jsdom/lib/jsdom/living/generated/MimeTypeArray.js +330 -0
  1256. data/node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js +463 -0
  1257. data/node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js +108 -0
  1258. data/node_modules/jsdom/lib/jsdom/living/generated/MutationCallback.js +38 -0
  1259. data/node_modules/jsdom/lib/jsdom/living/generated/MutationObserver.js +171 -0
  1260. data/node_modules/jsdom/lib/jsdom/living/generated/MutationObserverInit.js +103 -0
  1261. data/node_modules/jsdom/lib/jsdom/living/generated/MutationRecord.js +216 -0
  1262. data/node_modules/jsdom/lib/jsdom/living/generated/NamedNodeMap.js +522 -0
  1263. data/node_modules/jsdom/lib/jsdom/living/generated/Navigator.js +297 -0
  1264. data/node_modules/jsdom/lib/jsdom/living/generated/Node.js +736 -0
  1265. data/node_modules/jsdom/lib/jsdom/living/generated/NodeFilter.js +74 -0
  1266. data/node_modules/jsdom/lib/jsdom/living/generated/NodeIterator.js +196 -0
  1267. data/node_modules/jsdom/lib/jsdom/living/generated/NodeList.js +309 -0
  1268. data/node_modules/jsdom/lib/jsdom/living/generated/OnBeforeUnloadEventHandlerNonNull.js +46 -0
  1269. data/node_modules/jsdom/lib/jsdom/living/generated/OnErrorEventHandlerNonNull.js +60 -0
  1270. data/node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js +146 -0
  1271. data/node_modules/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js +32 -0
  1272. data/node_modules/jsdom/lib/jsdom/living/generated/Performance.js +145 -0
  1273. data/node_modules/jsdom/lib/jsdom/living/generated/Plugin.js +361 -0
  1274. data/node_modules/jsdom/lib/jsdom/living/generated/PluginArray.js +340 -0
  1275. data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js +142 -0
  1276. data/node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js +32 -0
  1277. data/node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js +125 -0
  1278. data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js +166 -0
  1279. data/node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js +56 -0
  1280. data/node_modules/jsdom/lib/jsdom/living/generated/Range.js +619 -0
  1281. data/node_modules/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js +143 -0
  1282. data/node_modules/jsdom/lib/jsdom/living/generated/SVGBoundingBoxOptions.js +64 -0
  1283. data/node_modules/jsdom/lib/jsdom/living/generated/SVGElement.js +1986 -0
  1284. data/node_modules/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js +144 -0
  1285. data/node_modules/jsdom/lib/jsdom/living/generated/SVGNumber.js +130 -0
  1286. data/node_modules/jsdom/lib/jsdom/living/generated/SVGSVGElement.js +681 -0
  1287. data/node_modules/jsdom/lib/jsdom/living/generated/SVGStringList.js +504 -0
  1288. data/node_modules/jsdom/lib/jsdom/living/generated/SVGTitleElement.js +114 -0
  1289. data/node_modules/jsdom/lib/jsdom/living/generated/Screen.js +173 -0
  1290. data/node_modules/jsdom/lib/jsdom/living/generated/ScrollBehavior.js +12 -0
  1291. data/node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js +45 -0
  1292. data/node_modules/jsdom/lib/jsdom/living/generated/ScrollLogicalPosition.js +12 -0
  1293. data/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js +30 -0
  1294. data/node_modules/jsdom/lib/jsdom/living/generated/ScrollRestoration.js +12 -0
  1295. data/node_modules/jsdom/lib/jsdom/living/generated/Selection.js +527 -0
  1296. data/node_modules/jsdom/lib/jsdom/living/generated/SelectionMode.js +12 -0
  1297. data/node_modules/jsdom/lib/jsdom/living/generated/ShadowRoot.js +185 -0
  1298. data/node_modules/jsdom/lib/jsdom/living/generated/ShadowRootInit.js +30 -0
  1299. data/node_modules/jsdom/lib/jsdom/living/generated/ShadowRootMode.js +12 -0
  1300. data/node_modules/jsdom/lib/jsdom/living/generated/StaticRange.js +126 -0
  1301. data/node_modules/jsdom/lib/jsdom/living/generated/StaticRangeInit.js +66 -0
  1302. data/node_modules/jsdom/lib/jsdom/living/generated/Storage.js +389 -0
  1303. data/node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js +305 -0
  1304. data/node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js +93 -0
  1305. data/node_modules/jsdom/lib/jsdom/living/generated/StyleSheetList.js +307 -0
  1306. data/node_modules/jsdom/lib/jsdom/living/generated/SupportedType.js +18 -0
  1307. data/node_modules/jsdom/lib/jsdom/living/generated/Text.js +169 -0
  1308. data/node_modules/jsdom/lib/jsdom/living/generated/TextTrackKind.js +12 -0
  1309. data/node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js +208 -0
  1310. data/node_modules/jsdom/lib/jsdom/living/generated/TouchEventInit.js +89 -0
  1311. data/node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js +236 -0
  1312. data/node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js +235 -0
  1313. data/node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js +59 -0
  1314. data/node_modules/jsdom/lib/jsdom/living/generated/ValidityState.js +228 -0
  1315. data/node_modules/jsdom/lib/jsdom/living/generated/VisibilityState.js +12 -0
  1316. data/node_modules/jsdom/lib/jsdom/living/generated/VoidFunction.js +30 -0
  1317. data/node_modules/jsdom/lib/jsdom/living/generated/WebSocket.js +444 -0
  1318. data/node_modules/jsdom/lib/jsdom/living/generated/WheelEvent.js +183 -0
  1319. data/node_modules/jsdom/lib/jsdom/living/generated/WheelEventInit.js +68 -0
  1320. data/node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js +114 -0
  1321. data/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js +617 -0
  1322. data/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js +341 -0
  1323. data/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestResponseType.js +12 -0
  1324. data/node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js +114 -0
  1325. data/node_modules/jsdom/lib/jsdom/living/generated/XMLSerializer.js +133 -0
  1326. data/node_modules/jsdom/lib/jsdom/living/generated/utils.js +141 -0
  1327. data/node_modules/jsdom/lib/jsdom/living/helpers/agent-factory.js +15 -0
  1328. data/node_modules/jsdom/lib/jsdom/living/helpers/binary-data.js +9 -0
  1329. data/node_modules/jsdom/lib/jsdom/living/helpers/create-element.js +320 -0
  1330. data/node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js +188 -0
  1331. data/node_modules/jsdom/lib/jsdom/living/helpers/custom-elements.js +270 -0
  1332. data/node_modules/jsdom/lib/jsdom/living/helpers/dates-and-times.js +270 -0
  1333. data/node_modules/jsdom/lib/jsdom/living/helpers/details.js +15 -0
  1334. data/node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js +54 -0
  1335. data/node_modules/jsdom/lib/jsdom/living/helpers/events.js +24 -0
  1336. data/node_modules/jsdom/lib/jsdom/living/helpers/focusing.js +104 -0
  1337. data/node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js +306 -0
  1338. data/node_modules/jsdom/lib/jsdom/living/helpers/html-constructor.js +78 -0
  1339. data/node_modules/jsdom/lib/jsdom/living/helpers/http-request.js +254 -0
  1340. data/node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js +12 -0
  1341. data/node_modules/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js +48 -0
  1342. data/node_modules/jsdom/lib/jsdom/living/helpers/json.js +12 -0
  1343. data/node_modules/jsdom/lib/jsdom/living/helpers/mutation-observers.js +198 -0
  1344. data/node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js +15 -0
  1345. data/node_modules/jsdom/lib/jsdom/living/helpers/node.js +68 -0
  1346. data/node_modules/jsdom/lib/jsdom/living/helpers/number-and-date-inputs.js +195 -0
  1347. data/node_modules/jsdom/lib/jsdom/living/helpers/ordered-set.js +104 -0
  1348. data/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js +76 -0
  1349. data/node_modules/jsdom/lib/jsdom/living/helpers/selectors.js +47 -0
  1350. data/node_modules/jsdom/lib/jsdom/living/helpers/shadow-dom.js +285 -0
  1351. data/node_modules/jsdom/lib/jsdom/living/helpers/strings.js +148 -0
  1352. data/node_modules/jsdom/lib/jsdom/living/helpers/style-rules.js +114 -0
  1353. data/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js +113 -0
  1354. data/node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js +41 -0
  1355. data/node_modules/jsdom/lib/jsdom/living/helpers/svg/render.js +46 -0
  1356. data/node_modules/jsdom/lib/jsdom/living/helpers/text.js +19 -0
  1357. data/node_modules/jsdom/lib/jsdom/living/helpers/traversal.js +72 -0
  1358. data/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js +75 -0
  1359. data/node_modules/jsdom/lib/jsdom/living/hr-time/Performance-impl.js +25 -0
  1360. data/node_modules/jsdom/lib/jsdom/living/interfaces.js +217 -0
  1361. data/node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js +95 -0
  1362. data/node_modules/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js +37 -0
  1363. data/node_modules/jsdom/lib/jsdom/living/named-properties-window.js +141 -0
  1364. data/node_modules/jsdom/lib/jsdom/living/navigator/MimeType-impl.js +3 -0
  1365. data/node_modules/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js +21 -0
  1366. data/node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js +29 -0
  1367. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +8 -0
  1368. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js +7 -0
  1369. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js +37 -0
  1370. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js +9 -0
  1371. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js +7 -0
  1372. data/node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js +8 -0
  1373. data/node_modules/jsdom/lib/jsdom/living/navigator/Plugin-impl.js +3 -0
  1374. data/node_modules/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js +23 -0
  1375. data/node_modules/jsdom/lib/jsdom/living/node-document-position.js +10 -0
  1376. data/node_modules/jsdom/lib/jsdom/living/node-type.js +16 -0
  1377. data/node_modules/jsdom/lib/jsdom/living/node.js +331 -0
  1378. data/node_modules/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js +16 -0
  1379. data/node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js +118 -0
  1380. data/node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js +80 -0
  1381. data/node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js +20 -0
  1382. data/node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js +120 -0
  1383. data/node_modules/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js +64 -0
  1384. data/node_modules/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js +171 -0
  1385. data/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js +946 -0
  1386. data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js +44 -0
  1387. data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js +28 -0
  1388. data/node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js +24 -0
  1389. data/node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js +578 -0
  1390. data/node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js +25 -0
  1391. data/node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js +7 -0
  1392. data/node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +95 -0
  1393. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js +50 -0
  1394. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js +43 -0
  1395. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js +9 -0
  1396. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js +9 -0
  1397. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js +27 -0
  1398. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js +17 -0
  1399. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js +79 -0
  1400. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js +130 -0
  1401. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js +96 -0
  1402. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js +9 -0
  1403. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js +9 -0
  1404. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js +20 -0
  1405. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js +35 -0
  1406. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js +9 -0
  1407. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js +9 -0
  1408. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js +9 -0
  1409. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js +160 -0
  1410. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js +8 -0
  1411. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js +43 -0
  1412. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js +9 -0
  1413. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js +226 -0
  1414. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +261 -0
  1415. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js +17 -0
  1416. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js +9 -0
  1417. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js +9 -0
  1418. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js +9 -0
  1419. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js +9 -0
  1420. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js +371 -0
  1421. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js +9 -0
  1422. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js +132 -0
  1423. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js +1128 -0
  1424. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js +9 -0
  1425. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js +94 -0
  1426. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js +18 -0
  1427. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js +101 -0
  1428. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js +13 -0
  1429. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js +9 -0
  1430. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js +138 -0
  1431. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js +9 -0
  1432. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js +9 -0
  1433. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js +180 -0
  1434. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js +9 -0
  1435. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js +22 -0
  1436. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js +26 -0
  1437. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js +9 -0
  1438. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js +146 -0
  1439. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js +110 -0
  1440. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js +85 -0
  1441. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js +88 -0
  1442. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js +9 -0
  1443. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js +9 -0
  1444. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js +9 -0
  1445. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js +9 -0
  1446. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js +74 -0
  1447. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js +9 -0
  1448. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +265 -0
  1449. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js +283 -0
  1450. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js +59 -0
  1451. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js +8 -0
  1452. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js +9 -0
  1453. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js +74 -0
  1454. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js +9 -0
  1455. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js +73 -0
  1456. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js +9 -0
  1457. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js +236 -0
  1458. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js +88 -0
  1459. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js +61 -0
  1460. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js +67 -0
  1461. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js +272 -0
  1462. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js +9 -0
  1463. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js +18 -0
  1464. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js +13 -0
  1465. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js +9 -0
  1466. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js +9 -0
  1467. data/node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js +17 -0
  1468. data/node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js +2 -0
  1469. data/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js +1165 -0
  1470. data/node_modules/jsdom/lib/jsdom/living/nodes/NodeList-impl.js +43 -0
  1471. data/node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js +28 -0
  1472. data/node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js +11 -0
  1473. data/node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js +91 -0
  1474. data/node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js +22 -0
  1475. data/node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js +64 -0
  1476. data/node_modules/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js +16 -0
  1477. data/node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js +42 -0
  1478. data/node_modules/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js +42 -0
  1479. data/node_modules/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js +9 -0
  1480. data/node_modules/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js +40 -0
  1481. data/node_modules/jsdom/lib/jsdom/living/nodes/Slotable-impl.js +48 -0
  1482. data/node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js +96 -0
  1483. data/node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js +52 -0
  1484. data/node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js +4 -0
  1485. data/node_modules/jsdom/lib/jsdom/living/post-message.js +39 -0
  1486. data/node_modules/jsdom/lib/jsdom/living/range/AbstractRange-impl.js +43 -0
  1487. data/node_modules/jsdom/lib/jsdom/living/range/Range-impl.js +889 -0
  1488. data/node_modules/jsdom/lib/jsdom/living/range/StaticRange-impl.js +39 -0
  1489. data/node_modules/jsdom/lib/jsdom/living/range/boundary-point.js +47 -0
  1490. data/node_modules/jsdom/lib/jsdom/living/selection/Selection-impl.js +342 -0
  1491. data/node_modules/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js +38 -0
  1492. data/node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.js +195 -0
  1493. data/node_modules/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js +48 -0
  1494. data/node_modules/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js +16 -0
  1495. data/node_modules/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js +127 -0
  1496. data/node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js +217 -0
  1497. data/node_modules/jsdom/lib/jsdom/living/traversal/helpers.js +44 -0
  1498. data/node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl-browser.js +175 -0
  1499. data/node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js +328 -0
  1500. data/node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js +102 -0
  1501. data/node_modules/jsdom/lib/jsdom/living/window/BarProp-impl.js +10 -0
  1502. data/node_modules/jsdom/lib/jsdom/living/window/External-impl.js +9 -0
  1503. data/node_modules/jsdom/lib/jsdom/living/window/History-impl.js +134 -0
  1504. data/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js +238 -0
  1505. data/node_modules/jsdom/lib/jsdom/living/window/Screen-impl.js +13 -0
  1506. data/node_modules/jsdom/lib/jsdom/living/window/SessionHistory.js +163 -0
  1507. data/node_modules/jsdom/lib/jsdom/living/window/navigation.js +84 -0
  1508. data/node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js +171 -0
  1509. data/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js +1023 -0
  1510. data/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js +17 -0
  1511. data/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js +4 -0
  1512. data/node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js +60 -0
  1513. data/node_modules/jsdom/lib/jsdom/living/xhr/xhr-utils.js +438 -0
  1514. data/node_modules/jsdom/lib/jsdom/named-properties-tracker.js +158 -0
  1515. data/node_modules/jsdom/lib/jsdom/utils.js +165 -0
  1516. data/node_modules/jsdom/lib/jsdom/virtual-console.js +34 -0
  1517. data/node_modules/jsdom/lib/jsdom/vm-shim.js +106 -0
  1518. data/node_modules/jsdom/package.json +116 -0
  1519. data/node_modules/jsonfile/CHANGELOG.md +171 -0
  1520. data/node_modules/jsonfile/LICENSE +15 -0
  1521. data/node_modules/jsonfile/README.md +230 -0
  1522. data/node_modules/jsonfile/index.js +88 -0
  1523. data/node_modules/jsonfile/package.json +40 -0
  1524. data/node_modules/jsonfile/utils.js +14 -0
  1525. data/node_modules/levn/LICENSE +22 -0
  1526. data/node_modules/levn/README.md +196 -0
  1527. data/node_modules/levn/lib/cast.js +298 -0
  1528. data/node_modules/levn/lib/coerce.js +285 -0
  1529. data/node_modules/levn/lib/index.js +22 -0
  1530. data/node_modules/levn/lib/parse-string.js +113 -0
  1531. data/node_modules/levn/lib/parse.js +102 -0
  1532. data/node_modules/levn/package.json +47 -0
  1533. data/node_modules/lodash/LICENSE +47 -0
  1534. data/node_modules/lodash/README.md +39 -0
  1535. data/node_modules/lodash/_DataView.js +7 -0
  1536. data/node_modules/lodash/_Hash.js +32 -0
  1537. data/node_modules/lodash/_LazyWrapper.js +28 -0
  1538. data/node_modules/lodash/_ListCache.js +32 -0
  1539. data/node_modules/lodash/_LodashWrapper.js +22 -0
  1540. data/node_modules/lodash/_Map.js +7 -0
  1541. data/node_modules/lodash/_MapCache.js +32 -0
  1542. data/node_modules/lodash/_Promise.js +7 -0
  1543. data/node_modules/lodash/_Set.js +7 -0
  1544. data/node_modules/lodash/_SetCache.js +27 -0
  1545. data/node_modules/lodash/_Stack.js +27 -0
  1546. data/node_modules/lodash/_Symbol.js +6 -0
  1547. data/node_modules/lodash/_Uint8Array.js +6 -0
  1548. data/node_modules/lodash/_WeakMap.js +7 -0
  1549. data/node_modules/lodash/_apply.js +21 -0
  1550. data/node_modules/lodash/_arrayAggregator.js +22 -0
  1551. data/node_modules/lodash/_arrayEach.js +22 -0
  1552. data/node_modules/lodash/_arrayEachRight.js +21 -0
  1553. data/node_modules/lodash/_arrayEvery.js +23 -0
  1554. data/node_modules/lodash/_arrayFilter.js +25 -0
  1555. data/node_modules/lodash/_arrayIncludes.js +17 -0
  1556. data/node_modules/lodash/_arrayIncludesWith.js +22 -0
  1557. data/node_modules/lodash/_arrayLikeKeys.js +49 -0
  1558. data/node_modules/lodash/_arrayMap.js +21 -0
  1559. data/node_modules/lodash/_arrayPush.js +20 -0
  1560. data/node_modules/lodash/_arrayReduce.js +26 -0
  1561. data/node_modules/lodash/_arrayReduceRight.js +24 -0
  1562. data/node_modules/lodash/_arraySample.js +15 -0
  1563. data/node_modules/lodash/_arraySampleSize.js +17 -0
  1564. data/node_modules/lodash/_arrayShuffle.js +15 -0
  1565. data/node_modules/lodash/_arraySome.js +23 -0
  1566. data/node_modules/lodash/_asciiSize.js +12 -0
  1567. data/node_modules/lodash/_asciiToArray.js +12 -0
  1568. data/node_modules/lodash/_asciiWords.js +15 -0
  1569. data/node_modules/lodash/_assignMergeValue.js +20 -0
  1570. data/node_modules/lodash/_assignValue.js +28 -0
  1571. data/node_modules/lodash/_assocIndexOf.js +21 -0
  1572. data/node_modules/lodash/_baseAggregator.js +21 -0
  1573. data/node_modules/lodash/_baseAssign.js +17 -0
  1574. data/node_modules/lodash/_baseAssignIn.js +17 -0
  1575. data/node_modules/lodash/_baseAssignValue.js +25 -0
  1576. data/node_modules/lodash/_baseAt.js +23 -0
  1577. data/node_modules/lodash/_baseClamp.js +22 -0
  1578. data/node_modules/lodash/_baseClone.js +166 -0
  1579. data/node_modules/lodash/_baseConforms.js +18 -0
  1580. data/node_modules/lodash/_baseConformsTo.js +27 -0
  1581. data/node_modules/lodash/_baseCreate.js +30 -0
  1582. data/node_modules/lodash/_baseDelay.js +21 -0
  1583. data/node_modules/lodash/_baseDifference.js +67 -0
  1584. data/node_modules/lodash/_baseEach.js +14 -0
  1585. data/node_modules/lodash/_baseEachRight.js +14 -0
  1586. data/node_modules/lodash/_baseEvery.js +21 -0
  1587. data/node_modules/lodash/_baseExtremum.js +32 -0
  1588. data/node_modules/lodash/_baseFill.js +32 -0
  1589. data/node_modules/lodash/_baseFilter.js +21 -0
  1590. data/node_modules/lodash/_baseFindIndex.js +24 -0
  1591. data/node_modules/lodash/_baseFindKey.js +23 -0
  1592. data/node_modules/lodash/_baseFlatten.js +38 -0
  1593. data/node_modules/lodash/_baseFor.js +16 -0
  1594. data/node_modules/lodash/_baseForOwn.js +16 -0
  1595. data/node_modules/lodash/_baseForOwnRight.js +16 -0
  1596. data/node_modules/lodash/_baseForRight.js +15 -0
  1597. data/node_modules/lodash/_baseFunctions.js +19 -0
  1598. data/node_modules/lodash/_baseGet.js +24 -0
  1599. data/node_modules/lodash/_baseGetAllKeys.js +20 -0
  1600. data/node_modules/lodash/_baseGetTag.js +28 -0
  1601. data/node_modules/lodash/_baseGt.js +14 -0
  1602. data/node_modules/lodash/_baseHas.js +19 -0
  1603. data/node_modules/lodash/_baseHasIn.js +13 -0
  1604. data/node_modules/lodash/_baseInRange.js +18 -0
  1605. data/node_modules/lodash/_baseIndexOf.js +20 -0
  1606. data/node_modules/lodash/_baseIndexOfWith.js +23 -0
  1607. data/node_modules/lodash/_baseIntersection.js +74 -0
  1608. data/node_modules/lodash/_baseInverter.js +21 -0
  1609. data/node_modules/lodash/_baseInvoke.js +24 -0
  1610. data/node_modules/lodash/_baseIsArguments.js +18 -0
  1611. data/node_modules/lodash/_baseIsArrayBuffer.js +17 -0
  1612. data/node_modules/lodash/_baseIsDate.js +18 -0
  1613. data/node_modules/lodash/_baseIsEqual.js +28 -0
  1614. data/node_modules/lodash/_baseIsEqualDeep.js +83 -0
  1615. data/node_modules/lodash/_baseIsMap.js +18 -0
  1616. data/node_modules/lodash/_baseIsMatch.js +62 -0
  1617. data/node_modules/lodash/_baseIsNaN.js +12 -0
  1618. data/node_modules/lodash/_baseIsNative.js +47 -0
  1619. data/node_modules/lodash/_baseIsRegExp.js +18 -0
  1620. data/node_modules/lodash/_baseIsSet.js +18 -0
  1621. data/node_modules/lodash/_baseIsTypedArray.js +60 -0
  1622. data/node_modules/lodash/_baseIteratee.js +31 -0
  1623. data/node_modules/lodash/_baseKeys.js +30 -0
  1624. data/node_modules/lodash/_baseKeysIn.js +33 -0
  1625. data/node_modules/lodash/_baseLodash.js +10 -0
  1626. data/node_modules/lodash/_baseLt.js +14 -0
  1627. data/node_modules/lodash/_baseMap.js +22 -0
  1628. data/node_modules/lodash/_baseMatches.js +22 -0
  1629. data/node_modules/lodash/_baseMatchesProperty.js +33 -0
  1630. data/node_modules/lodash/_baseMean.js +20 -0
  1631. data/node_modules/lodash/_baseMerge.js +42 -0
  1632. data/node_modules/lodash/_baseMergeDeep.js +94 -0
  1633. data/node_modules/lodash/_baseNth.js +20 -0
  1634. data/node_modules/lodash/_baseOrderBy.js +49 -0
  1635. data/node_modules/lodash/_basePick.js +19 -0
  1636. data/node_modules/lodash/_basePickBy.js +30 -0
  1637. data/node_modules/lodash/_baseProperty.js +14 -0
  1638. data/node_modules/lodash/_basePropertyDeep.js +16 -0
  1639. data/node_modules/lodash/_basePropertyOf.js +14 -0
  1640. data/node_modules/lodash/_basePullAll.js +51 -0
  1641. data/node_modules/lodash/_basePullAt.js +37 -0
  1642. data/node_modules/lodash/_baseRandom.js +18 -0
  1643. data/node_modules/lodash/_baseRange.js +28 -0
  1644. data/node_modules/lodash/_baseReduce.js +23 -0
  1645. data/node_modules/lodash/_baseRepeat.js +35 -0
  1646. data/node_modules/lodash/_baseRest.js +17 -0
  1647. data/node_modules/lodash/_baseSample.js +15 -0
  1648. data/node_modules/lodash/_baseSampleSize.js +18 -0
  1649. data/node_modules/lodash/_baseSet.js +51 -0
  1650. data/node_modules/lodash/_baseSetData.js +17 -0
  1651. data/node_modules/lodash/_baseSetToString.js +22 -0
  1652. data/node_modules/lodash/_baseShuffle.js +15 -0
  1653. data/node_modules/lodash/_baseSlice.js +31 -0
  1654. data/node_modules/lodash/_baseSome.js +22 -0
  1655. data/node_modules/lodash/_baseSortBy.js +21 -0
  1656. data/node_modules/lodash/_baseSortedIndex.js +42 -0
  1657. data/node_modules/lodash/_baseSortedIndexBy.js +67 -0
  1658. data/node_modules/lodash/_baseSortedUniq.js +30 -0
  1659. data/node_modules/lodash/_baseSum.js +24 -0
  1660. data/node_modules/lodash/_baseTimes.js +20 -0
  1661. data/node_modules/lodash/_baseToNumber.js +24 -0
  1662. data/node_modules/lodash/_baseToPairs.js +18 -0
  1663. data/node_modules/lodash/_baseToString.js +37 -0
  1664. data/node_modules/lodash/_baseTrim.js +19 -0
  1665. data/node_modules/lodash/_baseUnary.js +14 -0
  1666. data/node_modules/lodash/_baseUniq.js +72 -0
  1667. data/node_modules/lodash/_baseUnset.js +20 -0
  1668. data/node_modules/lodash/_baseUpdate.js +18 -0
  1669. data/node_modules/lodash/_baseValues.js +19 -0
  1670. data/node_modules/lodash/_baseWhile.js +26 -0
  1671. data/node_modules/lodash/_baseWrapperValue.js +25 -0
  1672. data/node_modules/lodash/_baseXor.js +36 -0
  1673. data/node_modules/lodash/_baseZipObject.js +23 -0
  1674. data/node_modules/lodash/_cacheHas.js +13 -0
  1675. data/node_modules/lodash/_castArrayLikeObject.js +14 -0
  1676. data/node_modules/lodash/_castFunction.js +14 -0
  1677. data/node_modules/lodash/_castPath.js +21 -0
  1678. data/node_modules/lodash/_castRest.js +14 -0
  1679. data/node_modules/lodash/_castSlice.js +18 -0
  1680. data/node_modules/lodash/_charsEndIndex.js +19 -0
  1681. data/node_modules/lodash/_charsStartIndex.js +20 -0
  1682. data/node_modules/lodash/_cloneArrayBuffer.js +16 -0
  1683. data/node_modules/lodash/_cloneBuffer.js +35 -0
  1684. data/node_modules/lodash/_cloneDataView.js +16 -0
  1685. data/node_modules/lodash/_cloneRegExp.js +17 -0
  1686. data/node_modules/lodash/_cloneSymbol.js +18 -0
  1687. data/node_modules/lodash/_cloneTypedArray.js +16 -0
  1688. data/node_modules/lodash/_compareAscending.js +41 -0
  1689. data/node_modules/lodash/_compareMultiple.js +44 -0
  1690. data/node_modules/lodash/_composeArgs.js +39 -0
  1691. data/node_modules/lodash/_composeArgsRight.js +41 -0
  1692. data/node_modules/lodash/_copyArray.js +20 -0
  1693. data/node_modules/lodash/_copyObject.js +40 -0
  1694. data/node_modules/lodash/_copySymbols.js +16 -0
  1695. data/node_modules/lodash/_copySymbolsIn.js +16 -0
  1696. data/node_modules/lodash/_coreJsData.js +6 -0
  1697. data/node_modules/lodash/_countHolders.js +21 -0
  1698. data/node_modules/lodash/_createAggregator.js +23 -0
  1699. data/node_modules/lodash/_createAssigner.js +37 -0
  1700. data/node_modules/lodash/_createBaseEach.js +32 -0
  1701. data/node_modules/lodash/_createBaseFor.js +25 -0
  1702. data/node_modules/lodash/_createBind.js +28 -0
  1703. data/node_modules/lodash/_createCaseFirst.js +33 -0
  1704. data/node_modules/lodash/_createCompounder.js +24 -0
  1705. data/node_modules/lodash/_createCtor.js +37 -0
  1706. data/node_modules/lodash/_createCurry.js +46 -0
  1707. data/node_modules/lodash/_createFind.js +25 -0
  1708. data/node_modules/lodash/_createFlow.js +78 -0
  1709. data/node_modules/lodash/_createHybrid.js +92 -0
  1710. data/node_modules/lodash/_createInverter.js +17 -0
  1711. data/node_modules/lodash/_createMathOperation.js +38 -0
  1712. data/node_modules/lodash/_createOver.js +27 -0
  1713. data/node_modules/lodash/_createPadding.js +33 -0
  1714. data/node_modules/lodash/_createPartial.js +43 -0
  1715. data/node_modules/lodash/_createRange.js +30 -0
  1716. data/node_modules/lodash/_createRecurry.js +56 -0
  1717. data/node_modules/lodash/_createRelationalOperation.js +20 -0
  1718. data/node_modules/lodash/_createRound.js +35 -0
  1719. data/node_modules/lodash/_createSet.js +19 -0
  1720. data/node_modules/lodash/_createToPairs.js +30 -0
  1721. data/node_modules/lodash/_createWrap.js +106 -0
  1722. data/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
  1723. data/node_modules/lodash/_customDefaultsMerge.js +28 -0
  1724. data/node_modules/lodash/_customOmitClone.js +16 -0
  1725. data/node_modules/lodash/_deburrLetter.js +71 -0
  1726. data/node_modules/lodash/_defineProperty.js +11 -0
  1727. data/node_modules/lodash/_equalArrays.js +84 -0
  1728. data/node_modules/lodash/_equalByTag.js +112 -0
  1729. data/node_modules/lodash/_equalObjects.js +90 -0
  1730. data/node_modules/lodash/_escapeHtmlChar.js +21 -0
  1731. data/node_modules/lodash/_escapeStringChar.js +22 -0
  1732. data/node_modules/lodash/_flatRest.js +16 -0
  1733. data/node_modules/lodash/_freeGlobal.js +4 -0
  1734. data/node_modules/lodash/_getAllKeys.js +16 -0
  1735. data/node_modules/lodash/_getAllKeysIn.js +17 -0
  1736. data/node_modules/lodash/_getData.js +15 -0
  1737. data/node_modules/lodash/_getFuncName.js +31 -0
  1738. data/node_modules/lodash/_getHolder.js +13 -0
  1739. data/node_modules/lodash/_getMapData.js +18 -0
  1740. data/node_modules/lodash/_getMatchData.js +24 -0
  1741. data/node_modules/lodash/_getNative.js +17 -0
  1742. data/node_modules/lodash/_getPrototype.js +6 -0
  1743. data/node_modules/lodash/_getRawTag.js +46 -0
  1744. data/node_modules/lodash/_getSymbols.js +30 -0
  1745. data/node_modules/lodash/_getSymbolsIn.js +25 -0
  1746. data/node_modules/lodash/_getTag.js +58 -0
  1747. data/node_modules/lodash/_getValue.js +13 -0
  1748. data/node_modules/lodash/_getView.js +33 -0
  1749. data/node_modules/lodash/_getWrapDetails.js +17 -0
  1750. data/node_modules/lodash/_hasPath.js +39 -0
  1751. data/node_modules/lodash/_hasUnicode.js +26 -0
  1752. data/node_modules/lodash/_hasUnicodeWord.js +15 -0
  1753. data/node_modules/lodash/_hashClear.js +15 -0
  1754. data/node_modules/lodash/_hashDelete.js +17 -0
  1755. data/node_modules/lodash/_hashGet.js +30 -0
  1756. data/node_modules/lodash/_hashHas.js +23 -0
  1757. data/node_modules/lodash/_hashSet.js +23 -0
  1758. data/node_modules/lodash/_initCloneArray.js +26 -0
  1759. data/node_modules/lodash/_initCloneByTag.js +77 -0
  1760. data/node_modules/lodash/_initCloneObject.js +18 -0
  1761. data/node_modules/lodash/_insertWrapDetails.js +23 -0
  1762. data/node_modules/lodash/_isFlattenable.js +20 -0
  1763. data/node_modules/lodash/_isIndex.js +25 -0
  1764. data/node_modules/lodash/_isIterateeCall.js +30 -0
  1765. data/node_modules/lodash/_isKey.js +29 -0
  1766. data/node_modules/lodash/_isKeyable.js +15 -0
  1767. data/node_modules/lodash/_isLaziable.js +28 -0
  1768. data/node_modules/lodash/_isMaskable.js +14 -0
  1769. data/node_modules/lodash/_isMasked.js +20 -0
  1770. data/node_modules/lodash/_isPrototype.js +18 -0
  1771. data/node_modules/lodash/_isStrictComparable.js +15 -0
  1772. data/node_modules/lodash/_iteratorToArray.js +18 -0
  1773. data/node_modules/lodash/_lazyClone.js +23 -0
  1774. data/node_modules/lodash/_lazyReverse.js +23 -0
  1775. data/node_modules/lodash/_lazyValue.js +69 -0
  1776. data/node_modules/lodash/_listCacheClear.js +13 -0
  1777. data/node_modules/lodash/_listCacheDelete.js +35 -0
  1778. data/node_modules/lodash/_listCacheGet.js +19 -0
  1779. data/node_modules/lodash/_listCacheHas.js +16 -0
  1780. data/node_modules/lodash/_listCacheSet.js +26 -0
  1781. data/node_modules/lodash/_mapCacheClear.js +21 -0
  1782. data/node_modules/lodash/_mapCacheDelete.js +18 -0
  1783. data/node_modules/lodash/_mapCacheGet.js +16 -0
  1784. data/node_modules/lodash/_mapCacheHas.js +16 -0
  1785. data/node_modules/lodash/_mapCacheSet.js +22 -0
  1786. data/node_modules/lodash/_mapToArray.js +18 -0
  1787. data/node_modules/lodash/_matchesStrictComparable.js +20 -0
  1788. data/node_modules/lodash/_memoizeCapped.js +26 -0
  1789. data/node_modules/lodash/_mergeData.js +90 -0
  1790. data/node_modules/lodash/_metaMap.js +6 -0
  1791. data/node_modules/lodash/_nativeCreate.js +6 -0
  1792. data/node_modules/lodash/_nativeKeys.js +6 -0
  1793. data/node_modules/lodash/_nativeKeysIn.js +20 -0
  1794. data/node_modules/lodash/_nodeUtil.js +30 -0
  1795. data/node_modules/lodash/_objectToString.js +22 -0
  1796. data/node_modules/lodash/_overArg.js +15 -0
  1797. data/node_modules/lodash/_overRest.js +36 -0
  1798. data/node_modules/lodash/_parent.js +16 -0
  1799. data/node_modules/lodash/_reEscape.js +4 -0
  1800. data/node_modules/lodash/_reEvaluate.js +4 -0
  1801. data/node_modules/lodash/_reInterpolate.js +4 -0
  1802. data/node_modules/lodash/_realNames.js +4 -0
  1803. data/node_modules/lodash/_reorder.js +29 -0
  1804. data/node_modules/lodash/_replaceHolders.js +29 -0
  1805. data/node_modules/lodash/_root.js +9 -0
  1806. data/node_modules/lodash/_safeGet.js +21 -0
  1807. data/node_modules/lodash/_setCacheAdd.js +19 -0
  1808. data/node_modules/lodash/_setCacheHas.js +14 -0
  1809. data/node_modules/lodash/_setData.js +20 -0
  1810. data/node_modules/lodash/_setToArray.js +18 -0
  1811. data/node_modules/lodash/_setToPairs.js +18 -0
  1812. data/node_modules/lodash/_setToString.js +14 -0
  1813. data/node_modules/lodash/_setWrapToString.js +21 -0
  1814. data/node_modules/lodash/_shortOut.js +37 -0
  1815. data/node_modules/lodash/_shuffleSelf.js +28 -0
  1816. data/node_modules/lodash/_stackClear.js +15 -0
  1817. data/node_modules/lodash/_stackDelete.js +18 -0
  1818. data/node_modules/lodash/_stackGet.js +14 -0
  1819. data/node_modules/lodash/_stackHas.js +14 -0
  1820. data/node_modules/lodash/_stackSet.js +34 -0
  1821. data/node_modules/lodash/_strictIndexOf.js +23 -0
  1822. data/node_modules/lodash/_strictLastIndexOf.js +21 -0
  1823. data/node_modules/lodash/_stringSize.js +18 -0
  1824. data/node_modules/lodash/_stringToArray.js +18 -0
  1825. data/node_modules/lodash/_stringToPath.js +27 -0
  1826. data/node_modules/lodash/_toKey.js +21 -0
  1827. data/node_modules/lodash/_toSource.js +26 -0
  1828. data/node_modules/lodash/_trimmedEndIndex.js +19 -0
  1829. data/node_modules/lodash/_unescapeHtmlChar.js +21 -0
  1830. data/node_modules/lodash/_unicodeSize.js +44 -0
  1831. data/node_modules/lodash/_unicodeToArray.js +40 -0
  1832. data/node_modules/lodash/_unicodeWords.js +69 -0
  1833. data/node_modules/lodash/_updateWrapDetails.js +46 -0
  1834. data/node_modules/lodash/_wrapperClone.js +23 -0
  1835. data/node_modules/lodash/add.js +22 -0
  1836. data/node_modules/lodash/after.js +42 -0
  1837. data/node_modules/lodash/array.js +67 -0
  1838. data/node_modules/lodash/ary.js +29 -0
  1839. data/node_modules/lodash/assign.js +58 -0
  1840. data/node_modules/lodash/assignIn.js +40 -0
  1841. data/node_modules/lodash/assignInWith.js +38 -0
  1842. data/node_modules/lodash/assignWith.js +37 -0
  1843. data/node_modules/lodash/at.js +23 -0
  1844. data/node_modules/lodash/attempt.js +35 -0
  1845. data/node_modules/lodash/before.js +40 -0
  1846. data/node_modules/lodash/bind.js +57 -0
  1847. data/node_modules/lodash/bindAll.js +41 -0
  1848. data/node_modules/lodash/bindKey.js +68 -0
  1849. data/node_modules/lodash/camelCase.js +29 -0
  1850. data/node_modules/lodash/capitalize.js +23 -0
  1851. data/node_modules/lodash/castArray.js +44 -0
  1852. data/node_modules/lodash/ceil.js +26 -0
  1853. data/node_modules/lodash/chain.js +38 -0
  1854. data/node_modules/lodash/chunk.js +50 -0
  1855. data/node_modules/lodash/clamp.js +39 -0
  1856. data/node_modules/lodash/clone.js +36 -0
  1857. data/node_modules/lodash/cloneDeep.js +29 -0
  1858. data/node_modules/lodash/cloneDeepWith.js +40 -0
  1859. data/node_modules/lodash/cloneWith.js +42 -0
  1860. data/node_modules/lodash/collection.js +30 -0
  1861. data/node_modules/lodash/commit.js +33 -0
  1862. data/node_modules/lodash/compact.js +31 -0
  1863. data/node_modules/lodash/concat.js +43 -0
  1864. data/node_modules/lodash/cond.js +60 -0
  1865. data/node_modules/lodash/conforms.js +35 -0
  1866. data/node_modules/lodash/conformsTo.js +32 -0
  1867. data/node_modules/lodash/constant.js +26 -0
  1868. data/node_modules/lodash/core.js +3877 -0
  1869. data/node_modules/lodash/core.min.js +29 -0
  1870. data/node_modules/lodash/countBy.js +40 -0
  1871. data/node_modules/lodash/create.js +43 -0
  1872. data/node_modules/lodash/curry.js +57 -0
  1873. data/node_modules/lodash/curryRight.js +54 -0
  1874. data/node_modules/lodash/date.js +3 -0
  1875. data/node_modules/lodash/debounce.js +191 -0
  1876. data/node_modules/lodash/deburr.js +45 -0
  1877. data/node_modules/lodash/defaultTo.js +25 -0
  1878. data/node_modules/lodash/defaults.js +64 -0
  1879. data/node_modules/lodash/defaultsDeep.js +30 -0
  1880. data/node_modules/lodash/defer.js +26 -0
  1881. data/node_modules/lodash/delay.js +28 -0
  1882. data/node_modules/lodash/difference.js +33 -0
  1883. data/node_modules/lodash/differenceBy.js +44 -0
  1884. data/node_modules/lodash/differenceWith.js +40 -0
  1885. data/node_modules/lodash/divide.js +22 -0
  1886. data/node_modules/lodash/drop.js +38 -0
  1887. data/node_modules/lodash/dropRight.js +39 -0
  1888. data/node_modules/lodash/dropRightWhile.js +45 -0
  1889. data/node_modules/lodash/dropWhile.js +45 -0
  1890. data/node_modules/lodash/each.js +1 -0
  1891. data/node_modules/lodash/eachRight.js +1 -0
  1892. data/node_modules/lodash/endsWith.js +43 -0
  1893. data/node_modules/lodash/entries.js +1 -0
  1894. data/node_modules/lodash/entriesIn.js +1 -0
  1895. data/node_modules/lodash/eq.js +37 -0
  1896. data/node_modules/lodash/escape.js +43 -0
  1897. data/node_modules/lodash/escapeRegExp.js +32 -0
  1898. data/node_modules/lodash/every.js +56 -0
  1899. data/node_modules/lodash/extend.js +1 -0
  1900. data/node_modules/lodash/extendWith.js +1 -0
  1901. data/node_modules/lodash/fill.js +45 -0
  1902. data/node_modules/lodash/filter.js +52 -0
  1903. data/node_modules/lodash/find.js +42 -0
  1904. data/node_modules/lodash/findIndex.js +55 -0
  1905. data/node_modules/lodash/findKey.js +44 -0
  1906. data/node_modules/lodash/findLast.js +25 -0
  1907. data/node_modules/lodash/findLastIndex.js +59 -0
  1908. data/node_modules/lodash/findLastKey.js +44 -0
  1909. data/node_modules/lodash/first.js +1 -0
  1910. data/node_modules/lodash/flake.lock +40 -0
  1911. data/node_modules/lodash/flake.nix +20 -0
  1912. data/node_modules/lodash/flatMap.js +29 -0
  1913. data/node_modules/lodash/flatMapDeep.js +31 -0
  1914. data/node_modules/lodash/flatMapDepth.js +31 -0
  1915. data/node_modules/lodash/flatten.js +22 -0
  1916. data/node_modules/lodash/flattenDeep.js +25 -0
  1917. data/node_modules/lodash/flattenDepth.js +33 -0
  1918. data/node_modules/lodash/flip.js +28 -0
  1919. data/node_modules/lodash/floor.js +26 -0
  1920. data/node_modules/lodash/flow.js +27 -0
  1921. data/node_modules/lodash/flowRight.js +26 -0
  1922. data/node_modules/lodash/forEach.js +41 -0
  1923. data/node_modules/lodash/forEachRight.js +31 -0
  1924. data/node_modules/lodash/forIn.js +39 -0
  1925. data/node_modules/lodash/forInRight.js +37 -0
  1926. data/node_modules/lodash/forOwn.js +36 -0
  1927. data/node_modules/lodash/forOwnRight.js +34 -0
  1928. data/node_modules/lodash/fp/F.js +1 -0
  1929. data/node_modules/lodash/fp/T.js +1 -0
  1930. data/node_modules/lodash/fp/__.js +1 -0
  1931. data/node_modules/lodash/fp/_baseConvert.js +569 -0
  1932. data/node_modules/lodash/fp/_convertBrowser.js +18 -0
  1933. data/node_modules/lodash/fp/_falseOptions.js +7 -0
  1934. data/node_modules/lodash/fp/_mapping.js +358 -0
  1935. data/node_modules/lodash/fp/_util.js +16 -0
  1936. data/node_modules/lodash/fp/add.js +5 -0
  1937. data/node_modules/lodash/fp/after.js +5 -0
  1938. data/node_modules/lodash/fp/all.js +1 -0
  1939. data/node_modules/lodash/fp/allPass.js +1 -0
  1940. data/node_modules/lodash/fp/always.js +1 -0
  1941. data/node_modules/lodash/fp/any.js +1 -0
  1942. data/node_modules/lodash/fp/anyPass.js +1 -0
  1943. data/node_modules/lodash/fp/apply.js +1 -0
  1944. data/node_modules/lodash/fp/array.js +2 -0
  1945. data/node_modules/lodash/fp/ary.js +5 -0
  1946. data/node_modules/lodash/fp/assign.js +5 -0
  1947. data/node_modules/lodash/fp/assignAll.js +5 -0
  1948. data/node_modules/lodash/fp/assignAllWith.js +5 -0
  1949. data/node_modules/lodash/fp/assignIn.js +5 -0
  1950. data/node_modules/lodash/fp/assignInAll.js +5 -0
  1951. data/node_modules/lodash/fp/assignInAllWith.js +5 -0
  1952. data/node_modules/lodash/fp/assignInWith.js +5 -0
  1953. data/node_modules/lodash/fp/assignWith.js +5 -0
  1954. data/node_modules/lodash/fp/assoc.js +1 -0
  1955. data/node_modules/lodash/fp/assocPath.js +1 -0
  1956. data/node_modules/lodash/fp/at.js +5 -0
  1957. data/node_modules/lodash/fp/attempt.js +5 -0
  1958. data/node_modules/lodash/fp/before.js +5 -0
  1959. data/node_modules/lodash/fp/bind.js +5 -0
  1960. data/node_modules/lodash/fp/bindAll.js +5 -0
  1961. data/node_modules/lodash/fp/bindKey.js +5 -0
  1962. data/node_modules/lodash/fp/camelCase.js +5 -0
  1963. data/node_modules/lodash/fp/capitalize.js +5 -0
  1964. data/node_modules/lodash/fp/castArray.js +5 -0
  1965. data/node_modules/lodash/fp/ceil.js +5 -0
  1966. data/node_modules/lodash/fp/chain.js +5 -0
  1967. data/node_modules/lodash/fp/chunk.js +5 -0
  1968. data/node_modules/lodash/fp/clamp.js +5 -0
  1969. data/node_modules/lodash/fp/clone.js +5 -0
  1970. data/node_modules/lodash/fp/cloneDeep.js +5 -0
  1971. data/node_modules/lodash/fp/cloneDeepWith.js +5 -0
  1972. data/node_modules/lodash/fp/cloneWith.js +5 -0
  1973. data/node_modules/lodash/fp/collection.js +2 -0
  1974. data/node_modules/lodash/fp/commit.js +5 -0
  1975. data/node_modules/lodash/fp/compact.js +5 -0
  1976. data/node_modules/lodash/fp/complement.js +1 -0
  1977. data/node_modules/lodash/fp/compose.js +1 -0
  1978. data/node_modules/lodash/fp/concat.js +5 -0
  1979. data/node_modules/lodash/fp/cond.js +5 -0
  1980. data/node_modules/lodash/fp/conforms.js +1 -0
  1981. data/node_modules/lodash/fp/conformsTo.js +5 -0
  1982. data/node_modules/lodash/fp/constant.js +5 -0
  1983. data/node_modules/lodash/fp/contains.js +1 -0
  1984. data/node_modules/lodash/fp/convert.js +18 -0
  1985. data/node_modules/lodash/fp/countBy.js +5 -0
  1986. data/node_modules/lodash/fp/create.js +5 -0
  1987. data/node_modules/lodash/fp/curry.js +5 -0
  1988. data/node_modules/lodash/fp/curryN.js +5 -0
  1989. data/node_modules/lodash/fp/curryRight.js +5 -0
  1990. data/node_modules/lodash/fp/curryRightN.js +5 -0
  1991. data/node_modules/lodash/fp/date.js +2 -0
  1992. data/node_modules/lodash/fp/debounce.js +5 -0
  1993. data/node_modules/lodash/fp/deburr.js +5 -0
  1994. data/node_modules/lodash/fp/defaultTo.js +5 -0
  1995. data/node_modules/lodash/fp/defaults.js +5 -0
  1996. data/node_modules/lodash/fp/defaultsAll.js +5 -0
  1997. data/node_modules/lodash/fp/defaultsDeep.js +5 -0
  1998. data/node_modules/lodash/fp/defaultsDeepAll.js +5 -0
  1999. data/node_modules/lodash/fp/defer.js +5 -0
  2000. data/node_modules/lodash/fp/delay.js +5 -0
  2001. data/node_modules/lodash/fp/difference.js +5 -0
  2002. data/node_modules/lodash/fp/differenceBy.js +5 -0
  2003. data/node_modules/lodash/fp/differenceWith.js +5 -0
  2004. data/node_modules/lodash/fp/dissoc.js +1 -0
  2005. data/node_modules/lodash/fp/dissocPath.js +1 -0
  2006. data/node_modules/lodash/fp/divide.js +5 -0
  2007. data/node_modules/lodash/fp/drop.js +5 -0
  2008. data/node_modules/lodash/fp/dropLast.js +1 -0
  2009. data/node_modules/lodash/fp/dropLastWhile.js +1 -0
  2010. data/node_modules/lodash/fp/dropRight.js +5 -0
  2011. data/node_modules/lodash/fp/dropRightWhile.js +5 -0
  2012. data/node_modules/lodash/fp/dropWhile.js +5 -0
  2013. data/node_modules/lodash/fp/each.js +1 -0
  2014. data/node_modules/lodash/fp/eachRight.js +1 -0
  2015. data/node_modules/lodash/fp/endsWith.js +5 -0
  2016. data/node_modules/lodash/fp/entries.js +1 -0
  2017. data/node_modules/lodash/fp/entriesIn.js +1 -0
  2018. data/node_modules/lodash/fp/eq.js +5 -0
  2019. data/node_modules/lodash/fp/equals.js +1 -0
  2020. data/node_modules/lodash/fp/escape.js +5 -0
  2021. data/node_modules/lodash/fp/escapeRegExp.js +5 -0
  2022. data/node_modules/lodash/fp/every.js +5 -0
  2023. data/node_modules/lodash/fp/extend.js +1 -0
  2024. data/node_modules/lodash/fp/extendAll.js +1 -0
  2025. data/node_modules/lodash/fp/extendAllWith.js +1 -0
  2026. data/node_modules/lodash/fp/extendWith.js +1 -0
  2027. data/node_modules/lodash/fp/fill.js +5 -0
  2028. data/node_modules/lodash/fp/filter.js +5 -0
  2029. data/node_modules/lodash/fp/find.js +5 -0
  2030. data/node_modules/lodash/fp/findFrom.js +5 -0
  2031. data/node_modules/lodash/fp/findIndex.js +5 -0
  2032. data/node_modules/lodash/fp/findIndexFrom.js +5 -0
  2033. data/node_modules/lodash/fp/findKey.js +5 -0
  2034. data/node_modules/lodash/fp/findLast.js +5 -0
  2035. data/node_modules/lodash/fp/findLastFrom.js +5 -0
  2036. data/node_modules/lodash/fp/findLastIndex.js +5 -0
  2037. data/node_modules/lodash/fp/findLastIndexFrom.js +5 -0
  2038. data/node_modules/lodash/fp/findLastKey.js +5 -0
  2039. data/node_modules/lodash/fp/first.js +1 -0
  2040. data/node_modules/lodash/fp/flatMap.js +5 -0
  2041. data/node_modules/lodash/fp/flatMapDeep.js +5 -0
  2042. data/node_modules/lodash/fp/flatMapDepth.js +5 -0
  2043. data/node_modules/lodash/fp/flatten.js +5 -0
  2044. data/node_modules/lodash/fp/flattenDeep.js +5 -0
  2045. data/node_modules/lodash/fp/flattenDepth.js +5 -0
  2046. data/node_modules/lodash/fp/flip.js +5 -0
  2047. data/node_modules/lodash/fp/floor.js +5 -0
  2048. data/node_modules/lodash/fp/flow.js +5 -0
  2049. data/node_modules/lodash/fp/flowRight.js +5 -0
  2050. data/node_modules/lodash/fp/forEach.js +5 -0
  2051. data/node_modules/lodash/fp/forEachRight.js +5 -0
  2052. data/node_modules/lodash/fp/forIn.js +5 -0
  2053. data/node_modules/lodash/fp/forInRight.js +5 -0
  2054. data/node_modules/lodash/fp/forOwn.js +5 -0
  2055. data/node_modules/lodash/fp/forOwnRight.js +5 -0
  2056. data/node_modules/lodash/fp/fromPairs.js +5 -0
  2057. data/node_modules/lodash/fp/function.js +2 -0
  2058. data/node_modules/lodash/fp/functions.js +5 -0
  2059. data/node_modules/lodash/fp/functionsIn.js +5 -0
  2060. data/node_modules/lodash/fp/get.js +5 -0
  2061. data/node_modules/lodash/fp/getOr.js +5 -0
  2062. data/node_modules/lodash/fp/groupBy.js +5 -0
  2063. data/node_modules/lodash/fp/gt.js +5 -0
  2064. data/node_modules/lodash/fp/gte.js +5 -0
  2065. data/node_modules/lodash/fp/has.js +5 -0
  2066. data/node_modules/lodash/fp/hasIn.js +5 -0
  2067. data/node_modules/lodash/fp/head.js +5 -0
  2068. data/node_modules/lodash/fp/identical.js +1 -0
  2069. data/node_modules/lodash/fp/identity.js +5 -0
  2070. data/node_modules/lodash/fp/inRange.js +5 -0
  2071. data/node_modules/lodash/fp/includes.js +5 -0
  2072. data/node_modules/lodash/fp/includesFrom.js +5 -0
  2073. data/node_modules/lodash/fp/indexBy.js +1 -0
  2074. data/node_modules/lodash/fp/indexOf.js +5 -0
  2075. data/node_modules/lodash/fp/indexOfFrom.js +5 -0
  2076. data/node_modules/lodash/fp/init.js +1 -0
  2077. data/node_modules/lodash/fp/initial.js +5 -0
  2078. data/node_modules/lodash/fp/intersection.js +5 -0
  2079. data/node_modules/lodash/fp/intersectionBy.js +5 -0
  2080. data/node_modules/lodash/fp/intersectionWith.js +5 -0
  2081. data/node_modules/lodash/fp/invert.js +5 -0
  2082. data/node_modules/lodash/fp/invertBy.js +5 -0
  2083. data/node_modules/lodash/fp/invertObj.js +1 -0
  2084. data/node_modules/lodash/fp/invoke.js +5 -0
  2085. data/node_modules/lodash/fp/invokeArgs.js +5 -0
  2086. data/node_modules/lodash/fp/invokeArgsMap.js +5 -0
  2087. data/node_modules/lodash/fp/invokeMap.js +5 -0
  2088. data/node_modules/lodash/fp/isArguments.js +5 -0
  2089. data/node_modules/lodash/fp/isArray.js +5 -0
  2090. data/node_modules/lodash/fp/isArrayBuffer.js +5 -0
  2091. data/node_modules/lodash/fp/isArrayLike.js +5 -0
  2092. data/node_modules/lodash/fp/isArrayLikeObject.js +5 -0
  2093. data/node_modules/lodash/fp/isBoolean.js +5 -0
  2094. data/node_modules/lodash/fp/isBuffer.js +5 -0
  2095. data/node_modules/lodash/fp/isDate.js +5 -0
  2096. data/node_modules/lodash/fp/isElement.js +5 -0
  2097. data/node_modules/lodash/fp/isEmpty.js +5 -0
  2098. data/node_modules/lodash/fp/isEqual.js +5 -0
  2099. data/node_modules/lodash/fp/isEqualWith.js +5 -0
  2100. data/node_modules/lodash/fp/isError.js +5 -0
  2101. data/node_modules/lodash/fp/isFinite.js +5 -0
  2102. data/node_modules/lodash/fp/isFunction.js +5 -0
  2103. data/node_modules/lodash/fp/isInteger.js +5 -0
  2104. data/node_modules/lodash/fp/isLength.js +5 -0
  2105. data/node_modules/lodash/fp/isMap.js +5 -0
  2106. data/node_modules/lodash/fp/isMatch.js +5 -0
  2107. data/node_modules/lodash/fp/isMatchWith.js +5 -0
  2108. data/node_modules/lodash/fp/isNaN.js +5 -0
  2109. data/node_modules/lodash/fp/isNative.js +5 -0
  2110. data/node_modules/lodash/fp/isNil.js +5 -0
  2111. data/node_modules/lodash/fp/isNull.js +5 -0
  2112. data/node_modules/lodash/fp/isNumber.js +5 -0
  2113. data/node_modules/lodash/fp/isObject.js +5 -0
  2114. data/node_modules/lodash/fp/isObjectLike.js +5 -0
  2115. data/node_modules/lodash/fp/isPlainObject.js +5 -0
  2116. data/node_modules/lodash/fp/isRegExp.js +5 -0
  2117. data/node_modules/lodash/fp/isSafeInteger.js +5 -0
  2118. data/node_modules/lodash/fp/isSet.js +5 -0
  2119. data/node_modules/lodash/fp/isString.js +5 -0
  2120. data/node_modules/lodash/fp/isSymbol.js +5 -0
  2121. data/node_modules/lodash/fp/isTypedArray.js +5 -0
  2122. data/node_modules/lodash/fp/isUndefined.js +5 -0
  2123. data/node_modules/lodash/fp/isWeakMap.js +5 -0
  2124. data/node_modules/lodash/fp/isWeakSet.js +5 -0
  2125. data/node_modules/lodash/fp/iteratee.js +5 -0
  2126. data/node_modules/lodash/fp/join.js +5 -0
  2127. data/node_modules/lodash/fp/juxt.js +1 -0
  2128. data/node_modules/lodash/fp/kebabCase.js +5 -0
  2129. data/node_modules/lodash/fp/keyBy.js +5 -0
  2130. data/node_modules/lodash/fp/keys.js +5 -0
  2131. data/node_modules/lodash/fp/keysIn.js +5 -0
  2132. data/node_modules/lodash/fp/lang.js +2 -0
  2133. data/node_modules/lodash/fp/last.js +5 -0
  2134. data/node_modules/lodash/fp/lastIndexOf.js +5 -0
  2135. data/node_modules/lodash/fp/lastIndexOfFrom.js +5 -0
  2136. data/node_modules/lodash/fp/lowerCase.js +5 -0
  2137. data/node_modules/lodash/fp/lowerFirst.js +5 -0
  2138. data/node_modules/lodash/fp/lt.js +5 -0
  2139. data/node_modules/lodash/fp/lte.js +5 -0
  2140. data/node_modules/lodash/fp/map.js +5 -0
  2141. data/node_modules/lodash/fp/mapKeys.js +5 -0
  2142. data/node_modules/lodash/fp/mapValues.js +5 -0
  2143. data/node_modules/lodash/fp/matches.js +1 -0
  2144. data/node_modules/lodash/fp/matchesProperty.js +5 -0
  2145. data/node_modules/lodash/fp/math.js +2 -0
  2146. data/node_modules/lodash/fp/max.js +5 -0
  2147. data/node_modules/lodash/fp/maxBy.js +5 -0
  2148. data/node_modules/lodash/fp/mean.js +5 -0
  2149. data/node_modules/lodash/fp/meanBy.js +5 -0
  2150. data/node_modules/lodash/fp/memoize.js +5 -0
  2151. data/node_modules/lodash/fp/merge.js +5 -0
  2152. data/node_modules/lodash/fp/mergeAll.js +5 -0
  2153. data/node_modules/lodash/fp/mergeAllWith.js +5 -0
  2154. data/node_modules/lodash/fp/mergeWith.js +5 -0
  2155. data/node_modules/lodash/fp/method.js +5 -0
  2156. data/node_modules/lodash/fp/methodOf.js +5 -0
  2157. data/node_modules/lodash/fp/min.js +5 -0
  2158. data/node_modules/lodash/fp/minBy.js +5 -0
  2159. data/node_modules/lodash/fp/mixin.js +5 -0
  2160. data/node_modules/lodash/fp/multiply.js +5 -0
  2161. data/node_modules/lodash/fp/nAry.js +1 -0
  2162. data/node_modules/lodash/fp/negate.js +5 -0
  2163. data/node_modules/lodash/fp/next.js +5 -0
  2164. data/node_modules/lodash/fp/noop.js +5 -0
  2165. data/node_modules/lodash/fp/now.js +5 -0
  2166. data/node_modules/lodash/fp/nth.js +5 -0
  2167. data/node_modules/lodash/fp/nthArg.js +5 -0
  2168. data/node_modules/lodash/fp/number.js +2 -0
  2169. data/node_modules/lodash/fp/object.js +2 -0
  2170. data/node_modules/lodash/fp/omit.js +5 -0
  2171. data/node_modules/lodash/fp/omitAll.js +1 -0
  2172. data/node_modules/lodash/fp/omitBy.js +5 -0
  2173. data/node_modules/lodash/fp/once.js +5 -0
  2174. data/node_modules/lodash/fp/orderBy.js +5 -0
  2175. data/node_modules/lodash/fp/over.js +5 -0
  2176. data/node_modules/lodash/fp/overArgs.js +5 -0
  2177. data/node_modules/lodash/fp/overEvery.js +5 -0
  2178. data/node_modules/lodash/fp/overSome.js +5 -0
  2179. data/node_modules/lodash/fp/pad.js +5 -0
  2180. data/node_modules/lodash/fp/padChars.js +5 -0
  2181. data/node_modules/lodash/fp/padCharsEnd.js +5 -0
  2182. data/node_modules/lodash/fp/padCharsStart.js +5 -0
  2183. data/node_modules/lodash/fp/padEnd.js +5 -0
  2184. data/node_modules/lodash/fp/padStart.js +5 -0
  2185. data/node_modules/lodash/fp/parseInt.js +5 -0
  2186. data/node_modules/lodash/fp/partial.js +5 -0
  2187. data/node_modules/lodash/fp/partialRight.js +5 -0
  2188. data/node_modules/lodash/fp/partition.js +5 -0
  2189. data/node_modules/lodash/fp/path.js +1 -0
  2190. data/node_modules/lodash/fp/pathEq.js +1 -0
  2191. data/node_modules/lodash/fp/pathOr.js +1 -0
  2192. data/node_modules/lodash/fp/paths.js +1 -0
  2193. data/node_modules/lodash/fp/pick.js +5 -0
  2194. data/node_modules/lodash/fp/pickAll.js +1 -0
  2195. data/node_modules/lodash/fp/pickBy.js +5 -0
  2196. data/node_modules/lodash/fp/pipe.js +1 -0
  2197. data/node_modules/lodash/fp/placeholder.js +6 -0
  2198. data/node_modules/lodash/fp/plant.js +5 -0
  2199. data/node_modules/lodash/fp/pluck.js +1 -0
  2200. data/node_modules/lodash/fp/prop.js +1 -0
  2201. data/node_modules/lodash/fp/propEq.js +1 -0
  2202. data/node_modules/lodash/fp/propOr.js +1 -0
  2203. data/node_modules/lodash/fp/property.js +1 -0
  2204. data/node_modules/lodash/fp/propertyOf.js +5 -0
  2205. data/node_modules/lodash/fp/props.js +1 -0
  2206. data/node_modules/lodash/fp/pull.js +5 -0
  2207. data/node_modules/lodash/fp/pullAll.js +5 -0
  2208. data/node_modules/lodash/fp/pullAllBy.js +5 -0
  2209. data/node_modules/lodash/fp/pullAllWith.js +5 -0
  2210. data/node_modules/lodash/fp/pullAt.js +5 -0
  2211. data/node_modules/lodash/fp/random.js +5 -0
  2212. data/node_modules/lodash/fp/range.js +5 -0
  2213. data/node_modules/lodash/fp/rangeRight.js +5 -0
  2214. data/node_modules/lodash/fp/rangeStep.js +5 -0
  2215. data/node_modules/lodash/fp/rangeStepRight.js +5 -0
  2216. data/node_modules/lodash/fp/rearg.js +5 -0
  2217. data/node_modules/lodash/fp/reduce.js +5 -0
  2218. data/node_modules/lodash/fp/reduceRight.js +5 -0
  2219. data/node_modules/lodash/fp/reject.js +5 -0
  2220. data/node_modules/lodash/fp/remove.js +5 -0
  2221. data/node_modules/lodash/fp/repeat.js +5 -0
  2222. data/node_modules/lodash/fp/replace.js +5 -0
  2223. data/node_modules/lodash/fp/rest.js +5 -0
  2224. data/node_modules/lodash/fp/restFrom.js +5 -0
  2225. data/node_modules/lodash/fp/result.js +5 -0
  2226. data/node_modules/lodash/fp/reverse.js +5 -0
  2227. data/node_modules/lodash/fp/round.js +5 -0
  2228. data/node_modules/lodash/fp/sample.js +5 -0
  2229. data/node_modules/lodash/fp/sampleSize.js +5 -0
  2230. data/node_modules/lodash/fp/seq.js +2 -0
  2231. data/node_modules/lodash/fp/set.js +5 -0
  2232. data/node_modules/lodash/fp/setWith.js +5 -0
  2233. data/node_modules/lodash/fp/shuffle.js +5 -0
  2234. data/node_modules/lodash/fp/size.js +5 -0
  2235. data/node_modules/lodash/fp/slice.js +5 -0
  2236. data/node_modules/lodash/fp/snakeCase.js +5 -0
  2237. data/node_modules/lodash/fp/some.js +5 -0
  2238. data/node_modules/lodash/fp/sortBy.js +5 -0
  2239. data/node_modules/lodash/fp/sortedIndex.js +5 -0
  2240. data/node_modules/lodash/fp/sortedIndexBy.js +5 -0
  2241. data/node_modules/lodash/fp/sortedIndexOf.js +5 -0
  2242. data/node_modules/lodash/fp/sortedLastIndex.js +5 -0
  2243. data/node_modules/lodash/fp/sortedLastIndexBy.js +5 -0
  2244. data/node_modules/lodash/fp/sortedLastIndexOf.js +5 -0
  2245. data/node_modules/lodash/fp/sortedUniq.js +5 -0
  2246. data/node_modules/lodash/fp/sortedUniqBy.js +5 -0
  2247. data/node_modules/lodash/fp/split.js +5 -0
  2248. data/node_modules/lodash/fp/spread.js +5 -0
  2249. data/node_modules/lodash/fp/spreadFrom.js +5 -0
  2250. data/node_modules/lodash/fp/startCase.js +5 -0
  2251. data/node_modules/lodash/fp/startsWith.js +5 -0
  2252. data/node_modules/lodash/fp/string.js +2 -0
  2253. data/node_modules/lodash/fp/stubArray.js +5 -0
  2254. data/node_modules/lodash/fp/stubFalse.js +5 -0
  2255. data/node_modules/lodash/fp/stubObject.js +5 -0
  2256. data/node_modules/lodash/fp/stubString.js +5 -0
  2257. data/node_modules/lodash/fp/stubTrue.js +5 -0
  2258. data/node_modules/lodash/fp/subtract.js +5 -0
  2259. data/node_modules/lodash/fp/sum.js +5 -0
  2260. data/node_modules/lodash/fp/sumBy.js +5 -0
  2261. data/node_modules/lodash/fp/symmetricDifference.js +1 -0
  2262. data/node_modules/lodash/fp/symmetricDifferenceBy.js +1 -0
  2263. data/node_modules/lodash/fp/symmetricDifferenceWith.js +1 -0
  2264. data/node_modules/lodash/fp/tail.js +5 -0
  2265. data/node_modules/lodash/fp/take.js +5 -0
  2266. data/node_modules/lodash/fp/takeLast.js +1 -0
  2267. data/node_modules/lodash/fp/takeLastWhile.js +1 -0
  2268. data/node_modules/lodash/fp/takeRight.js +5 -0
  2269. data/node_modules/lodash/fp/takeRightWhile.js +5 -0
  2270. data/node_modules/lodash/fp/takeWhile.js +5 -0
  2271. data/node_modules/lodash/fp/tap.js +5 -0
  2272. data/node_modules/lodash/fp/template.js +5 -0
  2273. data/node_modules/lodash/fp/templateSettings.js +5 -0
  2274. data/node_modules/lodash/fp/throttle.js +5 -0
  2275. data/node_modules/lodash/fp/thru.js +5 -0
  2276. data/node_modules/lodash/fp/times.js +5 -0
  2277. data/node_modules/lodash/fp/toArray.js +5 -0
  2278. data/node_modules/lodash/fp/toFinite.js +5 -0
  2279. data/node_modules/lodash/fp/toInteger.js +5 -0
  2280. data/node_modules/lodash/fp/toIterator.js +5 -0
  2281. data/node_modules/lodash/fp/toJSON.js +5 -0
  2282. data/node_modules/lodash/fp/toLength.js +5 -0
  2283. data/node_modules/lodash/fp/toLower.js +5 -0
  2284. data/node_modules/lodash/fp/toNumber.js +5 -0
  2285. data/node_modules/lodash/fp/toPairs.js +5 -0
  2286. data/node_modules/lodash/fp/toPairsIn.js +5 -0
  2287. data/node_modules/lodash/fp/toPath.js +5 -0
  2288. data/node_modules/lodash/fp/toPlainObject.js +5 -0
  2289. data/node_modules/lodash/fp/toSafeInteger.js +5 -0
  2290. data/node_modules/lodash/fp/toString.js +5 -0
  2291. data/node_modules/lodash/fp/toUpper.js +5 -0
  2292. data/node_modules/lodash/fp/transform.js +5 -0
  2293. data/node_modules/lodash/fp/trim.js +5 -0
  2294. data/node_modules/lodash/fp/trimChars.js +5 -0
  2295. data/node_modules/lodash/fp/trimCharsEnd.js +5 -0
  2296. data/node_modules/lodash/fp/trimCharsStart.js +5 -0
  2297. data/node_modules/lodash/fp/trimEnd.js +5 -0
  2298. data/node_modules/lodash/fp/trimStart.js +5 -0
  2299. data/node_modules/lodash/fp/truncate.js +5 -0
  2300. data/node_modules/lodash/fp/unapply.js +1 -0
  2301. data/node_modules/lodash/fp/unary.js +5 -0
  2302. data/node_modules/lodash/fp/unescape.js +5 -0
  2303. data/node_modules/lodash/fp/union.js +5 -0
  2304. data/node_modules/lodash/fp/unionBy.js +5 -0
  2305. data/node_modules/lodash/fp/unionWith.js +5 -0
  2306. data/node_modules/lodash/fp/uniq.js +5 -0
  2307. data/node_modules/lodash/fp/uniqBy.js +5 -0
  2308. data/node_modules/lodash/fp/uniqWith.js +5 -0
  2309. data/node_modules/lodash/fp/uniqueId.js +5 -0
  2310. data/node_modules/lodash/fp/unnest.js +1 -0
  2311. data/node_modules/lodash/fp/unset.js +5 -0
  2312. data/node_modules/lodash/fp/unzip.js +5 -0
  2313. data/node_modules/lodash/fp/unzipWith.js +5 -0
  2314. data/node_modules/lodash/fp/update.js +5 -0
  2315. data/node_modules/lodash/fp/updateWith.js +5 -0
  2316. data/node_modules/lodash/fp/upperCase.js +5 -0
  2317. data/node_modules/lodash/fp/upperFirst.js +5 -0
  2318. data/node_modules/lodash/fp/useWith.js +1 -0
  2319. data/node_modules/lodash/fp/util.js +2 -0
  2320. data/node_modules/lodash/fp/value.js +5 -0
  2321. data/node_modules/lodash/fp/valueOf.js +5 -0
  2322. data/node_modules/lodash/fp/values.js +5 -0
  2323. data/node_modules/lodash/fp/valuesIn.js +5 -0
  2324. data/node_modules/lodash/fp/where.js +1 -0
  2325. data/node_modules/lodash/fp/whereEq.js +1 -0
  2326. data/node_modules/lodash/fp/without.js +5 -0
  2327. data/node_modules/lodash/fp/words.js +5 -0
  2328. data/node_modules/lodash/fp/wrap.js +5 -0
  2329. data/node_modules/lodash/fp/wrapperAt.js +5 -0
  2330. data/node_modules/lodash/fp/wrapperChain.js +5 -0
  2331. data/node_modules/lodash/fp/wrapperLodash.js +5 -0
  2332. data/node_modules/lodash/fp/wrapperReverse.js +5 -0
  2333. data/node_modules/lodash/fp/wrapperValue.js +5 -0
  2334. data/node_modules/lodash/fp/xor.js +5 -0
  2335. data/node_modules/lodash/fp/xorBy.js +5 -0
  2336. data/node_modules/lodash/fp/xorWith.js +5 -0
  2337. data/node_modules/lodash/fp/zip.js +5 -0
  2338. data/node_modules/lodash/fp/zipAll.js +5 -0
  2339. data/node_modules/lodash/fp/zipObj.js +1 -0
  2340. data/node_modules/lodash/fp/zipObject.js +5 -0
  2341. data/node_modules/lodash/fp/zipObjectDeep.js +5 -0
  2342. data/node_modules/lodash/fp/zipWith.js +5 -0
  2343. data/node_modules/lodash/fp.js +2 -0
  2344. data/node_modules/lodash/fromPairs.js +28 -0
  2345. data/node_modules/lodash/function.js +25 -0
  2346. data/node_modules/lodash/functions.js +31 -0
  2347. data/node_modules/lodash/functionsIn.js +31 -0
  2348. data/node_modules/lodash/get.js +33 -0
  2349. data/node_modules/lodash/groupBy.js +41 -0
  2350. data/node_modules/lodash/gt.js +29 -0
  2351. data/node_modules/lodash/gte.js +30 -0
  2352. data/node_modules/lodash/has.js +35 -0
  2353. data/node_modules/lodash/hasIn.js +34 -0
  2354. data/node_modules/lodash/head.js +23 -0
  2355. data/node_modules/lodash/identity.js +21 -0
  2356. data/node_modules/lodash/inRange.js +55 -0
  2357. data/node_modules/lodash/includes.js +53 -0
  2358. data/node_modules/lodash/index.js +1 -0
  2359. data/node_modules/lodash/indexOf.js +42 -0
  2360. data/node_modules/lodash/initial.js +22 -0
  2361. data/node_modules/lodash/intersection.js +30 -0
  2362. data/node_modules/lodash/intersectionBy.js +45 -0
  2363. data/node_modules/lodash/intersectionWith.js +41 -0
  2364. data/node_modules/lodash/invert.js +42 -0
  2365. data/node_modules/lodash/invertBy.js +56 -0
  2366. data/node_modules/lodash/invoke.js +24 -0
  2367. data/node_modules/lodash/invokeMap.js +41 -0
  2368. data/node_modules/lodash/isArguments.js +36 -0
  2369. data/node_modules/lodash/isArray.js +26 -0
  2370. data/node_modules/lodash/isArrayBuffer.js +27 -0
  2371. data/node_modules/lodash/isArrayLike.js +33 -0
  2372. data/node_modules/lodash/isArrayLikeObject.js +33 -0
  2373. data/node_modules/lodash/isBoolean.js +29 -0
  2374. data/node_modules/lodash/isBuffer.js +38 -0
  2375. data/node_modules/lodash/isDate.js +27 -0
  2376. data/node_modules/lodash/isElement.js +25 -0
  2377. data/node_modules/lodash/isEmpty.js +77 -0
  2378. data/node_modules/lodash/isEqual.js +35 -0
  2379. data/node_modules/lodash/isEqualWith.js +41 -0
  2380. data/node_modules/lodash/isError.js +36 -0
  2381. data/node_modules/lodash/isFinite.js +36 -0
  2382. data/node_modules/lodash/isFunction.js +37 -0
  2383. data/node_modules/lodash/isInteger.js +33 -0
  2384. data/node_modules/lodash/isLength.js +35 -0
  2385. data/node_modules/lodash/isMap.js +27 -0
  2386. data/node_modules/lodash/isMatch.js +36 -0
  2387. data/node_modules/lodash/isMatchWith.js +41 -0
  2388. data/node_modules/lodash/isNaN.js +38 -0
  2389. data/node_modules/lodash/isNative.js +40 -0
  2390. data/node_modules/lodash/isNil.js +25 -0
  2391. data/node_modules/lodash/isNull.js +22 -0
  2392. data/node_modules/lodash/isNumber.js +38 -0
  2393. data/node_modules/lodash/isObject.js +31 -0
  2394. data/node_modules/lodash/isObjectLike.js +29 -0
  2395. data/node_modules/lodash/isPlainObject.js +62 -0
  2396. data/node_modules/lodash/isRegExp.js +27 -0
  2397. data/node_modules/lodash/isSafeInteger.js +37 -0
  2398. data/node_modules/lodash/isSet.js +27 -0
  2399. data/node_modules/lodash/isString.js +30 -0
  2400. data/node_modules/lodash/isSymbol.js +29 -0
  2401. data/node_modules/lodash/isTypedArray.js +27 -0
  2402. data/node_modules/lodash/isUndefined.js +22 -0
  2403. data/node_modules/lodash/isWeakMap.js +28 -0
  2404. data/node_modules/lodash/isWeakSet.js +28 -0
  2405. data/node_modules/lodash/iteratee.js +53 -0
  2406. data/node_modules/lodash/join.js +26 -0
  2407. data/node_modules/lodash/kebabCase.js +28 -0
  2408. data/node_modules/lodash/keyBy.js +36 -0
  2409. data/node_modules/lodash/keys.js +37 -0
  2410. data/node_modules/lodash/keysIn.js +32 -0
  2411. data/node_modules/lodash/lang.js +58 -0
  2412. data/node_modules/lodash/last.js +20 -0
  2413. data/node_modules/lodash/lastIndexOf.js +46 -0
  2414. data/node_modules/lodash/lodash.js +17209 -0
  2415. data/node_modules/lodash/lodash.min.js +140 -0
  2416. data/node_modules/lodash/lowerCase.js +27 -0
  2417. data/node_modules/lodash/lowerFirst.js +22 -0
  2418. data/node_modules/lodash/lt.js +29 -0
  2419. data/node_modules/lodash/lte.js +30 -0
  2420. data/node_modules/lodash/map.js +53 -0
  2421. data/node_modules/lodash/mapKeys.js +36 -0
  2422. data/node_modules/lodash/mapValues.js +43 -0
  2423. data/node_modules/lodash/matches.js +46 -0
  2424. data/node_modules/lodash/matchesProperty.js +44 -0
  2425. data/node_modules/lodash/math.js +17 -0
  2426. data/node_modules/lodash/max.js +29 -0
  2427. data/node_modules/lodash/maxBy.js +34 -0
  2428. data/node_modules/lodash/mean.js +22 -0
  2429. data/node_modules/lodash/meanBy.js +31 -0
  2430. data/node_modules/lodash/memoize.js +73 -0
  2431. data/node_modules/lodash/merge.js +39 -0
  2432. data/node_modules/lodash/mergeWith.js +39 -0
  2433. data/node_modules/lodash/method.js +34 -0
  2434. data/node_modules/lodash/methodOf.js +33 -0
  2435. data/node_modules/lodash/min.js +29 -0
  2436. data/node_modules/lodash/minBy.js +34 -0
  2437. data/node_modules/lodash/mixin.js +74 -0
  2438. data/node_modules/lodash/multiply.js +22 -0
  2439. data/node_modules/lodash/negate.js +40 -0
  2440. data/node_modules/lodash/next.js +35 -0
  2441. data/node_modules/lodash/noop.js +17 -0
  2442. data/node_modules/lodash/now.js +23 -0
  2443. data/node_modules/lodash/nth.js +29 -0
  2444. data/node_modules/lodash/nthArg.js +32 -0
  2445. data/node_modules/lodash/number.js +5 -0
  2446. data/node_modules/lodash/object.js +49 -0
  2447. data/node_modules/lodash/omit.js +57 -0
  2448. data/node_modules/lodash/omitBy.js +29 -0
  2449. data/node_modules/lodash/once.js +25 -0
  2450. data/node_modules/lodash/orderBy.js +47 -0
  2451. data/node_modules/lodash/over.js +24 -0
  2452. data/node_modules/lodash/overArgs.js +61 -0
  2453. data/node_modules/lodash/overEvery.js +34 -0
  2454. data/node_modules/lodash/overSome.js +37 -0
  2455. data/node_modules/lodash/package.json +17 -0
  2456. data/node_modules/lodash/pad.js +49 -0
  2457. data/node_modules/lodash/padEnd.js +39 -0
  2458. data/node_modules/lodash/padStart.js +39 -0
  2459. data/node_modules/lodash/parseInt.js +43 -0
  2460. data/node_modules/lodash/partial.js +50 -0
  2461. data/node_modules/lodash/partialRight.js +49 -0
  2462. data/node_modules/lodash/partition.js +43 -0
  2463. data/node_modules/lodash/pick.js +25 -0
  2464. data/node_modules/lodash/pickBy.js +37 -0
  2465. data/node_modules/lodash/plant.js +48 -0
  2466. data/node_modules/lodash/property.js +32 -0
  2467. data/node_modules/lodash/propertyOf.js +30 -0
  2468. data/node_modules/lodash/pull.js +29 -0
  2469. data/node_modules/lodash/pullAll.js +29 -0
  2470. data/node_modules/lodash/pullAllBy.js +33 -0
  2471. data/node_modules/lodash/pullAllWith.js +32 -0
  2472. data/node_modules/lodash/pullAt.js +43 -0
  2473. data/node_modules/lodash/random.js +82 -0
  2474. data/node_modules/lodash/range.js +46 -0
  2475. data/node_modules/lodash/rangeRight.js +41 -0
  2476. data/node_modules/lodash/rearg.js +33 -0
  2477. data/node_modules/lodash/reduce.js +51 -0
  2478. data/node_modules/lodash/reduceRight.js +36 -0
  2479. data/node_modules/lodash/reject.js +46 -0
  2480. data/node_modules/lodash/release.md +48 -0
  2481. data/node_modules/lodash/remove.js +53 -0
  2482. data/node_modules/lodash/repeat.js +37 -0
  2483. data/node_modules/lodash/replace.js +29 -0
  2484. data/node_modules/lodash/rest.js +40 -0
  2485. data/node_modules/lodash/result.js +56 -0
  2486. data/node_modules/lodash/reverse.js +34 -0
  2487. data/node_modules/lodash/round.js +26 -0
  2488. data/node_modules/lodash/sample.js +24 -0
  2489. data/node_modules/lodash/sampleSize.js +37 -0
  2490. data/node_modules/lodash/seq.js +16 -0
  2491. data/node_modules/lodash/set.js +35 -0
  2492. data/node_modules/lodash/setWith.js +32 -0
  2493. data/node_modules/lodash/shuffle.js +25 -0
  2494. data/node_modules/lodash/size.js +46 -0
  2495. data/node_modules/lodash/slice.js +37 -0
  2496. data/node_modules/lodash/snakeCase.js +28 -0
  2497. data/node_modules/lodash/some.js +51 -0
  2498. data/node_modules/lodash/sortBy.js +48 -0
  2499. data/node_modules/lodash/sortedIndex.js +24 -0
  2500. data/node_modules/lodash/sortedIndexBy.js +33 -0
  2501. data/node_modules/lodash/sortedIndexOf.js +31 -0
  2502. data/node_modules/lodash/sortedLastIndex.js +25 -0
  2503. data/node_modules/lodash/sortedLastIndexBy.js +33 -0
  2504. data/node_modules/lodash/sortedLastIndexOf.js +31 -0
  2505. data/node_modules/lodash/sortedUniq.js +24 -0
  2506. data/node_modules/lodash/sortedUniqBy.js +26 -0
  2507. data/node_modules/lodash/split.js +52 -0
  2508. data/node_modules/lodash/spread.js +63 -0
  2509. data/node_modules/lodash/startCase.js +29 -0
  2510. data/node_modules/lodash/startsWith.js +39 -0
  2511. data/node_modules/lodash/string.js +33 -0
  2512. data/node_modules/lodash/stubArray.js +23 -0
  2513. data/node_modules/lodash/stubFalse.js +18 -0
  2514. data/node_modules/lodash/stubObject.js +23 -0
  2515. data/node_modules/lodash/stubString.js +18 -0
  2516. data/node_modules/lodash/stubTrue.js +18 -0
  2517. data/node_modules/lodash/subtract.js +22 -0
  2518. data/node_modules/lodash/sum.js +24 -0
  2519. data/node_modules/lodash/sumBy.js +33 -0
  2520. data/node_modules/lodash/tail.js +22 -0
  2521. data/node_modules/lodash/take.js +37 -0
  2522. data/node_modules/lodash/takeRight.js +39 -0
  2523. data/node_modules/lodash/takeRightWhile.js +45 -0
  2524. data/node_modules/lodash/takeWhile.js +45 -0
  2525. data/node_modules/lodash/tap.js +29 -0
  2526. data/node_modules/lodash/template.js +272 -0
  2527. data/node_modules/lodash/templateSettings.js +67 -0
  2528. data/node_modules/lodash/throttle.js +69 -0
  2529. data/node_modules/lodash/thru.js +28 -0
  2530. data/node_modules/lodash/times.js +51 -0
  2531. data/node_modules/lodash/toArray.js +58 -0
  2532. data/node_modules/lodash/toFinite.js +42 -0
  2533. data/node_modules/lodash/toInteger.js +36 -0
  2534. data/node_modules/lodash/toIterator.js +23 -0
  2535. data/node_modules/lodash/toJSON.js +1 -0
  2536. data/node_modules/lodash/toLength.js +38 -0
  2537. data/node_modules/lodash/toLower.js +28 -0
  2538. data/node_modules/lodash/toNumber.js +64 -0
  2539. data/node_modules/lodash/toPairs.js +30 -0
  2540. data/node_modules/lodash/toPairsIn.js +30 -0
  2541. data/node_modules/lodash/toPath.js +33 -0
  2542. data/node_modules/lodash/toPlainObject.js +32 -0
  2543. data/node_modules/lodash/toSafeInteger.js +37 -0
  2544. data/node_modules/lodash/toString.js +28 -0
  2545. data/node_modules/lodash/toUpper.js +28 -0
  2546. data/node_modules/lodash/transform.js +65 -0
  2547. data/node_modules/lodash/trim.js +47 -0
  2548. data/node_modules/lodash/trimEnd.js +41 -0
  2549. data/node_modules/lodash/trimStart.js +43 -0
  2550. data/node_modules/lodash/truncate.js +111 -0
  2551. data/node_modules/lodash/unary.js +22 -0
  2552. data/node_modules/lodash/unescape.js +34 -0
  2553. data/node_modules/lodash/union.js +26 -0
  2554. data/node_modules/lodash/unionBy.js +39 -0
  2555. data/node_modules/lodash/unionWith.js +34 -0
  2556. data/node_modules/lodash/uniq.js +25 -0
  2557. data/node_modules/lodash/uniqBy.js +31 -0
  2558. data/node_modules/lodash/uniqWith.js +28 -0
  2559. data/node_modules/lodash/uniqueId.js +28 -0
  2560. data/node_modules/lodash/unset.js +34 -0
  2561. data/node_modules/lodash/unzip.js +45 -0
  2562. data/node_modules/lodash/unzipWith.js +39 -0
  2563. data/node_modules/lodash/update.js +35 -0
  2564. data/node_modules/lodash/updateWith.js +33 -0
  2565. data/node_modules/lodash/upperCase.js +27 -0
  2566. data/node_modules/lodash/upperFirst.js +22 -0
  2567. data/node_modules/lodash/util.js +34 -0
  2568. data/node_modules/lodash/value.js +1 -0
  2569. data/node_modules/lodash/valueOf.js +1 -0
  2570. data/node_modules/lodash/values.js +34 -0
  2571. data/node_modules/lodash/valuesIn.js +32 -0
  2572. data/node_modules/lodash/without.js +31 -0
  2573. data/node_modules/lodash/words.js +35 -0
  2574. data/node_modules/lodash/wrap.js +30 -0
  2575. data/node_modules/lodash/wrapperAt.js +48 -0
  2576. data/node_modules/lodash/wrapperChain.js +34 -0
  2577. data/node_modules/lodash/wrapperLodash.js +147 -0
  2578. data/node_modules/lodash/wrapperReverse.js +44 -0
  2579. data/node_modules/lodash/wrapperValue.js +21 -0
  2580. data/node_modules/lodash/xor.js +28 -0
  2581. data/node_modules/lodash/xorBy.js +39 -0
  2582. data/node_modules/lodash/xorWith.js +34 -0
  2583. data/node_modules/lodash/zip.js +22 -0
  2584. data/node_modules/lodash/zipObject.js +24 -0
  2585. data/node_modules/lodash/zipObjectDeep.js +23 -0
  2586. data/node_modules/lodash/zipWith.js +32 -0
  2587. data/node_modules/lru-cache/LICENSE +15 -0
  2588. data/node_modules/lru-cache/README.md +166 -0
  2589. data/node_modules/lru-cache/index.js +334 -0
  2590. data/node_modules/lru-cache/package.json +34 -0
  2591. data/node_modules/mime-db/HISTORY.md +486 -0
  2592. data/node_modules/mime-db/LICENSE +22 -0
  2593. data/node_modules/mime-db/README.md +100 -0
  2594. data/node_modules/mime-db/db.json +8417 -0
  2595. data/node_modules/mime-db/index.js +11 -0
  2596. data/node_modules/mime-db/package.json +59 -0
  2597. data/node_modules/mime-types/HISTORY.md +378 -0
  2598. data/node_modules/mime-types/LICENSE +23 -0
  2599. data/node_modules/mime-types/README.md +113 -0
  2600. data/node_modules/mime-types/index.js +188 -0
  2601. data/node_modules/mime-types/package.json +44 -0
  2602. data/node_modules/minimatch/LICENSE +15 -0
  2603. data/node_modules/minimatch/README.md +209 -0
  2604. data/node_modules/minimatch/minimatch.js +923 -0
  2605. data/node_modules/minimatch/package.json +30 -0
  2606. data/node_modules/ms/index.js +162 -0
  2607. data/node_modules/ms/license.md +21 -0
  2608. data/node_modules/ms/package.json +37 -0
  2609. data/node_modules/ms/readme.md +60 -0
  2610. data/node_modules/normalize-path/LICENSE +21 -0
  2611. data/node_modules/normalize-path/README.md +127 -0
  2612. data/node_modules/normalize-path/index.js +35 -0
  2613. data/node_modules/normalize-path/package.json +77 -0
  2614. data/node_modules/nwsapi/LICENSE +22 -0
  2615. data/node_modules/nwsapi/README.md +132 -0
  2616. data/node_modules/nwsapi/dist/lint.log +0 -0
  2617. data/node_modules/nwsapi/package.json +38 -0
  2618. data/node_modules/nwsapi/src/modules/nwsapi-jquery.js +135 -0
  2619. data/node_modules/nwsapi/src/modules/nwsapi-traversal.js +90 -0
  2620. data/node_modules/nwsapi/src/nwsapi.js +1800 -0
  2621. data/node_modules/once/LICENSE +15 -0
  2622. data/node_modules/once/README.md +79 -0
  2623. data/node_modules/once/once.js +42 -0
  2624. data/node_modules/once/package.json +33 -0
  2625. data/node_modules/optionator/CHANGELOG.md +56 -0
  2626. data/node_modules/optionator/LICENSE +22 -0
  2627. data/node_modules/optionator/README.md +238 -0
  2628. data/node_modules/optionator/lib/help.js +260 -0
  2629. data/node_modules/optionator/lib/index.js +465 -0
  2630. data/node_modules/optionator/lib/util.js +54 -0
  2631. data/node_modules/optionator/package.json +44 -0
  2632. data/node_modules/parse5/LICENSE +19 -0
  2633. data/node_modules/parse5/README.md +38 -0
  2634. data/node_modules/parse5/lib/common/doctype.js +162 -0
  2635. data/node_modules/parse5/lib/common/error-codes.js +65 -0
  2636. data/node_modules/parse5/lib/common/foreign-content.js +265 -0
  2637. data/node_modules/parse5/lib/common/html.js +272 -0
  2638. data/node_modules/parse5/lib/common/unicode.js +109 -0
  2639. data/node_modules/parse5/lib/extensions/error-reporting/mixin-base.js +43 -0
  2640. data/node_modules/parse5/lib/extensions/error-reporting/parser-mixin.js +52 -0
  2641. data/node_modules/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +24 -0
  2642. data/node_modules/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +17 -0
  2643. data/node_modules/parse5/lib/extensions/location-info/open-element-stack-mixin.js +35 -0
  2644. data/node_modules/parse5/lib/extensions/location-info/parser-mixin.js +223 -0
  2645. data/node_modules/parse5/lib/extensions/location-info/tokenizer-mixin.js +146 -0
  2646. data/node_modules/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +64 -0
  2647. data/node_modules/parse5/lib/index.js +29 -0
  2648. data/node_modules/parse5/lib/parser/formatting-element-list.js +181 -0
  2649. data/node_modules/parse5/lib/parser/index.js +2956 -0
  2650. data/node_modules/parse5/lib/parser/open-element-stack.js +482 -0
  2651. data/node_modules/parse5/lib/serializer/index.js +176 -0
  2652. data/node_modules/parse5/lib/tokenizer/index.js +2196 -0
  2653. data/node_modules/parse5/lib/tokenizer/named-entity-data.js +5 -0
  2654. data/node_modules/parse5/lib/tokenizer/preprocessor.js +159 -0
  2655. data/node_modules/parse5/lib/tree-adapters/default.js +221 -0
  2656. data/node_modules/parse5/lib/utils/merge-options.js +13 -0
  2657. data/node_modules/parse5/lib/utils/mixin.js +39 -0
  2658. data/node_modules/parse5/package.json +35 -0
  2659. data/node_modules/path-is-absolute/index.js +20 -0
  2660. data/node_modules/path-is-absolute/license +21 -0
  2661. data/node_modules/path-is-absolute/package.json +43 -0
  2662. data/node_modules/path-is-absolute/readme.md +59 -0
  2663. data/node_modules/path-key/index.d.ts +40 -0
  2664. data/node_modules/path-key/index.js +16 -0
  2665. data/node_modules/path-key/license +9 -0
  2666. data/node_modules/path-key/package.json +39 -0
  2667. data/node_modules/path-key/readme.md +61 -0
  2668. data/node_modules/picomatch/CHANGELOG.md +126 -0
  2669. data/node_modules/picomatch/LICENSE +21 -0
  2670. data/node_modules/picomatch/README.md +707 -0
  2671. data/node_modules/picomatch/index.js +3 -0
  2672. data/node_modules/picomatch/lib/constants.js +179 -0
  2673. data/node_modules/picomatch/lib/parse.js +1084 -0
  2674. data/node_modules/picomatch/lib/picomatch.js +342 -0
  2675. data/node_modules/picomatch/lib/scan.js +391 -0
  2676. data/node_modules/picomatch/lib/utils.js +64 -0
  2677. data/node_modules/picomatch/package.json +81 -0
  2678. data/node_modules/prelude-ls/CHANGELOG.md +99 -0
  2679. data/node_modules/prelude-ls/LICENSE +22 -0
  2680. data/node_modules/prelude-ls/README.md +15 -0
  2681. data/node_modules/prelude-ls/lib/Func.js +65 -0
  2682. data/node_modules/prelude-ls/lib/List.js +686 -0
  2683. data/node_modules/prelude-ls/lib/Num.js +130 -0
  2684. data/node_modules/prelude-ls/lib/Obj.js +154 -0
  2685. data/node_modules/prelude-ls/lib/Str.js +92 -0
  2686. data/node_modules/prelude-ls/lib/index.js +178 -0
  2687. data/node_modules/prelude-ls/package.json +52 -0
  2688. data/node_modules/psl/LICENSE +9 -0
  2689. data/node_modules/psl/README.md +215 -0
  2690. data/node_modules/psl/browserstack-logo.svg +90 -0
  2691. data/node_modules/psl/data/rules.json +8834 -0
  2692. data/node_modules/psl/dist/psl.js +9645 -0
  2693. data/node_modules/psl/dist/psl.min.js +1 -0
  2694. data/node_modules/psl/index.js +269 -0
  2695. data/node_modules/psl/package.json +44 -0
  2696. data/node_modules/punycode/LICENSE-MIT.txt +20 -0
  2697. data/node_modules/punycode/README.md +122 -0
  2698. data/node_modules/punycode/package.json +58 -0
  2699. data/node_modules/punycode/punycode.es6.js +441 -0
  2700. data/node_modules/punycode/punycode.js +440 -0
  2701. data/node_modules/readdirp/LICENSE +21 -0
  2702. data/node_modules/readdirp/README.md +122 -0
  2703. data/node_modules/readdirp/index.d.ts +43 -0
  2704. data/node_modules/readdirp/index.js +287 -0
  2705. data/node_modules/readdirp/package.json +122 -0
  2706. data/node_modules/require-directory/LICENSE +22 -0
  2707. data/node_modules/require-directory/README.markdown +184 -0
  2708. data/node_modules/require-directory/index.js +86 -0
  2709. data/node_modules/require-directory/package.json +40 -0
  2710. data/node_modules/safer-buffer/LICENSE +21 -0
  2711. data/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  2712. data/node_modules/safer-buffer/Readme.md +156 -0
  2713. data/node_modules/safer-buffer/dangerous.js +58 -0
  2714. data/node_modules/safer-buffer/package.json +34 -0
  2715. data/node_modules/safer-buffer/safer.js +77 -0
  2716. data/node_modules/safer-buffer/tests.js +406 -0
  2717. data/node_modules/saxes/README.md +323 -0
  2718. data/node_modules/saxes/package.json +70 -0
  2719. data/node_modules/saxes/saxes.d.ts +635 -0
  2720. data/node_modules/saxes/saxes.js +2064 -0
  2721. data/node_modules/saxes/saxes.js.map +1 -0
  2722. data/node_modules/semver/CHANGELOG.md +111 -0
  2723. data/node_modules/semver/LICENSE +15 -0
  2724. data/node_modules/semver/README.md +566 -0
  2725. data/node_modules/semver/bin/semver.js +173 -0
  2726. data/node_modules/semver/classes/comparator.js +135 -0
  2727. data/node_modules/semver/classes/index.js +5 -0
  2728. data/node_modules/semver/classes/range.js +510 -0
  2729. data/node_modules/semver/classes/semver.js +287 -0
  2730. data/node_modules/semver/functions/clean.js +6 -0
  2731. data/node_modules/semver/functions/cmp.js +48 -0
  2732. data/node_modules/semver/functions/coerce.js +51 -0
  2733. data/node_modules/semver/functions/compare-build.js +7 -0
  2734. data/node_modules/semver/functions/compare-loose.js +3 -0
  2735. data/node_modules/semver/functions/compare.js +5 -0
  2736. data/node_modules/semver/functions/diff.js +23 -0
  2737. data/node_modules/semver/functions/eq.js +3 -0
  2738. data/node_modules/semver/functions/gt.js +3 -0
  2739. data/node_modules/semver/functions/gte.js +3 -0
  2740. data/node_modules/semver/functions/inc.js +15 -0
  2741. data/node_modules/semver/functions/lt.js +3 -0
  2742. data/node_modules/semver/functions/lte.js +3 -0
  2743. data/node_modules/semver/functions/major.js +3 -0
  2744. data/node_modules/semver/functions/minor.js +3 -0
  2745. data/node_modules/semver/functions/neq.js +3 -0
  2746. data/node_modules/semver/functions/parse.js +33 -0
  2747. data/node_modules/semver/functions/patch.js +3 -0
  2748. data/node_modules/semver/functions/prerelease.js +6 -0
  2749. data/node_modules/semver/functions/rcompare.js +3 -0
  2750. data/node_modules/semver/functions/rsort.js +3 -0
  2751. data/node_modules/semver/functions/satisfies.js +10 -0
  2752. data/node_modules/semver/functions/sort.js +3 -0
  2753. data/node_modules/semver/functions/valid.js +6 -0
  2754. data/node_modules/semver/index.js +48 -0
  2755. data/node_modules/semver/internal/constants.js +17 -0
  2756. data/node_modules/semver/internal/debug.js +9 -0
  2757. data/node_modules/semver/internal/identifiers.js +23 -0
  2758. data/node_modules/semver/internal/parse-options.js +11 -0
  2759. data/node_modules/semver/internal/re.js +182 -0
  2760. data/node_modules/semver/package.json +41 -0
  2761. data/node_modules/semver/preload.js +2 -0
  2762. data/node_modules/semver/range.bnf +16 -0
  2763. data/node_modules/semver/ranges/gtr.js +4 -0
  2764. data/node_modules/semver/ranges/intersects.js +7 -0
  2765. data/node_modules/semver/ranges/ltr.js +4 -0
  2766. data/node_modules/semver/ranges/max-satisfying.js +25 -0
  2767. data/node_modules/semver/ranges/min-satisfying.js +24 -0
  2768. data/node_modules/semver/ranges/min-version.js +60 -0
  2769. data/node_modules/semver/ranges/outside.js +80 -0
  2770. data/node_modules/semver/ranges/simplify.js +44 -0
  2771. data/node_modules/semver/ranges/subset.js +222 -0
  2772. data/node_modules/semver/ranges/to-comparators.js +8 -0
  2773. data/node_modules/semver/ranges/valid.js +11 -0
  2774. data/node_modules/shebang-command/index.js +19 -0
  2775. data/node_modules/shebang-command/license +9 -0
  2776. data/node_modules/shebang-command/package.json +34 -0
  2777. data/node_modules/shebang-command/readme.md +34 -0
  2778. data/node_modules/shebang-regex/index.d.ts +22 -0
  2779. data/node_modules/shebang-regex/index.js +2 -0
  2780. data/node_modules/shebang-regex/license +9 -0
  2781. data/node_modules/shebang-regex/package.json +35 -0
  2782. data/node_modules/shebang-regex/readme.md +33 -0
  2783. data/node_modules/simple-wcswidth/CHANGELOG.md +13 -0
  2784. data/node_modules/simple-wcswidth/LICENSE +21 -0
  2785. data/node_modules/simple-wcswidth/README.md +100 -0
  2786. data/node_modules/simple-wcswidth/dist/index.d.ts +3 -0
  2787. data/node_modules/simple-wcswidth/dist/index.js +10 -0
  2788. data/node_modules/simple-wcswidth/dist/src/binary-search.d.ts +3 -0
  2789. data/node_modules/simple-wcswidth/dist/src/binary-search.js +24 -0
  2790. data/node_modules/simple-wcswidth/dist/src/models.d.ts +4 -0
  2791. data/node_modules/simple-wcswidth/dist/src/models.js +2 -0
  2792. data/node_modules/simple-wcswidth/dist/src/non-spacing-chars.d.ts +3 -0
  2793. data/node_modules/simple-wcswidth/dist/src/non-spacing-chars.js +149 -0
  2794. data/node_modules/simple-wcswidth/dist/src/wcswidth.d.ts +2 -0
  2795. data/node_modules/simple-wcswidth/dist/src/wcswidth.js +20 -0
  2796. data/node_modules/simple-wcswidth/dist/src/wcwidth.d.ts +2 -0
  2797. data/node_modules/simple-wcswidth/dist/src/wcwidth.js +67 -0
  2798. data/node_modules/simple-wcswidth/package.json +44 -0
  2799. data/node_modules/source-map/CHANGELOG.md +301 -0
  2800. data/node_modules/source-map/LICENSE +28 -0
  2801. data/node_modules/source-map/README.md +742 -0
  2802. data/node_modules/source-map/dist/source-map.debug.js +3234 -0
  2803. data/node_modules/source-map/dist/source-map.js +3233 -0
  2804. data/node_modules/source-map/dist/source-map.min.js +2 -0
  2805. data/node_modules/source-map/dist/source-map.min.js.map +1 -0
  2806. data/node_modules/source-map/lib/array-set.js +121 -0
  2807. data/node_modules/source-map/lib/base64-vlq.js +140 -0
  2808. data/node_modules/source-map/lib/base64.js +67 -0
  2809. data/node_modules/source-map/lib/binary-search.js +111 -0
  2810. data/node_modules/source-map/lib/mapping-list.js +79 -0
  2811. data/node_modules/source-map/lib/quick-sort.js +114 -0
  2812. data/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  2813. data/node_modules/source-map/lib/source-map-generator.js +425 -0
  2814. data/node_modules/source-map/lib/source-node.js +413 -0
  2815. data/node_modules/source-map/lib/util.js +488 -0
  2816. data/node_modules/source-map/package.json +73 -0
  2817. data/node_modules/source-map/source-map.d.ts +98 -0
  2818. data/node_modules/source-map/source-map.js +8 -0
  2819. data/node_modules/sprintf-js/LICENSE +24 -0
  2820. data/node_modules/sprintf-js/README.md +88 -0
  2821. data/node_modules/sprintf-js/bower.json +14 -0
  2822. data/node_modules/sprintf-js/demo/angular.html +20 -0
  2823. data/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
  2824. data/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
  2825. data/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
  2826. data/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
  2827. data/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
  2828. data/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
  2829. data/node_modules/sprintf-js/gruntfile.js +36 -0
  2830. data/node_modules/sprintf-js/package.json +22 -0
  2831. data/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
  2832. data/node_modules/sprintf-js/src/sprintf.js +208 -0
  2833. data/node_modules/sprintf-js/test/test.js +82 -0
  2834. data/node_modules/sqlite-parser/CHANGELOG.md +1263 -0
  2835. data/node_modules/sqlite-parser/LICENSE +22 -0
  2836. data/node_modules/sqlite-parser/README.md +187 -0
  2837. data/node_modules/sqlite-parser/bin/sqlite-parser +7 -0
  2838. data/node_modules/sqlite-parser/dist/sqlite-parser.js +19 -0
  2839. data/node_modules/sqlite-parser/lib/index.js +6 -0
  2840. data/node_modules/sqlite-parser/lib/parser.js +6 -0
  2841. data/node_modules/sqlite-parser/lib/streaming-shim.js +6 -0
  2842. data/node_modules/sqlite-parser/lib/streaming.js +6 -0
  2843. data/node_modules/sqlite-parser/lib/tracer.js +6 -0
  2844. data/node_modules/sqlite-parser/package.json +75 -0
  2845. data/node_modules/string-width/index.d.ts +29 -0
  2846. data/node_modules/string-width/index.js +47 -0
  2847. data/node_modules/string-width/license +9 -0
  2848. data/node_modules/string-width/package.json +56 -0
  2849. data/node_modules/string-width/readme.md +50 -0
  2850. data/node_modules/strip-ansi/index.d.ts +17 -0
  2851. data/node_modules/strip-ansi/index.js +4 -0
  2852. data/node_modules/strip-ansi/license +9 -0
  2853. data/node_modules/strip-ansi/package.json +54 -0
  2854. data/node_modules/strip-ansi/readme.md +46 -0
  2855. data/node_modules/symbol-tree/LICENSE +21 -0
  2856. data/node_modules/symbol-tree/README.md +545 -0
  2857. data/node_modules/symbol-tree/lib/SymbolTree.js +838 -0
  2858. data/node_modules/symbol-tree/lib/SymbolTreeNode.js +54 -0
  2859. data/node_modules/symbol-tree/lib/TreeIterator.js +69 -0
  2860. data/node_modules/symbol-tree/lib/TreePosition.js +11 -0
  2861. data/node_modules/symbol-tree/package.json +47 -0
  2862. data/node_modules/to-regex-range/LICENSE +21 -0
  2863. data/node_modules/to-regex-range/README.md +305 -0
  2864. data/node_modules/to-regex-range/index.js +288 -0
  2865. data/node_modules/to-regex-range/package.json +88 -0
  2866. data/node_modules/tough-cookie/LICENSE +12 -0
  2867. data/node_modules/tough-cookie/README.md +582 -0
  2868. data/node_modules/tough-cookie/lib/cookie.js +1671 -0
  2869. data/node_modules/tough-cookie/lib/memstore.js +190 -0
  2870. data/node_modules/tough-cookie/lib/pathMatch.js +61 -0
  2871. data/node_modules/tough-cookie/lib/permuteDomain.js +70 -0
  2872. data/node_modules/tough-cookie/lib/pubsuffix-psl.js +38 -0
  2873. data/node_modules/tough-cookie/lib/store.js +76 -0
  2874. data/node_modules/tough-cookie/lib/version.js +2 -0
  2875. data/node_modules/tough-cookie/node_modules/universalify/LICENSE +20 -0
  2876. data/node_modules/tough-cookie/node_modules/universalify/README.md +76 -0
  2877. data/node_modules/tough-cookie/node_modules/universalify/index.js +25 -0
  2878. data/node_modules/tough-cookie/node_modules/universalify/package.json +34 -0
  2879. data/node_modules/tough-cookie/package.json +109 -0
  2880. data/node_modules/tr46/LICENSE.md +21 -0
  2881. data/node_modules/tr46/README.md +72 -0
  2882. data/node_modules/tr46/index.js +297 -0
  2883. data/node_modules/tr46/lib/mappingTable.json +1 -0
  2884. data/node_modules/tr46/lib/regexes.js +29 -0
  2885. data/node_modules/tr46/lib/statusMapping.js +11 -0
  2886. data/node_modules/tr46/package.json +46 -0
  2887. data/node_modules/type-check/LICENSE +22 -0
  2888. data/node_modules/type-check/README.md +210 -0
  2889. data/node_modules/type-check/lib/check.js +126 -0
  2890. data/node_modules/type-check/lib/index.js +16 -0
  2891. data/node_modules/type-check/lib/parse-type.js +196 -0
  2892. data/node_modules/type-check/package.json +40 -0
  2893. data/node_modules/universalify/LICENSE +20 -0
  2894. data/node_modules/universalify/README.md +76 -0
  2895. data/node_modules/universalify/index.js +24 -0
  2896. data/node_modules/universalify/package.json +34 -0
  2897. data/node_modules/w3c-hr-time/CHANGELOG.md +19 -0
  2898. data/node_modules/w3c-hr-time/LICENSE.md +21 -0
  2899. data/node_modules/w3c-hr-time/README.md +130 -0
  2900. data/node_modules/w3c-hr-time/index.js +11 -0
  2901. data/node_modules/w3c-hr-time/lib/calculate-clock-offset.js +39 -0
  2902. data/node_modules/w3c-hr-time/lib/clock-is-accurate.js +61 -0
  2903. data/node_modules/w3c-hr-time/lib/global-monotonic-clock.js +10 -0
  2904. data/node_modules/w3c-hr-time/lib/performance.js +53 -0
  2905. data/node_modules/w3c-hr-time/lib/utils.js +11 -0
  2906. data/node_modules/w3c-hr-time/package.json +26 -0
  2907. data/node_modules/w3c-xmlserializer/LICENSE.md +25 -0
  2908. data/node_modules/w3c-xmlserializer/README.md +41 -0
  2909. data/node_modules/w3c-xmlserializer/lib/attributes.js +128 -0
  2910. data/node_modules/w3c-xmlserializer/lib/constants.js +44 -0
  2911. data/node_modules/w3c-xmlserializer/lib/serialize.js +371 -0
  2912. data/node_modules/w3c-xmlserializer/package.json +32 -0
  2913. data/node_modules/webidl-conversions/LICENSE.md +12 -0
  2914. data/node_modules/webidl-conversions/README.md +101 -0
  2915. data/node_modules/webidl-conversions/lib/index.js +489 -0
  2916. data/node_modules/webidl-conversions/package.json +30 -0
  2917. data/node_modules/whatwg-encoding/LICENSE.txt +7 -0
  2918. data/node_modules/whatwg-encoding/README.md +50 -0
  2919. data/node_modules/whatwg-encoding/lib/labels-to-names.json +207 -0
  2920. data/node_modules/whatwg-encoding/lib/supported-names.json +37 -0
  2921. data/node_modules/whatwg-encoding/lib/whatwg-encoding.js +47 -0
  2922. data/node_modules/whatwg-encoding/package.json +29 -0
  2923. data/node_modules/whatwg-mimetype/LICENSE.txt +7 -0
  2924. data/node_modules/whatwg-mimetype/README.md +101 -0
  2925. data/node_modules/whatwg-mimetype/lib/mime-type.js +191 -0
  2926. data/node_modules/whatwg-mimetype/lib/parser.js +124 -0
  2927. data/node_modules/whatwg-mimetype/lib/serializer.js +25 -0
  2928. data/node_modules/whatwg-mimetype/lib/utils.js +25 -0
  2929. data/node_modules/whatwg-mimetype/package.json +43 -0
  2930. data/node_modules/whatwg-url/LICENSE.txt +21 -0
  2931. data/node_modules/whatwg-url/README.md +104 -0
  2932. data/node_modules/whatwg-url/dist/Function.js +46 -0
  2933. data/node_modules/whatwg-url/dist/URL-impl.js +217 -0
  2934. data/node_modules/whatwg-url/dist/URL.js +417 -0
  2935. data/node_modules/whatwg-url/dist/URLSearchParams-impl.js +122 -0
  2936. data/node_modules/whatwg-url/dist/URLSearchParams.js +457 -0
  2937. data/node_modules/whatwg-url/dist/VoidFunction.js +30 -0
  2938. data/node_modules/whatwg-url/dist/encoding.js +26 -0
  2939. data/node_modules/whatwg-url/dist/infra.js +26 -0
  2940. data/node_modules/whatwg-url/dist/percent-encoding.js +141 -0
  2941. data/node_modules/whatwg-url/dist/url-state-machine.js +1210 -0
  2942. data/node_modules/whatwg-url/dist/urlencoded.js +102 -0
  2943. data/node_modules/whatwg-url/dist/utils.js +141 -0
  2944. data/node_modules/whatwg-url/index.js +24 -0
  2945. data/node_modules/whatwg-url/package.json +60 -0
  2946. data/node_modules/whatwg-url/webidl2js-wrapper.js +7 -0
  2947. data/node_modules/which/CHANGELOG.md +166 -0
  2948. data/node_modules/which/LICENSE +15 -0
  2949. data/node_modules/which/README.md +54 -0
  2950. data/node_modules/which/bin/node-which +52 -0
  2951. data/node_modules/which/package.json +43 -0
  2952. data/node_modules/which/which.js +125 -0
  2953. data/node_modules/word-wrap/LICENSE +21 -0
  2954. data/node_modules/word-wrap/README.md +182 -0
  2955. data/node_modules/word-wrap/index.d.ts +50 -0
  2956. data/node_modules/word-wrap/index.js +46 -0
  2957. data/node_modules/word-wrap/package.json +77 -0
  2958. data/node_modules/wrap-ansi/index.js +216 -0
  2959. data/node_modules/wrap-ansi/license +9 -0
  2960. data/node_modules/wrap-ansi/package.json +62 -0
  2961. data/node_modules/wrap-ansi/readme.md +91 -0
  2962. data/node_modules/wrappy/LICENSE +15 -0
  2963. data/node_modules/wrappy/README.md +36 -0
  2964. data/node_modules/wrappy/package.json +29 -0
  2965. data/node_modules/wrappy/wrappy.js +33 -0
  2966. data/node_modules/ws/LICENSE +21 -0
  2967. data/node_modules/ws/README.md +496 -0
  2968. data/node_modules/ws/browser.js +8 -0
  2969. data/node_modules/ws/index.js +10 -0
  2970. data/node_modules/ws/lib/buffer-util.js +129 -0
  2971. data/node_modules/ws/lib/constants.js +10 -0
  2972. data/node_modules/ws/lib/event-target.js +184 -0
  2973. data/node_modules/ws/lib/extension.js +223 -0
  2974. data/node_modules/ws/lib/limiter.js +55 -0
  2975. data/node_modules/ws/lib/permessage-deflate.js +518 -0
  2976. data/node_modules/ws/lib/receiver.js +607 -0
  2977. data/node_modules/ws/lib/sender.js +409 -0
  2978. data/node_modules/ws/lib/stream.js +177 -0
  2979. data/node_modules/ws/lib/validation.js +104 -0
  2980. data/node_modules/ws/lib/websocket-server.js +447 -0
  2981. data/node_modules/ws/lib/websocket.js +1078 -0
  2982. data/node_modules/ws/package.json +56 -0
  2983. data/node_modules/xml-name-validator/LICENSE.txt +176 -0
  2984. data/node_modules/xml-name-validator/README.md +36 -0
  2985. data/node_modules/xml-name-validator/lib/generated-parser.js +504 -0
  2986. data/node_modules/xml-name-validator/lib/grammar.pegjs +35 -0
  2987. data/node_modules/xml-name-validator/lib/xml-name-validator.js +17 -0
  2988. data/node_modules/xml-name-validator/package.json +28 -0
  2989. data/node_modules/xmlchars/LICENSE +18 -0
  2990. data/node_modules/xmlchars/README.md +33 -0
  2991. data/node_modules/xmlchars/package.json +51 -0
  2992. data/node_modules/xmlchars/xml/1.0/ed4.d.ts +31 -0
  2993. data/node_modules/xmlchars/xml/1.0/ed4.js +44 -0
  2994. data/node_modules/xmlchars/xml/1.0/ed4.js.map +1 -0
  2995. data/node_modules/xmlchars/xml/1.0/ed5.d.ts +51 -0
  2996. data/node_modules/xmlchars/xml/1.0/ed5.js +105 -0
  2997. data/node_modules/xmlchars/xml/1.0/ed5.js.map +1 -0
  2998. data/node_modules/xmlchars/xml/1.1/ed2.d.ts +73 -0
  2999. data/node_modules/xmlchars/xml/1.1/ed2.js +145 -0
  3000. data/node_modules/xmlchars/xml/1.1/ed2.js.map +1 -0
  3001. data/node_modules/xmlchars/xmlchars.d.ts +170 -0
  3002. data/node_modules/xmlchars/xmlchars.js +191 -0
  3003. data/node_modules/xmlchars/xmlchars.js.map +1 -0
  3004. data/node_modules/xmlchars/xmlns/1.0/ed3.d.ts +28 -0
  3005. data/node_modules/xmlchars/xmlns/1.0/ed3.js +65 -0
  3006. data/node_modules/xmlchars/xmlns/1.0/ed3.js.map +1 -0
  3007. data/node_modules/y18n/CHANGELOG.md +100 -0
  3008. data/node_modules/y18n/LICENSE +13 -0
  3009. data/node_modules/y18n/README.md +127 -0
  3010. data/node_modules/y18n/build/index.cjs +203 -0
  3011. data/node_modules/y18n/build/lib/cjs.js +6 -0
  3012. data/node_modules/y18n/build/lib/index.js +174 -0
  3013. data/node_modules/y18n/build/lib/platform-shims/node.js +19 -0
  3014. data/node_modules/y18n/index.mjs +8 -0
  3015. data/node_modules/y18n/package.json +70 -0
  3016. data/node_modules/yallist/LICENSE +15 -0
  3017. data/node_modules/yallist/README.md +204 -0
  3018. data/node_modules/yallist/iterator.js +8 -0
  3019. data/node_modules/yallist/package.json +29 -0
  3020. data/node_modules/yallist/yallist.js +426 -0
  3021. data/node_modules/yargs/CHANGELOG.md +151 -0
  3022. data/node_modules/yargs/LICENSE +21 -0
  3023. data/node_modules/yargs/README.md +204 -0
  3024. data/node_modules/yargs/browser.mjs +7 -0
  3025. data/node_modules/yargs/build/index.cjs +1 -0
  3026. data/node_modules/yargs/build/lib/argsert.js +62 -0
  3027. data/node_modules/yargs/build/lib/command.js +436 -0
  3028. data/node_modules/yargs/build/lib/completion-templates.js +48 -0
  3029. data/node_modules/yargs/build/lib/completion.js +166 -0
  3030. data/node_modules/yargs/build/lib/middleware.js +85 -0
  3031. data/node_modules/yargs/build/lib/parse-command.js +32 -0
  3032. data/node_modules/yargs/build/lib/typings/common-types.js +9 -0
  3033. data/node_modules/yargs/build/lib/typings/yargs-parser-types.js +1 -0
  3034. data/node_modules/yargs/build/lib/usage.js +567 -0
  3035. data/node_modules/yargs/build/lib/utils/apply-extends.js +59 -0
  3036. data/node_modules/yargs/build/lib/utils/is-promise.js +5 -0
  3037. data/node_modules/yargs/build/lib/utils/levenshtein.js +26 -0
  3038. data/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
  3039. data/node_modules/yargs/build/lib/utils/obj-filter.js +10 -0
  3040. data/node_modules/yargs/build/lib/utils/process-argv.js +17 -0
  3041. data/node_modules/yargs/build/lib/utils/set-blocking.js +12 -0
  3042. data/node_modules/yargs/build/lib/utils/which-module.js +10 -0
  3043. data/node_modules/yargs/build/lib/validation.js +279 -0
  3044. data/node_modules/yargs/build/lib/yargs-factory.js +1452 -0
  3045. data/node_modules/yargs/build/lib/yerror.js +7 -0
  3046. data/node_modules/yargs/helpers/helpers.mjs +10 -0
  3047. data/node_modules/yargs/helpers/index.js +14 -0
  3048. data/node_modules/yargs/helpers/package.json +3 -0
  3049. data/node_modules/yargs/index.cjs +43 -0
  3050. data/node_modules/yargs/index.mjs +8 -0
  3051. data/node_modules/yargs/lib/platform-shims/browser.mjs +94 -0
  3052. data/node_modules/yargs/lib/platform-shims/esm.mjs +67 -0
  3053. data/node_modules/yargs/locales/be.json +46 -0
  3054. data/node_modules/yargs/locales/de.json +46 -0
  3055. data/node_modules/yargs/locales/en.json +51 -0
  3056. data/node_modules/yargs/locales/es.json +46 -0
  3057. data/node_modules/yargs/locales/fi.json +49 -0
  3058. data/node_modules/yargs/locales/fr.json +53 -0
  3059. data/node_modules/yargs/locales/hi.json +49 -0
  3060. data/node_modules/yargs/locales/hu.json +46 -0
  3061. data/node_modules/yargs/locales/id.json +50 -0
  3062. data/node_modules/yargs/locales/it.json +46 -0
  3063. data/node_modules/yargs/locales/ja.json +51 -0
  3064. data/node_modules/yargs/locales/ko.json +49 -0
  3065. data/node_modules/yargs/locales/nb.json +44 -0
  3066. data/node_modules/yargs/locales/nl.json +49 -0
  3067. data/node_modules/yargs/locales/nn.json +44 -0
  3068. data/node_modules/yargs/locales/pirate.json +13 -0
  3069. data/node_modules/yargs/locales/pl.json +49 -0
  3070. data/node_modules/yargs/locales/pt.json +45 -0
  3071. data/node_modules/yargs/locales/pt_BR.json +48 -0
  3072. data/node_modules/yargs/locales/ru.json +46 -0
  3073. data/node_modules/yargs/locales/th.json +46 -0
  3074. data/node_modules/yargs/locales/tr.json +48 -0
  3075. data/node_modules/yargs/locales/uk_UA.json +51 -0
  3076. data/node_modules/yargs/locales/zh_CN.json +48 -0
  3077. data/node_modules/yargs/locales/zh_TW.json +47 -0
  3078. data/node_modules/yargs/package.json +116 -0
  3079. data/node_modules/yargs/yargs +9 -0
  3080. data/node_modules/yargs-parser/CHANGELOG.md +263 -0
  3081. data/node_modules/yargs-parser/LICENSE.txt +14 -0
  3082. data/node_modules/yargs-parser/README.md +518 -0
  3083. data/node_modules/yargs-parser/browser.js +29 -0
  3084. data/node_modules/yargs-parser/build/index.cjs +1042 -0
  3085. data/node_modules/yargs-parser/build/lib/index.js +59 -0
  3086. data/node_modules/yargs-parser/build/lib/string-utils.js +65 -0
  3087. data/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +40 -0
  3088. data/node_modules/yargs-parser/build/lib/yargs-parser-types.js +12 -0
  3089. data/node_modules/yargs-parser/build/lib/yargs-parser.js +1037 -0
  3090. data/node_modules/yargs-parser/package.json +87 -0
  3091. data/package.json +1 -1
  3092. data/release.sh +2 -1
  3093. data/spec/depends/api_spec.rb +184 -0
  3094. data/spec/depends/spec_helper.rb +27 -0
  3095. data/spec/fixtures/depends/.gitignore +2 -0
  3096. data/spec/fixtures/depends/app/controllers/api/api_keys_controller.rb +2 -0
  3097. data/spec/fixtures/depends/app/controllers/organizations_controller.rb +2 -0
  3098. data/spec/fixtures/depends/app/models/api_key.rb +2 -0
  3099. data/spec/fixtures/depends/app/models/configuration.rb +2 -0
  3100. data/spec/fixtures/depends/app/models/show.rb +2 -0
  3101. data/spec/fixtures/depends/app/models/user.rb +2 -0
  3102. data/spec/fixtures/depends/revoke_api_key.appmap.json +901 -0
  3103. data/spec/fixtures/depends/spec/actual_rspec_test.rb +7 -0
  3104. data/spec/fixtures/depends/spec/api_spec.rb +2 -0
  3105. data/spec/fixtures/depends/spec/user_spec.rb +2 -0
  3106. data/spec/fixtures/depends/test/actual_minitest_test.rb +5 -0
  3107. data/spec/fixtures/depends/user_page_scenario.appmap.json +1776 -0
  3108. data/spec/fixtures/rails5_users_app/create_app +3 -3
  3109. data/spec/fixtures/rails6_users_app/create_app +3 -3
  3110. data/spec/fixtures/rails6_users_app/lib/tasks/appmap.rake +11 -1
  3111. data/test/agent_setup_status_test.rb +6 -3
  3112. data/test/test_helper.rb +3 -0
  3113. data/yarn.lock +422 -20
  3114. metadata +3097 -2
@@ -0,0 +1 @@
1
+ (function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.async={})})(this,function(e){'use strict';function t(e,...t){return(...a)=>e(...t,...a)}function a(e){return function(...t){var a=t.pop();return e.call(this,t,a)}}function n(e){setTimeout(e,0)}function i(e){return(t,...a)=>e(()=>t(...a))}function r(e){return u(e)?function(...t){const a=t.pop(),n=e.apply(this,t);return s(n,a)}:a(function(t,a){var n;try{n=e.apply(this,t)}catch(t){return a(t)}return n&&"function"==typeof n.then?s(n,a):void a(null,n)})}function s(e,t){return e.then(e=>{l(t,null,e)},e=>{l(t,e&&e.message?e:new Error(e))})}function l(e,t,a){try{e(t,a)}catch(e){Ee(t=>{throw t},e)}}function u(e){return"AsyncFunction"===e[Symbol.toStringTag]}function c(e){return"AsyncGenerator"===e[Symbol.toStringTag]}function p(e){return"function"==typeof e[Symbol.asyncIterator]}function d(e){if("function"!=typeof e)throw new Error("expected a function");return u(e)?r(e):e}function o(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...a){return"function"==typeof a[t-1]?e.apply(this,a):new Promise((n,i)=>{a[t-1]=(e,...t)=>e?i(e):void n(1<t.length?t:t[0]),e.apply(this,a)})}}function h(e){return function(t,...a){const n=o(function(n){var i=this;return e(t,(e,t)=>{d(e).apply(i,a.concat(t))},n)});return n}}function f(e,t,a,n){t=t||[];var i=[],r=0,s=d(a);return e(t,(e,t,a)=>{var n=r++;s(e,(e,t)=>{i[n]=t,a(e)})},e=>{n(e,i)})}function y(e){return e&&"number"==typeof e.length&&0<=e.length&&0==e.length%1}function m(e){function t(...t){if(null!==e){var a=e;e=null,a.apply(this,t)}}return Object.assign(t,e),t}function g(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function k(e){var t=-1,a=e.length;return function(){return++t<a?{value:e[t],key:t}:null}}function v(e){var t=-1;return function(){var a=e.next();return a.done?null:(t++,{value:a.value,key:t})}}function S(e){var t=e?Object.keys(e):[],a=-1,n=t.length;return function(){var i=t[++a];return a<n?{value:e[i],key:i}:null}}function L(e){if(y(e))return k(e);var t=g(e);return t?v(t):S(e)}function x(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var a=e;e=null,a.apply(this,t)}}function E(e,t,a,n){function i(){p>=t||c||l||(c=!0,e.next().then(({value:e,done:t})=>{if(!(u||l))return c=!1,t?(l=!0,void(0>=p&&n(null))):void(p++,a(e,d,r),d++,i())}).catch(s))}function r(e,t){return p-=1,u?void 0:e?s(e):!1===e?(l=!0,void(u=!0)):t===be||l&&0>=p?(l=!0,n(null)):void i()}function s(e){u||(c=!1,l=!0,n(e))}let l=!1,u=!1,c=!1,p=0,d=0;i()}function b(e,t,a){function n(e,t){!1===e&&(l=!0);!0===l||(e?a(e):(++r===s||t===be)&&a(null))}a=m(a);var i=0,r=0,{length:s}=e,l=!1;for(0===s&&a(null);i<s;i++)t(e[i],i,x(n))}function O(e,t,a){return _e(e,1/0,t,a)}function _(){function e(e,...n){return e?a(e):void t(1<n.length?n:n[0])}let t,a;return e[Fe]=new Promise((e,n)=>{t=e,a=n}),e}function M(e,t,a){function n(e,t){g.push(()=>l(e,t))}function i(){if(!h){if(0===g.length&&0===o)return a(null,p);for(;g.length&&o<t;){var e=g.shift();e()}}}function r(e,t){var a=y[e];a||(a=y[e]=[]),a.push(t)}function s(e){var t=y[e]||[];t.forEach(e=>e()),i()}function l(e,t){if(!f){var n=x((t,...n)=>{if(o--,!1===t)return void(h=!0);if(2>n.length&&([n]=n),t){var i={};if(Object.keys(p).forEach(e=>{i[e]=p[e]}),i[e]=n,f=!0,y=Object.create(null),h)return;a(t,i)}else p[e]=n,s(e)});o++;var i=d(t[t.length-1]);1<t.length?i(p,n):i(n)}}function u(t){var a=[];return Object.keys(e).forEach(n=>{const i=e[n];Array.isArray(i)&&0<=i.indexOf(t)&&a.push(n)}),a}"number"!=typeof t&&(a=t,t=null),a=m(a||_());var c=Object.keys(e).length;if(!c)return a(null);t||(t=c);var p={},o=0,h=!1,f=!1,y=Object.create(null),g=[],k=[],v={};return Object.keys(e).forEach(t=>{var a=e[t];if(!Array.isArray(a))return n(t,[a]),void k.push(t);var i=a.slice(0,a.length-1),s=i.length;return 0===s?(n(t,a),void k.push(t)):void(v[t]=s,i.forEach(l=>{if(!e[l])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+l+"` in "+i.join(", "));r(l,()=>{s--,0===s&&n(t,a)})}))}),function(){for(var e,t=0;k.length;)e=k.pop(),t++,u(e).forEach(e=>{0==--v[e]&&k.push(e)});if(t!==c)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),i(),a[Fe]}function A(e){const t=e.toString().replace(ze,"");let a=t.match(Te);if(a||(a=t.match(Ce)),!a)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=a;return n.replace(/\s/g,"").split(Pe).map(e=>e.replace(Re,"").trim())}function I(e,t){var a={};return Object.keys(e).forEach(t=>{function n(e,t){var a=i.map(t=>e[t]);a.push(t),d(r)(...a)}var i,r=e[t],s=u(r),l=!s&&1===r.length||s&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),a[t]=i.concat(0<i.length?n:r);else if(l)a[t]=r;else{if(i=A(r),0===r.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),a[t]=i.concat(n)}}),M(a,t)}function j(e,t){e.length=1,e.head=e.tail=t}function w(e,t,a){function n(e,t){f[e].push(t)}function i(e,t){const a=(...n)=>{r(e,a),t(...n)};f[e].push(a)}function r(e,t){return e?t?void(f[e]=f[e].filter(e=>e!==t)):f[e]=[]:Object.keys(f).forEach(e=>f[e]=[])}function s(e,...t){f[e].forEach(e=>e(...t))}function l(e,t,a,n){function i(e,...t){return e?a?s(e):r():1>=t.length?r(t[0]):void r(t)}if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");k.started=!0;var r,s,l={data:e,callback:a?i:n||i};if(t?k._tasks.unshift(l):k._tasks.push(l),y||(y=!0,Ee(()=>{y=!1,k.process()})),a||!n)return new Promise((e,t)=>{r=e,s=t})}function u(e){return function(t,...a){o-=1;for(var n=0,r=e.length;n<r;n++){var l=e[n],u=h.indexOf(l);0===u?h.shift():0<u&&h.splice(u,1),l.callback(t,...a),null!=t&&s("error",t,l.data)}o<=k.concurrency-k.buffer&&s("unsaturated"),k.idle()&&s("drain"),k.process()}}function c(e){return!!(0===e.length&&k.idle())&&(Ee(()=>s("drain")),!0)}if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var p=d(e),o=0,h=[];const f={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};var y=!1;const m=e=>t=>t?void(r(e),n(e,t)):new Promise((t,a)=>{i(e,(e,n)=>e?a(e):void t(n))});var g=!1,k={_tasks:new Ne,*[Symbol.iterator](){yield*k._tasks[Symbol.iterator]()},concurrency:t,payload:a,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?c(e)?void 0:e.map(e=>l(e,!1,!1,t)):l(e,!1,!1,t)},pushAsync(e,t){return Array.isArray(e)?c(e)?void 0:e.map(e=>l(e,!1,!0,t)):l(e,!1,!0,t)},kill(){r(),k._tasks.empty()},unshift(e,t){return Array.isArray(e)?c(e)?void 0:e.map(e=>l(e,!0,!1,t)):l(e,!0,!1,t)},unshiftAsync(e,t){return Array.isArray(e)?c(e)?void 0:e.map(e=>l(e,!0,!0,t)):l(e,!0,!0,t)},remove(e){k._tasks.remove(e)},process(){var e=Math.min;if(!g){for(g=!0;!k.paused&&o<k.concurrency&&k._tasks.length;){var t=[],a=[],n=k._tasks.length;k.payload&&(n=e(n,k.payload));for(var r,c=0;c<n;c++)r=k._tasks.shift(),t.push(r),h.push(r),a.push(r.data);o+=1,0===k._tasks.length&&s("empty"),o===k.concurrency&&s("saturated");var d=x(u(t));p(a,d)}g=!1}},length(){return k._tasks.length},running(){return o},workersList(){return h},idle(){return 0===k._tasks.length+o},pause(){k.paused=!0},resume(){!1===k.paused||(k.paused=!1,Ee(k.process))}};return Object.defineProperties(k,{saturated:{writable:!1,value:m("saturated")},unsaturated:{writable:!1,value:m("unsaturated")},empty:{writable:!1,value:m("empty")},drain:{writable:!1,value:m("drain")},error:{writable:!1,value:m("error")}}),k}function B(e,t){return w(e,1,t)}function F(e,t,a){return w(e,t,a)}function T(...e){var t=e.map(d);return function(...e){var a=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=_(),Ye(t,e,(e,t,n)=>{t.apply(a,e.concat((e,...t)=>{n(e,t)}))},(e,t)=>n(e,...t)),n[Fe]}}function C(...e){return T(...e.reverse())}function P(...e){return function(...t){var a=t.pop();return a(null,...e)}}function R(e,t){return(a,n,i,r)=>{var s,l=!1;const u=d(i);a(n,(a,n,i)=>{u(a,(n,r)=>n||!1===n?i(n):e(r)&&!s?(l=!0,s=t(!0,a),i(null,be)):void i())},e=>e?r(e):void r(null,l?s:t(!1)))}}function z(e){return(t,...a)=>d(t)(...a,(t,...a)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&a.forEach(t=>console[e](t)))})}function N(e,t,a){const n=d(t);return Ke(e,(...e)=>{const t=e.pop();n(...e,(e,a)=>t(e,!a))},a)}function V(e){return(t,a,n)=>e(t,n)}function Y(e){return u(e)?e:function(...t){var a=t.pop(),n=!0;t.push((...e)=>{n?Ee(()=>a(...e)):a(...e)}),e.apply(this,t),n=!1}}function q(e,t,a,n){var r=Array(t.length);e(t,(e,t,n)=>{a(e,(e,a)=>{r[t]=!!a,n(e)})},e=>{if(e)return n(e);for(var a=[],s=0;s<t.length;s++)r[s]&&a.push(t[s]);n(null,a)})}function D(e,t,a,n){var i=[];e(t,(e,t,n)=>{a(e,(a,r)=>a?n(a):void(r&&i.push({index:t,value:e}),n(a)))},e=>e?n(e):void n(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value)))}function Q(e,t,a,n){var i=y(t)?q:D;return i(e,t,d(a),n)}function U(e,t,a){return lt(e,1/0,t,a)}function G(e,t,a){return lt(e,1,t,a)}function W(e,t,a){return ct(e,1/0,t,a)}function H(e,t,a){return ct(e,1,t,a)}function J(e,t=e=>e){var n=Object.create(null),r=Object.create(null),s=d(e),l=a((e,a)=>{var u=t(...e);u in n?Ee(()=>a(null,...n[u])):u in r?r[u].push(a):(r[u]=[a],s(...e,(e,...t)=>{e||(n[u]=t);var a=r[u];delete r[u];for(var s=0,c=a.length;s<c;s++)a[s](e,...t)}))});return l.memo=n,l.unmemoized=e,l}function K(e,t){return dt(Me,e,t)}function X(e,t,a){return dt(Oe(t),e,a)}function Z(e,t){var a=d(e);return w((e,t)=>{a(e[0],t)},t,1)}function $(e){return(e<<1)+1}function ee(e){return(e+1>>1)-1}function te(e,t){return e.priority===t.priority?e.pushCount<t.pushCount:e.priority<t.priority}function ae(e,t){var a=Z(e,t);return a._tasks=new ot,a.push=function(e,t=0,n=()=>{}){if("function"!=typeof n)throw new Error("task callback must be a function");if(a.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&a.idle())return Ee(()=>a.drain());for(var r,s=0,u=e.length;s<u;s++)r={data:e[s],priority:t,callback:n},a._tasks.push(r);Ee(a.process)},delete a.unshift,a}function ne(e,t,a,n){var i=[...e].reverse();return Ye(i,t,a,n)}function ie(e){var t=d(e);return a(function(e,a){return e.push((e,...t)=>{let n={};if(e&&(n.error=e),0<t.length){var i=t;1>=t.length&&([i]=t),n.value=i}a(null,n)}),t.apply(this,e)})}function re(e){var t;return Array.isArray(e)?t=e.map(ie):(t={},Object.keys(e).forEach(a=>{t[a]=ie.call(this,e[a])})),t}function se(e,t,a,n){const i=d(a);return Q(e,t,(e,t)=>{i(e,(e,a)=>{t(e,!a)})},n)}function le(e){return function(){return e}}function ue(e,t,a){function n(){r((e,...t)=>{!1===e||(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(n,i.intervalFunc(s-1)):a(e,...t))})}var i={times:gt,intervalFunc:le(kt)};if(3>arguments.length&&"function"==typeof e?(a=t||_(),t=e):(ce(i,e),a=a||_()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=d(t),s=1;return n(),a[Fe]}function ce(e,a){if("object"==typeof a)e.times=+a.times||gt,e.intervalFunc="function"==typeof a.interval?a.interval:le(+a.interval||kt),e.errorFilter=a.errorFilter;else if("number"==typeof a||"string"==typeof a)e.times=+a||gt;else throw new Error("Invalid arguments for async.retry")}function pe(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;u(t)&&(n+=1);var i=d(t);return a((t,a)=>{function r(e){i(...t,e)}return(t.length<n-1||null==a)&&(t.push(a),a=_()),e?ue(e,r,a):ue(r,a),a[Fe]})}function de(e,t){return dt(je,e,t)}function oe(e,t,n){var i=d(e);return a((a,r)=>{var s,l=!1;a.push((...e)=>{l||(r(...e),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",a=new Error("Callback function \""+t+"\" timed out.");a.code="ETIMEDOUT",n&&(a.info=n),l=!0,r(a)},t),i(...a)})}function he(e){for(var t=Array(e);e--;)t[e]=e;return t}function fe(e,t,a,n){var i=d(a);return qe(he(e),t,i,n)}function ye(e,t,a){return fe(e,1/0,t,a)}function me(e,t,a){return fe(e,1,t,a)}function ge(e,t,a,n){3>=arguments.length&&"function"==typeof t&&(n=a,a=t,t=Array.isArray(e)?[]:{}),n=m(n||_());var i=d(a);return Me(e,(e,a,n)=>{i(t,e,a,n)},e=>n(e,t)),n[Fe]}function ke(e){return(...t)=>(e.unmemoized||e)(...t)}function ve(e,t,a){const n=d(e);return bt(e=>n((t,a)=>e(t,!a)),t,a)}var Se,Le="function"==typeof setImmediate&&setImmediate,xe="object"==typeof process&&"function"==typeof process.nextTick;Se=Le?setImmediate:xe?process.nextTick:n;var Ee=i(Se);const be={};var Oe=e=>(t,a,n)=>{function i(e,t){if(!u)if(d-=1,e)l=!0,n(e);else if(!1===e)l=!0,u=!0;else{if(t===be||l&&0>=d)return l=!0,n(null);o||r()}}function r(){for(o=!0;d<e&&!l;){var t=s();if(null===t)return l=!0,void(0>=d&&n(null));d+=1,a(t.value,t.key,x(i))}o=!1}if(n=m(n),0>=e)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(c(t))return E(t,e,a,n);if(p(t))return E(t[Symbol.asyncIterator](),e,a,n);var s=L(t),l=!1,u=!1,d=0,o=!1;r()},_e=o(function(e,t,a,n){return Oe(t)(e,d(a),n)},4),Me=o(function(e,t,a){var n=y(e)?b:O;return n(e,d(t),a)},3),Ae=o(function(e,t,a){return f(Me,e,t,a)},3),Ie=h(Ae),je=o(function(e,t,a){return _e(e,1,t,a)},3),we=o(function(e,t,a){return f(je,e,t,a)},3),Be=h(we);const Fe=Symbol("promiseCallback");var Te=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,Ce=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,Pe=/,/,Re=/(=.+)?(\s*)$/,ze=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;class Ne{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):j(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):j(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:a}=t;e(t)&&this.removeLink(t),t=a}return this}}var Ve,Ye=o(function(e,t,a,n){n=m(n);var r=d(a);return je(e,(e,a,n)=>{r(t,e,(e,a)=>{t=a,n(e)})},e=>n(e,t))},4),qe=o(function(e,t,a,n){return f(Oe(t),e,a,n)},4),De=o(function(e,t,a,n){var i=d(a);return qe(e,t,(e,t)=>{i(e,(e,...a)=>e?t(e):t(e,a))},(e,t)=>{for(var a=[],r=0;r<t.length;r++)t[r]&&(a=a.concat(...t[r]));return n(e,a)})},4),Qe=o(function(e,t,a){return De(e,1/0,t,a)},3),Ue=o(function(e,t,a){return De(e,1,t,a)},3),Ge=o(function(e,t,a){return R(e=>e,(e,t)=>t)(Me,e,t,a)},3),We=o(function(e,t,a,n){return R(e=>e,(e,t)=>t)(Oe(t),e,a,n)},4),He=o(function(e,t,a){return R(e=>e,(e,t)=>t)(Oe(1),e,t,a)},3),Je=z("dir"),Ke=o(function(e,t,a){function n(e,...t){return e?a(e):void(!1===e||(r=t,l(...t,i)))}function i(e,t){return e?a(e):!1===e?void 0:t?void s(n):a(null,...r)}a=x(a);var r,s=d(e),l=d(t);return i(null,!0)},3),Xe=o(function(e,t,a){return Me(e,V(d(t)),a)},3),Ze=o(function(e,t,a,n){return Oe(t)(e,V(d(a)),n)},4),$e=o(function(e,t,a){return Ze(e,1,t,a)},3),et=o(function(e,t,a){return R(e=>!e,e=>!e)(Me,e,t,a)},3),tt=o(function(e,t,a,n){return R(e=>!e,e=>!e)(Oe(t),e,a,n)},4),at=o(function(e,t,a){return R(e=>!e,e=>!e)(je,e,t,a)},3),nt=o(function(e,t,a){return Q(Me,e,t,a)},3),it=o(function(e,t,a,n){return Q(Oe(t),e,a,n)},4),rt=o(function(e,t,a){return Q(je,e,t,a)},3),st=o(function(e,t){function a(e){return e?n(e):void(!1===e||i(a))}var n=x(t),i=d(Y(e));return a()},2),lt=o(function(e,t,a,n){var i=d(a);return qe(e,t,(e,t)=>{i(e,(a,n)=>a?t(a):t(a,{key:n,val:e}))},(e,t)=>{for(var a={},{hasOwnProperty:r}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:l}=t[s],{val:u}=t[s];r.call(a,l)?a[l].push(u):a[l]=[u]}return n(e,a)})},4),ut=z("log"),ct=o(function(e,t,a,n){n=m(n);var i={},r=d(a);return Oe(t)(e,(e,t,a)=>{r(e,t,(e,n)=>e?a(e):void(i[t]=n,a(e)))},e=>n(e,i))},4);Ve=xe?process.nextTick:Le?setImmediate:n;var pt=i(Ve),dt=o((e,t,a)=>{var n=y(t)?[]:{};e(t,(e,t,a)=>{d(e)((e,...i)=>{2>i.length&&([i]=i),n[t]=i,a(e)})},e=>a(e,n))},3);class ot{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){for(let a;0<e&&te(this.heap[e],this.heap[a=ee(e)]);){let n=this.heap[e];this.heap[e]=this.heap[a],this.heap[a]=n,e=a}}percDown(e){for(let a,n;(a=$(e))<this.heap.length&&(a+1<this.heap.length&&te(this.heap[a+1],this.heap[a])&&++a,!te(this.heap[e],this.heap[a]));)n=this.heap[e],this.heap[e]=this.heap[a],this.heap[a]=n,e=a}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let a=0;a<this.heap.length;a++)e(this.heap[a])||(this.heap[t]=this.heap[a],t++);this.heap.splice(t);for(let t=ee(this.heap.length-1);0<=t;t--)this.percDown(t);return this}}var ht=o(function(e,t){if(t=m(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var a=0,n=e.length;a<n;a++)d(e[a])(t)},2),ft=o(function(e,t,a){return se(Me,e,t,a)},3),yt=o(function(e,t,a,n){return se(Oe(t),e,a,n)},4),mt=o(function(e,t,a){return se(je,e,t,a)},3);const gt=5,kt=0;var vt=o(function(e,t,a){return R(Boolean,e=>e)(Me,e,t,a)},3),St=o(function(e,t,a,n){return R(Boolean,e=>e)(Oe(t),e,a,n)},4),Lt=o(function(e,t,a){return R(Boolean,e=>e)(je,e,t,a)},3),xt=o(function(e,t,a){function n(e,t){var n=e.criteria,a=t.criteria;return n<a?-1:n>a?1:0}var i=d(t);return Ae(e,(e,t)=>{i(e,(a,n)=>a?t(a):void t(a,{value:e,criteria:n}))},(e,t)=>e?a(e):void a(null,t.sort(n).map(e=>e.value)))},3),Et=o(function(e,t){var a,n=null;return $e(e,(e,t)=>{d(e)((e,...i)=>!1===e?t(e):void(2>i.length?[a]=i:a=i,n=e,t(e?null:{})))},()=>t(n,a))}),bt=o(function(e,t,a){function n(e,...t){if(e)return a(e);l=t;!1===e||s(i)}function i(e,t){return e?a(e):!1===e?void 0:t?void r(n):a(null,...l)}a=x(a);var r=d(t),s=d(e),l=[];return s(i)},3),Ot=o(function(e,t){function a(t){var a=d(e[i++]);a(...t,x(n))}function n(n,...r){return!1===n?void 0:n||i===e.length?t(n,...r):void a(r)}if(t=m(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var i=0;a([])});e.default={apply:t,applyEach:Ie,applyEachSeries:Be,asyncify:r,auto:M,autoInject:I,cargo:B,cargoQueue:F,compose:C,concat:Qe,concatLimit:De,concatSeries:Ue,constant:P,detect:Ge,detectLimit:We,detectSeries:He,dir:Je,doUntil:N,doWhilst:Ke,each:Xe,eachLimit:Ze,eachOf:Me,eachOfLimit:_e,eachOfSeries:je,eachSeries:$e,ensureAsync:Y,every:et,everyLimit:tt,everySeries:at,filter:nt,filterLimit:it,filterSeries:rt,forever:st,groupBy:U,groupByLimit:lt,groupBySeries:G,log:ut,map:Ae,mapLimit:qe,mapSeries:we,mapValues:W,mapValuesLimit:ct,mapValuesSeries:H,memoize:J,nextTick:pt,parallel:K,parallelLimit:X,priorityQueue:ae,queue:Z,race:ht,reduce:Ye,reduceRight:ne,reflect:ie,reflectAll:re,reject:ft,rejectLimit:yt,rejectSeries:mt,retry:ue,retryable:pe,seq:T,series:de,setImmediate:Ee,some:vt,someLimit:St,someSeries:Lt,sortBy:xt,timeout:oe,times:ye,timesLimit:fe,timesSeries:me,transform:ge,tryEach:Et,unmemoize:ke,until:ve,waterfall:Ot,whilst:bt,all:et,allLimit:tt,allSeries:at,any:vt,anyLimit:St,anySeries:Lt,find:Ge,findLimit:We,findSeries:He,flatMap:Qe,flatMapLimit:De,flatMapSeries:Ue,forEach:Xe,forEachSeries:$e,forEachLimit:Ze,forEachOf:Me,forEachOfSeries:je,forEachOfLimit:_e,inject:Ye,foldl:Ye,foldr:ne,select:nt,selectLimit:it,selectSeries:rt,wrapSync:r,during:bt,doDuring:Ke},e.apply=t,e.applyEach=Ie,e.applyEachSeries=Be,e.asyncify=r,e.auto=M,e.autoInject=I,e.cargo=B,e.cargoQueue=F,e.compose=C,e.concat=Qe,e.concatLimit=De,e.concatSeries=Ue,e.constant=P,e.detect=Ge,e.detectLimit=We,e.detectSeries=He,e.dir=Je,e.doUntil=N,e.doWhilst=Ke,e.each=Xe,e.eachLimit=Ze,e.eachOf=Me,e.eachOfLimit=_e,e.eachOfSeries=je,e.eachSeries=$e,e.ensureAsync=Y,e.every=et,e.everyLimit=tt,e.everySeries=at,e.filter=nt,e.filterLimit=it,e.filterSeries=rt,e.forever=st,e.groupBy=U,e.groupByLimit=lt,e.groupBySeries=G,e.log=ut,e.map=Ae,e.mapLimit=qe,e.mapSeries=we,e.mapValues=W,e.mapValuesLimit=ct,e.mapValuesSeries=H,e.memoize=J,e.nextTick=pt,e.parallel=K,e.parallelLimit=X,e.priorityQueue=ae,e.queue=Z,e.race=ht,e.reduce=Ye,e.reduceRight=ne,e.reflect=ie,e.reflectAll=re,e.reject=ft,e.rejectLimit=yt,e.rejectSeries=mt,e.retry=ue,e.retryable=pe,e.seq=T,e.series=de,e.setImmediate=Ee,e.some=vt,e.someLimit=St,e.someSeries=Lt,e.sortBy=xt,e.timeout=oe,e.times=ye,e.timesLimit=fe,e.timesSeries=me,e.transform=ge,e.tryEach=Et,e.unmemoize=ke,e.until=ve,e.waterfall=Ot,e.whilst=bt,e.all=et,e.allLimit=tt,e.allSeries=at,e.any=vt,e.anyLimit=St,e.anySeries=Lt,e.find=Ge,e.findLimit=We,e.findSeries=He,e.flatMap=Qe,e.flatMapLimit=De,e.flatMapSeries=Ue,e.forEach=Xe,e.forEachSeries=$e,e.forEachLimit=Ze,e.forEachOf=Me,e.forEachOfSeries=je,e.forEachOfLimit=_e,e.inject=Ye,e.foldl=Ye,e.foldr=ne,e.select=nt,e.selectLimit=it,e.selectSeries=rt,e.wrapSync=r,e.during=bt,e.doDuring=Ke,Object.defineProperty(e,"__esModule",{value:!0})});
@@ -0,0 +1,4734 @@
1
+ /**
2
+ * Creates a continuation function with some arguments already applied.
3
+ *
4
+ * Useful as a shorthand when combined with other control flow functions. Any
5
+ * arguments passed to the returned function are added to the arguments
6
+ * originally passed to apply.
7
+ *
8
+ * @name apply
9
+ * @static
10
+ * @memberOf module:Utils
11
+ * @method
12
+ * @category Util
13
+ * @param {Function} fn - The function you want to eventually apply all
14
+ * arguments to. Invokes with (arguments...).
15
+ * @param {...*} arguments... - Any number of arguments to automatically apply
16
+ * when the continuation is called.
17
+ * @returns {Function} the partially-applied function
18
+ * @example
19
+ *
20
+ * // using apply
21
+ * async.parallel([
22
+ * async.apply(fs.writeFile, 'testfile1', 'test1'),
23
+ * async.apply(fs.writeFile, 'testfile2', 'test2')
24
+ * ]);
25
+ *
26
+ *
27
+ * // the same process without using apply
28
+ * async.parallel([
29
+ * function(callback) {
30
+ * fs.writeFile('testfile1', 'test1', callback);
31
+ * },
32
+ * function(callback) {
33
+ * fs.writeFile('testfile2', 'test2', callback);
34
+ * }
35
+ * ]);
36
+ *
37
+ * // It's possible to pass any number of additional arguments when calling the
38
+ * // continuation:
39
+ *
40
+ * node> var fn = async.apply(sys.puts, 'one');
41
+ * node> fn('two', 'three');
42
+ * one
43
+ * two
44
+ * three
45
+ */
46
+ function apply(fn, ...args) {
47
+ return (...callArgs) => fn(...args,...callArgs);
48
+ }
49
+
50
+ function initialParams (fn) {
51
+ return function (...args/*, callback*/) {
52
+ var callback = args.pop();
53
+ return fn.call(this, args, callback);
54
+ };
55
+ }
56
+
57
+ /* istanbul ignore file */
58
+
59
+ var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
60
+ var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
61
+
62
+ function fallback(fn) {
63
+ setTimeout(fn, 0);
64
+ }
65
+
66
+ function wrap(defer) {
67
+ return (fn, ...args) => defer(() => fn(...args));
68
+ }
69
+
70
+ var _defer;
71
+
72
+ if (hasSetImmediate) {
73
+ _defer = setImmediate;
74
+ } else if (hasNextTick) {
75
+ _defer = process.nextTick;
76
+ } else {
77
+ _defer = fallback;
78
+ }
79
+
80
+ var setImmediate$1 = wrap(_defer);
81
+
82
+ /**
83
+ * Take a sync function and make it async, passing its return value to a
84
+ * callback. This is useful for plugging sync functions into a waterfall,
85
+ * series, or other async functions. Any arguments passed to the generated
86
+ * function will be passed to the wrapped function (except for the final
87
+ * callback argument). Errors thrown will be passed to the callback.
88
+ *
89
+ * If the function passed to `asyncify` returns a Promise, that promises's
90
+ * resolved/rejected state will be used to call the callback, rather than simply
91
+ * the synchronous return value.
92
+ *
93
+ * This also means you can asyncify ES2017 `async` functions.
94
+ *
95
+ * @name asyncify
96
+ * @static
97
+ * @memberOf module:Utils
98
+ * @method
99
+ * @alias wrapSync
100
+ * @category Util
101
+ * @param {Function} func - The synchronous function, or Promise-returning
102
+ * function to convert to an {@link AsyncFunction}.
103
+ * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
104
+ * invoked with `(args..., callback)`.
105
+ * @example
106
+ *
107
+ * // passing a regular synchronous function
108
+ * async.waterfall([
109
+ * async.apply(fs.readFile, filename, "utf8"),
110
+ * async.asyncify(JSON.parse),
111
+ * function (data, next) {
112
+ * // data is the result of parsing the text.
113
+ * // If there was a parsing error, it would have been caught.
114
+ * }
115
+ * ], callback);
116
+ *
117
+ * // passing a function returning a promise
118
+ * async.waterfall([
119
+ * async.apply(fs.readFile, filename, "utf8"),
120
+ * async.asyncify(function (contents) {
121
+ * return db.model.create(contents);
122
+ * }),
123
+ * function (model, next) {
124
+ * // `model` is the instantiated model object.
125
+ * // If there was an error, this function would be skipped.
126
+ * }
127
+ * ], callback);
128
+ *
129
+ * // es2017 example, though `asyncify` is not needed if your JS environment
130
+ * // supports async functions out of the box
131
+ * var q = async.queue(async.asyncify(async function(file) {
132
+ * var intermediateStep = await processFile(file);
133
+ * return await somePromise(intermediateStep)
134
+ * }));
135
+ *
136
+ * q.push(files);
137
+ */
138
+ function asyncify(func) {
139
+ if (isAsync(func)) {
140
+ return function (...args/*, callback*/) {
141
+ const callback = args.pop();
142
+ const promise = func.apply(this, args);
143
+ return handlePromise(promise, callback)
144
+ }
145
+ }
146
+
147
+ return initialParams(function (args, callback) {
148
+ var result;
149
+ try {
150
+ result = func.apply(this, args);
151
+ } catch (e) {
152
+ return callback(e);
153
+ }
154
+ // if result is Promise object
155
+ if (result && typeof result.then === 'function') {
156
+ return handlePromise(result, callback)
157
+ } else {
158
+ callback(null, result);
159
+ }
160
+ });
161
+ }
162
+
163
+ function handlePromise(promise, callback) {
164
+ return promise.then(value => {
165
+ invokeCallback(callback, null, value);
166
+ }, err => {
167
+ invokeCallback(callback, err && err.message ? err : new Error(err));
168
+ });
169
+ }
170
+
171
+ function invokeCallback(callback, error, value) {
172
+ try {
173
+ callback(error, value);
174
+ } catch (err) {
175
+ setImmediate$1(e => { throw e }, err);
176
+ }
177
+ }
178
+
179
+ function isAsync(fn) {
180
+ return fn[Symbol.toStringTag] === 'AsyncFunction';
181
+ }
182
+
183
+ function isAsyncGenerator(fn) {
184
+ return fn[Symbol.toStringTag] === 'AsyncGenerator';
185
+ }
186
+
187
+ function isAsyncIterable(obj) {
188
+ return typeof obj[Symbol.asyncIterator] === 'function';
189
+ }
190
+
191
+ function wrapAsync(asyncFn) {
192
+ if (typeof asyncFn !== 'function') throw new Error('expected a function')
193
+ return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
194
+ }
195
+
196
+ // conditionally promisify a function.
197
+ // only return a promise if a callback is omitted
198
+ function awaitify (asyncFn, arity = asyncFn.length) {
199
+ if (!arity) throw new Error('arity is undefined')
200
+ function awaitable (...args) {
201
+ if (typeof args[arity - 1] === 'function') {
202
+ return asyncFn.apply(this, args)
203
+ }
204
+
205
+ return new Promise((resolve, reject) => {
206
+ args[arity - 1] = (err, ...cbArgs) => {
207
+ if (err) return reject(err)
208
+ resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
209
+ };
210
+ asyncFn.apply(this, args);
211
+ })
212
+ }
213
+
214
+ return awaitable
215
+ }
216
+
217
+ function applyEach (eachfn) {
218
+ return function applyEach(fns, ...callArgs) {
219
+ const go = awaitify(function (callback) {
220
+ var that = this;
221
+ return eachfn(fns, (fn, cb) => {
222
+ wrapAsync(fn).apply(that, callArgs.concat(cb));
223
+ }, callback);
224
+ });
225
+ return go;
226
+ };
227
+ }
228
+
229
+ function _asyncMap(eachfn, arr, iteratee, callback) {
230
+ arr = arr || [];
231
+ var results = [];
232
+ var counter = 0;
233
+ var _iteratee = wrapAsync(iteratee);
234
+
235
+ return eachfn(arr, (value, _, iterCb) => {
236
+ var index = counter++;
237
+ _iteratee(value, (err, v) => {
238
+ results[index] = v;
239
+ iterCb(err);
240
+ });
241
+ }, err => {
242
+ callback(err, results);
243
+ });
244
+ }
245
+
246
+ function isArrayLike(value) {
247
+ return value &&
248
+ typeof value.length === 'number' &&
249
+ value.length >= 0 &&
250
+ value.length % 1 === 0;
251
+ }
252
+
253
+ // A temporary value used to identify if the loop should be broken.
254
+ // See #1064, #1293
255
+ const breakLoop = {};
256
+
257
+ function once(fn) {
258
+ function wrapper (...args) {
259
+ if (fn === null) return;
260
+ var callFn = fn;
261
+ fn = null;
262
+ callFn.apply(this, args);
263
+ }
264
+ Object.assign(wrapper, fn);
265
+ return wrapper
266
+ }
267
+
268
+ function getIterator (coll) {
269
+ return coll[Symbol.iterator] && coll[Symbol.iterator]();
270
+ }
271
+
272
+ function createArrayIterator(coll) {
273
+ var i = -1;
274
+ var len = coll.length;
275
+ return function next() {
276
+ return ++i < len ? {value: coll[i], key: i} : null;
277
+ }
278
+ }
279
+
280
+ function createES2015Iterator(iterator) {
281
+ var i = -1;
282
+ return function next() {
283
+ var item = iterator.next();
284
+ if (item.done)
285
+ return null;
286
+ i++;
287
+ return {value: item.value, key: i};
288
+ }
289
+ }
290
+
291
+ function createObjectIterator(obj) {
292
+ var okeys = obj ? Object.keys(obj) : [];
293
+ var i = -1;
294
+ var len = okeys.length;
295
+ return function next() {
296
+ var key = okeys[++i];
297
+ return i < len ? {value: obj[key], key} : null;
298
+ };
299
+ }
300
+
301
+ function createIterator(coll) {
302
+ if (isArrayLike(coll)) {
303
+ return createArrayIterator(coll);
304
+ }
305
+
306
+ var iterator = getIterator(coll);
307
+ return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
308
+ }
309
+
310
+ function onlyOnce(fn) {
311
+ return function (...args) {
312
+ if (fn === null) throw new Error("Callback was already called.");
313
+ var callFn = fn;
314
+ fn = null;
315
+ callFn.apply(this, args);
316
+ };
317
+ }
318
+
319
+ // for async generators
320
+ function asyncEachOfLimit(generator, limit, iteratee, callback) {
321
+ let done = false;
322
+ let canceled = false;
323
+ let awaiting = false;
324
+ let running = 0;
325
+ let idx = 0;
326
+
327
+ function replenish() {
328
+ //console.log('replenish')
329
+ if (running >= limit || awaiting || done) return
330
+ //console.log('replenish awaiting')
331
+ awaiting = true;
332
+ generator.next().then(({value, done: iterDone}) => {
333
+ //console.log('got value', value)
334
+ if (canceled || done) return
335
+ awaiting = false;
336
+ if (iterDone) {
337
+ done = true;
338
+ if (running <= 0) {
339
+ //console.log('done nextCb')
340
+ callback(null);
341
+ }
342
+ return;
343
+ }
344
+ running++;
345
+ iteratee(value, idx, iterateeCallback);
346
+ idx++;
347
+ replenish();
348
+ }).catch(handleError);
349
+ }
350
+
351
+ function iterateeCallback(err, result) {
352
+ //console.log('iterateeCallback')
353
+ running -= 1;
354
+ if (canceled) return
355
+ if (err) return handleError(err)
356
+
357
+ if (err === false) {
358
+ done = true;
359
+ canceled = true;
360
+ return
361
+ }
362
+
363
+ if (result === breakLoop || (done && running <= 0)) {
364
+ done = true;
365
+ //console.log('done iterCb')
366
+ return callback(null);
367
+ }
368
+ replenish();
369
+ }
370
+
371
+ function handleError(err) {
372
+ if (canceled) return
373
+ awaiting = false;
374
+ done = true;
375
+ callback(err);
376
+ }
377
+
378
+ replenish();
379
+ }
380
+
381
+ var eachOfLimit = (limit) => {
382
+ return (obj, iteratee, callback) => {
383
+ callback = once(callback);
384
+ if (limit <= 0) {
385
+ throw new RangeError('concurrency limit cannot be less than 1')
386
+ }
387
+ if (!obj) {
388
+ return callback(null);
389
+ }
390
+ if (isAsyncGenerator(obj)) {
391
+ return asyncEachOfLimit(obj, limit, iteratee, callback)
392
+ }
393
+ if (isAsyncIterable(obj)) {
394
+ return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback)
395
+ }
396
+ var nextElem = createIterator(obj);
397
+ var done = false;
398
+ var canceled = false;
399
+ var running = 0;
400
+ var looping = false;
401
+
402
+ function iterateeCallback(err, value) {
403
+ if (canceled) return
404
+ running -= 1;
405
+ if (err) {
406
+ done = true;
407
+ callback(err);
408
+ }
409
+ else if (err === false) {
410
+ done = true;
411
+ canceled = true;
412
+ }
413
+ else if (value === breakLoop || (done && running <= 0)) {
414
+ done = true;
415
+ return callback(null);
416
+ }
417
+ else if (!looping) {
418
+ replenish();
419
+ }
420
+ }
421
+
422
+ function replenish () {
423
+ looping = true;
424
+ while (running < limit && !done) {
425
+ var elem = nextElem();
426
+ if (elem === null) {
427
+ done = true;
428
+ if (running <= 0) {
429
+ callback(null);
430
+ }
431
+ return;
432
+ }
433
+ running += 1;
434
+ iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
435
+ }
436
+ looping = false;
437
+ }
438
+
439
+ replenish();
440
+ };
441
+ };
442
+
443
+ /**
444
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
445
+ * time.
446
+ *
447
+ * @name eachOfLimit
448
+ * @static
449
+ * @memberOf module:Collections
450
+ * @method
451
+ * @see [async.eachOf]{@link module:Collections.eachOf}
452
+ * @alias forEachOfLimit
453
+ * @category Collection
454
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
455
+ * @param {number} limit - The maximum number of async operations at a time.
456
+ * @param {AsyncFunction} iteratee - An async function to apply to each
457
+ * item in `coll`. The `key` is the item's key, or index in the case of an
458
+ * array.
459
+ * Invoked with (item, key, callback).
460
+ * @param {Function} [callback] - A callback which is called when all
461
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
462
+ * @returns {Promise} a promise, if a callback is omitted
463
+ */
464
+ function eachOfLimit$1(coll, limit, iteratee, callback) {
465
+ return eachOfLimit(limit)(coll, wrapAsync(iteratee), callback);
466
+ }
467
+
468
+ var eachOfLimit$2 = awaitify(eachOfLimit$1, 4);
469
+
470
+ // eachOf implementation optimized for array-likes
471
+ function eachOfArrayLike(coll, iteratee, callback) {
472
+ callback = once(callback);
473
+ var index = 0,
474
+ completed = 0,
475
+ {length} = coll,
476
+ canceled = false;
477
+ if (length === 0) {
478
+ callback(null);
479
+ }
480
+
481
+ function iteratorCallback(err, value) {
482
+ if (err === false) {
483
+ canceled = true;
484
+ }
485
+ if (canceled === true) return
486
+ if (err) {
487
+ callback(err);
488
+ } else if ((++completed === length) || value === breakLoop) {
489
+ callback(null);
490
+ }
491
+ }
492
+
493
+ for (; index < length; index++) {
494
+ iteratee(coll[index], index, onlyOnce(iteratorCallback));
495
+ }
496
+ }
497
+
498
+ // a generic version of eachOf which can handle array, object, and iterator cases.
499
+ function eachOfGeneric (coll, iteratee, callback) {
500
+ return eachOfLimit$2(coll, Infinity, iteratee, callback);
501
+ }
502
+
503
+ /**
504
+ * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
505
+ * to the iteratee.
506
+ *
507
+ * @name eachOf
508
+ * @static
509
+ * @memberOf module:Collections
510
+ * @method
511
+ * @alias forEachOf
512
+ * @category Collection
513
+ * @see [async.each]{@link module:Collections.each}
514
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
515
+ * @param {AsyncFunction} iteratee - A function to apply to each
516
+ * item in `coll`.
517
+ * The `key` is the item's key, or index in the case of an array.
518
+ * Invoked with (item, key, callback).
519
+ * @param {Function} [callback] - A callback which is called when all
520
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
521
+ * @returns {Promise} a promise, if a callback is omitted
522
+ * @example
523
+ *
524
+ * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
525
+ * var configs = {};
526
+ *
527
+ * async.forEachOf(obj, function (value, key, callback) {
528
+ * fs.readFile(__dirname + value, "utf8", function (err, data) {
529
+ * if (err) return callback(err);
530
+ * try {
531
+ * configs[key] = JSON.parse(data);
532
+ * } catch (e) {
533
+ * return callback(e);
534
+ * }
535
+ * callback();
536
+ * });
537
+ * }, function (err) {
538
+ * if (err) console.error(err.message);
539
+ * // configs is now a map of JSON data
540
+ * doSomethingWith(configs);
541
+ * });
542
+ */
543
+ function eachOf(coll, iteratee, callback) {
544
+ var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
545
+ return eachOfImplementation(coll, wrapAsync(iteratee), callback);
546
+ }
547
+
548
+ var eachOf$1 = awaitify(eachOf, 3);
549
+
550
+ /**
551
+ * Produces a new collection of values by mapping each value in `coll` through
552
+ * the `iteratee` function. The `iteratee` is called with an item from `coll`
553
+ * and a callback for when it has finished processing. Each of these callback
554
+ * takes 2 arguments: an `error`, and the transformed item from `coll`. If
555
+ * `iteratee` passes an error to its callback, the main `callback` (for the
556
+ * `map` function) is immediately called with the error.
557
+ *
558
+ * Note, that since this function applies the `iteratee` to each item in
559
+ * parallel, there is no guarantee that the `iteratee` functions will complete
560
+ * in order. However, the results array will be in the same order as the
561
+ * original `coll`.
562
+ *
563
+ * If `map` is passed an Object, the results will be an Array. The results
564
+ * will roughly be in the order of the original Objects' keys (but this can
565
+ * vary across JavaScript engines).
566
+ *
567
+ * @name map
568
+ * @static
569
+ * @memberOf module:Collections
570
+ * @method
571
+ * @category Collection
572
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
573
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
574
+ * `coll`.
575
+ * The iteratee should complete with the transformed item.
576
+ * Invoked with (item, callback).
577
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
578
+ * functions have finished, or an error occurs. Results is an Array of the
579
+ * transformed items from the `coll`. Invoked with (err, results).
580
+ * @returns {Promise} a promise, if no callback is passed
581
+ * @example
582
+ *
583
+ * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
584
+ * // results is now an array of stats for each file
585
+ * });
586
+ */
587
+ function map (coll, iteratee, callback) {
588
+ return _asyncMap(eachOf$1, coll, iteratee, callback)
589
+ }
590
+ var map$1 = awaitify(map, 3);
591
+
592
+ /**
593
+ * Applies the provided arguments to each function in the array, calling
594
+ * `callback` after all functions have completed. If you only provide the first
595
+ * argument, `fns`, then it will return a function which lets you pass in the
596
+ * arguments as if it were a single function call. If more arguments are
597
+ * provided, `callback` is required while `args` is still optional. The results
598
+ * for each of the applied async functions are passed to the final callback
599
+ * as an array.
600
+ *
601
+ * @name applyEach
602
+ * @static
603
+ * @memberOf module:ControlFlow
604
+ * @method
605
+ * @category Control Flow
606
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s
607
+ * to all call with the same arguments
608
+ * @param {...*} [args] - any number of separate arguments to pass to the
609
+ * function.
610
+ * @param {Function} [callback] - the final argument should be the callback,
611
+ * called when all functions have completed processing.
612
+ * @returns {AsyncFunction} - Returns a function that takes no args other than
613
+ * an optional callback, that is the result of applying the `args` to each
614
+ * of the functions.
615
+ * @example
616
+ *
617
+ * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
618
+ *
619
+ * appliedFn((err, results) => {
620
+ * // results[0] is the results for `enableSearch`
621
+ * // results[1] is the results for `updateSchema`
622
+ * });
623
+ *
624
+ * // partial application example:
625
+ * async.each(
626
+ * buckets,
627
+ * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
628
+ * callback
629
+ * );
630
+ */
631
+ var applyEach$1 = applyEach(map$1);
632
+
633
+ /**
634
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
635
+ *
636
+ * @name eachOfSeries
637
+ * @static
638
+ * @memberOf module:Collections
639
+ * @method
640
+ * @see [async.eachOf]{@link module:Collections.eachOf}
641
+ * @alias forEachOfSeries
642
+ * @category Collection
643
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
644
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
645
+ * `coll`.
646
+ * Invoked with (item, key, callback).
647
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
648
+ * functions have finished, or an error occurs. Invoked with (err).
649
+ * @returns {Promise} a promise, if a callback is omitted
650
+ */
651
+ function eachOfSeries(coll, iteratee, callback) {
652
+ return eachOfLimit$2(coll, 1, iteratee, callback)
653
+ }
654
+ var eachOfSeries$1 = awaitify(eachOfSeries, 3);
655
+
656
+ /**
657
+ * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
658
+ *
659
+ * @name mapSeries
660
+ * @static
661
+ * @memberOf module:Collections
662
+ * @method
663
+ * @see [async.map]{@link module:Collections.map}
664
+ * @category Collection
665
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
666
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
667
+ * `coll`.
668
+ * The iteratee should complete with the transformed item.
669
+ * Invoked with (item, callback).
670
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
671
+ * functions have finished, or an error occurs. Results is an array of the
672
+ * transformed items from the `coll`. Invoked with (err, results).
673
+ * @returns {Promise} a promise, if no callback is passed
674
+ */
675
+ function mapSeries (coll, iteratee, callback) {
676
+ return _asyncMap(eachOfSeries$1, coll, iteratee, callback)
677
+ }
678
+ var mapSeries$1 = awaitify(mapSeries, 3);
679
+
680
+ /**
681
+ * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
682
+ *
683
+ * @name applyEachSeries
684
+ * @static
685
+ * @memberOf module:ControlFlow
686
+ * @method
687
+ * @see [async.applyEach]{@link module:ControlFlow.applyEach}
688
+ * @category Control Flow
689
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all
690
+ * call with the same arguments
691
+ * @param {...*} [args] - any number of separate arguments to pass to the
692
+ * function.
693
+ * @param {Function} [callback] - the final argument should be the callback,
694
+ * called when all functions have completed processing.
695
+ * @returns {AsyncFunction} - A function, that when called, is the result of
696
+ * appling the `args` to the list of functions. It takes no args, other than
697
+ * a callback.
698
+ */
699
+ var applyEachSeries = applyEach(mapSeries$1);
700
+
701
+ const PROMISE_SYMBOL = Symbol('promiseCallback');
702
+
703
+ function promiseCallback () {
704
+ let resolve, reject;
705
+ function callback (err, ...args) {
706
+ if (err) return reject(err)
707
+ resolve(args.length > 1 ? args : args[0]);
708
+ }
709
+
710
+ callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
711
+ resolve = res,
712
+ reject = rej;
713
+ });
714
+
715
+ return callback
716
+ }
717
+
718
+ /**
719
+ * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
720
+ * their requirements. Each function can optionally depend on other functions
721
+ * being completed first, and each function is run as soon as its requirements
722
+ * are satisfied.
723
+ *
724
+ * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
725
+ * will stop. Further tasks will not execute (so any other functions depending
726
+ * on it will not run), and the main `callback` is immediately called with the
727
+ * error.
728
+ *
729
+ * {@link AsyncFunction}s also receive an object containing the results of functions which
730
+ * have completed so far as the first argument, if they have dependencies. If a
731
+ * task function has no dependencies, it will only be passed a callback.
732
+ *
733
+ * @name auto
734
+ * @static
735
+ * @memberOf module:ControlFlow
736
+ * @method
737
+ * @category Control Flow
738
+ * @param {Object} tasks - An object. Each of its properties is either a
739
+ * function or an array of requirements, with the {@link AsyncFunction} itself the last item
740
+ * in the array. The object's key of a property serves as the name of the task
741
+ * defined by that property, i.e. can be used when specifying requirements for
742
+ * other tasks. The function receives one or two arguments:
743
+ * * a `results` object, containing the results of the previously executed
744
+ * functions, only passed if the task has any dependencies,
745
+ * * a `callback(err, result)` function, which must be called when finished,
746
+ * passing an `error` (which can be `null`) and the result of the function's
747
+ * execution.
748
+ * @param {number} [concurrency=Infinity] - An optional `integer` for
749
+ * determining the maximum number of tasks that can be run in parallel. By
750
+ * default, as many as possible.
751
+ * @param {Function} [callback] - An optional callback which is called when all
752
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
753
+ * pass an error to their callback. Results are always returned; however, if an
754
+ * error occurs, no further `tasks` will be performed, and the results object
755
+ * will only contain partial results. Invoked with (err, results).
756
+ * @returns {Promise} a promise, if a callback is not passed
757
+ * @example
758
+ *
759
+ * async.auto({
760
+ * // this function will just be passed a callback
761
+ * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
762
+ * showData: ['readData', function(results, cb) {
763
+ * // results.readData is the file's contents
764
+ * // ...
765
+ * }]
766
+ * }, callback);
767
+ *
768
+ * async.auto({
769
+ * get_data: function(callback) {
770
+ * console.log('in get_data');
771
+ * // async code to get some data
772
+ * callback(null, 'data', 'converted to array');
773
+ * },
774
+ * make_folder: function(callback) {
775
+ * console.log('in make_folder');
776
+ * // async code to create a directory to store a file in
777
+ * // this is run at the same time as getting the data
778
+ * callback(null, 'folder');
779
+ * },
780
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
781
+ * console.log('in write_file', JSON.stringify(results));
782
+ * // once there is some data and the directory exists,
783
+ * // write the data to a file in the directory
784
+ * callback(null, 'filename');
785
+ * }],
786
+ * email_link: ['write_file', function(results, callback) {
787
+ * console.log('in email_link', JSON.stringify(results));
788
+ * // once the file is written let's email a link to it...
789
+ * // results.write_file contains the filename returned by write_file.
790
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
791
+ * }]
792
+ * }, function(err, results) {
793
+ * console.log('err = ', err);
794
+ * console.log('results = ', results);
795
+ * });
796
+ */
797
+ function auto(tasks, concurrency, callback) {
798
+ if (typeof concurrency !== 'number') {
799
+ // concurrency is optional, shift the args.
800
+ callback = concurrency;
801
+ concurrency = null;
802
+ }
803
+ callback = once(callback || promiseCallback());
804
+ var numTasks = Object.keys(tasks).length;
805
+ if (!numTasks) {
806
+ return callback(null);
807
+ }
808
+ if (!concurrency) {
809
+ concurrency = numTasks;
810
+ }
811
+
812
+ var results = {};
813
+ var runningTasks = 0;
814
+ var canceled = false;
815
+ var hasError = false;
816
+
817
+ var listeners = Object.create(null);
818
+
819
+ var readyTasks = [];
820
+
821
+ // for cycle detection:
822
+ var readyToCheck = []; // tasks that have been identified as reachable
823
+ // without the possibility of returning to an ancestor task
824
+ var uncheckedDependencies = {};
825
+
826
+ Object.keys(tasks).forEach(key => {
827
+ var task = tasks[key];
828
+ if (!Array.isArray(task)) {
829
+ // no dependencies
830
+ enqueueTask(key, [task]);
831
+ readyToCheck.push(key);
832
+ return;
833
+ }
834
+
835
+ var dependencies = task.slice(0, task.length - 1);
836
+ var remainingDependencies = dependencies.length;
837
+ if (remainingDependencies === 0) {
838
+ enqueueTask(key, task);
839
+ readyToCheck.push(key);
840
+ return;
841
+ }
842
+ uncheckedDependencies[key] = remainingDependencies;
843
+
844
+ dependencies.forEach(dependencyName => {
845
+ if (!tasks[dependencyName]) {
846
+ throw new Error('async.auto task `' + key +
847
+ '` has a non-existent dependency `' +
848
+ dependencyName + '` in ' +
849
+ dependencies.join(', '));
850
+ }
851
+ addListener(dependencyName, () => {
852
+ remainingDependencies--;
853
+ if (remainingDependencies === 0) {
854
+ enqueueTask(key, task);
855
+ }
856
+ });
857
+ });
858
+ });
859
+
860
+ checkForDeadlocks();
861
+ processQueue();
862
+
863
+ function enqueueTask(key, task) {
864
+ readyTasks.push(() => runTask(key, task));
865
+ }
866
+
867
+ function processQueue() {
868
+ if (canceled) return
869
+ if (readyTasks.length === 0 && runningTasks === 0) {
870
+ return callback(null, results);
871
+ }
872
+ while(readyTasks.length && runningTasks < concurrency) {
873
+ var run = readyTasks.shift();
874
+ run();
875
+ }
876
+
877
+ }
878
+
879
+ function addListener(taskName, fn) {
880
+ var taskListeners = listeners[taskName];
881
+ if (!taskListeners) {
882
+ taskListeners = listeners[taskName] = [];
883
+ }
884
+
885
+ taskListeners.push(fn);
886
+ }
887
+
888
+ function taskComplete(taskName) {
889
+ var taskListeners = listeners[taskName] || [];
890
+ taskListeners.forEach(fn => fn());
891
+ processQueue();
892
+ }
893
+
894
+
895
+ function runTask(key, task) {
896
+ if (hasError) return;
897
+
898
+ var taskCallback = onlyOnce((err, ...result) => {
899
+ runningTasks--;
900
+ if (err === false) {
901
+ canceled = true;
902
+ return
903
+ }
904
+ if (result.length < 2) {
905
+ [result] = result;
906
+ }
907
+ if (err) {
908
+ var safeResults = {};
909
+ Object.keys(results).forEach(rkey => {
910
+ safeResults[rkey] = results[rkey];
911
+ });
912
+ safeResults[key] = result;
913
+ hasError = true;
914
+ listeners = Object.create(null);
915
+ if (canceled) return
916
+ callback(err, safeResults);
917
+ } else {
918
+ results[key] = result;
919
+ taskComplete(key);
920
+ }
921
+ });
922
+
923
+ runningTasks++;
924
+ var taskFn = wrapAsync(task[task.length - 1]);
925
+ if (task.length > 1) {
926
+ taskFn(results, taskCallback);
927
+ } else {
928
+ taskFn(taskCallback);
929
+ }
930
+ }
931
+
932
+ function checkForDeadlocks() {
933
+ // Kahn's algorithm
934
+ // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
935
+ // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
936
+ var currentTask;
937
+ var counter = 0;
938
+ while (readyToCheck.length) {
939
+ currentTask = readyToCheck.pop();
940
+ counter++;
941
+ getDependents(currentTask).forEach(dependent => {
942
+ if (--uncheckedDependencies[dependent] === 0) {
943
+ readyToCheck.push(dependent);
944
+ }
945
+ });
946
+ }
947
+
948
+ if (counter !== numTasks) {
949
+ throw new Error(
950
+ 'async.auto cannot execute tasks due to a recursive dependency'
951
+ );
952
+ }
953
+ }
954
+
955
+ function getDependents(taskName) {
956
+ var result = [];
957
+ Object.keys(tasks).forEach(key => {
958
+ const task = tasks[key];
959
+ if (Array.isArray(task) && task.indexOf(taskName) >= 0) {
960
+ result.push(key);
961
+ }
962
+ });
963
+ return result;
964
+ }
965
+
966
+ return callback[PROMISE_SYMBOL]
967
+ }
968
+
969
+ var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;
970
+ var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;
971
+ var FN_ARG_SPLIT = /,/;
972
+ var FN_ARG = /(=.+)?(\s*)$/;
973
+ var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
974
+
975
+ function parseParams(func) {
976
+ const src = func.toString().replace(STRIP_COMMENTS, '');
977
+ let match = src.match(FN_ARGS);
978
+ if (!match) {
979
+ match = src.match(ARROW_FN_ARGS);
980
+ }
981
+ if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src)
982
+ let [, args] = match;
983
+ return args
984
+ .replace(/\s/g, '')
985
+ .split(FN_ARG_SPLIT)
986
+ .map((arg) => arg.replace(FN_ARG, '').trim());
987
+ }
988
+
989
+ /**
990
+ * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
991
+ * tasks are specified as parameters to the function, after the usual callback
992
+ * parameter, with the parameter names matching the names of the tasks it
993
+ * depends on. This can provide even more readable task graphs which can be
994
+ * easier to maintain.
995
+ *
996
+ * If a final callback is specified, the task results are similarly injected,
997
+ * specified as named parameters after the initial error parameter.
998
+ *
999
+ * The autoInject function is purely syntactic sugar and its semantics are
1000
+ * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
1001
+ *
1002
+ * @name autoInject
1003
+ * @static
1004
+ * @memberOf module:ControlFlow
1005
+ * @method
1006
+ * @see [async.auto]{@link module:ControlFlow.auto}
1007
+ * @category Control Flow
1008
+ * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
1009
+ * the form 'func([dependencies...], callback). The object's key of a property
1010
+ * serves as the name of the task defined by that property, i.e. can be used
1011
+ * when specifying requirements for other tasks.
1012
+ * * The `callback` parameter is a `callback(err, result)` which must be called
1013
+ * when finished, passing an `error` (which can be `null`) and the result of
1014
+ * the function's execution. The remaining parameters name other tasks on
1015
+ * which the task is dependent, and the results from those tasks are the
1016
+ * arguments of those parameters.
1017
+ * @param {Function} [callback] - An optional callback which is called when all
1018
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
1019
+ * pass an error to their callback, and a `results` object with any completed
1020
+ * task results, similar to `auto`.
1021
+ * @returns {Promise} a promise, if no callback is passed
1022
+ * @example
1023
+ *
1024
+ * // The example from `auto` can be rewritten as follows:
1025
+ * async.autoInject({
1026
+ * get_data: function(callback) {
1027
+ * // async code to get some data
1028
+ * callback(null, 'data', 'converted to array');
1029
+ * },
1030
+ * make_folder: function(callback) {
1031
+ * // async code to create a directory to store a file in
1032
+ * // this is run at the same time as getting the data
1033
+ * callback(null, 'folder');
1034
+ * },
1035
+ * write_file: function(get_data, make_folder, callback) {
1036
+ * // once there is some data and the directory exists,
1037
+ * // write the data to a file in the directory
1038
+ * callback(null, 'filename');
1039
+ * },
1040
+ * email_link: function(write_file, callback) {
1041
+ * // once the file is written let's email a link to it...
1042
+ * // write_file contains the filename returned by write_file.
1043
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
1044
+ * }
1045
+ * }, function(err, results) {
1046
+ * console.log('err = ', err);
1047
+ * console.log('email_link = ', results.email_link);
1048
+ * });
1049
+ *
1050
+ * // If you are using a JS minifier that mangles parameter names, `autoInject`
1051
+ * // will not work with plain functions, since the parameter names will be
1052
+ * // collapsed to a single letter identifier. To work around this, you can
1053
+ * // explicitly specify the names of the parameters your task function needs
1054
+ * // in an array, similar to Angular.js dependency injection.
1055
+ *
1056
+ * // This still has an advantage over plain `auto`, since the results a task
1057
+ * // depends on are still spread into arguments.
1058
+ * async.autoInject({
1059
+ * //...
1060
+ * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
1061
+ * callback(null, 'filename');
1062
+ * }],
1063
+ * email_link: ['write_file', function(write_file, callback) {
1064
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
1065
+ * }]
1066
+ * //...
1067
+ * }, function(err, results) {
1068
+ * console.log('err = ', err);
1069
+ * console.log('email_link = ', results.email_link);
1070
+ * });
1071
+ */
1072
+ function autoInject(tasks, callback) {
1073
+ var newTasks = {};
1074
+
1075
+ Object.keys(tasks).forEach(key => {
1076
+ var taskFn = tasks[key];
1077
+ var params;
1078
+ var fnIsAsync = isAsync(taskFn);
1079
+ var hasNoDeps =
1080
+ (!fnIsAsync && taskFn.length === 1) ||
1081
+ (fnIsAsync && taskFn.length === 0);
1082
+
1083
+ if (Array.isArray(taskFn)) {
1084
+ params = [...taskFn];
1085
+ taskFn = params.pop();
1086
+
1087
+ newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
1088
+ } else if (hasNoDeps) {
1089
+ // no dependencies, use the function as-is
1090
+ newTasks[key] = taskFn;
1091
+ } else {
1092
+ params = parseParams(taskFn);
1093
+ if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) {
1094
+ throw new Error("autoInject task functions require explicit parameters.");
1095
+ }
1096
+
1097
+ // remove callback param
1098
+ if (!fnIsAsync) params.pop();
1099
+
1100
+ newTasks[key] = params.concat(newTask);
1101
+ }
1102
+
1103
+ function newTask(results, taskCb) {
1104
+ var newArgs = params.map(name => results[name]);
1105
+ newArgs.push(taskCb);
1106
+ wrapAsync(taskFn)(...newArgs);
1107
+ }
1108
+ });
1109
+
1110
+ return auto(newTasks, callback);
1111
+ }
1112
+
1113
+ // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
1114
+ // used for queues. This implementation assumes that the node provided by the user can be modified
1115
+ // to adjust the next and last properties. We implement only the minimal functionality
1116
+ // for queue support.
1117
+ class DLL {
1118
+ constructor() {
1119
+ this.head = this.tail = null;
1120
+ this.length = 0;
1121
+ }
1122
+
1123
+ removeLink(node) {
1124
+ if (node.prev) node.prev.next = node.next;
1125
+ else this.head = node.next;
1126
+ if (node.next) node.next.prev = node.prev;
1127
+ else this.tail = node.prev;
1128
+
1129
+ node.prev = node.next = null;
1130
+ this.length -= 1;
1131
+ return node;
1132
+ }
1133
+
1134
+ empty () {
1135
+ while(this.head) this.shift();
1136
+ return this;
1137
+ }
1138
+
1139
+ insertAfter(node, newNode) {
1140
+ newNode.prev = node;
1141
+ newNode.next = node.next;
1142
+ if (node.next) node.next.prev = newNode;
1143
+ else this.tail = newNode;
1144
+ node.next = newNode;
1145
+ this.length += 1;
1146
+ }
1147
+
1148
+ insertBefore(node, newNode) {
1149
+ newNode.prev = node.prev;
1150
+ newNode.next = node;
1151
+ if (node.prev) node.prev.next = newNode;
1152
+ else this.head = newNode;
1153
+ node.prev = newNode;
1154
+ this.length += 1;
1155
+ }
1156
+
1157
+ unshift(node) {
1158
+ if (this.head) this.insertBefore(this.head, node);
1159
+ else setInitial(this, node);
1160
+ }
1161
+
1162
+ push(node) {
1163
+ if (this.tail) this.insertAfter(this.tail, node);
1164
+ else setInitial(this, node);
1165
+ }
1166
+
1167
+ shift() {
1168
+ return this.head && this.removeLink(this.head);
1169
+ }
1170
+
1171
+ pop() {
1172
+ return this.tail && this.removeLink(this.tail);
1173
+ }
1174
+
1175
+ toArray() {
1176
+ return [...this]
1177
+ }
1178
+
1179
+ *[Symbol.iterator] () {
1180
+ var cur = this.head;
1181
+ while (cur) {
1182
+ yield cur.data;
1183
+ cur = cur.next;
1184
+ }
1185
+ }
1186
+
1187
+ remove (testFn) {
1188
+ var curr = this.head;
1189
+ while(curr) {
1190
+ var {next} = curr;
1191
+ if (testFn(curr)) {
1192
+ this.removeLink(curr);
1193
+ }
1194
+ curr = next;
1195
+ }
1196
+ return this;
1197
+ }
1198
+ }
1199
+
1200
+ function setInitial(dll, node) {
1201
+ dll.length = 1;
1202
+ dll.head = dll.tail = node;
1203
+ }
1204
+
1205
+ function queue(worker, concurrency, payload) {
1206
+ if (concurrency == null) {
1207
+ concurrency = 1;
1208
+ }
1209
+ else if(concurrency === 0) {
1210
+ throw new RangeError('Concurrency must not be zero');
1211
+ }
1212
+
1213
+ var _worker = wrapAsync(worker);
1214
+ var numRunning = 0;
1215
+ var workersList = [];
1216
+ const events = {
1217
+ error: [],
1218
+ drain: [],
1219
+ saturated: [],
1220
+ unsaturated: [],
1221
+ empty: []
1222
+ };
1223
+
1224
+ function on (event, handler) {
1225
+ events[event].push(handler);
1226
+ }
1227
+
1228
+ function once (event, handler) {
1229
+ const handleAndRemove = (...args) => {
1230
+ off(event, handleAndRemove);
1231
+ handler(...args);
1232
+ };
1233
+ events[event].push(handleAndRemove);
1234
+ }
1235
+
1236
+ function off (event, handler) {
1237
+ if (!event) return Object.keys(events).forEach(ev => events[ev] = [])
1238
+ if (!handler) return events[event] = []
1239
+ events[event] = events[event].filter(ev => ev !== handler);
1240
+ }
1241
+
1242
+ function trigger (event, ...args) {
1243
+ events[event].forEach(handler => handler(...args));
1244
+ }
1245
+
1246
+ var processingScheduled = false;
1247
+ function _insert(data, insertAtFront, rejectOnError, callback) {
1248
+ if (callback != null && typeof callback !== 'function') {
1249
+ throw new Error('task callback must be a function');
1250
+ }
1251
+ q.started = true;
1252
+
1253
+ var res, rej;
1254
+ function promiseCallback (err, ...args) {
1255
+ // we don't care about the error, let the global error handler
1256
+ // deal with it
1257
+ if (err) return rejectOnError ? rej(err) : res()
1258
+ if (args.length <= 1) return res(args[0])
1259
+ res(args);
1260
+ }
1261
+
1262
+ var item = {
1263
+ data,
1264
+ callback: rejectOnError ?
1265
+ promiseCallback :
1266
+ (callback || promiseCallback)
1267
+ };
1268
+
1269
+ if (insertAtFront) {
1270
+ q._tasks.unshift(item);
1271
+ } else {
1272
+ q._tasks.push(item);
1273
+ }
1274
+
1275
+ if (!processingScheduled) {
1276
+ processingScheduled = true;
1277
+ setImmediate$1(() => {
1278
+ processingScheduled = false;
1279
+ q.process();
1280
+ });
1281
+ }
1282
+
1283
+ if (rejectOnError || !callback) {
1284
+ return new Promise((resolve, reject) => {
1285
+ res = resolve;
1286
+ rej = reject;
1287
+ })
1288
+ }
1289
+ }
1290
+
1291
+ function _createCB(tasks) {
1292
+ return function (err, ...args) {
1293
+ numRunning -= 1;
1294
+
1295
+ for (var i = 0, l = tasks.length; i < l; i++) {
1296
+ var task = tasks[i];
1297
+
1298
+ var index = workersList.indexOf(task);
1299
+ if (index === 0) {
1300
+ workersList.shift();
1301
+ } else if (index > 0) {
1302
+ workersList.splice(index, 1);
1303
+ }
1304
+
1305
+ task.callback(err, ...args);
1306
+
1307
+ if (err != null) {
1308
+ trigger('error', err, task.data);
1309
+ }
1310
+ }
1311
+
1312
+ if (numRunning <= (q.concurrency - q.buffer) ) {
1313
+ trigger('unsaturated');
1314
+ }
1315
+
1316
+ if (q.idle()) {
1317
+ trigger('drain');
1318
+ }
1319
+ q.process();
1320
+ };
1321
+ }
1322
+
1323
+ function _maybeDrain(data) {
1324
+ if (data.length === 0 && q.idle()) {
1325
+ // call drain immediately if there are no tasks
1326
+ setImmediate$1(() => trigger('drain'));
1327
+ return true
1328
+ }
1329
+ return false
1330
+ }
1331
+
1332
+ const eventMethod = (name) => (handler) => {
1333
+ if (!handler) {
1334
+ return new Promise((resolve, reject) => {
1335
+ once(name, (err, data) => {
1336
+ if (err) return reject(err)
1337
+ resolve(data);
1338
+ });
1339
+ })
1340
+ }
1341
+ off(name);
1342
+ on(name, handler);
1343
+
1344
+ };
1345
+
1346
+ var isProcessing = false;
1347
+ var q = {
1348
+ _tasks: new DLL(),
1349
+ *[Symbol.iterator] () {
1350
+ yield* q._tasks[Symbol.iterator]();
1351
+ },
1352
+ concurrency,
1353
+ payload,
1354
+ buffer: concurrency / 4,
1355
+ started: false,
1356
+ paused: false,
1357
+ push (data, callback) {
1358
+ if (Array.isArray(data)) {
1359
+ if (_maybeDrain(data)) return
1360
+ return data.map(datum => _insert(datum, false, false, callback))
1361
+ }
1362
+ return _insert(data, false, false, callback);
1363
+ },
1364
+ pushAsync (data, callback) {
1365
+ if (Array.isArray(data)) {
1366
+ if (_maybeDrain(data)) return
1367
+ return data.map(datum => _insert(datum, false, true, callback))
1368
+ }
1369
+ return _insert(data, false, true, callback);
1370
+ },
1371
+ kill () {
1372
+ off();
1373
+ q._tasks.empty();
1374
+ },
1375
+ unshift (data, callback) {
1376
+ if (Array.isArray(data)) {
1377
+ if (_maybeDrain(data)) return
1378
+ return data.map(datum => _insert(datum, true, false, callback))
1379
+ }
1380
+ return _insert(data, true, false, callback);
1381
+ },
1382
+ unshiftAsync (data, callback) {
1383
+ if (Array.isArray(data)) {
1384
+ if (_maybeDrain(data)) return
1385
+ return data.map(datum => _insert(datum, true, true, callback))
1386
+ }
1387
+ return _insert(data, true, true, callback);
1388
+ },
1389
+ remove (testFn) {
1390
+ q._tasks.remove(testFn);
1391
+ },
1392
+ process () {
1393
+ // Avoid trying to start too many processing operations. This can occur
1394
+ // when callbacks resolve synchronously (#1267).
1395
+ if (isProcessing) {
1396
+ return;
1397
+ }
1398
+ isProcessing = true;
1399
+ while(!q.paused && numRunning < q.concurrency && q._tasks.length){
1400
+ var tasks = [], data = [];
1401
+ var l = q._tasks.length;
1402
+ if (q.payload) l = Math.min(l, q.payload);
1403
+ for (var i = 0; i < l; i++) {
1404
+ var node = q._tasks.shift();
1405
+ tasks.push(node);
1406
+ workersList.push(node);
1407
+ data.push(node.data);
1408
+ }
1409
+
1410
+ numRunning += 1;
1411
+
1412
+ if (q._tasks.length === 0) {
1413
+ trigger('empty');
1414
+ }
1415
+
1416
+ if (numRunning === q.concurrency) {
1417
+ trigger('saturated');
1418
+ }
1419
+
1420
+ var cb = onlyOnce(_createCB(tasks));
1421
+ _worker(data, cb);
1422
+ }
1423
+ isProcessing = false;
1424
+ },
1425
+ length () {
1426
+ return q._tasks.length;
1427
+ },
1428
+ running () {
1429
+ return numRunning;
1430
+ },
1431
+ workersList () {
1432
+ return workersList;
1433
+ },
1434
+ idle() {
1435
+ return q._tasks.length + numRunning === 0;
1436
+ },
1437
+ pause () {
1438
+ q.paused = true;
1439
+ },
1440
+ resume () {
1441
+ if (q.paused === false) { return; }
1442
+ q.paused = false;
1443
+ setImmediate$1(q.process);
1444
+ }
1445
+ };
1446
+ // define these as fixed properties, so people get useful errors when updating
1447
+ Object.defineProperties(q, {
1448
+ saturated: {
1449
+ writable: false,
1450
+ value: eventMethod('saturated')
1451
+ },
1452
+ unsaturated: {
1453
+ writable: false,
1454
+ value: eventMethod('unsaturated')
1455
+ },
1456
+ empty: {
1457
+ writable: false,
1458
+ value: eventMethod('empty')
1459
+ },
1460
+ drain: {
1461
+ writable: false,
1462
+ value: eventMethod('drain')
1463
+ },
1464
+ error: {
1465
+ writable: false,
1466
+ value: eventMethod('error')
1467
+ },
1468
+ });
1469
+ return q;
1470
+ }
1471
+
1472
+ /**
1473
+ * Creates a `cargo` object with the specified payload. Tasks added to the
1474
+ * cargo will be processed altogether (up to the `payload` limit). If the
1475
+ * `worker` is in progress, the task is queued until it becomes available. Once
1476
+ * the `worker` has completed some tasks, each callback of those tasks is
1477
+ * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
1478
+ * for how `cargo` and `queue` work.
1479
+ *
1480
+ * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
1481
+ * at a time, cargo passes an array of tasks to a single worker, repeating
1482
+ * when the worker is finished.
1483
+ *
1484
+ * @name cargo
1485
+ * @static
1486
+ * @memberOf module:ControlFlow
1487
+ * @method
1488
+ * @see [async.queue]{@link module:ControlFlow.queue}
1489
+ * @category Control Flow
1490
+ * @param {AsyncFunction} worker - An asynchronous function for processing an array
1491
+ * of queued tasks. Invoked with `(tasks, callback)`.
1492
+ * @param {number} [payload=Infinity] - An optional `integer` for determining
1493
+ * how many tasks should be processed per round; if omitted, the default is
1494
+ * unlimited.
1495
+ * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can
1496
+ * attached as certain properties to listen for specific events during the
1497
+ * lifecycle of the cargo and inner queue.
1498
+ * @example
1499
+ *
1500
+ * // create a cargo object with payload 2
1501
+ * var cargo = async.cargo(function(tasks, callback) {
1502
+ * for (var i=0; i<tasks.length; i++) {
1503
+ * console.log('hello ' + tasks[i].name);
1504
+ * }
1505
+ * callback();
1506
+ * }, 2);
1507
+ *
1508
+ * // add some items
1509
+ * cargo.push({name: 'foo'}, function(err) {
1510
+ * console.log('finished processing foo');
1511
+ * });
1512
+ * cargo.push({name: 'bar'}, function(err) {
1513
+ * console.log('finished processing bar');
1514
+ * });
1515
+ * await cargo.push({name: 'baz'});
1516
+ * console.log('finished processing baz');
1517
+ */
1518
+ function cargo(worker, payload) {
1519
+ return queue(worker, 1, payload);
1520
+ }
1521
+
1522
+ /**
1523
+ * Creates a `cargoQueue` object with the specified payload. Tasks added to the
1524
+ * cargoQueue will be processed together (up to the `payload` limit) in `concurrency` parallel workers.
1525
+ * If the all `workers` are in progress, the task is queued until one becomes available. Once
1526
+ * a `worker` has completed some tasks, each callback of those tasks is
1527
+ * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
1528
+ * for how `cargo` and `queue` work.
1529
+ *
1530
+ * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
1531
+ * at a time, and [`cargo`]{@link module:ControlFlow.cargo} passes an array of tasks to a single worker,
1532
+ * the cargoQueue passes an array of tasks to multiple parallel workers.
1533
+ *
1534
+ * @name cargoQueue
1535
+ * @static
1536
+ * @memberOf module:ControlFlow
1537
+ * @method
1538
+ * @see [async.queue]{@link module:ControlFlow.queue}
1539
+ * @see [async.cargo]{@link module:ControlFLow.cargo}
1540
+ * @category Control Flow
1541
+ * @param {AsyncFunction} worker - An asynchronous function for processing an array
1542
+ * of queued tasks. Invoked with `(tasks, callback)`.
1543
+ * @param {number} [concurrency=1] - An `integer` for determining how many
1544
+ * `worker` functions should be run in parallel. If omitted, the concurrency
1545
+ * defaults to `1`. If the concurrency is `0`, an error is thrown.
1546
+ * @param {number} [payload=Infinity] - An optional `integer` for determining
1547
+ * how many tasks should be processed per round; if omitted, the default is
1548
+ * unlimited.
1549
+ * @returns {module:ControlFlow.QueueObject} A cargoQueue object to manage the tasks. Callbacks can
1550
+ * attached as certain properties to listen for specific events during the
1551
+ * lifecycle of the cargoQueue and inner queue.
1552
+ * @example
1553
+ *
1554
+ * // create a cargoQueue object with payload 2 and concurrency 2
1555
+ * var cargoQueue = async.cargoQueue(function(tasks, callback) {
1556
+ * for (var i=0; i<tasks.length; i++) {
1557
+ * console.log('hello ' + tasks[i].name);
1558
+ * }
1559
+ * callback();
1560
+ * }, 2, 2);
1561
+ *
1562
+ * // add some items
1563
+ * cargoQueue.push({name: 'foo'}, function(err) {
1564
+ * console.log('finished processing foo');
1565
+ * });
1566
+ * cargoQueue.push({name: 'bar'}, function(err) {
1567
+ * console.log('finished processing bar');
1568
+ * });
1569
+ * cargoQueue.push({name: 'baz'}, function(err) {
1570
+ * console.log('finished processing baz');
1571
+ * });
1572
+ * cargoQueue.push({name: 'boo'}, function(err) {
1573
+ * console.log('finished processing boo');
1574
+ * });
1575
+ */
1576
+ function cargo$1(worker, concurrency, payload) {
1577
+ return queue(worker, concurrency, payload);
1578
+ }
1579
+
1580
+ /**
1581
+ * Reduces `coll` into a single value using an async `iteratee` to return each
1582
+ * successive step. `memo` is the initial state of the reduction. This function
1583
+ * only operates in series.
1584
+ *
1585
+ * For performance reasons, it may make sense to split a call to this function
1586
+ * into a parallel map, and then use the normal `Array.prototype.reduce` on the
1587
+ * results. This function is for situations where each step in the reduction
1588
+ * needs to be async; if you can get the data before reducing it, then it's
1589
+ * probably a good idea to do so.
1590
+ *
1591
+ * @name reduce
1592
+ * @static
1593
+ * @memberOf module:Collections
1594
+ * @method
1595
+ * @alias inject
1596
+ * @alias foldl
1597
+ * @category Collection
1598
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1599
+ * @param {*} memo - The initial state of the reduction.
1600
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
1601
+ * array to produce the next step in the reduction.
1602
+ * The `iteratee` should complete with the next state of the reduction.
1603
+ * If the iteratee complete with an error, the reduction is stopped and the
1604
+ * main `callback` is immediately called with the error.
1605
+ * Invoked with (memo, item, callback).
1606
+ * @param {Function} [callback] - A callback which is called after all the
1607
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
1608
+ * (err, result).
1609
+ * @returns {Promise} a promise, if no callback is passed
1610
+ * @example
1611
+ *
1612
+ * async.reduce([1,2,3], 0, function(memo, item, callback) {
1613
+ * // pointless async:
1614
+ * process.nextTick(function() {
1615
+ * callback(null, memo + item)
1616
+ * });
1617
+ * }, function(err, result) {
1618
+ * // result is now equal to the last value of memo, which is 6
1619
+ * });
1620
+ */
1621
+ function reduce(coll, memo, iteratee, callback) {
1622
+ callback = once(callback);
1623
+ var _iteratee = wrapAsync(iteratee);
1624
+ return eachOfSeries$1(coll, (x, i, iterCb) => {
1625
+ _iteratee(memo, x, (err, v) => {
1626
+ memo = v;
1627
+ iterCb(err);
1628
+ });
1629
+ }, err => callback(err, memo));
1630
+ }
1631
+ var reduce$1 = awaitify(reduce, 4);
1632
+
1633
+ /**
1634
+ * Version of the compose function that is more natural to read. Each function
1635
+ * consumes the return value of the previous function. It is the equivalent of
1636
+ * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
1637
+ *
1638
+ * Each function is executed with the `this` binding of the composed function.
1639
+ *
1640
+ * @name seq
1641
+ * @static
1642
+ * @memberOf module:ControlFlow
1643
+ * @method
1644
+ * @see [async.compose]{@link module:ControlFlow.compose}
1645
+ * @category Control Flow
1646
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
1647
+ * @returns {Function} a function that composes the `functions` in order
1648
+ * @example
1649
+ *
1650
+ * // Requires lodash (or underscore), express3 and dresende's orm2.
1651
+ * // Part of an app, that fetches cats of the logged user.
1652
+ * // This example uses `seq` function to avoid overnesting and error
1653
+ * // handling clutter.
1654
+ * app.get('/cats', function(request, response) {
1655
+ * var User = request.models.User;
1656
+ * async.seq(
1657
+ * _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data))
1658
+ * function(user, fn) {
1659
+ * user.getCats(fn); // 'getCats' has signature (callback(err, data))
1660
+ * }
1661
+ * )(req.session.user_id, function (err, cats) {
1662
+ * if (err) {
1663
+ * console.error(err);
1664
+ * response.json({ status: 'error', message: err.message });
1665
+ * } else {
1666
+ * response.json({ status: 'ok', message: 'Cats found', data: cats });
1667
+ * }
1668
+ * });
1669
+ * });
1670
+ */
1671
+ function seq(...functions) {
1672
+ var _functions = functions.map(wrapAsync);
1673
+ return function (...args) {
1674
+ var that = this;
1675
+
1676
+ var cb = args[args.length - 1];
1677
+ if (typeof cb == 'function') {
1678
+ args.pop();
1679
+ } else {
1680
+ cb = promiseCallback();
1681
+ }
1682
+
1683
+ reduce$1(_functions, args, (newargs, fn, iterCb) => {
1684
+ fn.apply(that, newargs.concat((err, ...nextargs) => {
1685
+ iterCb(err, nextargs);
1686
+ }));
1687
+ },
1688
+ (err, results) => cb(err, ...results));
1689
+
1690
+ return cb[PROMISE_SYMBOL]
1691
+ };
1692
+ }
1693
+
1694
+ /**
1695
+ * Creates a function which is a composition of the passed asynchronous
1696
+ * functions. Each function consumes the return value of the function that
1697
+ * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
1698
+ * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
1699
+ *
1700
+ * If the last argument to the composed function is not a function, a promise
1701
+ * is returned when you call it.
1702
+ *
1703
+ * Each function is executed with the `this` binding of the composed function.
1704
+ *
1705
+ * @name compose
1706
+ * @static
1707
+ * @memberOf module:ControlFlow
1708
+ * @method
1709
+ * @category Control Flow
1710
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
1711
+ * @returns {Function} an asynchronous function that is the composed
1712
+ * asynchronous `functions`
1713
+ * @example
1714
+ *
1715
+ * function add1(n, callback) {
1716
+ * setTimeout(function () {
1717
+ * callback(null, n + 1);
1718
+ * }, 10);
1719
+ * }
1720
+ *
1721
+ * function mul3(n, callback) {
1722
+ * setTimeout(function () {
1723
+ * callback(null, n * 3);
1724
+ * }, 10);
1725
+ * }
1726
+ *
1727
+ * var add1mul3 = async.compose(mul3, add1);
1728
+ * add1mul3(4, function (err, result) {
1729
+ * // result now equals 15
1730
+ * });
1731
+ */
1732
+ function compose(...args) {
1733
+ return seq(...args.reverse());
1734
+ }
1735
+
1736
+ /**
1737
+ * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
1738
+ *
1739
+ * @name mapLimit
1740
+ * @static
1741
+ * @memberOf module:Collections
1742
+ * @method
1743
+ * @see [async.map]{@link module:Collections.map}
1744
+ * @category Collection
1745
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1746
+ * @param {number} limit - The maximum number of async operations at a time.
1747
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
1748
+ * `coll`.
1749
+ * The iteratee should complete with the transformed item.
1750
+ * Invoked with (item, callback).
1751
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
1752
+ * functions have finished, or an error occurs. Results is an array of the
1753
+ * transformed items from the `coll`. Invoked with (err, results).
1754
+ * @returns {Promise} a promise, if no callback is passed
1755
+ */
1756
+ function mapLimit (coll, limit, iteratee, callback) {
1757
+ return _asyncMap(eachOfLimit(limit), coll, iteratee, callback)
1758
+ }
1759
+ var mapLimit$1 = awaitify(mapLimit, 4);
1760
+
1761
+ /**
1762
+ * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
1763
+ *
1764
+ * @name concatLimit
1765
+ * @static
1766
+ * @memberOf module:Collections
1767
+ * @method
1768
+ * @see [async.concat]{@link module:Collections.concat}
1769
+ * @category Collection
1770
+ * @alias flatMapLimit
1771
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1772
+ * @param {number} limit - The maximum number of async operations at a time.
1773
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
1774
+ * which should use an array as its result. Invoked with (item, callback).
1775
+ * @param {Function} [callback] - A callback which is called after all the
1776
+ * `iteratee` functions have finished, or an error occurs. Results is an array
1777
+ * containing the concatenated results of the `iteratee` function. Invoked with
1778
+ * (err, results).
1779
+ * @returns A Promise, if no callback is passed
1780
+ */
1781
+ function concatLimit(coll, limit, iteratee, callback) {
1782
+ var _iteratee = wrapAsync(iteratee);
1783
+ return mapLimit$1(coll, limit, (val, iterCb) => {
1784
+ _iteratee(val, (err, ...args) => {
1785
+ if (err) return iterCb(err);
1786
+ return iterCb(err, args);
1787
+ });
1788
+ }, (err, mapResults) => {
1789
+ var result = [];
1790
+ for (var i = 0; i < mapResults.length; i++) {
1791
+ if (mapResults[i]) {
1792
+ result = result.concat(...mapResults[i]);
1793
+ }
1794
+ }
1795
+
1796
+ return callback(err, result);
1797
+ });
1798
+ }
1799
+ var concatLimit$1 = awaitify(concatLimit, 4);
1800
+
1801
+ /**
1802
+ * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
1803
+ * the concatenated list. The `iteratee`s are called in parallel, and the
1804
+ * results are concatenated as they return. The results array will be returned in
1805
+ * the original order of `coll` passed to the `iteratee` function.
1806
+ *
1807
+ * @name concat
1808
+ * @static
1809
+ * @memberOf module:Collections
1810
+ * @method
1811
+ * @category Collection
1812
+ * @alias flatMap
1813
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1814
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
1815
+ * which should use an array as its result. Invoked with (item, callback).
1816
+ * @param {Function} [callback] - A callback which is called after all the
1817
+ * `iteratee` functions have finished, or an error occurs. Results is an array
1818
+ * containing the concatenated results of the `iteratee` function. Invoked with
1819
+ * (err, results).
1820
+ * @returns A Promise, if no callback is passed
1821
+ * @example
1822
+ *
1823
+ * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
1824
+ * // files is now a list of filenames that exist in the 3 directories
1825
+ * });
1826
+ */
1827
+ function concat(coll, iteratee, callback) {
1828
+ return concatLimit$1(coll, Infinity, iteratee, callback)
1829
+ }
1830
+ var concat$1 = awaitify(concat, 3);
1831
+
1832
+ /**
1833
+ * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
1834
+ *
1835
+ * @name concatSeries
1836
+ * @static
1837
+ * @memberOf module:Collections
1838
+ * @method
1839
+ * @see [async.concat]{@link module:Collections.concat}
1840
+ * @category Collection
1841
+ * @alias flatMapSeries
1842
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1843
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
1844
+ * The iteratee should complete with an array an array of results.
1845
+ * Invoked with (item, callback).
1846
+ * @param {Function} [callback] - A callback which is called after all the
1847
+ * `iteratee` functions have finished, or an error occurs. Results is an array
1848
+ * containing the concatenated results of the `iteratee` function. Invoked with
1849
+ * (err, results).
1850
+ * @returns A Promise, if no callback is passed
1851
+ */
1852
+ function concatSeries(coll, iteratee, callback) {
1853
+ return concatLimit$1(coll, 1, iteratee, callback)
1854
+ }
1855
+ var concatSeries$1 = awaitify(concatSeries, 3);
1856
+
1857
+ /**
1858
+ * Returns a function that when called, calls-back with the values provided.
1859
+ * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
1860
+ * [`auto`]{@link module:ControlFlow.auto}.
1861
+ *
1862
+ * @name constant
1863
+ * @static
1864
+ * @memberOf module:Utils
1865
+ * @method
1866
+ * @category Util
1867
+ * @param {...*} arguments... - Any number of arguments to automatically invoke
1868
+ * callback with.
1869
+ * @returns {AsyncFunction} Returns a function that when invoked, automatically
1870
+ * invokes the callback with the previous given arguments.
1871
+ * @example
1872
+ *
1873
+ * async.waterfall([
1874
+ * async.constant(42),
1875
+ * function (value, next) {
1876
+ * // value === 42
1877
+ * },
1878
+ * //...
1879
+ * ], callback);
1880
+ *
1881
+ * async.waterfall([
1882
+ * async.constant(filename, "utf8"),
1883
+ * fs.readFile,
1884
+ * function (fileData, next) {
1885
+ * //...
1886
+ * }
1887
+ * //...
1888
+ * ], callback);
1889
+ *
1890
+ * async.auto({
1891
+ * hostname: async.constant("https://server.net/"),
1892
+ * port: findFreePort,
1893
+ * launchServer: ["hostname", "port", function (options, cb) {
1894
+ * startServer(options, cb);
1895
+ * }],
1896
+ * //...
1897
+ * }, callback);
1898
+ */
1899
+ function constant(...args) {
1900
+ return function (...ignoredArgs/*, callback*/) {
1901
+ var callback = ignoredArgs.pop();
1902
+ return callback(null, ...args);
1903
+ };
1904
+ }
1905
+
1906
+ function _createTester(check, getResult) {
1907
+ return (eachfn, arr, _iteratee, cb) => {
1908
+ var testPassed = false;
1909
+ var testResult;
1910
+ const iteratee = wrapAsync(_iteratee);
1911
+ eachfn(arr, (value, _, callback) => {
1912
+ iteratee(value, (err, result) => {
1913
+ if (err || err === false) return callback(err);
1914
+
1915
+ if (check(result) && !testResult) {
1916
+ testPassed = true;
1917
+ testResult = getResult(true, value);
1918
+ return callback(null, breakLoop);
1919
+ }
1920
+ callback();
1921
+ });
1922
+ }, err => {
1923
+ if (err) return cb(err);
1924
+ cb(null, testPassed ? testResult : getResult(false));
1925
+ });
1926
+ };
1927
+ }
1928
+
1929
+ /**
1930
+ * Returns the first value in `coll` that passes an async truth test. The
1931
+ * `iteratee` is applied in parallel, meaning the first iteratee to return
1932
+ * `true` will fire the detect `callback` with that result. That means the
1933
+ * result might not be the first item in the original `coll` (in terms of order)
1934
+ * that passes the test.
1935
+
1936
+ * If order within the original `coll` is important, then look at
1937
+ * [`detectSeries`]{@link module:Collections.detectSeries}.
1938
+ *
1939
+ * @name detect
1940
+ * @static
1941
+ * @memberOf module:Collections
1942
+ * @method
1943
+ * @alias find
1944
+ * @category Collections
1945
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1946
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
1947
+ * The iteratee must complete with a boolean value as its result.
1948
+ * Invoked with (item, callback).
1949
+ * @param {Function} [callback] - A callback which is called as soon as any
1950
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
1951
+ * Result will be the first item in the array that passes the truth test
1952
+ * (iteratee) or the value `undefined` if none passed. Invoked with
1953
+ * (err, result).
1954
+ * @returns A Promise, if no callback is passed
1955
+ * @example
1956
+ *
1957
+ * async.detect(['file1','file2','file3'], function(filePath, callback) {
1958
+ * fs.access(filePath, function(err) {
1959
+ * callback(null, !err)
1960
+ * });
1961
+ * }, function(err, result) {
1962
+ * // result now equals the first file in the list that exists
1963
+ * });
1964
+ */
1965
+ function detect(coll, iteratee, callback) {
1966
+ return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback)
1967
+ }
1968
+ var detect$1 = awaitify(detect, 3);
1969
+
1970
+ /**
1971
+ * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
1972
+ * time.
1973
+ *
1974
+ * @name detectLimit
1975
+ * @static
1976
+ * @memberOf module:Collections
1977
+ * @method
1978
+ * @see [async.detect]{@link module:Collections.detect}
1979
+ * @alias findLimit
1980
+ * @category Collections
1981
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
1982
+ * @param {number} limit - The maximum number of async operations at a time.
1983
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
1984
+ * The iteratee must complete with a boolean value as its result.
1985
+ * Invoked with (item, callback).
1986
+ * @param {Function} [callback] - A callback which is called as soon as any
1987
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
1988
+ * Result will be the first item in the array that passes the truth test
1989
+ * (iteratee) or the value `undefined` if none passed. Invoked with
1990
+ * (err, result).
1991
+ * @returns a Promise if no callback is passed
1992
+ */
1993
+ function detectLimit(coll, limit, iteratee, callback) {
1994
+ return _createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback)
1995
+ }
1996
+ var detectLimit$1 = awaitify(detectLimit, 4);
1997
+
1998
+ /**
1999
+ * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
2000
+ *
2001
+ * @name detectSeries
2002
+ * @static
2003
+ * @memberOf module:Collections
2004
+ * @method
2005
+ * @see [async.detect]{@link module:Collections.detect}
2006
+ * @alias findSeries
2007
+ * @category Collections
2008
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2009
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
2010
+ * The iteratee must complete with a boolean value as its result.
2011
+ * Invoked with (item, callback).
2012
+ * @param {Function} [callback] - A callback which is called as soon as any
2013
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
2014
+ * Result will be the first item in the array that passes the truth test
2015
+ * (iteratee) or the value `undefined` if none passed. Invoked with
2016
+ * (err, result).
2017
+ * @returns a Promise if no callback is passed
2018
+ */
2019
+ function detectSeries(coll, iteratee, callback) {
2020
+ return _createTester(bool => bool, (res, item) => item)(eachOfLimit(1), coll, iteratee, callback)
2021
+ }
2022
+
2023
+ var detectSeries$1 = awaitify(detectSeries, 3);
2024
+
2025
+ function consoleFunc(name) {
2026
+ return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => {
2027
+ if (typeof console === 'object') {
2028
+ if (err) {
2029
+ if (console.error) {
2030
+ console.error(err);
2031
+ }
2032
+ } else if (console[name]) {
2033
+ resultArgs.forEach(x => console[name](x));
2034
+ }
2035
+ }
2036
+ })
2037
+ }
2038
+
2039
+ /**
2040
+ * Logs the result of an [`async` function]{@link AsyncFunction} to the
2041
+ * `console` using `console.dir` to display the properties of the resulting object.
2042
+ * Only works in Node.js or in browsers that support `console.dir` and
2043
+ * `console.error` (such as FF and Chrome).
2044
+ * If multiple arguments are returned from the async function,
2045
+ * `console.dir` is called on each argument in order.
2046
+ *
2047
+ * @name dir
2048
+ * @static
2049
+ * @memberOf module:Utils
2050
+ * @method
2051
+ * @category Util
2052
+ * @param {AsyncFunction} function - The function you want to eventually apply
2053
+ * all arguments to.
2054
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
2055
+ * @example
2056
+ *
2057
+ * // in a module
2058
+ * var hello = function(name, callback) {
2059
+ * setTimeout(function() {
2060
+ * callback(null, {hello: name});
2061
+ * }, 1000);
2062
+ * };
2063
+ *
2064
+ * // in the node repl
2065
+ * node> async.dir(hello, 'world');
2066
+ * {hello: 'world'}
2067
+ */
2068
+ var dir = consoleFunc('dir');
2069
+
2070
+ /**
2071
+ * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
2072
+ * the order of operations, the arguments `test` and `iteratee` are switched.
2073
+ *
2074
+ * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
2075
+ *
2076
+ * @name doWhilst
2077
+ * @static
2078
+ * @memberOf module:ControlFlow
2079
+ * @method
2080
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
2081
+ * @category Control Flow
2082
+ * @param {AsyncFunction} iteratee - A function which is called each time `test`
2083
+ * passes. Invoked with (callback).
2084
+ * @param {AsyncFunction} test - asynchronous truth test to perform after each
2085
+ * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
2086
+ * non-error args from the previous callback of `iteratee`.
2087
+ * @param {Function} [callback] - A callback which is called after the test
2088
+ * function has failed and repeated execution of `iteratee` has stopped.
2089
+ * `callback` will be passed an error and any arguments passed to the final
2090
+ * `iteratee`'s callback. Invoked with (err, [results]);
2091
+ * @returns {Promise} a promise, if no callback is passed
2092
+ */
2093
+ function doWhilst(iteratee, test, callback) {
2094
+ callback = onlyOnce(callback);
2095
+ var _fn = wrapAsync(iteratee);
2096
+ var _test = wrapAsync(test);
2097
+ var results;
2098
+
2099
+ function next(err, ...args) {
2100
+ if (err) return callback(err);
2101
+ if (err === false) return;
2102
+ results = args;
2103
+ _test(...args, check);
2104
+ }
2105
+
2106
+ function check(err, truth) {
2107
+ if (err) return callback(err);
2108
+ if (err === false) return;
2109
+ if (!truth) return callback(null, ...results);
2110
+ _fn(next);
2111
+ }
2112
+
2113
+ return check(null, true);
2114
+ }
2115
+
2116
+ var doWhilst$1 = awaitify(doWhilst, 3);
2117
+
2118
+ /**
2119
+ * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
2120
+ * argument ordering differs from `until`.
2121
+ *
2122
+ * @name doUntil
2123
+ * @static
2124
+ * @memberOf module:ControlFlow
2125
+ * @method
2126
+ * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
2127
+ * @category Control Flow
2128
+ * @param {AsyncFunction} iteratee - An async function which is called each time
2129
+ * `test` fails. Invoked with (callback).
2130
+ * @param {AsyncFunction} test - asynchronous truth test to perform after each
2131
+ * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
2132
+ * non-error args from the previous callback of `iteratee`
2133
+ * @param {Function} [callback] - A callback which is called after the test
2134
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
2135
+ * will be passed an error and any arguments passed to the final `iteratee`'s
2136
+ * callback. Invoked with (err, [results]);
2137
+ * @returns {Promise} a promise, if no callback is passed
2138
+ */
2139
+ function doUntil(iteratee, test, callback) {
2140
+ const _test = wrapAsync(test);
2141
+ return doWhilst$1(iteratee, (...args) => {
2142
+ const cb = args.pop();
2143
+ _test(...args, (err, truth) => cb (err, !truth));
2144
+ }, callback);
2145
+ }
2146
+
2147
+ function _withoutIndex(iteratee) {
2148
+ return (value, index, callback) => iteratee(value, callback);
2149
+ }
2150
+
2151
+ /**
2152
+ * Applies the function `iteratee` to each item in `coll`, in parallel.
2153
+ * The `iteratee` is called with an item from the list, and a callback for when
2154
+ * it has finished. If the `iteratee` passes an error to its `callback`, the
2155
+ * main `callback` (for the `each` function) is immediately called with the
2156
+ * error.
2157
+ *
2158
+ * Note, that since this function applies `iteratee` to each item in parallel,
2159
+ * there is no guarantee that the iteratee functions will complete in order.
2160
+ *
2161
+ * @name each
2162
+ * @static
2163
+ * @memberOf module:Collections
2164
+ * @method
2165
+ * @alias forEach
2166
+ * @category Collection
2167
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2168
+ * @param {AsyncFunction} iteratee - An async function to apply to
2169
+ * each item in `coll`. Invoked with (item, callback).
2170
+ * The array index is not passed to the iteratee.
2171
+ * If you need the index, use `eachOf`.
2172
+ * @param {Function} [callback] - A callback which is called when all
2173
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
2174
+ * @returns {Promise} a promise, if a callback is omitted
2175
+ * @example
2176
+ *
2177
+ * // assuming openFiles is an array of file names and saveFile is a function
2178
+ * // to save the modified contents of that file:
2179
+ *
2180
+ * async.each(openFiles, saveFile, function(err){
2181
+ * // if any of the saves produced an error, err would equal that error
2182
+ * });
2183
+ *
2184
+ * // assuming openFiles is an array of file names
2185
+ * async.each(openFiles, function(file, callback) {
2186
+ *
2187
+ * // Perform operation on file here.
2188
+ * console.log('Processing file ' + file);
2189
+ *
2190
+ * if( file.length > 32 ) {
2191
+ * console.log('This file name is too long');
2192
+ * callback('File name too long');
2193
+ * } else {
2194
+ * // Do work to process file here
2195
+ * console.log('File processed');
2196
+ * callback();
2197
+ * }
2198
+ * }, function(err) {
2199
+ * // if any of the file processing produced an error, err would equal that error
2200
+ * if( err ) {
2201
+ * // One of the iterations produced an error.
2202
+ * // All processing will now stop.
2203
+ * console.log('A file failed to process');
2204
+ * } else {
2205
+ * console.log('All files have been processed successfully');
2206
+ * }
2207
+ * });
2208
+ */
2209
+ function eachLimit(coll, iteratee, callback) {
2210
+ return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback);
2211
+ }
2212
+
2213
+ var each = awaitify(eachLimit, 3);
2214
+
2215
+ /**
2216
+ * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
2217
+ *
2218
+ * @name eachLimit
2219
+ * @static
2220
+ * @memberOf module:Collections
2221
+ * @method
2222
+ * @see [async.each]{@link module:Collections.each}
2223
+ * @alias forEachLimit
2224
+ * @category Collection
2225
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2226
+ * @param {number} limit - The maximum number of async operations at a time.
2227
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
2228
+ * `coll`.
2229
+ * The array index is not passed to the iteratee.
2230
+ * If you need the index, use `eachOfLimit`.
2231
+ * Invoked with (item, callback).
2232
+ * @param {Function} [callback] - A callback which is called when all
2233
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
2234
+ * @returns {Promise} a promise, if a callback is omitted
2235
+ */
2236
+ function eachLimit$1(coll, limit, iteratee, callback) {
2237
+ return eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
2238
+ }
2239
+ var eachLimit$2 = awaitify(eachLimit$1, 4);
2240
+
2241
+ /**
2242
+ * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
2243
+ *
2244
+ * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item
2245
+ * in series and therefore the iteratee functions will complete in order.
2246
+
2247
+ * @name eachSeries
2248
+ * @static
2249
+ * @memberOf module:Collections
2250
+ * @method
2251
+ * @see [async.each]{@link module:Collections.each}
2252
+ * @alias forEachSeries
2253
+ * @category Collection
2254
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2255
+ * @param {AsyncFunction} iteratee - An async function to apply to each
2256
+ * item in `coll`.
2257
+ * The array index is not passed to the iteratee.
2258
+ * If you need the index, use `eachOfSeries`.
2259
+ * Invoked with (item, callback).
2260
+ * @param {Function} [callback] - A callback which is called when all
2261
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
2262
+ * @returns {Promise} a promise, if a callback is omitted
2263
+ */
2264
+ function eachSeries(coll, iteratee, callback) {
2265
+ return eachLimit$2(coll, 1, iteratee, callback)
2266
+ }
2267
+ var eachSeries$1 = awaitify(eachSeries, 3);
2268
+
2269
+ /**
2270
+ * Wrap an async function and ensure it calls its callback on a later tick of
2271
+ * the event loop. If the function already calls its callback on a next tick,
2272
+ * no extra deferral is added. This is useful for preventing stack overflows
2273
+ * (`RangeError: Maximum call stack size exceeded`) and generally keeping
2274
+ * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
2275
+ * contained. ES2017 `async` functions are returned as-is -- they are immune
2276
+ * to Zalgo's corrupting influences, as they always resolve on a later tick.
2277
+ *
2278
+ * @name ensureAsync
2279
+ * @static
2280
+ * @memberOf module:Utils
2281
+ * @method
2282
+ * @category Util
2283
+ * @param {AsyncFunction} fn - an async function, one that expects a node-style
2284
+ * callback as its last argument.
2285
+ * @returns {AsyncFunction} Returns a wrapped function with the exact same call
2286
+ * signature as the function passed in.
2287
+ * @example
2288
+ *
2289
+ * function sometimesAsync(arg, callback) {
2290
+ * if (cache[arg]) {
2291
+ * return callback(null, cache[arg]); // this would be synchronous!!
2292
+ * } else {
2293
+ * doSomeIO(arg, callback); // this IO would be asynchronous
2294
+ * }
2295
+ * }
2296
+ *
2297
+ * // this has a risk of stack overflows if many results are cached in a row
2298
+ * async.mapSeries(args, sometimesAsync, done);
2299
+ *
2300
+ * // this will defer sometimesAsync's callback if necessary,
2301
+ * // preventing stack overflows
2302
+ * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
2303
+ */
2304
+ function ensureAsync(fn) {
2305
+ if (isAsync(fn)) return fn;
2306
+ return function (...args/*, callback*/) {
2307
+ var callback = args.pop();
2308
+ var sync = true;
2309
+ args.push((...innerArgs) => {
2310
+ if (sync) {
2311
+ setImmediate$1(() => callback(...innerArgs));
2312
+ } else {
2313
+ callback(...innerArgs);
2314
+ }
2315
+ });
2316
+ fn.apply(this, args);
2317
+ sync = false;
2318
+ };
2319
+ }
2320
+
2321
+ /**
2322
+ * Returns `true` if every element in `coll` satisfies an async test. If any
2323
+ * iteratee call returns `false`, the main `callback` is immediately called.
2324
+ *
2325
+ * @name every
2326
+ * @static
2327
+ * @memberOf module:Collections
2328
+ * @method
2329
+ * @alias all
2330
+ * @category Collection
2331
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2332
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
2333
+ * in the collection in parallel.
2334
+ * The iteratee must complete with a boolean result value.
2335
+ * Invoked with (item, callback).
2336
+ * @param {Function} [callback] - A callback which is called after all the
2337
+ * `iteratee` functions have finished. Result will be either `true` or `false`
2338
+ * depending on the values of the async tests. Invoked with (err, result).
2339
+ * @returns {Promise} a promise, if no callback provided
2340
+ * @example
2341
+ *
2342
+ * async.every(['file1','file2','file3'], function(filePath, callback) {
2343
+ * fs.access(filePath, function(err) {
2344
+ * callback(null, !err)
2345
+ * });
2346
+ * }, function(err, result) {
2347
+ * // if result is true then every file exists
2348
+ * });
2349
+ */
2350
+ function every(coll, iteratee, callback) {
2351
+ return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback)
2352
+ }
2353
+ var every$1 = awaitify(every, 3);
2354
+
2355
+ /**
2356
+ * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
2357
+ *
2358
+ * @name everyLimit
2359
+ * @static
2360
+ * @memberOf module:Collections
2361
+ * @method
2362
+ * @see [async.every]{@link module:Collections.every}
2363
+ * @alias allLimit
2364
+ * @category Collection
2365
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2366
+ * @param {number} limit - The maximum number of async operations at a time.
2367
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
2368
+ * in the collection in parallel.
2369
+ * The iteratee must complete with a boolean result value.
2370
+ * Invoked with (item, callback).
2371
+ * @param {Function} [callback] - A callback which is called after all the
2372
+ * `iteratee` functions have finished. Result will be either `true` or `false`
2373
+ * depending on the values of the async tests. Invoked with (err, result).
2374
+ * @returns {Promise} a promise, if no callback provided
2375
+ */
2376
+ function everyLimit(coll, limit, iteratee, callback) {
2377
+ return _createTester(bool => !bool, res => !res)(eachOfLimit(limit), coll, iteratee, callback)
2378
+ }
2379
+ var everyLimit$1 = awaitify(everyLimit, 4);
2380
+
2381
+ /**
2382
+ * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
2383
+ *
2384
+ * @name everySeries
2385
+ * @static
2386
+ * @memberOf module:Collections
2387
+ * @method
2388
+ * @see [async.every]{@link module:Collections.every}
2389
+ * @alias allSeries
2390
+ * @category Collection
2391
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2392
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
2393
+ * in the collection in series.
2394
+ * The iteratee must complete with a boolean result value.
2395
+ * Invoked with (item, callback).
2396
+ * @param {Function} [callback] - A callback which is called after all the
2397
+ * `iteratee` functions have finished. Result will be either `true` or `false`
2398
+ * depending on the values of the async tests. Invoked with (err, result).
2399
+ * @returns {Promise} a promise, if no callback provided
2400
+ */
2401
+ function everySeries(coll, iteratee, callback) {
2402
+ return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback)
2403
+ }
2404
+ var everySeries$1 = awaitify(everySeries, 3);
2405
+
2406
+ function filterArray(eachfn, arr, iteratee, callback) {
2407
+ var truthValues = new Array(arr.length);
2408
+ eachfn(arr, (x, index, iterCb) => {
2409
+ iteratee(x, (err, v) => {
2410
+ truthValues[index] = !!v;
2411
+ iterCb(err);
2412
+ });
2413
+ }, err => {
2414
+ if (err) return callback(err);
2415
+ var results = [];
2416
+ for (var i = 0; i < arr.length; i++) {
2417
+ if (truthValues[i]) results.push(arr[i]);
2418
+ }
2419
+ callback(null, results);
2420
+ });
2421
+ }
2422
+
2423
+ function filterGeneric(eachfn, coll, iteratee, callback) {
2424
+ var results = [];
2425
+ eachfn(coll, (x, index, iterCb) => {
2426
+ iteratee(x, (err, v) => {
2427
+ if (err) return iterCb(err);
2428
+ if (v) {
2429
+ results.push({index, value: x});
2430
+ }
2431
+ iterCb(err);
2432
+ });
2433
+ }, err => {
2434
+ if (err) return callback(err);
2435
+ callback(null, results
2436
+ .sort((a, b) => a.index - b.index)
2437
+ .map(v => v.value));
2438
+ });
2439
+ }
2440
+
2441
+ function _filter(eachfn, coll, iteratee, callback) {
2442
+ var filter = isArrayLike(coll) ? filterArray : filterGeneric;
2443
+ return filter(eachfn, coll, wrapAsync(iteratee), callback);
2444
+ }
2445
+
2446
+ /**
2447
+ * Returns a new array of all the values in `coll` which pass an async truth
2448
+ * test. This operation is performed in parallel, but the results array will be
2449
+ * in the same order as the original.
2450
+ *
2451
+ * @name filter
2452
+ * @static
2453
+ * @memberOf module:Collections
2454
+ * @method
2455
+ * @alias select
2456
+ * @category Collection
2457
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2458
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
2459
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
2460
+ * with a boolean argument once it has completed. Invoked with (item, callback).
2461
+ * @param {Function} [callback] - A callback which is called after all the
2462
+ * `iteratee` functions have finished. Invoked with (err, results).
2463
+ * @returns {Promise} a promise, if no callback provided
2464
+ * @example
2465
+ *
2466
+ * async.filter(['file1','file2','file3'], function(filePath, callback) {
2467
+ * fs.access(filePath, function(err) {
2468
+ * callback(null, !err)
2469
+ * });
2470
+ * }, function(err, results) {
2471
+ * // results now equals an array of the existing files
2472
+ * });
2473
+ */
2474
+ function filter (coll, iteratee, callback) {
2475
+ return _filter(eachOf$1, coll, iteratee, callback)
2476
+ }
2477
+ var filter$1 = awaitify(filter, 3);
2478
+
2479
+ /**
2480
+ * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
2481
+ * time.
2482
+ *
2483
+ * @name filterLimit
2484
+ * @static
2485
+ * @memberOf module:Collections
2486
+ * @method
2487
+ * @see [async.filter]{@link module:Collections.filter}
2488
+ * @alias selectLimit
2489
+ * @category Collection
2490
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2491
+ * @param {number} limit - The maximum number of async operations at a time.
2492
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
2493
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
2494
+ * with a boolean argument once it has completed. Invoked with (item, callback).
2495
+ * @param {Function} [callback] - A callback which is called after all the
2496
+ * `iteratee` functions have finished. Invoked with (err, results).
2497
+ * @returns {Promise} a promise, if no callback provided
2498
+ */
2499
+ function filterLimit (coll, limit, iteratee, callback) {
2500
+ return _filter(eachOfLimit(limit), coll, iteratee, callback)
2501
+ }
2502
+ var filterLimit$1 = awaitify(filterLimit, 4);
2503
+
2504
+ /**
2505
+ * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
2506
+ *
2507
+ * @name filterSeries
2508
+ * @static
2509
+ * @memberOf module:Collections
2510
+ * @method
2511
+ * @see [async.filter]{@link module:Collections.filter}
2512
+ * @alias selectSeries
2513
+ * @category Collection
2514
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2515
+ * @param {Function} iteratee - A truth test to apply to each item in `coll`.
2516
+ * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
2517
+ * with a boolean argument once it has completed. Invoked with (item, callback).
2518
+ * @param {Function} [callback] - A callback which is called after all the
2519
+ * `iteratee` functions have finished. Invoked with (err, results)
2520
+ * @returns {Promise} a promise, if no callback provided
2521
+ */
2522
+ function filterSeries (coll, iteratee, callback) {
2523
+ return _filter(eachOfSeries$1, coll, iteratee, callback)
2524
+ }
2525
+ var filterSeries$1 = awaitify(filterSeries, 3);
2526
+
2527
+ /**
2528
+ * Calls the asynchronous function `fn` with a callback parameter that allows it
2529
+ * to call itself again, in series, indefinitely.
2530
+
2531
+ * If an error is passed to the callback then `errback` is called with the
2532
+ * error, and execution stops, otherwise it will never be called.
2533
+ *
2534
+ * @name forever
2535
+ * @static
2536
+ * @memberOf module:ControlFlow
2537
+ * @method
2538
+ * @category Control Flow
2539
+ * @param {AsyncFunction} fn - an async function to call repeatedly.
2540
+ * Invoked with (next).
2541
+ * @param {Function} [errback] - when `fn` passes an error to it's callback,
2542
+ * this function will be called, and execution stops. Invoked with (err).
2543
+ * @returns {Promise} a promise that rejects if an error occurs and an errback
2544
+ * is not passed
2545
+ * @example
2546
+ *
2547
+ * async.forever(
2548
+ * function(next) {
2549
+ * // next is suitable for passing to things that need a callback(err [, whatever]);
2550
+ * // it will result in this function being called again.
2551
+ * },
2552
+ * function(err) {
2553
+ * // if next is called with a value in its first parameter, it will appear
2554
+ * // in here as 'err', and execution will stop.
2555
+ * }
2556
+ * );
2557
+ */
2558
+ function forever(fn, errback) {
2559
+ var done = onlyOnce(errback);
2560
+ var task = wrapAsync(ensureAsync(fn));
2561
+
2562
+ function next(err) {
2563
+ if (err) return done(err);
2564
+ if (err === false) return;
2565
+ task(next);
2566
+ }
2567
+ return next();
2568
+ }
2569
+ var forever$1 = awaitify(forever, 2);
2570
+
2571
+ /**
2572
+ * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
2573
+ *
2574
+ * @name groupByLimit
2575
+ * @static
2576
+ * @memberOf module:Collections
2577
+ * @method
2578
+ * @see [async.groupBy]{@link module:Collections.groupBy}
2579
+ * @category Collection
2580
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2581
+ * @param {number} limit - The maximum number of async operations at a time.
2582
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
2583
+ * `coll`.
2584
+ * The iteratee should complete with a `key` to group the value under.
2585
+ * Invoked with (value, callback).
2586
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2587
+ * functions have finished, or an error occurs. Result is an `Object` whoses
2588
+ * properties are arrays of values which returned the corresponding key.
2589
+ * @returns {Promise} a promise, if no callback is passed
2590
+ */
2591
+ function groupByLimit(coll, limit, iteratee, callback) {
2592
+ var _iteratee = wrapAsync(iteratee);
2593
+ return mapLimit$1(coll, limit, (val, iterCb) => {
2594
+ _iteratee(val, (err, key) => {
2595
+ if (err) return iterCb(err);
2596
+ return iterCb(err, {key, val});
2597
+ });
2598
+ }, (err, mapResults) => {
2599
+ var result = {};
2600
+ // from MDN, handle object having an `hasOwnProperty` prop
2601
+ var {hasOwnProperty} = Object.prototype;
2602
+
2603
+ for (var i = 0; i < mapResults.length; i++) {
2604
+ if (mapResults[i]) {
2605
+ var {key} = mapResults[i];
2606
+ var {val} = mapResults[i];
2607
+
2608
+ if (hasOwnProperty.call(result, key)) {
2609
+ result[key].push(val);
2610
+ } else {
2611
+ result[key] = [val];
2612
+ }
2613
+ }
2614
+ }
2615
+
2616
+ return callback(err, result);
2617
+ });
2618
+ }
2619
+
2620
+ var groupByLimit$1 = awaitify(groupByLimit, 4);
2621
+
2622
+ /**
2623
+ * Returns a new object, where each value corresponds to an array of items, from
2624
+ * `coll`, that returned the corresponding key. That is, the keys of the object
2625
+ * correspond to the values passed to the `iteratee` callback.
2626
+ *
2627
+ * Note: Since this function applies the `iteratee` to each item in parallel,
2628
+ * there is no guarantee that the `iteratee` functions will complete in order.
2629
+ * However, the values for each key in the `result` will be in the same order as
2630
+ * the original `coll`. For Objects, the values will roughly be in the order of
2631
+ * the original Objects' keys (but this can vary across JavaScript engines).
2632
+ *
2633
+ * @name groupBy
2634
+ * @static
2635
+ * @memberOf module:Collections
2636
+ * @method
2637
+ * @category Collection
2638
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2639
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
2640
+ * `coll`.
2641
+ * The iteratee should complete with a `key` to group the value under.
2642
+ * Invoked with (value, callback).
2643
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2644
+ * functions have finished, or an error occurs. Result is an `Object` whoses
2645
+ * properties are arrays of values which returned the corresponding key.
2646
+ * @returns {Promise} a promise, if no callback is passed
2647
+ * @example
2648
+ *
2649
+ * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
2650
+ * db.findById(userId, function(err, user) {
2651
+ * if (err) return callback(err);
2652
+ * return callback(null, user.age);
2653
+ * });
2654
+ * }, function(err, result) {
2655
+ * // result is object containing the userIds grouped by age
2656
+ * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
2657
+ * });
2658
+ */
2659
+ function groupBy (coll, iteratee, callback) {
2660
+ return groupByLimit$1(coll, Infinity, iteratee, callback)
2661
+ }
2662
+
2663
+ /**
2664
+ * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
2665
+ *
2666
+ * @name groupBySeries
2667
+ * @static
2668
+ * @memberOf module:Collections
2669
+ * @method
2670
+ * @see [async.groupBy]{@link module:Collections.groupBy}
2671
+ * @category Collection
2672
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
2673
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
2674
+ * `coll`.
2675
+ * The iteratee should complete with a `key` to group the value under.
2676
+ * Invoked with (value, callback).
2677
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2678
+ * functions have finished, or an error occurs. Result is an `Object` whoses
2679
+ * properties are arrays of values which returned the corresponding key.
2680
+ * @returns {Promise} a promise, if no callback is passed
2681
+ */
2682
+ function groupBySeries (coll, iteratee, callback) {
2683
+ return groupByLimit$1(coll, 1, iteratee, callback)
2684
+ }
2685
+
2686
+ /**
2687
+ * Logs the result of an `async` function to the `console`. Only works in
2688
+ * Node.js or in browsers that support `console.log` and `console.error` (such
2689
+ * as FF and Chrome). If multiple arguments are returned from the async
2690
+ * function, `console.log` is called on each argument in order.
2691
+ *
2692
+ * @name log
2693
+ * @static
2694
+ * @memberOf module:Utils
2695
+ * @method
2696
+ * @category Util
2697
+ * @param {AsyncFunction} function - The function you want to eventually apply
2698
+ * all arguments to.
2699
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
2700
+ * @example
2701
+ *
2702
+ * // in a module
2703
+ * var hello = function(name, callback) {
2704
+ * setTimeout(function() {
2705
+ * callback(null, 'hello ' + name);
2706
+ * }, 1000);
2707
+ * };
2708
+ *
2709
+ * // in the node repl
2710
+ * node> async.log(hello, 'world');
2711
+ * 'hello world'
2712
+ */
2713
+ var log = consoleFunc('log');
2714
+
2715
+ /**
2716
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
2717
+ * time.
2718
+ *
2719
+ * @name mapValuesLimit
2720
+ * @static
2721
+ * @memberOf module:Collections
2722
+ * @method
2723
+ * @see [async.mapValues]{@link module:Collections.mapValues}
2724
+ * @category Collection
2725
+ * @param {Object} obj - A collection to iterate over.
2726
+ * @param {number} limit - The maximum number of async operations at a time.
2727
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
2728
+ * in `coll`.
2729
+ * The iteratee should complete with the transformed value as its result.
2730
+ * Invoked with (value, key, callback).
2731
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2732
+ * functions have finished, or an error occurs. `result` is a new object consisting
2733
+ * of each key from `obj`, with each transformed value on the right-hand side.
2734
+ * Invoked with (err, result).
2735
+ * @returns {Promise} a promise, if no callback is passed
2736
+ */
2737
+ function mapValuesLimit(obj, limit, iteratee, callback) {
2738
+ callback = once(callback);
2739
+ var newObj = {};
2740
+ var _iteratee = wrapAsync(iteratee);
2741
+ return eachOfLimit(limit)(obj, (val, key, next) => {
2742
+ _iteratee(val, key, (err, result) => {
2743
+ if (err) return next(err);
2744
+ newObj[key] = result;
2745
+ next(err);
2746
+ });
2747
+ }, err => callback(err, newObj));
2748
+ }
2749
+
2750
+ var mapValuesLimit$1 = awaitify(mapValuesLimit, 4);
2751
+
2752
+ /**
2753
+ * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
2754
+ *
2755
+ * Produces a new Object by mapping each value of `obj` through the `iteratee`
2756
+ * function. The `iteratee` is called each `value` and `key` from `obj` and a
2757
+ * callback for when it has finished processing. Each of these callbacks takes
2758
+ * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
2759
+ * passes an error to its callback, the main `callback` (for the `mapValues`
2760
+ * function) is immediately called with the error.
2761
+ *
2762
+ * Note, the order of the keys in the result is not guaranteed. The keys will
2763
+ * be roughly in the order they complete, (but this is very engine-specific)
2764
+ *
2765
+ * @name mapValues
2766
+ * @static
2767
+ * @memberOf module:Collections
2768
+ * @method
2769
+ * @category Collection
2770
+ * @param {Object} obj - A collection to iterate over.
2771
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
2772
+ * in `coll`.
2773
+ * The iteratee should complete with the transformed value as its result.
2774
+ * Invoked with (value, key, callback).
2775
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2776
+ * functions have finished, or an error occurs. `result` is a new object consisting
2777
+ * of each key from `obj`, with each transformed value on the right-hand side.
2778
+ * Invoked with (err, result).
2779
+ * @returns {Promise} a promise, if no callback is passed
2780
+ * @example
2781
+ *
2782
+ * async.mapValues({
2783
+ * f1: 'file1',
2784
+ * f2: 'file2',
2785
+ * f3: 'file3'
2786
+ * }, function (file, key, callback) {
2787
+ * fs.stat(file, callback);
2788
+ * }, function(err, result) {
2789
+ * // result is now a map of stats for each file, e.g.
2790
+ * // {
2791
+ * // f1: [stats for file1],
2792
+ * // f2: [stats for file2],
2793
+ * // f3: [stats for file3]
2794
+ * // }
2795
+ * });
2796
+ */
2797
+ function mapValues(obj, iteratee, callback) {
2798
+ return mapValuesLimit$1(obj, Infinity, iteratee, callback)
2799
+ }
2800
+
2801
+ /**
2802
+ * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
2803
+ *
2804
+ * @name mapValuesSeries
2805
+ * @static
2806
+ * @memberOf module:Collections
2807
+ * @method
2808
+ * @see [async.mapValues]{@link module:Collections.mapValues}
2809
+ * @category Collection
2810
+ * @param {Object} obj - A collection to iterate over.
2811
+ * @param {AsyncFunction} iteratee - A function to apply to each value and key
2812
+ * in `coll`.
2813
+ * The iteratee should complete with the transformed value as its result.
2814
+ * Invoked with (value, key, callback).
2815
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
2816
+ * functions have finished, or an error occurs. `result` is a new object consisting
2817
+ * of each key from `obj`, with each transformed value on the right-hand side.
2818
+ * Invoked with (err, result).
2819
+ * @returns {Promise} a promise, if no callback is passed
2820
+ */
2821
+ function mapValuesSeries(obj, iteratee, callback) {
2822
+ return mapValuesLimit$1(obj, 1, iteratee, callback)
2823
+ }
2824
+
2825
+ /**
2826
+ * Caches the results of an async function. When creating a hash to store
2827
+ * function results against, the callback is omitted from the hash and an
2828
+ * optional hash function can be used.
2829
+ *
2830
+ * **Note: if the async function errs, the result will not be cached and
2831
+ * subsequent calls will call the wrapped function.**
2832
+ *
2833
+ * If no hash function is specified, the first argument is used as a hash key,
2834
+ * which may work reasonably if it is a string or a data type that converts to a
2835
+ * distinct string. Note that objects and arrays will not behave reasonably.
2836
+ * Neither will cases where the other arguments are significant. In such cases,
2837
+ * specify your own hash function.
2838
+ *
2839
+ * The cache of results is exposed as the `memo` property of the function
2840
+ * returned by `memoize`.
2841
+ *
2842
+ * @name memoize
2843
+ * @static
2844
+ * @memberOf module:Utils
2845
+ * @method
2846
+ * @category Util
2847
+ * @param {AsyncFunction} fn - The async function to proxy and cache results from.
2848
+ * @param {Function} hasher - An optional function for generating a custom hash
2849
+ * for storing results. It has all the arguments applied to it apart from the
2850
+ * callback, and must be synchronous.
2851
+ * @returns {AsyncFunction} a memoized version of `fn`
2852
+ * @example
2853
+ *
2854
+ * var slow_fn = function(name, callback) {
2855
+ * // do something
2856
+ * callback(null, result);
2857
+ * };
2858
+ * var fn = async.memoize(slow_fn);
2859
+ *
2860
+ * // fn can now be used as if it were slow_fn
2861
+ * fn('some name', function() {
2862
+ * // callback
2863
+ * });
2864
+ */
2865
+ function memoize(fn, hasher = v => v) {
2866
+ var memo = Object.create(null);
2867
+ var queues = Object.create(null);
2868
+ var _fn = wrapAsync(fn);
2869
+ var memoized = initialParams((args, callback) => {
2870
+ var key = hasher(...args);
2871
+ if (key in memo) {
2872
+ setImmediate$1(() => callback(null, ...memo[key]));
2873
+ } else if (key in queues) {
2874
+ queues[key].push(callback);
2875
+ } else {
2876
+ queues[key] = [callback];
2877
+ _fn(...args, (err, ...resultArgs) => {
2878
+ // #1465 don't memoize if an error occurred
2879
+ if (!err) {
2880
+ memo[key] = resultArgs;
2881
+ }
2882
+ var q = queues[key];
2883
+ delete queues[key];
2884
+ for (var i = 0, l = q.length; i < l; i++) {
2885
+ q[i](err, ...resultArgs);
2886
+ }
2887
+ });
2888
+ }
2889
+ });
2890
+ memoized.memo = memo;
2891
+ memoized.unmemoized = fn;
2892
+ return memoized;
2893
+ }
2894
+
2895
+ /**
2896
+ * Calls `callback` on a later loop around the event loop. In Node.js this just
2897
+ * calls `process.nextTick`. In the browser it will use `setImmediate` if
2898
+ * available, otherwise `setTimeout(callback, 0)`, which means other higher
2899
+ * priority events may precede the execution of `callback`.
2900
+ *
2901
+ * This is used internally for browser-compatibility purposes.
2902
+ *
2903
+ * @name nextTick
2904
+ * @static
2905
+ * @memberOf module:Utils
2906
+ * @method
2907
+ * @see [async.setImmediate]{@link module:Utils.setImmediate}
2908
+ * @category Util
2909
+ * @param {Function} callback - The function to call on a later loop around
2910
+ * the event loop. Invoked with (args...).
2911
+ * @param {...*} args... - any number of additional arguments to pass to the
2912
+ * callback on the next tick.
2913
+ * @example
2914
+ *
2915
+ * var call_order = [];
2916
+ * async.nextTick(function() {
2917
+ * call_order.push('two');
2918
+ * // call_order now equals ['one','two']
2919
+ * });
2920
+ * call_order.push('one');
2921
+ *
2922
+ * async.setImmediate(function (a, b, c) {
2923
+ * // a, b, and c equal 1, 2, and 3
2924
+ * }, 1, 2, 3);
2925
+ */
2926
+ var _defer$1;
2927
+
2928
+ if (hasNextTick) {
2929
+ _defer$1 = process.nextTick;
2930
+ } else if (hasSetImmediate) {
2931
+ _defer$1 = setImmediate;
2932
+ } else {
2933
+ _defer$1 = fallback;
2934
+ }
2935
+
2936
+ var nextTick = wrap(_defer$1);
2937
+
2938
+ var _parallel = awaitify((eachfn, tasks, callback) => {
2939
+ var results = isArrayLike(tasks) ? [] : {};
2940
+
2941
+ eachfn(tasks, (task, key, taskCb) => {
2942
+ wrapAsync(task)((err, ...result) => {
2943
+ if (result.length < 2) {
2944
+ [result] = result;
2945
+ }
2946
+ results[key] = result;
2947
+ taskCb(err);
2948
+ });
2949
+ }, err => callback(err, results));
2950
+ }, 3);
2951
+
2952
+ /**
2953
+ * Run the `tasks` collection of functions in parallel, without waiting until
2954
+ * the previous function has completed. If any of the functions pass an error to
2955
+ * its callback, the main `callback` is immediately called with the value of the
2956
+ * error. Once the `tasks` have completed, the results are passed to the final
2957
+ * `callback` as an array.
2958
+ *
2959
+ * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
2960
+ * parallel execution of code. If your tasks do not use any timers or perform
2961
+ * any I/O, they will actually be executed in series. Any synchronous setup
2962
+ * sections for each task will happen one after the other. JavaScript remains
2963
+ * single-threaded.
2964
+ *
2965
+ * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
2966
+ * execution of other tasks when a task fails.
2967
+ *
2968
+ * It is also possible to use an object instead of an array. Each property will
2969
+ * be run as a function and the results will be passed to the final `callback`
2970
+ * as an object instead of an array. This can be a more readable way of handling
2971
+ * results from {@link async.parallel}.
2972
+ *
2973
+ * @name parallel
2974
+ * @static
2975
+ * @memberOf module:ControlFlow
2976
+ * @method
2977
+ * @category Control Flow
2978
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
2979
+ * [async functions]{@link AsyncFunction} to run.
2980
+ * Each async function can complete with any number of optional `result` values.
2981
+ * @param {Function} [callback] - An optional callback to run once all the
2982
+ * functions have completed successfully. This function gets a results array
2983
+ * (or object) containing all the result arguments passed to the task callbacks.
2984
+ * Invoked with (err, results).
2985
+ * @returns {Promise} a promise, if a callback is not passed
2986
+ *
2987
+ * @example
2988
+ * async.parallel([
2989
+ * function(callback) {
2990
+ * setTimeout(function() {
2991
+ * callback(null, 'one');
2992
+ * }, 200);
2993
+ * },
2994
+ * function(callback) {
2995
+ * setTimeout(function() {
2996
+ * callback(null, 'two');
2997
+ * }, 100);
2998
+ * }
2999
+ * ],
3000
+ * // optional callback
3001
+ * function(err, results) {
3002
+ * // the results array will equal ['one','two'] even though
3003
+ * // the second function had a shorter timeout.
3004
+ * });
3005
+ *
3006
+ * // an example using an object instead of an array
3007
+ * async.parallel({
3008
+ * one: function(callback) {
3009
+ * setTimeout(function() {
3010
+ * callback(null, 1);
3011
+ * }, 200);
3012
+ * },
3013
+ * two: function(callback) {
3014
+ * setTimeout(function() {
3015
+ * callback(null, 2);
3016
+ * }, 100);
3017
+ * }
3018
+ * }, function(err, results) {
3019
+ * // results is now equals to: {one: 1, two: 2}
3020
+ * });
3021
+ */
3022
+ function parallel(tasks, callback) {
3023
+ return _parallel(eachOf$1, tasks, callback);
3024
+ }
3025
+
3026
+ /**
3027
+ * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
3028
+ * time.
3029
+ *
3030
+ * @name parallelLimit
3031
+ * @static
3032
+ * @memberOf module:ControlFlow
3033
+ * @method
3034
+ * @see [async.parallel]{@link module:ControlFlow.parallel}
3035
+ * @category Control Flow
3036
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
3037
+ * [async functions]{@link AsyncFunction} to run.
3038
+ * Each async function can complete with any number of optional `result` values.
3039
+ * @param {number} limit - The maximum number of async operations at a time.
3040
+ * @param {Function} [callback] - An optional callback to run once all the
3041
+ * functions have completed successfully. This function gets a results array
3042
+ * (or object) containing all the result arguments passed to the task callbacks.
3043
+ * Invoked with (err, results).
3044
+ * @returns {Promise} a promise, if a callback is not passed
3045
+ */
3046
+ function parallelLimit(tasks, limit, callback) {
3047
+ return _parallel(eachOfLimit(limit), tasks, callback);
3048
+ }
3049
+
3050
+ /**
3051
+ * A queue of tasks for the worker function to complete.
3052
+ * @typedef {Iterable} QueueObject
3053
+ * @memberOf module:ControlFlow
3054
+ * @property {Function} length - a function returning the number of items
3055
+ * waiting to be processed. Invoke with `queue.length()`.
3056
+ * @property {boolean} started - a boolean indicating whether or not any
3057
+ * items have been pushed and processed by the queue.
3058
+ * @property {Function} running - a function returning the number of items
3059
+ * currently being processed. Invoke with `queue.running()`.
3060
+ * @property {Function} workersList - a function returning the array of items
3061
+ * currently being processed. Invoke with `queue.workersList()`.
3062
+ * @property {Function} idle - a function returning false if there are items
3063
+ * waiting or being processed, or true if not. Invoke with `queue.idle()`.
3064
+ * @property {number} concurrency - an integer for determining how many `worker`
3065
+ * functions should be run in parallel. This property can be changed after a
3066
+ * `queue` is created to alter the concurrency on-the-fly.
3067
+ * @property {number} payload - an integer that specifies how many items are
3068
+ * passed to the worker function at a time. only applies if this is a
3069
+ * [cargo]{@link module:ControlFlow.cargo} object
3070
+ * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback`
3071
+ * once the `worker` has finished processing the task. Instead of a single task,
3072
+ * a `tasks` array can be submitted. The respective callback is used for every
3073
+ * task in the list. Invoke with `queue.push(task, [callback])`,
3074
+ * @property {AsyncFunction} unshift - add a new task to the front of the `queue`.
3075
+ * Invoke with `queue.unshift(task, [callback])`.
3076
+ * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns
3077
+ * a promise that rejects if an error occurs.
3078
+ * @property {AsyncFunction} unshirtAsync - the same as `q.unshift`, except this returns
3079
+ * a promise that rejects if an error occurs.
3080
+ * @property {Function} remove - remove items from the queue that match a test
3081
+ * function. The test function will be passed an object with a `data` property,
3082
+ * and a `priority` property, if this is a
3083
+ * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
3084
+ * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
3085
+ * `function ({data, priority}) {}` and returns a Boolean.
3086
+ * @property {Function} saturated - a function that sets a callback that is
3087
+ * called when the number of running workers hits the `concurrency` limit, and
3088
+ * further tasks will be queued. If the callback is omitted, `q.saturated()`
3089
+ * returns a promise for the next occurrence.
3090
+ * @property {Function} unsaturated - a function that sets a callback that is
3091
+ * called when the number of running workers is less than the `concurrency` &
3092
+ * `buffer` limits, and further tasks will not be queued. If the callback is
3093
+ * omitted, `q.unsaturated()` returns a promise for the next occurrence.
3094
+ * @property {number} buffer - A minimum threshold buffer in order to say that
3095
+ * the `queue` is `unsaturated`.
3096
+ * @property {Function} empty - a function that sets a callback that is called
3097
+ * when the last item from the `queue` is given to a `worker`. If the callback
3098
+ * is omitted, `q.empty()` returns a promise for the next occurrence.
3099
+ * @property {Function} drain - a function that sets a callback that is called
3100
+ * when the last item from the `queue` has returned from the `worker`. If the
3101
+ * callback is omitted, `q.drain()` returns a promise for the next occurrence.
3102
+ * @property {Function} error - a function that sets a callback that is called
3103
+ * when a task errors. Has the signature `function(error, task)`. If the
3104
+ * callback is omitted, `error()` returns a promise that rejects on the next
3105
+ * error.
3106
+ * @property {boolean} paused - a boolean for determining whether the queue is
3107
+ * in a paused state.
3108
+ * @property {Function} pause - a function that pauses the processing of tasks
3109
+ * until `resume()` is called. Invoke with `queue.pause()`.
3110
+ * @property {Function} resume - a function that resumes the processing of
3111
+ * queued tasks when the queue is paused. Invoke with `queue.resume()`.
3112
+ * @property {Function} kill - a function that removes the `drain` callback and
3113
+ * empties remaining tasks from the queue forcing it to go idle. No more tasks
3114
+ * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
3115
+ *
3116
+ * @example
3117
+ * const q = aync.queue(worker, 2)
3118
+ * q.push(item1)
3119
+ * q.push(item2)
3120
+ * q.push(item3)
3121
+ * // queues are iterable, spread into an array to inspect
3122
+ * const items = [...q] // [item1, item2, item3]
3123
+ * // or use for of
3124
+ * for (let item of q) {
3125
+ * console.log(item)
3126
+ * }
3127
+ *
3128
+ * q.drain(() => {
3129
+ * console.log('all done')
3130
+ * })
3131
+ * // or
3132
+ * await q.drain()
3133
+ */
3134
+
3135
+ /**
3136
+ * Creates a `queue` object with the specified `concurrency`. Tasks added to the
3137
+ * `queue` are processed in parallel (up to the `concurrency` limit). If all
3138
+ * `worker`s are in progress, the task is queued until one becomes available.
3139
+ * Once a `worker` completes a `task`, that `task`'s callback is called.
3140
+ *
3141
+ * @name queue
3142
+ * @static
3143
+ * @memberOf module:ControlFlow
3144
+ * @method
3145
+ * @category Control Flow
3146
+ * @param {AsyncFunction} worker - An async function for processing a queued task.
3147
+ * If you want to handle errors from an individual task, pass a callback to
3148
+ * `q.push()`. Invoked with (task, callback).
3149
+ * @param {number} [concurrency=1] - An `integer` for determining how many
3150
+ * `worker` functions should be run in parallel. If omitted, the concurrency
3151
+ * defaults to `1`. If the concurrency is `0`, an error is thrown.
3152
+ * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be
3153
+ * attached as certain properties to listen for specific events during the
3154
+ * lifecycle of the queue.
3155
+ * @example
3156
+ *
3157
+ * // create a queue object with concurrency 2
3158
+ * var q = async.queue(function(task, callback) {
3159
+ * console.log('hello ' + task.name);
3160
+ * callback();
3161
+ * }, 2);
3162
+ *
3163
+ * // assign a callback
3164
+ * q.drain(function() {
3165
+ * console.log('all items have been processed');
3166
+ * });
3167
+ * // or await the end
3168
+ * await q.drain()
3169
+ *
3170
+ * // assign an error callback
3171
+ * q.error(function(err, task) {
3172
+ * console.error('task experienced an error');
3173
+ * });
3174
+ *
3175
+ * // add some items to the queue
3176
+ * q.push({name: 'foo'}, function(err) {
3177
+ * console.log('finished processing foo');
3178
+ * });
3179
+ * // callback is optional
3180
+ * q.push({name: 'bar'});
3181
+ *
3182
+ * // add some items to the queue (batch-wise)
3183
+ * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
3184
+ * console.log('finished processing item');
3185
+ * });
3186
+ *
3187
+ * // add some items to the front of the queue
3188
+ * q.unshift({name: 'bar'}, function (err) {
3189
+ * console.log('finished processing bar');
3190
+ * });
3191
+ */
3192
+ function queue$1 (worker, concurrency) {
3193
+ var _worker = wrapAsync(worker);
3194
+ return queue((items, cb) => {
3195
+ _worker(items[0], cb);
3196
+ }, concurrency, 1);
3197
+ }
3198
+
3199
+ // Binary min-heap implementation used for priority queue.
3200
+ // Implementation is stable, i.e. push time is considered for equal priorities
3201
+ class Heap {
3202
+ constructor() {
3203
+ this.heap = [];
3204
+ this.pushCount = Number.MIN_SAFE_INTEGER;
3205
+ }
3206
+
3207
+ get length() {
3208
+ return this.heap.length;
3209
+ }
3210
+
3211
+ empty () {
3212
+ this.heap = [];
3213
+ return this;
3214
+ }
3215
+
3216
+ percUp(index) {
3217
+ let p;
3218
+
3219
+ while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) {
3220
+ let t = this.heap[index];
3221
+ this.heap[index] = this.heap[p];
3222
+ this.heap[p] = t;
3223
+
3224
+ index = p;
3225
+ }
3226
+ }
3227
+
3228
+ percDown(index) {
3229
+ let l;
3230
+
3231
+ while ((l=leftChi(index)) < this.heap.length) {
3232
+ if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) {
3233
+ l = l+1;
3234
+ }
3235
+
3236
+ if (smaller(this.heap[index], this.heap[l])) {
3237
+ break;
3238
+ }
3239
+
3240
+ let t = this.heap[index];
3241
+ this.heap[index] = this.heap[l];
3242
+ this.heap[l] = t;
3243
+
3244
+ index = l;
3245
+ }
3246
+ }
3247
+
3248
+ push(node) {
3249
+ node.pushCount = ++this.pushCount;
3250
+ this.heap.push(node);
3251
+ this.percUp(this.heap.length-1);
3252
+ }
3253
+
3254
+ unshift(node) {
3255
+ return this.heap.push(node);
3256
+ }
3257
+
3258
+ shift() {
3259
+ let [top] = this.heap;
3260
+
3261
+ this.heap[0] = this.heap[this.heap.length-1];
3262
+ this.heap.pop();
3263
+ this.percDown(0);
3264
+
3265
+ return top;
3266
+ }
3267
+
3268
+ toArray() {
3269
+ return [...this];
3270
+ }
3271
+
3272
+ *[Symbol.iterator] () {
3273
+ for (let i = 0; i < this.heap.length; i++) {
3274
+ yield this.heap[i].data;
3275
+ }
3276
+ }
3277
+
3278
+ remove (testFn) {
3279
+ let j = 0;
3280
+ for (let i = 0; i < this.heap.length; i++) {
3281
+ if (!testFn(this.heap[i])) {
3282
+ this.heap[j] = this.heap[i];
3283
+ j++;
3284
+ }
3285
+ }
3286
+
3287
+ this.heap.splice(j);
3288
+
3289
+ for (let i = parent(this.heap.length-1); i >= 0; i--) {
3290
+ this.percDown(i);
3291
+ }
3292
+
3293
+ return this;
3294
+ }
3295
+ }
3296
+
3297
+ function leftChi(i) {
3298
+ return (i<<1)+1;
3299
+ }
3300
+
3301
+ function parent(i) {
3302
+ return ((i+1)>>1)-1;
3303
+ }
3304
+
3305
+ function smaller(x, y) {
3306
+ if (x.priority !== y.priority) {
3307
+ return x.priority < y.priority;
3308
+ }
3309
+ else {
3310
+ return x.pushCount < y.pushCount;
3311
+ }
3312
+ }
3313
+
3314
+ /**
3315
+ * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
3316
+ * completed in ascending priority order.
3317
+ *
3318
+ * @name priorityQueue
3319
+ * @static
3320
+ * @memberOf module:ControlFlow
3321
+ * @method
3322
+ * @see [async.queue]{@link module:ControlFlow.queue}
3323
+ * @category Control Flow
3324
+ * @param {AsyncFunction} worker - An async function for processing a queued task.
3325
+ * If you want to handle errors from an individual task, pass a callback to
3326
+ * `q.push()`.
3327
+ * Invoked with (task, callback).
3328
+ * @param {number} concurrency - An `integer` for determining how many `worker`
3329
+ * functions should be run in parallel. If omitted, the concurrency defaults to
3330
+ * `1`. If the concurrency is `0`, an error is thrown.
3331
+ * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
3332
+ * differences between `queue` and `priorityQueue` objects:
3333
+ * * `push(task, priority, [callback])` - `priority` should be a number. If an
3334
+ * array of `tasks` is given, all tasks will be assigned the same priority.
3335
+ * * The `unshift` method was removed.
3336
+ */
3337
+ function priorityQueue(worker, concurrency) {
3338
+ // Start with a normal queue
3339
+ var q = queue$1(worker, concurrency);
3340
+
3341
+ q._tasks = new Heap();
3342
+
3343
+ // Override push to accept second parameter representing priority
3344
+ q.push = function(data, priority = 0, callback = () => {}) {
3345
+ if (typeof callback !== 'function') {
3346
+ throw new Error('task callback must be a function');
3347
+ }
3348
+ q.started = true;
3349
+ if (!Array.isArray(data)) {
3350
+ data = [data];
3351
+ }
3352
+ if (data.length === 0 && q.idle()) {
3353
+ // call drain immediately if there are no tasks
3354
+ return setImmediate$1(() => q.drain());
3355
+ }
3356
+
3357
+ for (var i = 0, l = data.length; i < l; i++) {
3358
+ var item = {
3359
+ data: data[i],
3360
+ priority,
3361
+ callback
3362
+ };
3363
+
3364
+ q._tasks.push(item);
3365
+ }
3366
+
3367
+ setImmediate$1(q.process);
3368
+ };
3369
+
3370
+ // Remove unshift function
3371
+ delete q.unshift;
3372
+
3373
+ return q;
3374
+ }
3375
+
3376
+ /**
3377
+ * Runs the `tasks` array of functions in parallel, without waiting until the
3378
+ * previous function has completed. Once any of the `tasks` complete or pass an
3379
+ * error to its callback, the main `callback` is immediately called. It's
3380
+ * equivalent to `Promise.race()`.
3381
+ *
3382
+ * @name race
3383
+ * @static
3384
+ * @memberOf module:ControlFlow
3385
+ * @method
3386
+ * @category Control Flow
3387
+ * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
3388
+ * to run. Each function can complete with an optional `result` value.
3389
+ * @param {Function} callback - A callback to run once any of the functions have
3390
+ * completed. This function gets an error or result from the first function that
3391
+ * completed. Invoked with (err, result).
3392
+ * @returns undefined
3393
+ * @example
3394
+ *
3395
+ * async.race([
3396
+ * function(callback) {
3397
+ * setTimeout(function() {
3398
+ * callback(null, 'one');
3399
+ * }, 200);
3400
+ * },
3401
+ * function(callback) {
3402
+ * setTimeout(function() {
3403
+ * callback(null, 'two');
3404
+ * }, 100);
3405
+ * }
3406
+ * ],
3407
+ * // main callback
3408
+ * function(err, result) {
3409
+ * // the result will be equal to 'two' as it finishes earlier
3410
+ * });
3411
+ */
3412
+ function race(tasks, callback) {
3413
+ callback = once(callback);
3414
+ if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
3415
+ if (!tasks.length) return callback();
3416
+ for (var i = 0, l = tasks.length; i < l; i++) {
3417
+ wrapAsync(tasks[i])(callback);
3418
+ }
3419
+ }
3420
+
3421
+ var race$1 = awaitify(race, 2);
3422
+
3423
+ /**
3424
+ * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
3425
+ *
3426
+ * @name reduceRight
3427
+ * @static
3428
+ * @memberOf module:Collections
3429
+ * @method
3430
+ * @see [async.reduce]{@link module:Collections.reduce}
3431
+ * @alias foldr
3432
+ * @category Collection
3433
+ * @param {Array} array - A collection to iterate over.
3434
+ * @param {*} memo - The initial state of the reduction.
3435
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
3436
+ * array to produce the next step in the reduction.
3437
+ * The `iteratee` should complete with the next state of the reduction.
3438
+ * If the iteratee complete with an error, the reduction is stopped and the
3439
+ * main `callback` is immediately called with the error.
3440
+ * Invoked with (memo, item, callback).
3441
+ * @param {Function} [callback] - A callback which is called after all the
3442
+ * `iteratee` functions have finished. Result is the reduced value. Invoked with
3443
+ * (err, result).
3444
+ * @returns {Promise} a promise, if no callback is passed
3445
+ */
3446
+ function reduceRight (array, memo, iteratee, callback) {
3447
+ var reversed = [...array].reverse();
3448
+ return reduce$1(reversed, memo, iteratee, callback);
3449
+ }
3450
+
3451
+ /**
3452
+ * Wraps the async function in another function that always completes with a
3453
+ * result object, even when it errors.
3454
+ *
3455
+ * The result object has either the property `error` or `value`.
3456
+ *
3457
+ * @name reflect
3458
+ * @static
3459
+ * @memberOf module:Utils
3460
+ * @method
3461
+ * @category Util
3462
+ * @param {AsyncFunction} fn - The async function you want to wrap
3463
+ * @returns {Function} - A function that always passes null to it's callback as
3464
+ * the error. The second argument to the callback will be an `object` with
3465
+ * either an `error` or a `value` property.
3466
+ * @example
3467
+ *
3468
+ * async.parallel([
3469
+ * async.reflect(function(callback) {
3470
+ * // do some stuff ...
3471
+ * callback(null, 'one');
3472
+ * }),
3473
+ * async.reflect(function(callback) {
3474
+ * // do some more stuff but error ...
3475
+ * callback('bad stuff happened');
3476
+ * }),
3477
+ * async.reflect(function(callback) {
3478
+ * // do some more stuff ...
3479
+ * callback(null, 'two');
3480
+ * })
3481
+ * ],
3482
+ * // optional callback
3483
+ * function(err, results) {
3484
+ * // values
3485
+ * // results[0].value = 'one'
3486
+ * // results[1].error = 'bad stuff happened'
3487
+ * // results[2].value = 'two'
3488
+ * });
3489
+ */
3490
+ function reflect(fn) {
3491
+ var _fn = wrapAsync(fn);
3492
+ return initialParams(function reflectOn(args, reflectCallback) {
3493
+ args.push((error, ...cbArgs) => {
3494
+ let retVal = {};
3495
+ if (error) {
3496
+ retVal.error = error;
3497
+ }
3498
+ if (cbArgs.length > 0){
3499
+ var value = cbArgs;
3500
+ if (cbArgs.length <= 1) {
3501
+ [value] = cbArgs;
3502
+ }
3503
+ retVal.value = value;
3504
+ }
3505
+ reflectCallback(null, retVal);
3506
+ });
3507
+
3508
+ return _fn.apply(this, args);
3509
+ });
3510
+ }
3511
+
3512
+ /**
3513
+ * A helper function that wraps an array or an object of functions with `reflect`.
3514
+ *
3515
+ * @name reflectAll
3516
+ * @static
3517
+ * @memberOf module:Utils
3518
+ * @method
3519
+ * @see [async.reflect]{@link module:Utils.reflect}
3520
+ * @category Util
3521
+ * @param {Array|Object|Iterable} tasks - The collection of
3522
+ * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
3523
+ * @returns {Array} Returns an array of async functions, each wrapped in
3524
+ * `async.reflect`
3525
+ * @example
3526
+ *
3527
+ * let tasks = [
3528
+ * function(callback) {
3529
+ * setTimeout(function() {
3530
+ * callback(null, 'one');
3531
+ * }, 200);
3532
+ * },
3533
+ * function(callback) {
3534
+ * // do some more stuff but error ...
3535
+ * callback(new Error('bad stuff happened'));
3536
+ * },
3537
+ * function(callback) {
3538
+ * setTimeout(function() {
3539
+ * callback(null, 'two');
3540
+ * }, 100);
3541
+ * }
3542
+ * ];
3543
+ *
3544
+ * async.parallel(async.reflectAll(tasks),
3545
+ * // optional callback
3546
+ * function(err, results) {
3547
+ * // values
3548
+ * // results[0].value = 'one'
3549
+ * // results[1].error = Error('bad stuff happened')
3550
+ * // results[2].value = 'two'
3551
+ * });
3552
+ *
3553
+ * // an example using an object instead of an array
3554
+ * let tasks = {
3555
+ * one: function(callback) {
3556
+ * setTimeout(function() {
3557
+ * callback(null, 'one');
3558
+ * }, 200);
3559
+ * },
3560
+ * two: function(callback) {
3561
+ * callback('two');
3562
+ * },
3563
+ * three: function(callback) {
3564
+ * setTimeout(function() {
3565
+ * callback(null, 'three');
3566
+ * }, 100);
3567
+ * }
3568
+ * };
3569
+ *
3570
+ * async.parallel(async.reflectAll(tasks),
3571
+ * // optional callback
3572
+ * function(err, results) {
3573
+ * // values
3574
+ * // results.one.value = 'one'
3575
+ * // results.two.error = 'two'
3576
+ * // results.three.value = 'three'
3577
+ * });
3578
+ */
3579
+ function reflectAll(tasks) {
3580
+ var results;
3581
+ if (Array.isArray(tasks)) {
3582
+ results = tasks.map(reflect);
3583
+ } else {
3584
+ results = {};
3585
+ Object.keys(tasks).forEach(key => {
3586
+ results[key] = reflect.call(this, tasks[key]);
3587
+ });
3588
+ }
3589
+ return results;
3590
+ }
3591
+
3592
+ function reject(eachfn, arr, _iteratee, callback) {
3593
+ const iteratee = wrapAsync(_iteratee);
3594
+ return _filter(eachfn, arr, (value, cb) => {
3595
+ iteratee(value, (err, v) => {
3596
+ cb(err, !v);
3597
+ });
3598
+ }, callback);
3599
+ }
3600
+
3601
+ /**
3602
+ * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
3603
+ *
3604
+ * @name reject
3605
+ * @static
3606
+ * @memberOf module:Collections
3607
+ * @method
3608
+ * @see [async.filter]{@link module:Collections.filter}
3609
+ * @category Collection
3610
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
3611
+ * @param {Function} iteratee - An async truth test to apply to each item in
3612
+ * `coll`.
3613
+ * The should complete with a boolean value as its `result`.
3614
+ * Invoked with (item, callback).
3615
+ * @param {Function} [callback] - A callback which is called after all the
3616
+ * `iteratee` functions have finished. Invoked with (err, results).
3617
+ * @returns {Promise} a promise, if no callback is passed
3618
+ * @example
3619
+ *
3620
+ * async.reject(['file1','file2','file3'], function(filePath, callback) {
3621
+ * fs.access(filePath, function(err) {
3622
+ * callback(null, !err)
3623
+ * });
3624
+ * }, function(err, results) {
3625
+ * // results now equals an array of missing files
3626
+ * createFiles(results);
3627
+ * });
3628
+ */
3629
+ function reject$1 (coll, iteratee, callback) {
3630
+ return reject(eachOf$1, coll, iteratee, callback)
3631
+ }
3632
+ var reject$2 = awaitify(reject$1, 3);
3633
+
3634
+ /**
3635
+ * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
3636
+ * time.
3637
+ *
3638
+ * @name rejectLimit
3639
+ * @static
3640
+ * @memberOf module:Collections
3641
+ * @method
3642
+ * @see [async.reject]{@link module:Collections.reject}
3643
+ * @category Collection
3644
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
3645
+ * @param {number} limit - The maximum number of async operations at a time.
3646
+ * @param {Function} iteratee - An async truth test to apply to each item in
3647
+ * `coll`.
3648
+ * The should complete with a boolean value as its `result`.
3649
+ * Invoked with (item, callback).
3650
+ * @param {Function} [callback] - A callback which is called after all the
3651
+ * `iteratee` functions have finished. Invoked with (err, results).
3652
+ * @returns {Promise} a promise, if no callback is passed
3653
+ */
3654
+ function rejectLimit (coll, limit, iteratee, callback) {
3655
+ return reject(eachOfLimit(limit), coll, iteratee, callback)
3656
+ }
3657
+ var rejectLimit$1 = awaitify(rejectLimit, 4);
3658
+
3659
+ /**
3660
+ * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
3661
+ *
3662
+ * @name rejectSeries
3663
+ * @static
3664
+ * @memberOf module:Collections
3665
+ * @method
3666
+ * @see [async.reject]{@link module:Collections.reject}
3667
+ * @category Collection
3668
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
3669
+ * @param {Function} iteratee - An async truth test to apply to each item in
3670
+ * `coll`.
3671
+ * The should complete with a boolean value as its `result`.
3672
+ * Invoked with (item, callback).
3673
+ * @param {Function} [callback] - A callback which is called after all the
3674
+ * `iteratee` functions have finished. Invoked with (err, results).
3675
+ * @returns {Promise} a promise, if no callback is passed
3676
+ */
3677
+ function rejectSeries (coll, iteratee, callback) {
3678
+ return reject(eachOfSeries$1, coll, iteratee, callback)
3679
+ }
3680
+ var rejectSeries$1 = awaitify(rejectSeries, 3);
3681
+
3682
+ function constant$1(value) {
3683
+ return function () {
3684
+ return value;
3685
+ }
3686
+ }
3687
+
3688
+ /**
3689
+ * Attempts to get a successful response from `task` no more than `times` times
3690
+ * before returning an error. If the task is successful, the `callback` will be
3691
+ * passed the result of the successful task. If all attempts fail, the callback
3692
+ * will be passed the error and result (if any) of the final attempt.
3693
+ *
3694
+ * @name retry
3695
+ * @static
3696
+ * @memberOf module:ControlFlow
3697
+ * @method
3698
+ * @category Control Flow
3699
+ * @see [async.retryable]{@link module:ControlFlow.retryable}
3700
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
3701
+ * object with `times` and `interval` or a number.
3702
+ * * `times` - The number of attempts to make before giving up. The default
3703
+ * is `5`.
3704
+ * * `interval` - The time to wait between retries, in milliseconds. The
3705
+ * default is `0`. The interval may also be specified as a function of the
3706
+ * retry count (see example).
3707
+ * * `errorFilter` - An optional synchronous function that is invoked on
3708
+ * erroneous result. If it returns `true` the retry attempts will continue;
3709
+ * if the function returns `false` the retry flow is aborted with the current
3710
+ * attempt's error and result being returned to the final callback.
3711
+ * Invoked with (err).
3712
+ * * If `opts` is a number, the number specifies the number of times to retry,
3713
+ * with the default interval of `0`.
3714
+ * @param {AsyncFunction} task - An async function to retry.
3715
+ * Invoked with (callback).
3716
+ * @param {Function} [callback] - An optional callback which is called when the
3717
+ * task has succeeded, or after the final failed attempt. It receives the `err`
3718
+ * and `result` arguments of the last attempt at completing the `task`. Invoked
3719
+ * with (err, results).
3720
+ * @returns {Promise} a promise if no callback provided
3721
+ *
3722
+ * @example
3723
+ *
3724
+ * // The `retry` function can be used as a stand-alone control flow by passing
3725
+ * // a callback, as shown below:
3726
+ *
3727
+ * // try calling apiMethod 3 times
3728
+ * async.retry(3, apiMethod, function(err, result) {
3729
+ * // do something with the result
3730
+ * });
3731
+ *
3732
+ * // try calling apiMethod 3 times, waiting 200 ms between each retry
3733
+ * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
3734
+ * // do something with the result
3735
+ * });
3736
+ *
3737
+ * // try calling apiMethod 10 times with exponential backoff
3738
+ * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
3739
+ * async.retry({
3740
+ * times: 10,
3741
+ * interval: function(retryCount) {
3742
+ * return 50 * Math.pow(2, retryCount);
3743
+ * }
3744
+ * }, apiMethod, function(err, result) {
3745
+ * // do something with the result
3746
+ * });
3747
+ *
3748
+ * // try calling apiMethod the default 5 times no delay between each retry
3749
+ * async.retry(apiMethod, function(err, result) {
3750
+ * // do something with the result
3751
+ * });
3752
+ *
3753
+ * // try calling apiMethod only when error condition satisfies, all other
3754
+ * // errors will abort the retry control flow and return to final callback
3755
+ * async.retry({
3756
+ * errorFilter: function(err) {
3757
+ * return err.message === 'Temporary error'; // only retry on a specific error
3758
+ * }
3759
+ * }, apiMethod, function(err, result) {
3760
+ * // do something with the result
3761
+ * });
3762
+ *
3763
+ * // to retry individual methods that are not as reliable within other
3764
+ * // control flow functions, use the `retryable` wrapper:
3765
+ * async.auto({
3766
+ * users: api.getUsers.bind(api),
3767
+ * payments: async.retryable(3, api.getPayments.bind(api))
3768
+ * }, function(err, results) {
3769
+ * // do something with the results
3770
+ * });
3771
+ *
3772
+ */
3773
+ const DEFAULT_TIMES = 5;
3774
+ const DEFAULT_INTERVAL = 0;
3775
+
3776
+ function retry(opts, task, callback) {
3777
+ var options = {
3778
+ times: DEFAULT_TIMES,
3779
+ intervalFunc: constant$1(DEFAULT_INTERVAL)
3780
+ };
3781
+
3782
+ if (arguments.length < 3 && typeof opts === 'function') {
3783
+ callback = task || promiseCallback();
3784
+ task = opts;
3785
+ } else {
3786
+ parseTimes(options, opts);
3787
+ callback = callback || promiseCallback();
3788
+ }
3789
+
3790
+ if (typeof task !== 'function') {
3791
+ throw new Error("Invalid arguments for async.retry");
3792
+ }
3793
+
3794
+ var _task = wrapAsync(task);
3795
+
3796
+ var attempt = 1;
3797
+ function retryAttempt() {
3798
+ _task((err, ...args) => {
3799
+ if (err === false) return
3800
+ if (err && attempt++ < options.times &&
3801
+ (typeof options.errorFilter != 'function' ||
3802
+ options.errorFilter(err))) {
3803
+ setTimeout(retryAttempt, options.intervalFunc(attempt - 1));
3804
+ } else {
3805
+ callback(err, ...args);
3806
+ }
3807
+ });
3808
+ }
3809
+
3810
+ retryAttempt();
3811
+ return callback[PROMISE_SYMBOL]
3812
+ }
3813
+
3814
+ function parseTimes(acc, t) {
3815
+ if (typeof t === 'object') {
3816
+ acc.times = +t.times || DEFAULT_TIMES;
3817
+
3818
+ acc.intervalFunc = typeof t.interval === 'function' ?
3819
+ t.interval :
3820
+ constant$1(+t.interval || DEFAULT_INTERVAL);
3821
+
3822
+ acc.errorFilter = t.errorFilter;
3823
+ } else if (typeof t === 'number' || typeof t === 'string') {
3824
+ acc.times = +t || DEFAULT_TIMES;
3825
+ } else {
3826
+ throw new Error("Invalid arguments for async.retry");
3827
+ }
3828
+ }
3829
+
3830
+ /**
3831
+ * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method
3832
+ * wraps a task and makes it retryable, rather than immediately calling it
3833
+ * with retries.
3834
+ *
3835
+ * @name retryable
3836
+ * @static
3837
+ * @memberOf module:ControlFlow
3838
+ * @method
3839
+ * @see [async.retry]{@link module:ControlFlow.retry}
3840
+ * @category Control Flow
3841
+ * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
3842
+ * options, exactly the same as from `retry`, except for a `opts.arity` that
3843
+ * is the arity of the `task` function, defaulting to `task.length`
3844
+ * @param {AsyncFunction} task - the asynchronous function to wrap.
3845
+ * This function will be passed any arguments passed to the returned wrapper.
3846
+ * Invoked with (...args, callback).
3847
+ * @returns {AsyncFunction} The wrapped function, which when invoked, will
3848
+ * retry on an error, based on the parameters specified in `opts`.
3849
+ * This function will accept the same parameters as `task`.
3850
+ * @example
3851
+ *
3852
+ * async.auto({
3853
+ * dep1: async.retryable(3, getFromFlakyService),
3854
+ * process: ["dep1", async.retryable(3, function (results, cb) {
3855
+ * maybeProcessData(results.dep1, cb);
3856
+ * })]
3857
+ * }, callback);
3858
+ */
3859
+ function retryable (opts, task) {
3860
+ if (!task) {
3861
+ task = opts;
3862
+ opts = null;
3863
+ }
3864
+ let arity = (opts && opts.arity) || task.length;
3865
+ if (isAsync(task)) {
3866
+ arity += 1;
3867
+ }
3868
+ var _task = wrapAsync(task);
3869
+ return initialParams((args, callback) => {
3870
+ if (args.length < arity - 1 || callback == null) {
3871
+ args.push(callback);
3872
+ callback = promiseCallback();
3873
+ }
3874
+ function taskFn(cb) {
3875
+ _task(...args, cb);
3876
+ }
3877
+
3878
+ if (opts) retry(opts, taskFn, callback);
3879
+ else retry(taskFn, callback);
3880
+
3881
+ return callback[PROMISE_SYMBOL]
3882
+ });
3883
+ }
3884
+
3885
+ /**
3886
+ * Run the functions in the `tasks` collection in series, each one running once
3887
+ * the previous function has completed. If any functions in the series pass an
3888
+ * error to its callback, no more functions are run, and `callback` is
3889
+ * immediately called with the value of the error. Otherwise, `callback`
3890
+ * receives an array of results when `tasks` have completed.
3891
+ *
3892
+ * It is also possible to use an object instead of an array. Each property will
3893
+ * be run as a function, and the results will be passed to the final `callback`
3894
+ * as an object instead of an array. This can be a more readable way of handling
3895
+ * results from {@link async.series}.
3896
+ *
3897
+ * **Note** that while many implementations preserve the order of object
3898
+ * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
3899
+ * explicitly states that
3900
+ *
3901
+ * > The mechanics and order of enumerating the properties is not specified.
3902
+ *
3903
+ * So if you rely on the order in which your series of functions are executed,
3904
+ * and want this to work on all platforms, consider using an array.
3905
+ *
3906
+ * @name series
3907
+ * @static
3908
+ * @memberOf module:ControlFlow
3909
+ * @method
3910
+ * @category Control Flow
3911
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing
3912
+ * [async functions]{@link AsyncFunction} to run in series.
3913
+ * Each function can complete with any number of optional `result` values.
3914
+ * @param {Function} [callback] - An optional callback to run once all the
3915
+ * functions have completed. This function gets a results array (or object)
3916
+ * containing all the result arguments passed to the `task` callbacks. Invoked
3917
+ * with (err, result).
3918
+ * @return {Promise} a promise, if no callback is passed
3919
+ * @example
3920
+ * async.series([
3921
+ * function(callback) {
3922
+ * // do some stuff ...
3923
+ * callback(null, 'one');
3924
+ * },
3925
+ * function(callback) {
3926
+ * // do some more stuff ...
3927
+ * callback(null, 'two');
3928
+ * }
3929
+ * ],
3930
+ * // optional callback
3931
+ * function(err, results) {
3932
+ * // results is now equal to ['one', 'two']
3933
+ * });
3934
+ *
3935
+ * async.series({
3936
+ * one: function(callback) {
3937
+ * setTimeout(function() {
3938
+ * callback(null, 1);
3939
+ * }, 200);
3940
+ * },
3941
+ * two: function(callback){
3942
+ * setTimeout(function() {
3943
+ * callback(null, 2);
3944
+ * }, 100);
3945
+ * }
3946
+ * }, function(err, results) {
3947
+ * // results is now equal to: {one: 1, two: 2}
3948
+ * });
3949
+ */
3950
+ function series(tasks, callback) {
3951
+ return _parallel(eachOfSeries$1, tasks, callback);
3952
+ }
3953
+
3954
+ /**
3955
+ * Returns `true` if at least one element in the `coll` satisfies an async test.
3956
+ * If any iteratee call returns `true`, the main `callback` is immediately
3957
+ * called.
3958
+ *
3959
+ * @name some
3960
+ * @static
3961
+ * @memberOf module:Collections
3962
+ * @method
3963
+ * @alias any
3964
+ * @category Collection
3965
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
3966
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
3967
+ * in the collections in parallel.
3968
+ * The iteratee should complete with a boolean `result` value.
3969
+ * Invoked with (item, callback).
3970
+ * @param {Function} [callback] - A callback which is called as soon as any
3971
+ * iteratee returns `true`, or after all the iteratee functions have finished.
3972
+ * Result will be either `true` or `false` depending on the values of the async
3973
+ * tests. Invoked with (err, result).
3974
+ * @returns {Promise} a promise, if no callback provided
3975
+ * @example
3976
+ *
3977
+ * async.some(['file1','file2','file3'], function(filePath, callback) {
3978
+ * fs.access(filePath, function(err) {
3979
+ * callback(null, !err)
3980
+ * });
3981
+ * }, function(err, result) {
3982
+ * // if result is true then at least one of the files exists
3983
+ * });
3984
+ */
3985
+ function some(coll, iteratee, callback) {
3986
+ return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback)
3987
+ }
3988
+ var some$1 = awaitify(some, 3);
3989
+
3990
+ /**
3991
+ * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
3992
+ *
3993
+ * @name someLimit
3994
+ * @static
3995
+ * @memberOf module:Collections
3996
+ * @method
3997
+ * @see [async.some]{@link module:Collections.some}
3998
+ * @alias anyLimit
3999
+ * @category Collection
4000
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
4001
+ * @param {number} limit - The maximum number of async operations at a time.
4002
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
4003
+ * in the collections in parallel.
4004
+ * The iteratee should complete with a boolean `result` value.
4005
+ * Invoked with (item, callback).
4006
+ * @param {Function} [callback] - A callback which is called as soon as any
4007
+ * iteratee returns `true`, or after all the iteratee functions have finished.
4008
+ * Result will be either `true` or `false` depending on the values of the async
4009
+ * tests. Invoked with (err, result).
4010
+ * @returns {Promise} a promise, if no callback provided
4011
+ */
4012
+ function someLimit(coll, limit, iteratee, callback) {
4013
+ return _createTester(Boolean, res => res)(eachOfLimit(limit), coll, iteratee, callback)
4014
+ }
4015
+ var someLimit$1 = awaitify(someLimit, 4);
4016
+
4017
+ /**
4018
+ * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
4019
+ *
4020
+ * @name someSeries
4021
+ * @static
4022
+ * @memberOf module:Collections
4023
+ * @method
4024
+ * @see [async.some]{@link module:Collections.some}
4025
+ * @alias anySeries
4026
+ * @category Collection
4027
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
4028
+ * @param {AsyncFunction} iteratee - An async truth test to apply to each item
4029
+ * in the collections in series.
4030
+ * The iteratee should complete with a boolean `result` value.
4031
+ * Invoked with (item, callback).
4032
+ * @param {Function} [callback] - A callback which is called as soon as any
4033
+ * iteratee returns `true`, or after all the iteratee functions have finished.
4034
+ * Result will be either `true` or `false` depending on the values of the async
4035
+ * tests. Invoked with (err, result).
4036
+ * @returns {Promise} a promise, if no callback provided
4037
+ */
4038
+ function someSeries(coll, iteratee, callback) {
4039
+ return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback)
4040
+ }
4041
+ var someSeries$1 = awaitify(someSeries, 3);
4042
+
4043
+ /**
4044
+ * Sorts a list by the results of running each `coll` value through an async
4045
+ * `iteratee`.
4046
+ *
4047
+ * @name sortBy
4048
+ * @static
4049
+ * @memberOf module:Collections
4050
+ * @method
4051
+ * @category Collection
4052
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
4053
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
4054
+ * `coll`.
4055
+ * The iteratee should complete with a value to use as the sort criteria as
4056
+ * its `result`.
4057
+ * Invoked with (item, callback).
4058
+ * @param {Function} callback - A callback which is called after all the
4059
+ * `iteratee` functions have finished, or an error occurs. Results is the items
4060
+ * from the original `coll` sorted by the values returned by the `iteratee`
4061
+ * calls. Invoked with (err, results).
4062
+ * @returns {Promise} a promise, if no callback passed
4063
+ * @example
4064
+ *
4065
+ * async.sortBy(['file1','file2','file3'], function(file, callback) {
4066
+ * fs.stat(file, function(err, stats) {
4067
+ * callback(err, stats.mtime);
4068
+ * });
4069
+ * }, function(err, results) {
4070
+ * // results is now the original array of files sorted by
4071
+ * // modified date
4072
+ * });
4073
+ *
4074
+ * // By modifying the callback parameter the
4075
+ * // sorting order can be influenced:
4076
+ *
4077
+ * // ascending order
4078
+ * async.sortBy([1,9,3,5], function(x, callback) {
4079
+ * callback(null, x);
4080
+ * }, function(err,result) {
4081
+ * // result callback
4082
+ * });
4083
+ *
4084
+ * // descending order
4085
+ * async.sortBy([1,9,3,5], function(x, callback) {
4086
+ * callback(null, x*-1); //<- x*-1 instead of x, turns the order around
4087
+ * }, function(err,result) {
4088
+ * // result callback
4089
+ * });
4090
+ */
4091
+ function sortBy (coll, iteratee, callback) {
4092
+ var _iteratee = wrapAsync(iteratee);
4093
+ return map$1(coll, (x, iterCb) => {
4094
+ _iteratee(x, (err, criteria) => {
4095
+ if (err) return iterCb(err);
4096
+ iterCb(err, {value: x, criteria});
4097
+ });
4098
+ }, (err, results) => {
4099
+ if (err) return callback(err);
4100
+ callback(null, results.sort(comparator).map(v => v.value));
4101
+ });
4102
+
4103
+ function comparator(left, right) {
4104
+ var a = left.criteria, b = right.criteria;
4105
+ return a < b ? -1 : a > b ? 1 : 0;
4106
+ }
4107
+ }
4108
+ var sortBy$1 = awaitify(sortBy, 3);
4109
+
4110
+ /**
4111
+ * Sets a time limit on an asynchronous function. If the function does not call
4112
+ * its callback within the specified milliseconds, it will be called with a
4113
+ * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
4114
+ *
4115
+ * @name timeout
4116
+ * @static
4117
+ * @memberOf module:Utils
4118
+ * @method
4119
+ * @category Util
4120
+ * @param {AsyncFunction} asyncFn - The async function to limit in time.
4121
+ * @param {number} milliseconds - The specified time limit.
4122
+ * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
4123
+ * to timeout Error for more information..
4124
+ * @returns {AsyncFunction} Returns a wrapped function that can be used with any
4125
+ * of the control flow functions.
4126
+ * Invoke this function with the same parameters as you would `asyncFunc`.
4127
+ * @example
4128
+ *
4129
+ * function myFunction(foo, callback) {
4130
+ * doAsyncTask(foo, function(err, data) {
4131
+ * // handle errors
4132
+ * if (err) return callback(err);
4133
+ *
4134
+ * // do some stuff ...
4135
+ *
4136
+ * // return processed data
4137
+ * return callback(null, data);
4138
+ * });
4139
+ * }
4140
+ *
4141
+ * var wrapped = async.timeout(myFunction, 1000);
4142
+ *
4143
+ * // call `wrapped` as you would `myFunction`
4144
+ * wrapped({ bar: 'bar' }, function(err, data) {
4145
+ * // if `myFunction` takes < 1000 ms to execute, `err`
4146
+ * // and `data` will have their expected values
4147
+ *
4148
+ * // else `err` will be an Error with the code 'ETIMEDOUT'
4149
+ * });
4150
+ */
4151
+ function timeout(asyncFn, milliseconds, info) {
4152
+ var fn = wrapAsync(asyncFn);
4153
+
4154
+ return initialParams((args, callback) => {
4155
+ var timedOut = false;
4156
+ var timer;
4157
+
4158
+ function timeoutCallback() {
4159
+ var name = asyncFn.name || 'anonymous';
4160
+ var error = new Error('Callback function "' + name + '" timed out.');
4161
+ error.code = 'ETIMEDOUT';
4162
+ if (info) {
4163
+ error.info = info;
4164
+ }
4165
+ timedOut = true;
4166
+ callback(error);
4167
+ }
4168
+
4169
+ args.push((...cbArgs) => {
4170
+ if (!timedOut) {
4171
+ callback(...cbArgs);
4172
+ clearTimeout(timer);
4173
+ }
4174
+ });
4175
+
4176
+ // setup timer and call original function
4177
+ timer = setTimeout(timeoutCallback, milliseconds);
4178
+ fn(...args);
4179
+ });
4180
+ }
4181
+
4182
+ function range(size) {
4183
+ var result = Array(size);
4184
+ while (size--) {
4185
+ result[size] = size;
4186
+ }
4187
+ return result;
4188
+ }
4189
+
4190
+ /**
4191
+ * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
4192
+ * time.
4193
+ *
4194
+ * @name timesLimit
4195
+ * @static
4196
+ * @memberOf module:ControlFlow
4197
+ * @method
4198
+ * @see [async.times]{@link module:ControlFlow.times}
4199
+ * @category Control Flow
4200
+ * @param {number} count - The number of times to run the function.
4201
+ * @param {number} limit - The maximum number of async operations at a time.
4202
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
4203
+ * Invoked with the iteration index and a callback: (n, next).
4204
+ * @param {Function} callback - see [async.map]{@link module:Collections.map}.
4205
+ * @returns {Promise} a promise, if no callback is provided
4206
+ */
4207
+ function timesLimit(count, limit, iteratee, callback) {
4208
+ var _iteratee = wrapAsync(iteratee);
4209
+ return mapLimit$1(range(count), limit, _iteratee, callback);
4210
+ }
4211
+
4212
+ /**
4213
+ * Calls the `iteratee` function `n` times, and accumulates results in the same
4214
+ * manner you would use with [map]{@link module:Collections.map}.
4215
+ *
4216
+ * @name times
4217
+ * @static
4218
+ * @memberOf module:ControlFlow
4219
+ * @method
4220
+ * @see [async.map]{@link module:Collections.map}
4221
+ * @category Control Flow
4222
+ * @param {number} n - The number of times to run the function.
4223
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
4224
+ * Invoked with the iteration index and a callback: (n, next).
4225
+ * @param {Function} callback - see {@link module:Collections.map}.
4226
+ * @returns {Promise} a promise, if no callback is provided
4227
+ * @example
4228
+ *
4229
+ * // Pretend this is some complicated async factory
4230
+ * var createUser = function(id, callback) {
4231
+ * callback(null, {
4232
+ * id: 'user' + id
4233
+ * });
4234
+ * };
4235
+ *
4236
+ * // generate 5 users
4237
+ * async.times(5, function(n, next) {
4238
+ * createUser(n, function(err, user) {
4239
+ * next(err, user);
4240
+ * });
4241
+ * }, function(err, users) {
4242
+ * // we should now have 5 users
4243
+ * });
4244
+ */
4245
+ function times (n, iteratee, callback) {
4246
+ return timesLimit(n, Infinity, iteratee, callback)
4247
+ }
4248
+
4249
+ /**
4250
+ * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
4251
+ *
4252
+ * @name timesSeries
4253
+ * @static
4254
+ * @memberOf module:ControlFlow
4255
+ * @method
4256
+ * @see [async.times]{@link module:ControlFlow.times}
4257
+ * @category Control Flow
4258
+ * @param {number} n - The number of times to run the function.
4259
+ * @param {AsyncFunction} iteratee - The async function to call `n` times.
4260
+ * Invoked with the iteration index and a callback: (n, next).
4261
+ * @param {Function} callback - see {@link module:Collections.map}.
4262
+ * @returns {Promise} a promise, if no callback is provided
4263
+ */
4264
+ function timesSeries (n, iteratee, callback) {
4265
+ return timesLimit(n, 1, iteratee, callback)
4266
+ }
4267
+
4268
+ /**
4269
+ * A relative of `reduce`. Takes an Object or Array, and iterates over each
4270
+ * element in parallel, each step potentially mutating an `accumulator` value.
4271
+ * The type of the accumulator defaults to the type of collection passed in.
4272
+ *
4273
+ * @name transform
4274
+ * @static
4275
+ * @memberOf module:Collections
4276
+ * @method
4277
+ * @category Collection
4278
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
4279
+ * @param {*} [accumulator] - The initial state of the transform. If omitted,
4280
+ * it will default to an empty Object or Array, depending on the type of `coll`
4281
+ * @param {AsyncFunction} iteratee - A function applied to each item in the
4282
+ * collection that potentially modifies the accumulator.
4283
+ * Invoked with (accumulator, item, key, callback).
4284
+ * @param {Function} [callback] - A callback which is called after all the
4285
+ * `iteratee` functions have finished. Result is the transformed accumulator.
4286
+ * Invoked with (err, result).
4287
+ * @returns {Promise} a promise, if no callback provided
4288
+ * @example
4289
+ *
4290
+ * async.transform([1,2,3], function(acc, item, index, callback) {
4291
+ * // pointless async:
4292
+ * process.nextTick(function() {
4293
+ * acc[index] = item * 2
4294
+ * callback(null)
4295
+ * });
4296
+ * }, function(err, result) {
4297
+ * // result is now equal to [2, 4, 6]
4298
+ * });
4299
+ *
4300
+ * @example
4301
+ *
4302
+ * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
4303
+ * setImmediate(function () {
4304
+ * obj[key] = val * 2;
4305
+ * callback();
4306
+ * })
4307
+ * }, function (err, result) {
4308
+ * // result is equal to {a: 2, b: 4, c: 6}
4309
+ * })
4310
+ */
4311
+ function transform (coll, accumulator, iteratee, callback) {
4312
+ if (arguments.length <= 3 && typeof accumulator === 'function') {
4313
+ callback = iteratee;
4314
+ iteratee = accumulator;
4315
+ accumulator = Array.isArray(coll) ? [] : {};
4316
+ }
4317
+ callback = once(callback || promiseCallback());
4318
+ var _iteratee = wrapAsync(iteratee);
4319
+
4320
+ eachOf$1(coll, (v, k, cb) => {
4321
+ _iteratee(accumulator, v, k, cb);
4322
+ }, err => callback(err, accumulator));
4323
+ return callback[PROMISE_SYMBOL]
4324
+ }
4325
+
4326
+ /**
4327
+ * It runs each task in series but stops whenever any of the functions were
4328
+ * successful. If one of the tasks were successful, the `callback` will be
4329
+ * passed the result of the successful task. If all tasks fail, the callback
4330
+ * will be passed the error and result (if any) of the final attempt.
4331
+ *
4332
+ * @name tryEach
4333
+ * @static
4334
+ * @memberOf module:ControlFlow
4335
+ * @method
4336
+ * @category Control Flow
4337
+ * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to
4338
+ * run, each function is passed a `callback(err, result)` it must call on
4339
+ * completion with an error `err` (which can be `null`) and an optional `result`
4340
+ * value.
4341
+ * @param {Function} [callback] - An optional callback which is called when one
4342
+ * of the tasks has succeeded, or all have failed. It receives the `err` and
4343
+ * `result` arguments of the last attempt at completing the `task`. Invoked with
4344
+ * (err, results).
4345
+ * @returns {Promise} a promise, if no callback is passed
4346
+ * @example
4347
+ * async.tryEach([
4348
+ * function getDataFromFirstWebsite(callback) {
4349
+ * // Try getting the data from the first website
4350
+ * callback(err, data);
4351
+ * },
4352
+ * function getDataFromSecondWebsite(callback) {
4353
+ * // First website failed,
4354
+ * // Try getting the data from the backup website
4355
+ * callback(err, data);
4356
+ * }
4357
+ * ],
4358
+ * // optional callback
4359
+ * function(err, results) {
4360
+ * Now do something with the data.
4361
+ * });
4362
+ *
4363
+ */
4364
+ function tryEach(tasks, callback) {
4365
+ var error = null;
4366
+ var result;
4367
+ return eachSeries$1(tasks, (task, taskCb) => {
4368
+ wrapAsync(task)((err, ...args) => {
4369
+ if (err === false) return taskCb(err);
4370
+
4371
+ if (args.length < 2) {
4372
+ [result] = args;
4373
+ } else {
4374
+ result = args;
4375
+ }
4376
+ error = err;
4377
+ taskCb(err ? null : {});
4378
+ });
4379
+ }, () => callback(error, result));
4380
+ }
4381
+
4382
+ var tryEach$1 = awaitify(tryEach);
4383
+
4384
+ /**
4385
+ * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
4386
+ * unmemoized form. Handy for testing.
4387
+ *
4388
+ * @name unmemoize
4389
+ * @static
4390
+ * @memberOf module:Utils
4391
+ * @method
4392
+ * @see [async.memoize]{@link module:Utils.memoize}
4393
+ * @category Util
4394
+ * @param {AsyncFunction} fn - the memoized function
4395
+ * @returns {AsyncFunction} a function that calls the original unmemoized function
4396
+ */
4397
+ function unmemoize(fn) {
4398
+ return (...args) => {
4399
+ return (fn.unmemoized || fn)(...args);
4400
+ };
4401
+ }
4402
+
4403
+ /**
4404
+ * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
4405
+ * stopped, or an error occurs.
4406
+ *
4407
+ * @name whilst
4408
+ * @static
4409
+ * @memberOf module:ControlFlow
4410
+ * @method
4411
+ * @category Control Flow
4412
+ * @param {AsyncFunction} test - asynchronous truth test to perform before each
4413
+ * execution of `iteratee`. Invoked with ().
4414
+ * @param {AsyncFunction} iteratee - An async function which is called each time
4415
+ * `test` passes. Invoked with (callback).
4416
+ * @param {Function} [callback] - A callback which is called after the test
4417
+ * function has failed and repeated execution of `iteratee` has stopped. `callback`
4418
+ * will be passed an error and any arguments passed to the final `iteratee`'s
4419
+ * callback. Invoked with (err, [results]);
4420
+ * @returns {Promise} a promise, if no callback is passed
4421
+ * @example
4422
+ *
4423
+ * var count = 0;
4424
+ * async.whilst(
4425
+ * function test(cb) { cb(null, count < 5); },
4426
+ * function iter(callback) {
4427
+ * count++;
4428
+ * setTimeout(function() {
4429
+ * callback(null, count);
4430
+ * }, 1000);
4431
+ * },
4432
+ * function (err, n) {
4433
+ * // 5 seconds have passed, n = 5
4434
+ * }
4435
+ * );
4436
+ */
4437
+ function whilst(test, iteratee, callback) {
4438
+ callback = onlyOnce(callback);
4439
+ var _fn = wrapAsync(iteratee);
4440
+ var _test = wrapAsync(test);
4441
+ var results = [];
4442
+
4443
+ function next(err, ...rest) {
4444
+ if (err) return callback(err);
4445
+ results = rest;
4446
+ if (err === false) return;
4447
+ _test(check);
4448
+ }
4449
+
4450
+ function check(err, truth) {
4451
+ if (err) return callback(err);
4452
+ if (err === false) return;
4453
+ if (!truth) return callback(null, ...results);
4454
+ _fn(next);
4455
+ }
4456
+
4457
+ return _test(check);
4458
+ }
4459
+ var whilst$1 = awaitify(whilst, 3);
4460
+
4461
+ /**
4462
+ * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
4463
+ * stopped, or an error occurs. `callback` will be passed an error and any
4464
+ * arguments passed to the final `iteratee`'s callback.
4465
+ *
4466
+ * The inverse of [whilst]{@link module:ControlFlow.whilst}.
4467
+ *
4468
+ * @name until
4469
+ * @static
4470
+ * @memberOf module:ControlFlow
4471
+ * @method
4472
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
4473
+ * @category Control Flow
4474
+ * @param {AsyncFunction} test - asynchronous truth test to perform before each
4475
+ * execution of `iteratee`. Invoked with (callback).
4476
+ * @param {AsyncFunction} iteratee - An async function which is called each time
4477
+ * `test` fails. Invoked with (callback).
4478
+ * @param {Function} [callback] - A callback which is called after the test
4479
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
4480
+ * will be passed an error and any arguments passed to the final `iteratee`'s
4481
+ * callback. Invoked with (err, [results]);
4482
+ * @returns {Promise} a promise, if a callback is not passed
4483
+ *
4484
+ * @example
4485
+ * const results = []
4486
+ * let finished = false
4487
+ * async.until(function test(page, cb) {
4488
+ * cb(null, finished)
4489
+ * }, function iter(next) {
4490
+ * fetchPage(url, (err, body) => {
4491
+ * if (err) return next(err)
4492
+ * results = results.concat(body.objects)
4493
+ * finished = !!body.next
4494
+ * next(err)
4495
+ * })
4496
+ * }, function done (err) {
4497
+ * // all pages have been fetched
4498
+ * })
4499
+ */
4500
+ function until(test, iteratee, callback) {
4501
+ const _test = wrapAsync(test);
4502
+ return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback);
4503
+ }
4504
+
4505
+ /**
4506
+ * Runs the `tasks` array of functions in series, each passing their results to
4507
+ * the next in the array. However, if any of the `tasks` pass an error to their
4508
+ * own callback, the next function is not executed, and the main `callback` is
4509
+ * immediately called with the error.
4510
+ *
4511
+ * @name waterfall
4512
+ * @static
4513
+ * @memberOf module:ControlFlow
4514
+ * @method
4515
+ * @category Control Flow
4516
+ * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
4517
+ * to run.
4518
+ * Each function should complete with any number of `result` values.
4519
+ * The `result` values will be passed as arguments, in order, to the next task.
4520
+ * @param {Function} [callback] - An optional callback to run once all the
4521
+ * functions have completed. This will be passed the results of the last task's
4522
+ * callback. Invoked with (err, [results]).
4523
+ * @returns undefined
4524
+ * @example
4525
+ *
4526
+ * async.waterfall([
4527
+ * function(callback) {
4528
+ * callback(null, 'one', 'two');
4529
+ * },
4530
+ * function(arg1, arg2, callback) {
4531
+ * // arg1 now equals 'one' and arg2 now equals 'two'
4532
+ * callback(null, 'three');
4533
+ * },
4534
+ * function(arg1, callback) {
4535
+ * // arg1 now equals 'three'
4536
+ * callback(null, 'done');
4537
+ * }
4538
+ * ], function (err, result) {
4539
+ * // result now equals 'done'
4540
+ * });
4541
+ *
4542
+ * // Or, with named functions:
4543
+ * async.waterfall([
4544
+ * myFirstFunction,
4545
+ * mySecondFunction,
4546
+ * myLastFunction,
4547
+ * ], function (err, result) {
4548
+ * // result now equals 'done'
4549
+ * });
4550
+ * function myFirstFunction(callback) {
4551
+ * callback(null, 'one', 'two');
4552
+ * }
4553
+ * function mySecondFunction(arg1, arg2, callback) {
4554
+ * // arg1 now equals 'one' and arg2 now equals 'two'
4555
+ * callback(null, 'three');
4556
+ * }
4557
+ * function myLastFunction(arg1, callback) {
4558
+ * // arg1 now equals 'three'
4559
+ * callback(null, 'done');
4560
+ * }
4561
+ */
4562
+ function waterfall (tasks, callback) {
4563
+ callback = once(callback);
4564
+ if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
4565
+ if (!tasks.length) return callback();
4566
+ var taskIndex = 0;
4567
+
4568
+ function nextTask(args) {
4569
+ var task = wrapAsync(tasks[taskIndex++]);
4570
+ task(...args, onlyOnce(next));
4571
+ }
4572
+
4573
+ function next(err, ...args) {
4574
+ if (err === false) return
4575
+ if (err || taskIndex === tasks.length) {
4576
+ return callback(err, ...args);
4577
+ }
4578
+ nextTask(args);
4579
+ }
4580
+
4581
+ nextTask([]);
4582
+ }
4583
+
4584
+ var waterfall$1 = awaitify(waterfall);
4585
+
4586
+ /**
4587
+ * An "async function" in the context of Async is an asynchronous function with
4588
+ * a variable number of parameters, with the final parameter being a callback.
4589
+ * (`function (arg1, arg2, ..., callback) {}`)
4590
+ * The final callback is of the form `callback(err, results...)`, which must be
4591
+ * called once the function is completed. The callback should be called with a
4592
+ * Error as its first argument to signal that an error occurred.
4593
+ * Otherwise, if no error occurred, it should be called with `null` as the first
4594
+ * argument, and any additional `result` arguments that may apply, to signal
4595
+ * successful completion.
4596
+ * The callback must be called exactly once, ideally on a later tick of the
4597
+ * JavaScript event loop.
4598
+ *
4599
+ * This type of function is also referred to as a "Node-style async function",
4600
+ * or a "continuation passing-style function" (CPS). Most of the methods of this
4601
+ * library are themselves CPS/Node-style async functions, or functions that
4602
+ * return CPS/Node-style async functions.
4603
+ *
4604
+ * Wherever we accept a Node-style async function, we also directly accept an
4605
+ * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
4606
+ * In this case, the `async` function will not be passed a final callback
4607
+ * argument, and any thrown error will be used as the `err` argument of the
4608
+ * implicit callback, and the return value will be used as the `result` value.
4609
+ * (i.e. a `rejected` of the returned Promise becomes the `err` callback
4610
+ * argument, and a `resolved` value becomes the `result`.)
4611
+ *
4612
+ * Note, due to JavaScript limitations, we can only detect native `async`
4613
+ * functions and not transpilied implementations.
4614
+ * Your environment must have `async`/`await` support for this to work.
4615
+ * (e.g. Node > v7.6, or a recent version of a modern browser).
4616
+ * If you are using `async` functions through a transpiler (e.g. Babel), you
4617
+ * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
4618
+ * because the `async function` will be compiled to an ordinary function that
4619
+ * returns a promise.
4620
+ *
4621
+ * @typedef {Function} AsyncFunction
4622
+ * @static
4623
+ */
4624
+
4625
+ var index = {
4626
+ apply,
4627
+ applyEach: applyEach$1,
4628
+ applyEachSeries,
4629
+ asyncify,
4630
+ auto,
4631
+ autoInject,
4632
+ cargo,
4633
+ cargoQueue: cargo$1,
4634
+ compose,
4635
+ concat: concat$1,
4636
+ concatLimit: concatLimit$1,
4637
+ concatSeries: concatSeries$1,
4638
+ constant,
4639
+ detect: detect$1,
4640
+ detectLimit: detectLimit$1,
4641
+ detectSeries: detectSeries$1,
4642
+ dir,
4643
+ doUntil,
4644
+ doWhilst: doWhilst$1,
4645
+ each,
4646
+ eachLimit: eachLimit$2,
4647
+ eachOf: eachOf$1,
4648
+ eachOfLimit: eachOfLimit$2,
4649
+ eachOfSeries: eachOfSeries$1,
4650
+ eachSeries: eachSeries$1,
4651
+ ensureAsync,
4652
+ every: every$1,
4653
+ everyLimit: everyLimit$1,
4654
+ everySeries: everySeries$1,
4655
+ filter: filter$1,
4656
+ filterLimit: filterLimit$1,
4657
+ filterSeries: filterSeries$1,
4658
+ forever: forever$1,
4659
+ groupBy,
4660
+ groupByLimit: groupByLimit$1,
4661
+ groupBySeries,
4662
+ log,
4663
+ map: map$1,
4664
+ mapLimit: mapLimit$1,
4665
+ mapSeries: mapSeries$1,
4666
+ mapValues,
4667
+ mapValuesLimit: mapValuesLimit$1,
4668
+ mapValuesSeries,
4669
+ memoize,
4670
+ nextTick,
4671
+ parallel,
4672
+ parallelLimit,
4673
+ priorityQueue,
4674
+ queue: queue$1,
4675
+ race: race$1,
4676
+ reduce: reduce$1,
4677
+ reduceRight,
4678
+ reflect,
4679
+ reflectAll,
4680
+ reject: reject$2,
4681
+ rejectLimit: rejectLimit$1,
4682
+ rejectSeries: rejectSeries$1,
4683
+ retry,
4684
+ retryable,
4685
+ seq,
4686
+ series,
4687
+ setImmediate: setImmediate$1,
4688
+ some: some$1,
4689
+ someLimit: someLimit$1,
4690
+ someSeries: someSeries$1,
4691
+ sortBy: sortBy$1,
4692
+ timeout,
4693
+ times,
4694
+ timesLimit,
4695
+ timesSeries,
4696
+ transform,
4697
+ tryEach: tryEach$1,
4698
+ unmemoize,
4699
+ until,
4700
+ waterfall: waterfall$1,
4701
+ whilst: whilst$1,
4702
+
4703
+ // aliases
4704
+ all: every$1,
4705
+ allLimit: everyLimit$1,
4706
+ allSeries: everySeries$1,
4707
+ any: some$1,
4708
+ anyLimit: someLimit$1,
4709
+ anySeries: someSeries$1,
4710
+ find: detect$1,
4711
+ findLimit: detectLimit$1,
4712
+ findSeries: detectSeries$1,
4713
+ flatMap: concat$1,
4714
+ flatMapLimit: concatLimit$1,
4715
+ flatMapSeries: concatSeries$1,
4716
+ forEach: each,
4717
+ forEachSeries: eachSeries$1,
4718
+ forEachLimit: eachLimit$2,
4719
+ forEachOf: eachOf$1,
4720
+ forEachOfSeries: eachOfSeries$1,
4721
+ forEachOfLimit: eachOfLimit$2,
4722
+ inject: reduce$1,
4723
+ foldl: reduce$1,
4724
+ foldr: reduceRight,
4725
+ select: filter$1,
4726
+ selectLimit: filterLimit$1,
4727
+ selectSeries: filterSeries$1,
4728
+ wrapSync: asyncify,
4729
+ during: whilst$1,
4730
+ doDuring: doWhilst$1
4731
+ };
4732
+
4733
+ export default index;
4734
+ export { apply, applyEach$1 as applyEach, applyEachSeries, asyncify, auto, autoInject, cargo, cargo$1 as cargoQueue, compose, concat$1 as concat, concatLimit$1 as concatLimit, concatSeries$1 as concatSeries, constant, detect$1 as detect, detectLimit$1 as detectLimit, detectSeries$1 as detectSeries, dir, doUntil, doWhilst$1 as doWhilst, each, eachLimit$2 as eachLimit, eachOf$1 as eachOf, eachOfLimit$2 as eachOfLimit, eachOfSeries$1 as eachOfSeries, eachSeries$1 as eachSeries, ensureAsync, every$1 as every, everyLimit$1 as everyLimit, everySeries$1 as everySeries, filter$1 as filter, filterLimit$1 as filterLimit, filterSeries$1 as filterSeries, forever$1 as forever, groupBy, groupByLimit$1 as groupByLimit, groupBySeries, log, map$1 as map, mapLimit$1 as mapLimit, mapSeries$1 as mapSeries, mapValues, mapValuesLimit$1 as mapValuesLimit, mapValuesSeries, memoize, nextTick, parallel, parallelLimit, priorityQueue, queue$1 as queue, race$1 as race, reduce$1 as reduce, reduceRight, reflect, reflectAll, reject$2 as reject, rejectLimit$1 as rejectLimit, rejectSeries$1 as rejectSeries, retry, retryable, seq, series, setImmediate$1 as setImmediate, some$1 as some, someLimit$1 as someLimit, someSeries$1 as someSeries, sortBy$1 as sortBy, timeout, times, timesLimit, timesSeries, transform, tryEach$1 as tryEach, unmemoize, until, waterfall$1 as waterfall, whilst$1 as whilst, every$1 as all, everyLimit$1 as allLimit, everySeries$1 as allSeries, some$1 as any, someLimit$1 as anyLimit, someSeries$1 as anySeries, detect$1 as find, detectLimit$1 as findLimit, detectSeries$1 as findSeries, concat$1 as flatMap, concatLimit$1 as flatMapLimit, concatSeries$1 as flatMapSeries, each as forEach, eachSeries$1 as forEachSeries, eachLimit$2 as forEachLimit, eachOf$1 as forEachOf, eachOfSeries$1 as forEachOfSeries, eachOfLimit$2 as forEachOfLimit, reduce$1 as inject, reduce$1 as foldl, reduceRight as foldr, filter$1 as select, filterLimit$1 as selectLimit, filterSeries$1 as selectSeries, asyncify as wrapSync, whilst$1 as during, doWhilst$1 as doDuring };