@slicemachine/manager 0.25.4-beta.5 → 0.25.4-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/dist/_node_modules/@amplitude/analytics-core/_node_modules/tslib/tslib.es6.cjs +69 -88
  2. package/dist/_node_modules/@amplitude/analytics-core/_node_modules/tslib/tslib.es6.cjs.map +1 -1
  3. package/dist/_node_modules/@amplitude/analytics-core/_node_modules/tslib/tslib.es6.js +69 -88
  4. package/dist/_node_modules/@amplitude/analytics-core/_node_modules/tslib/tslib.es6.js.map +1 -1
  5. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/config.cjs +4 -4
  6. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/config.cjs.map +1 -1
  7. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/config.js +1 -1
  8. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/config.js.map +1 -1
  9. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/core-client.cjs +3 -6
  10. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/core-client.cjs.map +1 -1
  11. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/core-client.js +3 -6
  12. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/core-client.js.map +1 -1
  13. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/identify.cjs.map +1 -1
  14. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/identify.js.map +1 -1
  15. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/logger.cjs.map +1 -1
  16. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/logger.js.map +1 -1
  17. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.cjs.map +1 -1
  18. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js.map +1 -1
  19. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/revenue.cjs.map +1 -1
  20. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/revenue.js.map +1 -1
  21. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/timeline.cjs +6 -12
  22. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/timeline.cjs.map +1 -1
  23. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/timeline.js +6 -12
  24. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/timeline.js.map +1 -1
  25. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/transports/base.cjs.map +1 -1
  26. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/transports/base.js.map +1 -1
  27. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.cjs.map +1 -1
  28. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js.map +1 -1
  29. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/debug.cjs +4 -11
  30. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/debug.cjs.map +1 -1
  31. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js +5 -12
  32. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js.map +1 -1
  33. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.cjs.map +1 -1
  34. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js.map +1 -1
  35. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.cjs.map +1 -1
  36. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js.map +1 -1
  37. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.cjs.map +1 -1
  38. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js.map +1 -1
  39. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.cjs.map +1 -1
  40. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js.map +1 -1
  41. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.cjs +2 -4
  42. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.cjs.map +1 -1
  43. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js +2 -4
  44. package/dist/_node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js.map +1 -1
  45. package/dist/_node_modules/@amplitude/analytics-node/_node_modules/tslib/tslib.es6.cjs +52 -63
  46. package/dist/_node_modules/@amplitude/analytics-node/_node_modules/tslib/tslib.es6.cjs.map +1 -1
  47. package/dist/_node_modules/@amplitude/analytics-node/_node_modules/tslib/tslib.es6.js +52 -63
  48. package/dist/_node_modules/@amplitude/analytics-node/_node_modules/tslib/tslib.es6.js.map +1 -1
  49. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/config.cjs.map +1 -1
  50. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/config.js.map +1 -1
  51. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/index.cjs.map +1 -1
  52. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/node-client.cjs.map +1 -1
  53. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/node-client.js.map +1 -1
  54. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/plugins/context.cjs.map +1 -1
  55. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/plugins/context.js.map +1 -1
  56. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.cjs.map +1 -1
  57. package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js.map +1 -1
  58. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/event.cjs.map +1 -1
  59. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/event.js.map +1 -1
  60. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/logger.cjs.map +1 -1
  61. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/plugin.cjs.map +1 -1
  62. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/server-zone.cjs.map +1 -1
  63. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/status.cjs.map +1 -1
  64. package/dist/_node_modules/@amplitude/analytics-types/lib/esm/transport.cjs.map +1 -1
  65. package/dist/_node_modules/@amplitude/experiment-core/dist/experiment-core.esm.cjs +101 -146
  66. package/dist/_node_modules/@amplitude/experiment-core/dist/experiment-core.esm.cjs.map +1 -1
  67. package/dist/_node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js +101 -146
  68. package/dist/_node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js.map +1 -1
  69. package/dist/_node_modules/@amplitude/experiment-node-server/dist/gen/version.cjs.map +1 -1
  70. package/dist/_node_modules/@amplitude/experiment-node-server/dist/gen/version.js.map +1 -1
  71. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-filter.cjs +1 -1
  72. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-filter.cjs.map +1 -1
  73. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-filter.js +1 -1
  74. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-filter.js.map +1 -1
  75. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-service.cjs.map +1 -1
  76. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment-service.js.map +1 -1
  77. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment.cjs.map +1 -1
  78. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/assignment/assignment.js.map +1 -1
  79. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/cookie.cjs.map +1 -1
  80. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/cookie.js.map +1 -1
  81. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/factory.cjs +1 -1
  82. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/factory.cjs.map +1 -1
  83. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/factory.js +1 -1
  84. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/factory.js.map +1 -1
  85. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/index.cjs.map +1 -1
  86. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/index.js.map +1 -1
  87. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/cache.cjs.map +1 -1
  88. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/cache.js.map +1 -1
  89. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/client.cjs +12 -18
  90. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/client.cjs.map +1 -1
  91. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/client.js +12 -18
  92. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/client.js.map +1 -1
  93. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/fetcher.cjs +2 -2
  94. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/fetcher.cjs.map +1 -1
  95. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/fetcher.js +2 -2
  96. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/fetcher.js.map +1 -1
  97. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/poller.cjs +1 -1
  98. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/poller.cjs.map +1 -1
  99. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/poller.js +1 -1
  100. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/poller.js.map +1 -1
  101. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/remote/client.cjs +3 -3
  102. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/remote/client.cjs.map +1 -1
  103. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/remote/client.js +3 -3
  104. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/remote/client.js.map +1 -1
  105. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs.map +1 -1
  106. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js.map +1 -1
  107. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/types/config.cjs.map +1 -1
  108. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/types/config.js.map +1 -1
  109. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/backoff.cjs.map +1 -1
  110. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/backoff.js.map +1 -1
  111. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/cache.cjs.map +1 -1
  112. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/cache.js.map +1 -1
  113. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/hash.cjs.map +1 -1
  114. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/hash.js.map +1 -1
  115. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/logger.cjs.map +1 -1
  116. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/logger.js.map +1 -1
  117. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/time.cjs.map +1 -1
  118. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/time.js.map +1 -1
  119. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/user.cjs.map +1 -1
  120. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/user.js.map +1 -1
  121. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/variant.cjs.map +1 -1
  122. package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/util/variant.js.map +1 -1
  123. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.cjs +8 -9
  124. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.cjs.map +1 -1
  125. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.js +8 -9
  126. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/CachedKeyDecoder.js.map +1 -1
  127. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.cjs +2 -4
  128. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.cjs.map +1 -1
  129. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.js +2 -4
  130. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/DecodeError.js.map +1 -1
  131. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.cjs +220 -239
  132. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.cjs.map +1 -1
  133. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.js +221 -240
  134. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Decoder.js.map +1 -1
  135. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.cjs.map +1 -1
  136. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/Encoder.js.map +1 -1
  137. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.cjs +1 -1
  138. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.cjs.map +1 -1
  139. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.js +1 -1
  140. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtData.js.map +1 -1
  141. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.cjs.map +1 -1
  142. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/ExtensionCodec.js.map +1 -1
  143. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.cjs.map +1 -1
  144. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/decode.js.map +1 -1
  145. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.cjs.map +1 -1
  146. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/encode.js.map +1 -1
  147. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.cjs.map +1 -1
  148. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.js +1 -1
  149. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/timestamp.js.map +1 -1
  150. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.cjs.map +1 -1
  151. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/typedArrays.js.map +1 -1
  152. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.cjs.map +1 -1
  153. package/dist/_node_modules/@msgpack/msgpack/dist.es5_esm/utils/utf8.js.map +1 -1
  154. package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.cjs +4 -7
  155. package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.cjs.map +1 -1
  156. package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.js +4 -7
  157. package/dist/_node_modules/common-tags/es/TemplateTag/TemplateTag.js.map +1 -1
  158. package/dist/_node_modules/common-tags/es/commaLists/commaLists.cjs.map +1 -1
  159. package/dist/_node_modules/common-tags/es/commaLists/commaLists.js.map +1 -1
  160. package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs.map +1 -1
  161. package/dist/_node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js.map +1 -1
  162. package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs.map +1 -1
  163. package/dist/_node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js.map +1 -1
  164. package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs.map +1 -1
  165. package/dist/_node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js.map +1 -1
  166. package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs.map +1 -1
  167. package/dist/_node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js.map +1 -1
  168. package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs.map +1 -1
  169. package/dist/_node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js.map +1 -1
  170. package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs.map +1 -1
  171. package/dist/_node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js.map +1 -1
  172. package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs +1 -3
  173. package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs.map +1 -1
  174. package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js +1 -3
  175. package/dist/_node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js.map +1 -1
  176. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs +1 -2
  177. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -1
  178. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js +1 -2
  179. package/dist/_node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -1
  180. package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs.map +1 -1
  181. package/dist/_node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js.map +1 -1
  182. package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs.map +1 -1
  183. package/dist/_node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js.map +1 -1
  184. package/dist/_node_modules/cross-spawn/index.cjs.map +1 -1
  185. package/dist/_node_modules/cross-spawn/index.js.map +1 -1
  186. package/dist/_node_modules/cross-spawn/lib/enoent.cjs.map +1 -1
  187. package/dist/_node_modules/cross-spawn/lib/enoent.js.map +1 -1
  188. package/dist/_node_modules/cross-spawn/lib/parse.cjs.map +1 -1
  189. package/dist/_node_modules/cross-spawn/lib/parse.js.map +1 -1
  190. package/dist/_node_modules/cross-spawn/lib/util/escape.cjs.map +1 -1
  191. package/dist/_node_modules/cross-spawn/lib/util/escape.js.map +1 -1
  192. package/dist/_node_modules/cross-spawn/lib/util/readShebang.cjs.map +1 -1
  193. package/dist/_node_modules/cross-spawn/lib/util/readShebang.js.map +1 -1
  194. package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.cjs.map +1 -1
  195. package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.js.map +1 -1
  196. package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -1
  197. package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +1 -1
  198. package/dist/_node_modules/execa/index.cjs +1 -1
  199. package/dist/_node_modules/execa/index.cjs.map +1 -1
  200. package/dist/_node_modules/execa/index.js +1 -1
  201. package/dist/_node_modules/execa/index.js.map +1 -1
  202. package/dist/_node_modules/execa/lib/command.cjs.map +1 -1
  203. package/dist/_node_modules/execa/lib/command.js.map +1 -1
  204. package/dist/_node_modules/execa/lib/error.cjs.map +1 -1
  205. package/dist/_node_modules/execa/lib/error.js.map +1 -1
  206. package/dist/_node_modules/execa/lib/kill.cjs.map +1 -1
  207. package/dist/_node_modules/execa/lib/kill.js.map +1 -1
  208. package/dist/_node_modules/execa/lib/pipe.cjs.map +1 -1
  209. package/dist/_node_modules/execa/lib/pipe.js.map +1 -1
  210. package/dist/_node_modules/execa/lib/promise.cjs +2 -2
  211. package/dist/_node_modules/execa/lib/promise.cjs.map +1 -1
  212. package/dist/_node_modules/execa/lib/promise.js +2 -2
  213. package/dist/_node_modules/execa/lib/promise.js.map +1 -1
  214. package/dist/_node_modules/execa/lib/stdio.cjs.map +1 -1
  215. package/dist/_node_modules/execa/lib/stdio.js.map +1 -1
  216. package/dist/_node_modules/execa/lib/stream.cjs.map +1 -1
  217. package/dist/_node_modules/execa/lib/stream.js.map +1 -1
  218. package/dist/_node_modules/execa/lib/verbose.cjs.map +1 -1
  219. package/dist/_node_modules/execa/lib/verbose.js.map +1 -1
  220. package/dist/_node_modules/fetch-blob/file.cjs +9 -21
  221. package/dist/_node_modules/fetch-blob/file.cjs.map +1 -1
  222. package/dist/_node_modules/fetch-blob/file.js +8 -20
  223. package/dist/_node_modules/fetch-blob/file.js.map +1 -1
  224. package/dist/_node_modules/fetch-blob/from.cjs +9 -0
  225. package/dist/_node_modules/fetch-blob/from.cjs.map +1 -0
  226. package/dist/_node_modules/fetch-blob/from.js +9 -0
  227. package/dist/_node_modules/fetch-blob/from.js.map +1 -0
  228. package/dist/_node_modules/fetch-blob/index.cjs +8 -21
  229. package/dist/_node_modules/fetch-blob/index.cjs.map +1 -1
  230. package/dist/_node_modules/fetch-blob/index.js +8 -21
  231. package/dist/_node_modules/fetch-blob/index.js.map +1 -1
  232. package/dist/_node_modules/fetch-blob/streams.cjs.map +1 -1
  233. package/dist/_node_modules/fetch-blob/streams.js.map +1 -1
  234. package/dist/_node_modules/file-type/core.cjs.map +1 -1
  235. package/dist/_node_modules/file-type/core.js.map +1 -1
  236. package/dist/_node_modules/file-type/util.cjs.map +1 -1
  237. package/dist/_node_modules/file-type/util.js.map +1 -1
  238. package/dist/_node_modules/formdata-polyfill/esm.min.cjs +12 -29
  239. package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +1 -1
  240. package/dist/_node_modules/formdata-polyfill/esm.min.js +12 -29
  241. package/dist/_node_modules/formdata-polyfill/esm.min.js.map +1 -1
  242. package/dist/_node_modules/fp-ts/es6/Either.cjs.map +1 -1
  243. package/dist/_node_modules/fp-ts/es6/Either.js.map +1 -1
  244. package/dist/_node_modules/fp-ts/es6/function.cjs +7 -9
  245. package/dist/_node_modules/fp-ts/es6/function.cjs.map +1 -1
  246. package/dist/_node_modules/fp-ts/es6/function.js +7 -9
  247. package/dist/_node_modules/fp-ts/es6/function.js.map +1 -1
  248. package/dist/_node_modules/fp-ts/es6/internal.cjs +7 -9
  249. package/dist/_node_modules/fp-ts/es6/internal.cjs.map +1 -1
  250. package/dist/_node_modules/fp-ts/es6/internal.js +7 -9
  251. package/dist/_node_modules/fp-ts/es6/internal.js.map +1 -1
  252. package/dist/_node_modules/get-port/index.cjs.map +1 -1
  253. package/dist/_node_modules/get-port/index.js.map +1 -1
  254. package/dist/_node_modules/get-stream/buffer-stream.cjs.map +1 -1
  255. package/dist/_node_modules/get-stream/buffer-stream.js.map +1 -1
  256. package/dist/_node_modules/get-stream/index.cjs +4 -4
  257. package/dist/_node_modules/get-stream/index.cjs.map +1 -1
  258. package/dist/_node_modules/get-stream/index.js +4 -4
  259. package/dist/_node_modules/get-stream/index.js.map +1 -1
  260. package/dist/_node_modules/human-signals/build/src/main.cjs.map +1 -1
  261. package/dist/_node_modules/human-signals/build/src/main.js.map +1 -1
  262. package/dist/_node_modules/human-signals/build/src/signals.cjs.map +1 -1
  263. package/dist/_node_modules/isexe/index.cjs.map +1 -1
  264. package/dist/_node_modules/isexe/index.js.map +1 -1
  265. package/dist/_node_modules/isexe/mode.cjs +1 -2
  266. package/dist/_node_modules/isexe/mode.cjs.map +1 -1
  267. package/dist/_node_modules/isexe/mode.js +1 -2
  268. package/dist/_node_modules/isexe/mode.js.map +1 -1
  269. package/dist/_node_modules/isexe/windows.cjs +1 -2
  270. package/dist/_node_modules/isexe/windows.cjs.map +1 -1
  271. package/dist/_node_modules/isexe/windows.js +1 -2
  272. package/dist/_node_modules/isexe/windows.js.map +1 -1
  273. package/dist/_node_modules/merge-stream/index.cjs.map +1 -1
  274. package/dist/_node_modules/merge-stream/index.js.map +1 -1
  275. package/dist/_node_modules/mimic-fn/index.cjs.map +1 -1
  276. package/dist/_node_modules/mimic-fn/index.js.map +1 -1
  277. package/dist/_node_modules/node-domexception/index.cjs.map +1 -1
  278. package/dist/_node_modules/node-domexception/index.js.map +1 -1
  279. package/dist/_node_modules/node-fetch/src/body.cjs +4 -7
  280. package/dist/_node_modules/node-fetch/src/body.cjs.map +1 -1
  281. package/dist/_node_modules/node-fetch/src/body.js +5 -8
  282. package/dist/_node_modules/node-fetch/src/body.js.map +1 -1
  283. package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -1
  284. package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +1 -1
  285. package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +1 -1
  286. package/dist/_node_modules/node-fetch/src/errors/base.js.map +1 -1
  287. package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -1
  288. package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +1 -1
  289. package/dist/_node_modules/node-fetch/src/headers.cjs +1 -2
  290. package/dist/_node_modules/node-fetch/src/headers.cjs.map +1 -1
  291. package/dist/_node_modules/node-fetch/src/headers.js +1 -2
  292. package/dist/_node_modules/node-fetch/src/headers.js.map +1 -1
  293. package/dist/_node_modules/node-fetch/src/index.cjs +2 -4
  294. package/dist/_node_modules/node-fetch/src/index.cjs.map +1 -1
  295. package/dist/_node_modules/node-fetch/src/index.js +3 -5
  296. package/dist/_node_modules/node-fetch/src/index.js.map +1 -1
  297. package/dist/_node_modules/node-fetch/src/request.cjs.map +1 -1
  298. package/dist/_node_modules/node-fetch/src/request.js.map +1 -1
  299. package/dist/_node_modules/node-fetch/src/response.cjs.map +1 -1
  300. package/dist/_node_modules/node-fetch/src/response.js.map +1 -1
  301. package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +1 -1
  302. package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +1 -1
  303. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +2 -5
  304. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -1
  305. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +2 -5
  306. package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -1
  307. package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +1 -1
  308. package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +1 -1
  309. package/dist/_node_modules/npm-run-path/_node_modules/path-key/index.cjs.map +1 -1
  310. package/dist/_node_modules/npm-run-path/_node_modules/path-key/index.js.map +1 -1
  311. package/dist/_node_modules/npm-run-path/index.cjs.map +1 -1
  312. package/dist/_node_modules/npm-run-path/index.js.map +1 -1
  313. package/dist/_node_modules/onetime/index.cjs.map +1 -1
  314. package/dist/_node_modules/onetime/index.js.map +1 -1
  315. package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.cjs +11 -25
  316. package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.cjs.map +1 -1
  317. package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.js +11 -25
  318. package/dist/_node_modules/p-limit/_node_modules/yocto-queue/index.js.map +1 -1
  319. package/dist/_node_modules/p-limit/index.cjs.map +1 -1
  320. package/dist/_node_modules/p-limit/index.js.map +1 -1
  321. package/dist/_node_modules/path-key/index.cjs.map +1 -1
  322. package/dist/_node_modules/path-key/index.js.map +1 -1
  323. package/dist/_node_modules/peek-readable/lib/EndOfFileStream.cjs.map +1 -1
  324. package/dist/_node_modules/peek-readable/lib/EndOfFileStream.js.map +1 -1
  325. package/dist/_node_modules/r19/dist/R19Error.cjs.map +1 -1
  326. package/dist/_node_modules/r19/dist/R19Error.js.map +1 -1
  327. package/dist/_node_modules/r19/dist/client/createRPCClient.cjs.map +1 -1
  328. package/dist/_node_modules/r19/dist/client/createRPCClient.js.map +1 -1
  329. package/dist/_node_modules/r19/dist/createRPCMiddleware.cjs.map +1 -1
  330. package/dist/_node_modules/r19/dist/createRPCMiddleware.js.map +1 -1
  331. package/dist/_node_modules/r19/dist/handleRPCRequest.cjs.map +1 -1
  332. package/dist/_node_modules/r19/dist/handleRPCRequest.js.map +1 -1
  333. package/dist/_node_modules/r19/dist/lib/replaceLeaves.cjs.map +1 -1
  334. package/dist/_node_modules/r19/dist/lib/replaceLeaves.js.map +1 -1
  335. package/dist/_node_modules/r19/dist/proceduresFromInstance.cjs.map +1 -1
  336. package/dist/_node_modules/r19/dist/proceduresFromInstance.js.map +1 -1
  337. package/dist/_node_modules/shebang-command/index.cjs.map +1 -1
  338. package/dist/_node_modules/shebang-command/index.js.map +1 -1
  339. package/dist/_node_modules/signal-exit/index.cjs.map +1 -1
  340. package/dist/_node_modules/signal-exit/index.js +1 -1
  341. package/dist/_node_modules/signal-exit/index.js.map +1 -1
  342. package/dist/_node_modules/signal-exit/signals.cjs +1 -2
  343. package/dist/_node_modules/signal-exit/signals.cjs.map +1 -1
  344. package/dist/_node_modules/signal-exit/signals.js +1 -2
  345. package/dist/_node_modules/signal-exit/signals.js.map +1 -1
  346. package/dist/_node_modules/strip-final-newline/index.cjs.map +1 -1
  347. package/dist/_node_modules/strip-final-newline/index.js.map +1 -1
  348. package/dist/_node_modules/strtok3/lib/AbstractTokenizer.cjs.map +1 -1
  349. package/dist/_node_modules/strtok3/lib/AbstractTokenizer.js.map +1 -1
  350. package/dist/_node_modules/strtok3/lib/BufferTokenizer.cjs.map +1 -1
  351. package/dist/_node_modules/strtok3/lib/BufferTokenizer.js.map +1 -1
  352. package/dist/_node_modules/strtok3/lib/core.cjs.map +1 -1
  353. package/dist/_node_modules/token-types/lib/index.cjs.map +1 -1
  354. package/dist/_node_modules/token-types/lib/index.js.map +1 -1
  355. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +5 -10
  356. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -1
  357. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +5 -10
  358. package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -1
  359. package/dist/_node_modules/which/which.cjs.map +1 -1
  360. package/dist/_node_modules/which/which.js.map +1 -1
  361. package/dist/_node_modules/zod/lib/index.cjs +11 -20
  362. package/dist/_node_modules/zod/lib/index.cjs.map +1 -1
  363. package/dist/_node_modules/zod/lib/index.js +11 -20
  364. package/dist/_node_modules/zod/lib/index.js.map +1 -1
  365. package/dist/_virtual/_commonjsHelpers.cjs +2 -4
  366. package/dist/_virtual/_commonjsHelpers.cjs.map +1 -1
  367. package/dist/_virtual/_commonjsHelpers.js +2 -4
  368. package/dist/_virtual/_commonjsHelpers.js.map +1 -1
  369. package/dist/auth/PrismicAuthManager.cjs +1 -4
  370. package/dist/auth/PrismicAuthManager.cjs.map +1 -1
  371. package/dist/auth/PrismicAuthManager.js +1 -4
  372. package/dist/auth/PrismicAuthManager.js.map +1 -1
  373. package/dist/auth/createPrismicAuthManager.cjs.map +1 -1
  374. package/dist/auth/createPrismicAuthManager.js.map +1 -1
  375. package/dist/auth/createPrismicAuthManagerMiddleware.cjs.map +1 -1
  376. package/dist/auth/createPrismicAuthManagerMiddleware.js.map +1 -1
  377. package/dist/constants/API_ENDPOINTS.cjs.map +1 -1
  378. package/dist/constants/API_ENDPOINTS.js.map +1 -1
  379. package/dist/constants/API_TOKENS.cjs.map +1 -1
  380. package/dist/constants/API_TOKENS.js.map +1 -1
  381. package/dist/errors.cjs +1 -4
  382. package/dist/errors.cjs.map +1 -1
  383. package/dist/errors.js +1 -4
  384. package/dist/errors.js.map +1 -1
  385. package/dist/getEnvironmentInfo.cjs.map +1 -1
  386. package/dist/getEnvironmentInfo.js.map +1 -1
  387. package/dist/lib/DecodeError.cjs +1 -4
  388. package/dist/lib/DecodeError.cjs.map +1 -1
  389. package/dist/lib/DecodeError.js +1 -4
  390. package/dist/lib/DecodeError.js.map +1 -1
  391. package/dist/lib/assertPluginsInitialized.cjs.map +1 -1
  392. package/dist/lib/assertPluginsInitialized.js.map +1 -1
  393. package/dist/lib/bufferCodec.cjs.map +1 -1
  394. package/dist/lib/buildPrismicRepositoryAPIEndpoint.cjs.map +1 -1
  395. package/dist/lib/buildPrismicRepositoryAPIEndpoint.js.map +1 -1
  396. package/dist/lib/castArray.cjs.map +1 -1
  397. package/dist/lib/castArray.js.map +1 -1
  398. package/dist/lib/createContentDigest.cjs.map +1 -1
  399. package/dist/lib/createContentDigest.js.map +1 -1
  400. package/dist/lib/decode.cjs.map +1 -1
  401. package/dist/lib/decode.js.map +1 -1
  402. package/dist/lib/decodeHookResult.cjs.map +1 -1
  403. package/dist/lib/decodeHookResult.js.map +1 -1
  404. package/dist/lib/decodePackageJSON.cjs.map +1 -1
  405. package/dist/lib/decodePackageJSON.js.map +1 -1
  406. package/dist/lib/decodeSliceMachineConfig.cjs.map +1 -1
  407. package/dist/lib/decodeSliceMachineConfig.js.map +1 -1
  408. package/dist/lib/fetch.cjs +1 -2
  409. package/dist/lib/fetch.cjs.map +1 -1
  410. package/dist/lib/fetch.js +3 -4
  411. package/dist/lib/fetch.js.map +1 -1
  412. package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs.map +1 -1
  413. package/dist/lib/fetchGitHubReleaseBodyForRelease.js.map +1 -1
  414. package/dist/lib/fetchNPMPackageVersions.cjs.map +1 -1
  415. package/dist/lib/fetchNPMPackageVersions.js.map +1 -1
  416. package/dist/lib/findEnvironment.cjs.map +1 -1
  417. package/dist/lib/findEnvironment.js.map +1 -1
  418. package/dist/lib/format.cjs +1 -4
  419. package/dist/lib/format.cjs.map +1 -1
  420. package/dist/lib/format.js +1 -4
  421. package/dist/lib/format.js.map +1 -1
  422. package/dist/lib/installDependencies.cjs.map +1 -1
  423. package/dist/lib/installDependencies.js.map +1 -1
  424. package/dist/lib/locateFileUpward.cjs.map +1 -1
  425. package/dist/lib/locateFileUpward.js.map +1 -1
  426. package/dist/lib/mockSlice.cjs.map +1 -1
  427. package/dist/lib/mockSlice.js.map +1 -1
  428. package/dist/lib/prismicrc.cjs.map +1 -1
  429. package/dist/lib/prismicrc.js.map +1 -1
  430. package/dist/lib/requireResolve.cjs.map +1 -1
  431. package/dist/lib/requireResolve.js.map +1 -1
  432. package/dist/lib/serializeCookies.cjs.map +1 -1
  433. package/dist/lib/serializeCookies.js.map +1 -1
  434. package/dist/lib/trailingSlash.cjs.map +1 -1
  435. package/dist/lib/trailingSlash.js.map +1 -1
  436. package/dist/managers/BaseManager.cjs +1 -4
  437. package/dist/managers/BaseManager.cjs.map +1 -1
  438. package/dist/managers/BaseManager.js +1 -4
  439. package/dist/managers/BaseManager.js.map +1 -1
  440. package/dist/managers/SliceMachineManager.cjs +1 -4
  441. package/dist/managers/SliceMachineManager.cjs.map +1 -1
  442. package/dist/managers/SliceMachineManager.js +1 -4
  443. package/dist/managers/SliceMachineManager.js.map +1 -1
  444. package/dist/managers/createSliceMachineManager.cjs.map +1 -1
  445. package/dist/managers/createSliceMachineManager.js.map +1 -1
  446. package/dist/managers/createSliceMachineManagerClient.cjs.map +1 -1
  447. package/dist/managers/createSliceMachineManagerClient.js.map +1 -1
  448. package/dist/managers/createSliceMachineManagerMiddleware.cjs.map +1 -1
  449. package/dist/managers/createSliceMachineManagerMiddleware.js.map +1 -1
  450. package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
  451. package/dist/managers/customTypes/CustomTypesManager.js +1 -1
  452. package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
  453. package/dist/managers/documentation/DocumentationManager.cjs.map +1 -1
  454. package/dist/managers/documentation/DocumentationManager.js.map +1 -1
  455. package/dist/managers/plugins/PluginsManager.cjs +1 -4
  456. package/dist/managers/plugins/PluginsManager.cjs.map +1 -1
  457. package/dist/managers/plugins/PluginsManager.js +1 -4
  458. package/dist/managers/plugins/PluginsManager.js.map +1 -1
  459. package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs.map +1 -1
  460. package/dist/managers/prismicRepository/PrismicRepositoryManager.js.map +1 -1
  461. package/dist/managers/prismicRepository/sortEnvironments.cjs.map +1 -1
  462. package/dist/managers/prismicRepository/sortEnvironments.js.map +1 -1
  463. package/dist/managers/prismicRepository/types.cjs.map +1 -1
  464. package/dist/managers/prismicRepository/types.js.map +1 -1
  465. package/dist/managers/project/ProjectManager.cjs +1 -4
  466. package/dist/managers/project/ProjectManager.cjs.map +1 -1
  467. package/dist/managers/project/ProjectManager.js +1 -4
  468. package/dist/managers/project/ProjectManager.js.map +1 -1
  469. package/dist/managers/screenshots/ScreenshotsManager.cjs +6 -11
  470. package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -1
  471. package/dist/managers/screenshots/ScreenshotsManager.js +3 -8
  472. package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -1
  473. package/dist/managers/simulator/SimulatorManager.cjs.map +1 -1
  474. package/dist/managers/simulator/SimulatorManager.js.map +1 -1
  475. package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.cjs.map +1 -1
  476. package/dist/managers/sliceTemplateLibrary/SliceTemplateLibraryManager.js.map +1 -1
  477. package/dist/managers/slices/SlicesManager.cjs.map +1 -1
  478. package/dist/managers/slices/SlicesManager.js.map +1 -1
  479. package/dist/managers/snippets/SnippetsManager.cjs.map +1 -1
  480. package/dist/managers/snippets/SnippetsManager.js.map +1 -1
  481. package/dist/managers/telemetry/TelemetryManager.cjs +1 -13
  482. package/dist/managers/telemetry/TelemetryManager.cjs.map +1 -1
  483. package/dist/managers/telemetry/TelemetryManager.js +1 -13
  484. package/dist/managers/telemetry/TelemetryManager.js.map +1 -1
  485. package/dist/managers/telemetry/types.cjs +6 -2
  486. package/dist/managers/telemetry/types.cjs.map +1 -1
  487. package/dist/managers/telemetry/types.d.ts +11 -1
  488. package/dist/managers/telemetry/types.js +6 -2
  489. package/dist/managers/telemetry/types.js.map +1 -1
  490. package/dist/managers/user/UserManager.cjs +1 -4
  491. package/dist/managers/user/UserManager.cjs.map +1 -1
  492. package/dist/managers/user/UserManager.js +1 -4
  493. package/dist/managers/user/UserManager.js.map +1 -1
  494. package/dist/managers/versions/VersionsManager.cjs +1 -4
  495. package/dist/managers/versions/VersionsManager.cjs.map +1 -1
  496. package/dist/managers/versions/VersionsManager.js +1 -4
  497. package/dist/managers/versions/VersionsManager.js.map +1 -1
  498. package/dist/test/createSliceMachineManagerMSWHandler.cjs.map +1 -1
  499. package/dist/test/createSliceMachineManagerMSWHandler.js.map +1 -1
  500. package/package.json +3 -3
  501. package/src/managers/telemetry/types.ts +23 -1
@@ -1 +1 @@
1
- {"version":3,"file":"referrer.cjs","sources":["../../../../../../../node_modules/node-fetch/src/utils/referrer.js"],"sourcesContent":["import {isIP} from 'node:net';\n\n/**\n * @external URL\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}\n */\n\n/**\n * @module utils/referrer\n * @private\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}\n * @param {string} URL\n * @param {boolean} [originOnly=false]\n */\nexport function stripURLForUseAsAReferrer(url, originOnly = false) {\n\t// 1. If url is null, return no referrer.\n\tif (url == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\treturn 'no-referrer';\n\t}\n\n\turl = new URL(url);\n\n\t// 2. If url's scheme is a local scheme, then return no referrer.\n\tif (/^(about|blob|data):$/.test(url.protocol)) {\n\t\treturn 'no-referrer';\n\t}\n\n\t// 3. Set url's username to the empty string.\n\turl.username = '';\n\n\t// 4. Set url's password to null.\n\t// Note: `null` appears to be a mistake as this actually results in the password being `\"null\"`.\n\turl.password = '';\n\n\t// 5. Set url's fragment to null.\n\t// Note: `null` appears to be a mistake as this actually results in the fragment being `\"#null\"`.\n\turl.hash = '';\n\n\t// 6. If the origin-only flag is true, then:\n\tif (originOnly) {\n\t\t// 6.1. Set url's path to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the path being `\"/null\"`.\n\t\turl.pathname = '';\n\n\t\t// 6.2. Set url's query to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the query being `\"?null\"`.\n\t\turl.search = '';\n\t}\n\n\t// 7. Return url.\n\treturn url;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}\n */\nexport const ReferrerPolicy = new Set([\n\t'',\n\t'no-referrer',\n\t'no-referrer-when-downgrade',\n\t'same-origin',\n\t'origin',\n\t'strict-origin',\n\t'origin-when-cross-origin',\n\t'strict-origin-when-cross-origin',\n\t'unsafe-url'\n]);\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}\n */\nexport const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}\n * @param {string} referrerPolicy\n * @returns {string} referrerPolicy\n */\nexport function validateReferrerPolicy(referrerPolicy) {\n\tif (!ReferrerPolicy.has(referrerPolicy)) {\n\t\tthrow new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);\n\t}\n\n\treturn referrerPolicy;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isOriginPotentiallyTrustworthy(url) {\n\t// 1. If origin is an opaque origin, return \"Not Trustworthy\".\n\t// Not applicable\n\n\t// 2. Assert: origin is a tuple origin.\n\t// Not for implementations\n\n\t// 3. If origin's scheme is either \"https\" or \"wss\", return \"Potentially Trustworthy\".\n\tif (/^(http|ws)s:$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n\tconst hostIp = url.host.replace(/(^\\[)|(]$)/g, '');\n\tconst hostIPVersion = isIP(hostIp);\n\n\tif (hostIPVersion === 4 && /^127\\./.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\tif (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\t// 5. If origin's host component is \"localhost\" or falls within \".localhost\", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return \"Potentially Trustworthy\".\n\t// We are returning FALSE here because we cannot ensure conformance to\n\t// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)\n\tif (url.host === 'localhost' || url.host.endsWith('.localhost')) {\n\t\treturn false;\n\t}\n\n\t// 6. If origin's scheme component is file, return \"Potentially Trustworthy\".\n\tif (url.protocol === 'file:') {\n\t\treturn true;\n\t}\n\n\t// 7. If origin's scheme component is one which the user agent considers to be authenticated, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 8. If origin has been configured as a trustworthy origin, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 9. Return \"Not Trustworthy\".\n\treturn false;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isUrlPotentiallyTrustworthy(url) {\n\t// 1. If url is \"about:blank\" or \"about:srcdoc\", return \"Potentially Trustworthy\".\n\tif (/^about:(blank|srcdoc)$/.test(url)) {\n\t\treturn true;\n\t}\n\n\t// 2. If url's scheme is \"data\", return \"Potentially Trustworthy\".\n\tif (url.protocol === 'data:') {\n\t\treturn true;\n\t}\n\n\t// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were\n\t// created. Therefore, blobs created in a trustworthy origin will themselves be potentially\n\t// trustworthy.\n\tif (/^(blob|filesystem):$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.\n\treturn isOriginPotentiallyTrustworthy(url);\n}\n\n/**\n * Modifies the referrerURL to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerURLCallback\n * @param {external:URL} referrerURL\n * @returns {external:URL} modified referrerURL\n */\n\n/**\n * Modifies the referrerOrigin to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerOriginCallback\n * @param {external:URL} referrerOrigin\n * @returns {external:URL} modified referrerOrigin\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}\n * @param {Request} request\n * @param {object} o\n * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback\n * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback\n * @returns {external:URL} Request's referrer\n */\nexport function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {\n\t// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for\n\t// these cases:\n\t// > Note: If request's referrer is \"no-referrer\", Fetch will not call into this algorithm.\n\t// > Note: If request's referrer policy is the empty string, Fetch will not call into this\n\t// > algorithm.\n\tif (request.referrer === 'no-referrer' || request.referrerPolicy === '') {\n\t\treturn null;\n\t}\n\n\t// 1. Let policy be request's associated referrer policy.\n\tconst policy = request.referrerPolicy;\n\n\t// 2. Let environment be request's client.\n\t// not applicable to node.js\n\n\t// 3. Switch on request's referrer:\n\tif (request.referrer === 'about:client') {\n\t\treturn 'no-referrer';\n\t}\n\n\t// \"a URL\": Let referrerSource be request's referrer.\n\tconst referrerSource = request.referrer;\n\n\t// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.\n\tlet referrerURL = stripURLForUseAsAReferrer(referrerSource);\n\n\t// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the\n\t// origin-only flag set to true.\n\tlet referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);\n\n\t// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set\n\t// referrerURL to referrerOrigin.\n\tif (referrerURL.toString().length > 4096) {\n\t\treferrerURL = referrerOrigin;\n\t}\n\n\t// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary\n\t// policy considerations in the interests of minimizing data leakage. For example, the user\n\t// agent could strip the URL down to an origin, modify its host, replace it with an empty\n\t// string, etc.\n\tif (referrerURLCallback) {\n\t\treferrerURL = referrerURLCallback(referrerURL);\n\t}\n\n\tif (referrerOriginCallback) {\n\t\treferrerOrigin = referrerOriginCallback(referrerOrigin);\n\t}\n\n\t// 8.Execute the statements corresponding to the value of policy:\n\tconst currentURL = new URL(request.url);\n\n\tswitch (policy) {\n\t\tcase 'no-referrer':\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin':\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'unsafe-url':\n\t\t\treturn referrerURL;\n\n\t\tcase 'strict-origin':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerOrigin.\n\t\t\treturn referrerOrigin.toString();\n\n\t\tcase 'strict-origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 3. Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'same-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. Return no referrer.\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'no-referrer-when-downgrade':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerURL.\n\t\t\treturn referrerURL;\n\n\t\tdefault:\n\t\t\tthrow new TypeError(`Invalid referrerPolicy: ${policy}`);\n\t}\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}\n * @param {Headers} headers Response headers\n * @returns {string} policy\n */\nexport function parseReferrerPolicyFromHeader(headers) {\n\t// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`\n\t// and response’s header list.\n\tconst policyTokens = (headers.get('referrer-policy') || '').split(/[,\\s]+/);\n\n\t// 2. Let policy be the empty string.\n\tlet policy = '';\n\n\t// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty\n\t// string, then set policy to token.\n\t// Note: This algorithm loops over multiple policy values to allow deployment of new policy\n\t// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.\n\tfor (const token of policyTokens) {\n\t\tif (token && ReferrerPolicy.has(token)) {\n\t\t\tpolicy = token;\n\t\t}\n\t}\n\n\t// 4. Return policy.\n\treturn policy;\n}\n"],"names":["isIP"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"referrer.cjs","sources":["../../../../../../../node_modules/node-fetch/src/utils/referrer.js"],"sourcesContent":["import {isIP} from 'node:net';\n\n/**\n * @external URL\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}\n */\n\n/**\n * @module utils/referrer\n * @private\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}\n * @param {string} URL\n * @param {boolean} [originOnly=false]\n */\nexport function stripURLForUseAsAReferrer(url, originOnly = false) {\n\t// 1. If url is null, return no referrer.\n\tif (url == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\treturn 'no-referrer';\n\t}\n\n\turl = new URL(url);\n\n\t// 2. If url's scheme is a local scheme, then return no referrer.\n\tif (/^(about|blob|data):$/.test(url.protocol)) {\n\t\treturn 'no-referrer';\n\t}\n\n\t// 3. Set url's username to the empty string.\n\turl.username = '';\n\n\t// 4. Set url's password to null.\n\t// Note: `null` appears to be a mistake as this actually results in the password being `\"null\"`.\n\turl.password = '';\n\n\t// 5. Set url's fragment to null.\n\t// Note: `null` appears to be a mistake as this actually results in the fragment being `\"#null\"`.\n\turl.hash = '';\n\n\t// 6. If the origin-only flag is true, then:\n\tif (originOnly) {\n\t\t// 6.1. Set url's path to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the path being `\"/null\"`.\n\t\turl.pathname = '';\n\n\t\t// 6.2. Set url's query to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the query being `\"?null\"`.\n\t\turl.search = '';\n\t}\n\n\t// 7. Return url.\n\treturn url;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}\n */\nexport const ReferrerPolicy = new Set([\n\t'',\n\t'no-referrer',\n\t'no-referrer-when-downgrade',\n\t'same-origin',\n\t'origin',\n\t'strict-origin',\n\t'origin-when-cross-origin',\n\t'strict-origin-when-cross-origin',\n\t'unsafe-url'\n]);\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}\n */\nexport const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}\n * @param {string} referrerPolicy\n * @returns {string} referrerPolicy\n */\nexport function validateReferrerPolicy(referrerPolicy) {\n\tif (!ReferrerPolicy.has(referrerPolicy)) {\n\t\tthrow new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);\n\t}\n\n\treturn referrerPolicy;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isOriginPotentiallyTrustworthy(url) {\n\t// 1. If origin is an opaque origin, return \"Not Trustworthy\".\n\t// Not applicable\n\n\t// 2. Assert: origin is a tuple origin.\n\t// Not for implementations\n\n\t// 3. If origin's scheme is either \"https\" or \"wss\", return \"Potentially Trustworthy\".\n\tif (/^(http|ws)s:$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n\tconst hostIp = url.host.replace(/(^\\[)|(]$)/g, '');\n\tconst hostIPVersion = isIP(hostIp);\n\n\tif (hostIPVersion === 4 && /^127\\./.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\tif (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\t// 5. If origin's host component is \"localhost\" or falls within \".localhost\", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return \"Potentially Trustworthy\".\n\t// We are returning FALSE here because we cannot ensure conformance to\n\t// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)\n\tif (url.host === 'localhost' || url.host.endsWith('.localhost')) {\n\t\treturn false;\n\t}\n\n\t// 6. If origin's scheme component is file, return \"Potentially Trustworthy\".\n\tif (url.protocol === 'file:') {\n\t\treturn true;\n\t}\n\n\t// 7. If origin's scheme component is one which the user agent considers to be authenticated, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 8. If origin has been configured as a trustworthy origin, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 9. Return \"Not Trustworthy\".\n\treturn false;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isUrlPotentiallyTrustworthy(url) {\n\t// 1. If url is \"about:blank\" or \"about:srcdoc\", return \"Potentially Trustworthy\".\n\tif (/^about:(blank|srcdoc)$/.test(url)) {\n\t\treturn true;\n\t}\n\n\t// 2. If url's scheme is \"data\", return \"Potentially Trustworthy\".\n\tif (url.protocol === 'data:') {\n\t\treturn true;\n\t}\n\n\t// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were\n\t// created. Therefore, blobs created in a trustworthy origin will themselves be potentially\n\t// trustworthy.\n\tif (/^(blob|filesystem):$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.\n\treturn isOriginPotentiallyTrustworthy(url);\n}\n\n/**\n * Modifies the referrerURL to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerURLCallback\n * @param {external:URL} referrerURL\n * @returns {external:URL} modified referrerURL\n */\n\n/**\n * Modifies the referrerOrigin to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerOriginCallback\n * @param {external:URL} referrerOrigin\n * @returns {external:URL} modified referrerOrigin\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}\n * @param {Request} request\n * @param {object} o\n * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback\n * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback\n * @returns {external:URL} Request's referrer\n */\nexport function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {\n\t// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for\n\t// these cases:\n\t// > Note: If request's referrer is \"no-referrer\", Fetch will not call into this algorithm.\n\t// > Note: If request's referrer policy is the empty string, Fetch will not call into this\n\t// > algorithm.\n\tif (request.referrer === 'no-referrer' || request.referrerPolicy === '') {\n\t\treturn null;\n\t}\n\n\t// 1. Let policy be request's associated referrer policy.\n\tconst policy = request.referrerPolicy;\n\n\t// 2. Let environment be request's client.\n\t// not applicable to node.js\n\n\t// 3. Switch on request's referrer:\n\tif (request.referrer === 'about:client') {\n\t\treturn 'no-referrer';\n\t}\n\n\t// \"a URL\": Let referrerSource be request's referrer.\n\tconst referrerSource = request.referrer;\n\n\t// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.\n\tlet referrerURL = stripURLForUseAsAReferrer(referrerSource);\n\n\t// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the\n\t// origin-only flag set to true.\n\tlet referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);\n\n\t// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set\n\t// referrerURL to referrerOrigin.\n\tif (referrerURL.toString().length > 4096) {\n\t\treferrerURL = referrerOrigin;\n\t}\n\n\t// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary\n\t// policy considerations in the interests of minimizing data leakage. For example, the user\n\t// agent could strip the URL down to an origin, modify its host, replace it with an empty\n\t// string, etc.\n\tif (referrerURLCallback) {\n\t\treferrerURL = referrerURLCallback(referrerURL);\n\t}\n\n\tif (referrerOriginCallback) {\n\t\treferrerOrigin = referrerOriginCallback(referrerOrigin);\n\t}\n\n\t// 8.Execute the statements corresponding to the value of policy:\n\tconst currentURL = new URL(request.url);\n\n\tswitch (policy) {\n\t\tcase 'no-referrer':\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin':\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'unsafe-url':\n\t\t\treturn referrerURL;\n\n\t\tcase 'strict-origin':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerOrigin.\n\t\t\treturn referrerOrigin.toString();\n\n\t\tcase 'strict-origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 3. Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'same-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. Return no referrer.\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'no-referrer-when-downgrade':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerURL.\n\t\t\treturn referrerURL;\n\n\t\tdefault:\n\t\t\tthrow new TypeError(`Invalid referrerPolicy: ${policy}`);\n\t}\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}\n * @param {Headers} headers Response headers\n * @returns {string} policy\n */\nexport function parseReferrerPolicyFromHeader(headers) {\n\t// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`\n\t// and response’s header list.\n\tconst policyTokens = (headers.get('referrer-policy') || '').split(/[,\\s]+/);\n\n\t// 2. Let policy be the empty string.\n\tlet policy = '';\n\n\t// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty\n\t// string, then set policy to token.\n\t// Note: This algorithm loops over multiple policy values to allow deployment of new policy\n\t// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.\n\tfor (const token of policyTokens) {\n\t\tif (token && ReferrerPolicy.has(token)) {\n\t\t\tpolicy = token;\n\t\t}\n\t}\n\n\t// 4. Return policy.\n\treturn policy;\n}\n"],"names":["isIP"],"mappings":";;;AAiBO,SAAS,0BAA0B,KAAK,aAAa,OAAO;AAElE,MAAI,OAAO,MAAM;AAChB,WAAO;AAAA,EACR;AAEA,QAAM,IAAI,IAAI,GAAG;AAGjB,MAAI,uBAAuB,KAAK,IAAI,QAAQ,GAAG;AAC9C,WAAO;AAAA,EACR;AAGA,MAAI,WAAW;AAIf,MAAI,WAAW;AAIf,MAAI,OAAO;AAGX,MAAI,YAAY;AAGf,QAAI,WAAW;AAIf,QAAI,SAAS;AAAA,EACd;AAGA,SAAO;AACR;AAKY,MAAC,iBAAiB,oBAAI,IAAI;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAKW,MAAC,0BAA0B;AAOhC,SAAS,uBAAuB,gBAAgB;AACtD,MAAI,CAAC,eAAe,IAAI,cAAc,GAAG;AACxC,UAAM,IAAI,UAAU,2BAA2B,cAAc,EAAE;AAAA,EAChE;AAEA,SAAO;AACR;AAOO,SAAS,+BAA+B,KAAK;AAQnD,MAAI,gBAAgB,KAAK,IAAI,QAAQ,GAAG;AACvC,WAAO;AAAA,EACR;AAGA,QAAM,SAAS,IAAI,KAAK,QAAQ,eAAe,EAAE;AACjD,QAAM,gBAAgBA,IAAAA,KAAK,MAAM;AAEjC,MAAI,kBAAkB,KAAK,SAAS,KAAK,MAAM,GAAG;AACjD,WAAO;AAAA,EACR;AAEA,MAAI,kBAAkB,KAAK,mCAAmC,KAAK,MAAM,GAAG;AAC3E,WAAO;AAAA,EACR;AAKA,MAAI,IAAI,SAAS,eAAe,IAAI,KAAK,SAAS,YAAY,GAAG;AAChE,WAAO;AAAA,EACR;AAGA,MAAI,IAAI,aAAa,SAAS;AAC7B,WAAO;AAAA,EACR;AASA,SAAO;AACR;AAOO,SAAS,4BAA4B,KAAK;AAEhD,MAAI,yBAAyB,KAAK,GAAG,GAAG;AACvC,WAAO;AAAA,EACR;AAGA,MAAI,IAAI,aAAa,SAAS;AAC7B,WAAO;AAAA,EACR;AAKA,MAAI,uBAAuB,KAAK,IAAI,QAAQ,GAAG;AAC9C,WAAO;AAAA,EACR;AAGA,SAAO,+BAA+B,GAAG;AAC1C;AA0BO,SAAS,0BAA0B,SAAS,EAAC,qBAAqB,uBAAsB,IAAI,CAAA,GAAI;AAMtG,MAAI,QAAQ,aAAa,iBAAiB,QAAQ,mBAAmB,IAAI;AACxE,WAAO;AAAA,EACR;AAGA,QAAM,SAAS,QAAQ;AAMvB,MAAI,QAAQ,aAAa,gBAAgB;AACxC,WAAO;AAAA,EACR;AAGA,QAAM,iBAAiB,QAAQ;AAG/B,MAAI,cAAc,0BAA0B,cAAc;AAI1D,MAAI,iBAAiB,0BAA0B,gBAAgB,IAAI;AAInE,MAAI,YAAY,WAAW,SAAS,MAAM;AACzC,kBAAc;AAAA,EACf;AAMA,MAAI,qBAAqB;AACxB,kBAAc,oBAAoB,WAAW;AAAA,EAC9C;AAEA,MAAI,wBAAwB;AAC3B,qBAAiB,uBAAuB,cAAc;AAAA,EACvD;AAGA,QAAM,aAAa,IAAI,IAAI,QAAQ,GAAG;AAEtC,UAAQ,QAAM;AAAA,IACb,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACR;AAGA,aAAO,eAAe,SAAQ;AAAA,IAE/B,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACR;AAIA,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACR;AAGA,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACR;AAGA,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACR;AAGA,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACR;AAGA,aAAO;AAAA,IAER;AACC,YAAM,IAAI,UAAU,2BAA2B,MAAM,EAAE;AAAA,EAC1D;AACA;AAOO,SAAS,8BAA8B,SAAS;AAGtD,QAAM,gBAAgB,QAAQ,IAAI,iBAAiB,KAAK,IAAI,MAAM,QAAQ;AAG1E,MAAI,SAAS;AAMb,aAAW,SAAS,cAAc;AACjC,QAAI,SAAS,eAAe,IAAI,KAAK,GAAG;AACvC,eAAS;AAAA,IACV;AAAA,EACD;AAGA,SAAO;AACR;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"referrer.js","sources":["../../../../../../../node_modules/node-fetch/src/utils/referrer.js"],"sourcesContent":["import {isIP} from 'node:net';\n\n/**\n * @external URL\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}\n */\n\n/**\n * @module utils/referrer\n * @private\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}\n * @param {string} URL\n * @param {boolean} [originOnly=false]\n */\nexport function stripURLForUseAsAReferrer(url, originOnly = false) {\n\t// 1. If url is null, return no referrer.\n\tif (url == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\treturn 'no-referrer';\n\t}\n\n\turl = new URL(url);\n\n\t// 2. If url's scheme is a local scheme, then return no referrer.\n\tif (/^(about|blob|data):$/.test(url.protocol)) {\n\t\treturn 'no-referrer';\n\t}\n\n\t// 3. Set url's username to the empty string.\n\turl.username = '';\n\n\t// 4. Set url's password to null.\n\t// Note: `null` appears to be a mistake as this actually results in the password being `\"null\"`.\n\turl.password = '';\n\n\t// 5. Set url's fragment to null.\n\t// Note: `null` appears to be a mistake as this actually results in the fragment being `\"#null\"`.\n\turl.hash = '';\n\n\t// 6. If the origin-only flag is true, then:\n\tif (originOnly) {\n\t\t// 6.1. Set url's path to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the path being `\"/null\"`.\n\t\turl.pathname = '';\n\n\t\t// 6.2. Set url's query to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the query being `\"?null\"`.\n\t\turl.search = '';\n\t}\n\n\t// 7. Return url.\n\treturn url;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}\n */\nexport const ReferrerPolicy = new Set([\n\t'',\n\t'no-referrer',\n\t'no-referrer-when-downgrade',\n\t'same-origin',\n\t'origin',\n\t'strict-origin',\n\t'origin-when-cross-origin',\n\t'strict-origin-when-cross-origin',\n\t'unsafe-url'\n]);\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}\n */\nexport const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}\n * @param {string} referrerPolicy\n * @returns {string} referrerPolicy\n */\nexport function validateReferrerPolicy(referrerPolicy) {\n\tif (!ReferrerPolicy.has(referrerPolicy)) {\n\t\tthrow new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);\n\t}\n\n\treturn referrerPolicy;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isOriginPotentiallyTrustworthy(url) {\n\t// 1. If origin is an opaque origin, return \"Not Trustworthy\".\n\t// Not applicable\n\n\t// 2. Assert: origin is a tuple origin.\n\t// Not for implementations\n\n\t// 3. If origin's scheme is either \"https\" or \"wss\", return \"Potentially Trustworthy\".\n\tif (/^(http|ws)s:$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n\tconst hostIp = url.host.replace(/(^\\[)|(]$)/g, '');\n\tconst hostIPVersion = isIP(hostIp);\n\n\tif (hostIPVersion === 4 && /^127\\./.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\tif (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\t// 5. If origin's host component is \"localhost\" or falls within \".localhost\", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return \"Potentially Trustworthy\".\n\t// We are returning FALSE here because we cannot ensure conformance to\n\t// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)\n\tif (url.host === 'localhost' || url.host.endsWith('.localhost')) {\n\t\treturn false;\n\t}\n\n\t// 6. If origin's scheme component is file, return \"Potentially Trustworthy\".\n\tif (url.protocol === 'file:') {\n\t\treturn true;\n\t}\n\n\t// 7. If origin's scheme component is one which the user agent considers to be authenticated, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 8. If origin has been configured as a trustworthy origin, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 9. Return \"Not Trustworthy\".\n\treturn false;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isUrlPotentiallyTrustworthy(url) {\n\t// 1. If url is \"about:blank\" or \"about:srcdoc\", return \"Potentially Trustworthy\".\n\tif (/^about:(blank|srcdoc)$/.test(url)) {\n\t\treturn true;\n\t}\n\n\t// 2. If url's scheme is \"data\", return \"Potentially Trustworthy\".\n\tif (url.protocol === 'data:') {\n\t\treturn true;\n\t}\n\n\t// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were\n\t// created. Therefore, blobs created in a trustworthy origin will themselves be potentially\n\t// trustworthy.\n\tif (/^(blob|filesystem):$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.\n\treturn isOriginPotentiallyTrustworthy(url);\n}\n\n/**\n * Modifies the referrerURL to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerURLCallback\n * @param {external:URL} referrerURL\n * @returns {external:URL} modified referrerURL\n */\n\n/**\n * Modifies the referrerOrigin to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerOriginCallback\n * @param {external:URL} referrerOrigin\n * @returns {external:URL} modified referrerOrigin\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}\n * @param {Request} request\n * @param {object} o\n * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback\n * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback\n * @returns {external:URL} Request's referrer\n */\nexport function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {\n\t// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for\n\t// these cases:\n\t// > Note: If request's referrer is \"no-referrer\", Fetch will not call into this algorithm.\n\t// > Note: If request's referrer policy is the empty string, Fetch will not call into this\n\t// > algorithm.\n\tif (request.referrer === 'no-referrer' || request.referrerPolicy === '') {\n\t\treturn null;\n\t}\n\n\t// 1. Let policy be request's associated referrer policy.\n\tconst policy = request.referrerPolicy;\n\n\t// 2. Let environment be request's client.\n\t// not applicable to node.js\n\n\t// 3. Switch on request's referrer:\n\tif (request.referrer === 'about:client') {\n\t\treturn 'no-referrer';\n\t}\n\n\t// \"a URL\": Let referrerSource be request's referrer.\n\tconst referrerSource = request.referrer;\n\n\t// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.\n\tlet referrerURL = stripURLForUseAsAReferrer(referrerSource);\n\n\t// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the\n\t// origin-only flag set to true.\n\tlet referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);\n\n\t// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set\n\t// referrerURL to referrerOrigin.\n\tif (referrerURL.toString().length > 4096) {\n\t\treferrerURL = referrerOrigin;\n\t}\n\n\t// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary\n\t// policy considerations in the interests of minimizing data leakage. For example, the user\n\t// agent could strip the URL down to an origin, modify its host, replace it with an empty\n\t// string, etc.\n\tif (referrerURLCallback) {\n\t\treferrerURL = referrerURLCallback(referrerURL);\n\t}\n\n\tif (referrerOriginCallback) {\n\t\treferrerOrigin = referrerOriginCallback(referrerOrigin);\n\t}\n\n\t// 8.Execute the statements corresponding to the value of policy:\n\tconst currentURL = new URL(request.url);\n\n\tswitch (policy) {\n\t\tcase 'no-referrer':\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin':\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'unsafe-url':\n\t\t\treturn referrerURL;\n\n\t\tcase 'strict-origin':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerOrigin.\n\t\t\treturn referrerOrigin.toString();\n\n\t\tcase 'strict-origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 3. Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'same-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. Return no referrer.\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'no-referrer-when-downgrade':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerURL.\n\t\t\treturn referrerURL;\n\n\t\tdefault:\n\t\t\tthrow new TypeError(`Invalid referrerPolicy: ${policy}`);\n\t}\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}\n * @param {Headers} headers Response headers\n * @returns {string} policy\n */\nexport function parseReferrerPolicyFromHeader(headers) {\n\t// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`\n\t// and response’s header list.\n\tconst policyTokens = (headers.get('referrer-policy') || '').split(/[,\\s]+/);\n\n\t// 2. Let policy be the empty string.\n\tlet policy = '';\n\n\t// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty\n\t// string, then set policy to token.\n\t// Note: This algorithm loops over multiple policy values to allow deployment of new policy\n\t// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.\n\tfor (const token of policyTokens) {\n\t\tif (token && ReferrerPolicy.has(token)) {\n\t\t\tpolicy = token;\n\t\t}\n\t}\n\n\t// 4. Return policy.\n\treturn policy;\n}\n"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"referrer.js","sources":["../../../../../../../node_modules/node-fetch/src/utils/referrer.js"],"sourcesContent":["import {isIP} from 'node:net';\n\n/**\n * @external URL\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}\n */\n\n/**\n * @module utils/referrer\n * @private\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}\n * @param {string} URL\n * @param {boolean} [originOnly=false]\n */\nexport function stripURLForUseAsAReferrer(url, originOnly = false) {\n\t// 1. If url is null, return no referrer.\n\tif (url == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\treturn 'no-referrer';\n\t}\n\n\turl = new URL(url);\n\n\t// 2. If url's scheme is a local scheme, then return no referrer.\n\tif (/^(about|blob|data):$/.test(url.protocol)) {\n\t\treturn 'no-referrer';\n\t}\n\n\t// 3. Set url's username to the empty string.\n\turl.username = '';\n\n\t// 4. Set url's password to null.\n\t// Note: `null` appears to be a mistake as this actually results in the password being `\"null\"`.\n\turl.password = '';\n\n\t// 5. Set url's fragment to null.\n\t// Note: `null` appears to be a mistake as this actually results in the fragment being `\"#null\"`.\n\turl.hash = '';\n\n\t// 6. If the origin-only flag is true, then:\n\tif (originOnly) {\n\t\t// 6.1. Set url's path to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the path being `\"/null\"`.\n\t\turl.pathname = '';\n\n\t\t// 6.2. Set url's query to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the query being `\"?null\"`.\n\t\turl.search = '';\n\t}\n\n\t// 7. Return url.\n\treturn url;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}\n */\nexport const ReferrerPolicy = new Set([\n\t'',\n\t'no-referrer',\n\t'no-referrer-when-downgrade',\n\t'same-origin',\n\t'origin',\n\t'strict-origin',\n\t'origin-when-cross-origin',\n\t'strict-origin-when-cross-origin',\n\t'unsafe-url'\n]);\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}\n */\nexport const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}\n * @param {string} referrerPolicy\n * @returns {string} referrerPolicy\n */\nexport function validateReferrerPolicy(referrerPolicy) {\n\tif (!ReferrerPolicy.has(referrerPolicy)) {\n\t\tthrow new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);\n\t}\n\n\treturn referrerPolicy;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isOriginPotentiallyTrustworthy(url) {\n\t// 1. If origin is an opaque origin, return \"Not Trustworthy\".\n\t// Not applicable\n\n\t// 2. Assert: origin is a tuple origin.\n\t// Not for implementations\n\n\t// 3. If origin's scheme is either \"https\" or \"wss\", return \"Potentially Trustworthy\".\n\tif (/^(http|ws)s:$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n\tconst hostIp = url.host.replace(/(^\\[)|(]$)/g, '');\n\tconst hostIPVersion = isIP(hostIp);\n\n\tif (hostIPVersion === 4 && /^127\\./.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\tif (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\t// 5. If origin's host component is \"localhost\" or falls within \".localhost\", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return \"Potentially Trustworthy\".\n\t// We are returning FALSE here because we cannot ensure conformance to\n\t// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)\n\tif (url.host === 'localhost' || url.host.endsWith('.localhost')) {\n\t\treturn false;\n\t}\n\n\t// 6. If origin's scheme component is file, return \"Potentially Trustworthy\".\n\tif (url.protocol === 'file:') {\n\t\treturn true;\n\t}\n\n\t// 7. If origin's scheme component is one which the user agent considers to be authenticated, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 8. If origin has been configured as a trustworthy origin, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 9. Return \"Not Trustworthy\".\n\treturn false;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isUrlPotentiallyTrustworthy(url) {\n\t// 1. If url is \"about:blank\" or \"about:srcdoc\", return \"Potentially Trustworthy\".\n\tif (/^about:(blank|srcdoc)$/.test(url)) {\n\t\treturn true;\n\t}\n\n\t// 2. If url's scheme is \"data\", return \"Potentially Trustworthy\".\n\tif (url.protocol === 'data:') {\n\t\treturn true;\n\t}\n\n\t// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were\n\t// created. Therefore, blobs created in a trustworthy origin will themselves be potentially\n\t// trustworthy.\n\tif (/^(blob|filesystem):$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.\n\treturn isOriginPotentiallyTrustworthy(url);\n}\n\n/**\n * Modifies the referrerURL to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerURLCallback\n * @param {external:URL} referrerURL\n * @returns {external:URL} modified referrerURL\n */\n\n/**\n * Modifies the referrerOrigin to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerOriginCallback\n * @param {external:URL} referrerOrigin\n * @returns {external:URL} modified referrerOrigin\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}\n * @param {Request} request\n * @param {object} o\n * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback\n * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback\n * @returns {external:URL} Request's referrer\n */\nexport function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {\n\t// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for\n\t// these cases:\n\t// > Note: If request's referrer is \"no-referrer\", Fetch will not call into this algorithm.\n\t// > Note: If request's referrer policy is the empty string, Fetch will not call into this\n\t// > algorithm.\n\tif (request.referrer === 'no-referrer' || request.referrerPolicy === '') {\n\t\treturn null;\n\t}\n\n\t// 1. Let policy be request's associated referrer policy.\n\tconst policy = request.referrerPolicy;\n\n\t// 2. Let environment be request's client.\n\t// not applicable to node.js\n\n\t// 3. Switch on request's referrer:\n\tif (request.referrer === 'about:client') {\n\t\treturn 'no-referrer';\n\t}\n\n\t// \"a URL\": Let referrerSource be request's referrer.\n\tconst referrerSource = request.referrer;\n\n\t// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.\n\tlet referrerURL = stripURLForUseAsAReferrer(referrerSource);\n\n\t// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the\n\t// origin-only flag set to true.\n\tlet referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);\n\n\t// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set\n\t// referrerURL to referrerOrigin.\n\tif (referrerURL.toString().length > 4096) {\n\t\treferrerURL = referrerOrigin;\n\t}\n\n\t// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary\n\t// policy considerations in the interests of minimizing data leakage. For example, the user\n\t// agent could strip the URL down to an origin, modify its host, replace it with an empty\n\t// string, etc.\n\tif (referrerURLCallback) {\n\t\treferrerURL = referrerURLCallback(referrerURL);\n\t}\n\n\tif (referrerOriginCallback) {\n\t\treferrerOrigin = referrerOriginCallback(referrerOrigin);\n\t}\n\n\t// 8.Execute the statements corresponding to the value of policy:\n\tconst currentURL = new URL(request.url);\n\n\tswitch (policy) {\n\t\tcase 'no-referrer':\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin':\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'unsafe-url':\n\t\t\treturn referrerURL;\n\n\t\tcase 'strict-origin':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerOrigin.\n\t\t\treturn referrerOrigin.toString();\n\n\t\tcase 'strict-origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 3. Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'same-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. Return no referrer.\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'no-referrer-when-downgrade':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerURL.\n\t\t\treturn referrerURL;\n\n\t\tdefault:\n\t\t\tthrow new TypeError(`Invalid referrerPolicy: ${policy}`);\n\t}\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}\n * @param {Headers} headers Response headers\n * @returns {string} policy\n */\nexport function parseReferrerPolicyFromHeader(headers) {\n\t// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`\n\t// and response’s header list.\n\tconst policyTokens = (headers.get('referrer-policy') || '').split(/[,\\s]+/);\n\n\t// 2. Let policy be the empty string.\n\tlet policy = '';\n\n\t// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty\n\t// string, then set policy to token.\n\t// Note: This algorithm loops over multiple policy values to allow deployment of new policy\n\t// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.\n\tfor (const token of policyTokens) {\n\t\tif (token && ReferrerPolicy.has(token)) {\n\t\t\tpolicy = token;\n\t\t}\n\t}\n\n\t// 4. Return policy.\n\treturn policy;\n}\n"],"names":[],"mappings":"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","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/npm-run-path/node_modules/path-key/index.js"],"sourcesContent":["export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n"],"names":[],"mappings":";AAAe,SAAS,QAAQ,UAAU,IAAI;AAC7C,QAAM;AAAA,IACL,MAAM,QAAQ;AAAA,IACd,WAAW,QAAQ;AAAA,EACnB,IAAG;AAEJ,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACP;AAED,SAAO,OAAO,KAAK,GAAG,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,YAAW,MAAO,MAAM,KAAK;AAChF;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/npm-run-path/node_modules/path-key/index.js"],"sourcesContent":["export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n"],"names":[],"mappings":";AAAe,SAAS,QAAQ,UAAU,IAAI;AAC7C,QAAM;AAAA,IACL,MAAM,QAAQ;AAAA,IACd,WAAW,QAAQ;AAAA,EACrB,IAAK;AAEJ,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACR;AAEA,SAAO,OAAO,KAAK,GAAG,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,kBAAkB,MAAM,KAAK;AAChF;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/npm-run-path/node_modules/path-key/index.js"],"sourcesContent":["export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n"],"names":[],"mappings":"AAAe,SAAS,QAAQ,UAAU,IAAI;AAC7C,QAAM;AAAA,IACL,MAAM,QAAQ;AAAA,IACd,WAAW,QAAQ;AAAA,EACnB,IAAG;AAEJ,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACP;AAED,SAAO,OAAO,KAAK,GAAG,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,YAAW,MAAO,MAAM,KAAK;AAChF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/npm-run-path/node_modules/path-key/index.js"],"sourcesContent":["export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n"],"names":[],"mappings":"AAAe,SAAS,QAAQ,UAAU,IAAI;AAC7C,QAAM;AAAA,IACL,MAAM,QAAQ;AAAA,IACd,WAAW,QAAQ;AAAA,EACrB,IAAK;AAEJ,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACR;AAEA,SAAO,OAAO,KAAK,GAAG,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,kBAAkB,MAAM,KAAK;AAChF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/npm-run-path/index.js"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport url from 'node:url';\nimport pathKey from 'path-key';\n\nexport function npmRunPath(options = {}) {\n\tconst {\n\t\tcwd = process.cwd(),\n\t\tpath: path_ = process.env[pathKey()],\n\t\texecPath = process.execPath,\n\t} = options;\n\n\tlet previous;\n\tconst cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd;\n\tlet cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n\n\t// Ensure the running `node` binary is used.\n\tresult.push(path.resolve(cwdString, execPath, '..'));\n\n\treturn [...result, path_].join(path.delimiter);\n}\n\nexport function npmRunPathEnv({env = process.env, ...options} = {}) {\n\tenv = {...env};\n\n\tconst path = pathKey({env});\n\toptions.path = env[path];\n\tenv[path] = npmRunPath(options);\n\n\treturn env;\n}\n"],"names":["pathKey","path"],"mappings":";;;;;;AAKO,SAAS,WAAW,UAAU,IAAI;AACxC,QAAM;AAAA,IACL,MAAM,QAAQ,IAAK;AAAA,IACnB,MAAM,QAAQ,QAAQ,IAAIA,MAAO,CAAE;AAAA,IACnC,WAAW,QAAQ;AAAA,EACnB,IAAG;AAEJ,MAAI;AACJ,QAAM,YAAY,eAAe,MAAM,IAAI,cAAc,GAAG,IAAI;AAChE,MAAI,UAAU,KAAK,QAAQ,SAAS;AACpC,QAAM,SAAS,CAAA;AAEf,SAAO,aAAa,SAAS;AAC5B,WAAO,KAAK,KAAK,KAAK,SAAS,mBAAmB,CAAC;AACnD,eAAW;AACX,cAAU,KAAK,QAAQ,SAAS,IAAI;AAAA,EACpC;AAGD,SAAO,KAAK,KAAK,QAAQ,WAAW,UAAU,IAAI,CAAC;AAEnD,SAAO,CAAC,GAAG,QAAQ,KAAK,EAAE,KAAK,KAAK,SAAS;AAC9C;AAEO,SAAS,cAAc,EAAC,MAAM,QAAQ,KAAK,GAAG,QAAO,IAAI,IAAI;AACnE,QAAM,EAAC,GAAG,IAAG;AAEb,QAAMC,QAAOD,MAAQ,EAAC,IAAG,CAAC;AAC1B,UAAQ,OAAO,IAAIC,KAAI;AACvB,MAAIA,KAAI,IAAI,WAAW,OAAO;AAE9B,SAAO;AACR;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/npm-run-path/index.js"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport url from 'node:url';\nimport pathKey from 'path-key';\n\nexport function npmRunPath(options = {}) {\n\tconst {\n\t\tcwd = process.cwd(),\n\t\tpath: path_ = process.env[pathKey()],\n\t\texecPath = process.execPath,\n\t} = options;\n\n\tlet previous;\n\tconst cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd;\n\tlet cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n\n\t// Ensure the running `node` binary is used.\n\tresult.push(path.resolve(cwdString, execPath, '..'));\n\n\treturn [...result, path_].join(path.delimiter);\n}\n\nexport function npmRunPathEnv({env = process.env, ...options} = {}) {\n\tenv = {...env};\n\n\tconst path = pathKey({env});\n\toptions.path = env[path];\n\tenv[path] = npmRunPath(options);\n\n\treturn env;\n}\n"],"names":["pathKey","path"],"mappings":";;;;;;AAKO,SAAS,WAAW,UAAU,IAAI;AACxC,QAAM;AAAA,IACL,MAAM,QAAQ,IAAG;AAAA,IACjB,MAAM,QAAQ,QAAQ,IAAIA,MAAO,CAAE;AAAA,IACnC,WAAW,QAAQ;AAAA,EACrB,IAAK;AAEJ,MAAI;AACJ,QAAM,YAAY,eAAe,MAAM,IAAI,cAAc,GAAG,IAAI;AAChE,MAAI,UAAU,KAAK,QAAQ,SAAS;AACpC,QAAM,SAAS,CAAA;AAEf,SAAO,aAAa,SAAS;AAC5B,WAAO,KAAK,KAAK,KAAK,SAAS,mBAAmB,CAAC;AACnD,eAAW;AACX,cAAU,KAAK,QAAQ,SAAS,IAAI;AAAA,EACrC;AAGA,SAAO,KAAK,KAAK,QAAQ,WAAW,UAAU,IAAI,CAAC;AAEnD,SAAO,CAAC,GAAG,QAAQ,KAAK,EAAE,KAAK,KAAK,SAAS;AAC9C;AAEO,SAAS,cAAc,EAAC,MAAM,QAAQ,KAAK,GAAG,QAAO,IAAI,IAAI;AACnE,QAAM,EAAC,GAAG,IAAG;AAEb,QAAMC,QAAOD,MAAQ,EAAC,IAAG,CAAC;AAC1B,UAAQ,OAAO,IAAIC,KAAI;AACvB,MAAIA,KAAI,IAAI,WAAW,OAAO;AAE9B,SAAO;AACR;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/npm-run-path/index.js"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport url from 'node:url';\nimport pathKey from 'path-key';\n\nexport function npmRunPath(options = {}) {\n\tconst {\n\t\tcwd = process.cwd(),\n\t\tpath: path_ = process.env[pathKey()],\n\t\texecPath = process.execPath,\n\t} = options;\n\n\tlet previous;\n\tconst cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd;\n\tlet cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n\n\t// Ensure the running `node` binary is used.\n\tresult.push(path.resolve(cwdString, execPath, '..'));\n\n\treturn [...result, path_].join(path.delimiter);\n}\n\nexport function npmRunPathEnv({env = process.env, ...options} = {}) {\n\tenv = {...env};\n\n\tconst path = pathKey({env});\n\toptions.path = env[path];\n\tenv[path] = npmRunPath(options);\n\n\treturn env;\n}\n"],"names":["path"],"mappings":";;;;AAKO,SAAS,WAAW,UAAU,IAAI;AACxC,QAAM;AAAA,IACL,MAAM,QAAQ,IAAK;AAAA,IACnB,MAAM,QAAQ,QAAQ,IAAI,QAAO,CAAE;AAAA,IACnC,WAAW,QAAQ;AAAA,EACnB,IAAG;AAEJ,MAAI;AACJ,QAAM,YAAY,eAAe,MAAM,IAAI,cAAc,GAAG,IAAI;AAChE,MAAI,UAAUA,cAAK,QAAQ,SAAS;AACpC,QAAM,SAAS,CAAA;AAEf,SAAO,aAAa,SAAS;AAC5B,WAAO,KAAKA,cAAK,KAAK,SAAS,mBAAmB,CAAC;AACnD,eAAW;AACX,cAAUA,cAAK,QAAQ,SAAS,IAAI;AAAA,EACpC;AAGD,SAAO,KAAKA,cAAK,QAAQ,WAAW,UAAU,IAAI,CAAC;AAEnD,SAAO,CAAC,GAAG,QAAQ,KAAK,EAAE,KAAKA,cAAK,SAAS;AAC9C;AAEO,SAAS,cAAc,EAAC,MAAM,QAAQ,KAAK,GAAG,QAAO,IAAI,IAAI;AACnE,QAAM,EAAC,GAAG,IAAG;AAEb,QAAM,OAAO,QAAQ,EAAC,IAAG,CAAC;AAC1B,UAAQ,OAAO,IAAI,IAAI;AACvB,MAAI,IAAI,IAAI,WAAW,OAAO;AAE9B,SAAO;AACR;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/npm-run-path/index.js"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport url from 'node:url';\nimport pathKey from 'path-key';\n\nexport function npmRunPath(options = {}) {\n\tconst {\n\t\tcwd = process.cwd(),\n\t\tpath: path_ = process.env[pathKey()],\n\t\texecPath = process.execPath,\n\t} = options;\n\n\tlet previous;\n\tconst cwdString = cwd instanceof URL ? url.fileURLToPath(cwd) : cwd;\n\tlet cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n\n\t// Ensure the running `node` binary is used.\n\tresult.push(path.resolve(cwdString, execPath, '..'));\n\n\treturn [...result, path_].join(path.delimiter);\n}\n\nexport function npmRunPathEnv({env = process.env, ...options} = {}) {\n\tenv = {...env};\n\n\tconst path = pathKey({env});\n\toptions.path = env[path];\n\tenv[path] = npmRunPath(options);\n\n\treturn env;\n}\n"],"names":["path"],"mappings":";;;;AAKO,SAAS,WAAW,UAAU,IAAI;AACxC,QAAM;AAAA,IACL,MAAM,QAAQ,IAAG;AAAA,IACjB,MAAM,QAAQ,QAAQ,IAAI,QAAO,CAAE;AAAA,IACnC,WAAW,QAAQ;AAAA,EACrB,IAAK;AAEJ,MAAI;AACJ,QAAM,YAAY,eAAe,MAAM,IAAI,cAAc,GAAG,IAAI;AAChE,MAAI,UAAUA,cAAK,QAAQ,SAAS;AACpC,QAAM,SAAS,CAAA;AAEf,SAAO,aAAa,SAAS;AAC5B,WAAO,KAAKA,cAAK,KAAK,SAAS,mBAAmB,CAAC;AACnD,eAAW;AACX,cAAUA,cAAK,QAAQ,SAAS,IAAI;AAAA,EACrC;AAGA,SAAO,KAAKA,cAAK,QAAQ,WAAW,UAAU,IAAI,CAAC;AAEnD,SAAO,CAAC,GAAG,QAAQ,KAAK,EAAE,KAAKA,cAAK,SAAS;AAC9C;AAEO,SAAS,cAAc,EAAC,MAAM,QAAQ,KAAK,GAAG,QAAO,IAAI,IAAI;AACnE,QAAM,EAAC,GAAG,IAAG;AAEb,QAAM,OAAO,QAAQ,EAAC,IAAG,CAAC;AAC1B,UAAQ,OAAO,IAAI,IAAI;AACvB,MAAI,IAAI,IAAI,WAAW,OAAO;AAE9B,SAAO;AACR;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/onetime/index.js"],"sourcesContent":["import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n"],"names":["onetime","mimicFunction"],"mappings":";;AAEA,MAAM,kBAAkB,oBAAI;AAEvB,MAAC,UAAU,CAAC,WAAW,UAAU,OAAO;AAC5C,MAAI,OAAO,cAAc,YAAY;AACpC,UAAM,IAAI,UAAU,qBAAqB;AAAA,EACzC;AAED,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,eAAe,UAAU,eAAe,UAAU,QAAQ;AAEhE,QAAMA,WAAU,YAAa,YAAY;AACxC,oBAAgB,IAAIA,UAAS,EAAE,SAAS;AAExC,QAAI,cAAc,GAAG;AACpB,oBAAc,UAAU,MAAM,MAAM,UAAU;AAC9C,kBAAY;AAAA,IACf,WAAa,QAAQ,UAAU,MAAM;AAClC,YAAM,IAAI,MAAM,cAAc,YAAY,4BAA4B;AAAA,IACtE;AAED,WAAO;AAAA,EACT;AAECC,QAAcD,UAAS,SAAS;AAChC,kBAAgB,IAAIA,UAAS,SAAS;AAEtC,SAAOA;AACR;AAEA,QAAQ,YAAY,eAAa;AAChC,MAAI,CAAC,gBAAgB,IAAI,SAAS,GAAG;AACpC,UAAM,IAAI,MAAM,wBAAwB,UAAU,IAAI,8CAA8C;AAAA,EACpG;AAED,SAAO,gBAAgB,IAAI,SAAS;AACrC;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/onetime/index.js"],"sourcesContent":["import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n"],"names":["onetime","mimicFunction"],"mappings":";;AAEA,MAAM,kBAAkB,oBAAI,QAAO;AAE9B,MAAC,UAAU,CAAC,WAAW,UAAU,OAAO;AAC5C,MAAI,OAAO,cAAc,YAAY;AACpC,UAAM,IAAI,UAAU,qBAAqB;AAAA,EAC1C;AAEA,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,eAAe,UAAU,eAAe,UAAU,QAAQ;AAEhE,QAAMA,WAAU,YAAa,YAAY;AACxC,oBAAgB,IAAIA,UAAS,EAAE,SAAS;AAExC,QAAI,cAAc,GAAG;AACpB,oBAAc,UAAU,MAAM,MAAM,UAAU;AAC9C,kBAAY;AAAA,IACb,WAAW,QAAQ,UAAU,MAAM;AAClC,YAAM,IAAI,MAAM,cAAc,YAAY,4BAA4B;AAAA,IACvE;AAEA,WAAO;AAAA,EACR;AAEAC,QAAcD,UAAS,SAAS;AAChC,kBAAgB,IAAIA,UAAS,SAAS;AAEtC,SAAOA;AACR;AAEA,QAAQ,YAAY,eAAa;AAChC,MAAI,CAAC,gBAAgB,IAAI,SAAS,GAAG;AACpC,UAAM,IAAI,MAAM,wBAAwB,UAAU,IAAI,8CAA8C;AAAA,EACrG;AAEA,SAAO,gBAAgB,IAAI,SAAS;AACrC;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/onetime/index.js"],"sourcesContent":["import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n"],"names":["onetime"],"mappings":";AAEA,MAAM,kBAAkB,oBAAI;AAEvB,MAAC,UAAU,CAAC,WAAW,UAAU,OAAO;AAC5C,MAAI,OAAO,cAAc,YAAY;AACpC,UAAM,IAAI,UAAU,qBAAqB;AAAA,EACzC;AAED,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,eAAe,UAAU,eAAe,UAAU,QAAQ;AAEhE,QAAMA,WAAU,YAAa,YAAY;AACxC,oBAAgB,IAAIA,UAAS,EAAE,SAAS;AAExC,QAAI,cAAc,GAAG;AACpB,oBAAc,UAAU,MAAM,MAAM,UAAU;AAC9C,kBAAY;AAAA,IACf,WAAa,QAAQ,UAAU,MAAM;AAClC,YAAM,IAAI,MAAM,cAAc,YAAY,4BAA4B;AAAA,IACtE;AAED,WAAO;AAAA,EACT;AAEC,gBAAcA,UAAS,SAAS;AAChC,kBAAgB,IAAIA,UAAS,SAAS;AAEtC,SAAOA;AACR;AAEA,QAAQ,YAAY,eAAa;AAChC,MAAI,CAAC,gBAAgB,IAAI,SAAS,GAAG;AACpC,UAAM,IAAI,MAAM,wBAAwB,UAAU,IAAI,8CAA8C;AAAA,EACpG;AAED,SAAO,gBAAgB,IAAI,SAAS;AACrC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/onetime/index.js"],"sourcesContent":["import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n"],"names":["onetime"],"mappings":";AAEA,MAAM,kBAAkB,oBAAI,QAAO;AAE9B,MAAC,UAAU,CAAC,WAAW,UAAU,OAAO;AAC5C,MAAI,OAAO,cAAc,YAAY;AACpC,UAAM,IAAI,UAAU,qBAAqB;AAAA,EAC1C;AAEA,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,eAAe,UAAU,eAAe,UAAU,QAAQ;AAEhE,QAAMA,WAAU,YAAa,YAAY;AACxC,oBAAgB,IAAIA,UAAS,EAAE,SAAS;AAExC,QAAI,cAAc,GAAG;AACpB,oBAAc,UAAU,MAAM,MAAM,UAAU;AAC9C,kBAAY;AAAA,IACb,WAAW,QAAQ,UAAU,MAAM;AAClC,YAAM,IAAI,MAAM,cAAc,YAAY,4BAA4B;AAAA,IACvE;AAEA,WAAO;AAAA,EACR;AAEA,gBAAcA,UAAS,SAAS;AAChC,kBAAgB,IAAIA,UAAS,SAAS;AAEtC,SAAOA;AACR;AAEA,QAAQ,YAAY,eAAa;AAChC,MAAI,CAAC,gBAAgB,IAAI,SAAS,GAAG;AACpC,UAAM,IAAI,MAAM,wBAAwB,UAAU,IAAI,8CAA8C;AAAA,EACrG;AAEA,SAAO,gBAAgB,IAAI,SAAS;AACrC;","x_google_ignoreList":[0]}
@@ -1,28 +1,14 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => {
5
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
- return value;
7
- };
8
- var __accessCheck = (obj, member, msg) => {
9
- if (!member.has(obj))
10
- throw TypeError("Cannot " + msg);
11
- };
12
- var __privateGet = (obj, member, getter) => {
13
- __accessCheck(obj, member, "read from private field");
14
- return getter ? getter.call(obj) : member.get(obj);
15
- };
16
- var __privateAdd = (obj, member, value) => {
17
- if (member.has(obj))
18
- throw TypeError("Cannot add the same private member more than once");
19
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
20
- };
21
- var __privateSet = (obj, member, value, setter) => {
22
- __accessCheck(obj, member, "write to private field");
23
- setter ? setter.call(obj, value) : member.set(obj, value);
24
- return value;
3
+ var __typeError = (msg) => {
4
+ throw TypeError(msg);
25
5
  };
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
9
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
10
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
11
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
26
12
  var __privateWrapper = (obj, member, setter, getter) => ({
27
13
  set _(value) {
28
14
  __privateSet(obj, member, value, setter);
@@ -41,9 +27,9 @@ class Node {
41
27
  }
42
28
  class Queue {
43
29
  constructor() {
44
- __privateAdd(this, _head, void 0);
45
- __privateAdd(this, _tail, void 0);
46
- __privateAdd(this, _size, void 0);
30
+ __privateAdd(this, _head);
31
+ __privateAdd(this, _tail);
32
+ __privateAdd(this, _size);
47
33
  this.clear();
48
34
  }
49
35
  enqueue(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/p-limit/node_modules/yocto-queue/index.js"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,KAAK;AAAA,EAIV,YAAY,OAAO;AAHnB;AACA;AAGC,SAAK,QAAQ;AAAA,EACb;AACF;AAEe,MAAM,MAAM;AAAA,EAK1B,cAAc;AAJd;AACA;AACA;AAGC,SAAK,MAAK;AAAA,EACV;AAAA,EAED,QAAQ,OAAO;AACd,UAAM,OAAO,IAAI,KAAK,KAAK;AAE3B,QAAI,mBAAK,QAAO;AACf,yBAAK,OAAM,OAAO;AAClB,yBAAK,OAAQ;AAAA,IAChB,OAAS;AACN,yBAAK,OAAQ;AACb,yBAAK,OAAQ;AAAA,IACb;AAED,2BAAK,OAAL;AAAA,EACA;AAAA,EAED,UAAU;AACT,UAAM,UAAU,mBAAK;AACrB,QAAI,CAAC,SAAS;AACb;AAAA,IACA;AAED,uBAAK,OAAQ,mBAAK,OAAM;AACxB,2BAAK,OAAL;AACA,WAAO,QAAQ;AAAA,EACf;AAAA,EAED,QAAQ;AACP,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AAAA,EACb;AAAA,EAED,IAAI,OAAO;AACV,WAAO,mBAAK;AAAA,EACZ;AAAA,EAED,EAAG,OAAO,QAAQ,IAAI;AACrB,QAAI,UAAU,mBAAK;AAEnB,WAAO,SAAS;AACf,YAAM,QAAQ;AACd,gBAAU,QAAQ;AAAA,IAClB;AAAA,EACD;AACF;AAnDC;AACA;AACA;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/p-limit/node_modules/yocto-queue/index.js"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKA,MAAM,KAAK;AAAA,EAIV,YAAY,OAAO;AAHnB;AACA;AAGC,SAAK,QAAQ;AAAA,EACd;AACD;AAEe,MAAM,MAAM;AAAA,EAK1B,cAAc;AAJd;AACA;AACA;AAGC,SAAK,MAAK;AAAA,EACX;AAAA,EAEA,QAAQ,OAAO;AACd,UAAM,OAAO,IAAI,KAAK,KAAK;AAE3B,QAAI,mBAAK,QAAO;AACf,yBAAK,OAAM,OAAO;AAClB,yBAAK,OAAQ;AAAA,IACd,OAAO;AACN,yBAAK,OAAQ;AACb,yBAAK,OAAQ;AAAA,IACd;AAEA,2BAAK,OAAL;AAAA,EACD;AAAA,EAEA,UAAU;AACT,UAAM,UAAU,mBAAK;AACrB,QAAI,CAAC,SAAS;AACb;AAAA,IACD;AAEA,uBAAK,OAAQ,mBAAK,OAAM;AACxB,2BAAK,OAAL;AACA,WAAO,QAAQ;AAAA,EAChB;AAAA,EAEA,QAAQ;AACP,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AAAA,EACd;AAAA,EAEA,IAAI,OAAO;AACV,WAAO,mBAAK;AAAA,EACb;AAAA,EAEA,EAAG,OAAO,QAAQ,IAAI;AACrB,QAAI,UAAU,mBAAK;AAEnB,WAAO,SAAS;AACf,YAAM,QAAQ;AACd,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AACD;AAnDC;AACA;AACA;;","x_google_ignoreList":[0]}
@@ -1,27 +1,13 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => {
4
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- return value;
6
- };
7
- var __accessCheck = (obj, member, msg) => {
8
- if (!member.has(obj))
9
- throw TypeError("Cannot " + msg);
10
- };
11
- var __privateGet = (obj, member, getter) => {
12
- __accessCheck(obj, member, "read from private field");
13
- return getter ? getter.call(obj) : member.get(obj);
14
- };
15
- var __privateAdd = (obj, member, value) => {
16
- if (member.has(obj))
17
- throw TypeError("Cannot add the same private member more than once");
18
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
19
- };
20
- var __privateSet = (obj, member, value, setter) => {
21
- __accessCheck(obj, member, "write to private field");
22
- setter ? setter.call(obj, value) : member.set(obj, value);
23
- return value;
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
24
4
  };
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
8
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
9
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
25
11
  var __privateWrapper = (obj, member, setter, getter) => ({
26
12
  set _(value) {
27
13
  __privateSet(obj, member, value, setter);
@@ -40,9 +26,9 @@ class Node {
40
26
  }
41
27
  class Queue {
42
28
  constructor() {
43
- __privateAdd(this, _head, void 0);
44
- __privateAdd(this, _tail, void 0);
45
- __privateAdd(this, _size, void 0);
29
+ __privateAdd(this, _head);
30
+ __privateAdd(this, _tail);
31
+ __privateAdd(this, _size);
46
32
  this.clear();
47
33
  }
48
34
  enqueue(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/p-limit/node_modules/yocto-queue/index.js"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAKA,MAAM,KAAK;AAAA,EAIV,YAAY,OAAO;AAHnB;AACA;AAGC,SAAK,QAAQ;AAAA,EACb;AACF;AAEe,MAAM,MAAM;AAAA,EAK1B,cAAc;AAJd;AACA;AACA;AAGC,SAAK,MAAK;AAAA,EACV;AAAA,EAED,QAAQ,OAAO;AACd,UAAM,OAAO,IAAI,KAAK,KAAK;AAE3B,QAAI,mBAAK,QAAO;AACf,yBAAK,OAAM,OAAO;AAClB,yBAAK,OAAQ;AAAA,IAChB,OAAS;AACN,yBAAK,OAAQ;AACb,yBAAK,OAAQ;AAAA,IACb;AAED,2BAAK,OAAL;AAAA,EACA;AAAA,EAED,UAAU;AACT,UAAM,UAAU,mBAAK;AACrB,QAAI,CAAC,SAAS;AACb;AAAA,IACA;AAED,uBAAK,OAAQ,mBAAK,OAAM;AACxB,2BAAK,OAAL;AACA,WAAO,QAAQ;AAAA,EACf;AAAA,EAED,QAAQ;AACP,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AAAA,EACb;AAAA,EAED,IAAI,OAAO;AACV,WAAO,mBAAK;AAAA,EACZ;AAAA,EAED,EAAG,OAAO,QAAQ,IAAI;AACrB,QAAI,UAAU,mBAAK;AAEnB,WAAO,SAAS;AACf,YAAM,QAAQ;AACd,gBAAU,QAAQ;AAAA,IAClB;AAAA,EACD;AACF;AAnDC;AACA;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../node_modules/p-limit/node_modules/yocto-queue/index.js"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\t\treturn current.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAKA,MAAM,KAAK;AAAA,EAIV,YAAY,OAAO;AAHnB;AACA;AAGC,SAAK,QAAQ;AAAA,EACd;AACD;AAEe,MAAM,MAAM;AAAA,EAK1B,cAAc;AAJd;AACA;AACA;AAGC,SAAK,MAAK;AAAA,EACX;AAAA,EAEA,QAAQ,OAAO;AACd,UAAM,OAAO,IAAI,KAAK,KAAK;AAE3B,QAAI,mBAAK,QAAO;AACf,yBAAK,OAAM,OAAO;AAClB,yBAAK,OAAQ;AAAA,IACd,OAAO;AACN,yBAAK,OAAQ;AACb,yBAAK,OAAQ;AAAA,IACd;AAEA,2BAAK,OAAL;AAAA,EACD;AAAA,EAEA,UAAU;AACT,UAAM,UAAU,mBAAK;AACrB,QAAI,CAAC,SAAS;AACb;AAAA,IACD;AAEA,uBAAK,OAAQ,mBAAK,OAAM;AACxB,2BAAK,OAAL;AACA,WAAO,QAAQ;AAAA,EAChB;AAAA,EAEA,QAAQ;AACP,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AACb,uBAAK,OAAQ;AAAA,EACd;AAAA,EAEA,IAAI,OAAO;AACV,WAAO,mBAAK;AAAA,EACb;AAAA,EAEA,EAAG,OAAO,QAAQ,IAAI;AACrB,QAAI,UAAU,mBAAK;AAEnB,WAAO,SAAS;AACf,YAAM,QAAQ;AACd,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AACD;AAnDC;AACA;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/p-limit/index.js"],"sourcesContent":["import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n"],"names":["Queue"],"mappings":";;AAEe,SAAS,OAAO,aAAa;AAC3C,MAAI,GAAG,OAAO,UAAU,WAAW,KAAK,gBAAgB,OAAO,sBAAsB,cAAc,IAAI;AACtG,UAAM,IAAI,UAAU,qDAAqD;AAAA,EACzE;AAED,QAAM,QAAQ,IAAIA;AAClB,MAAI,cAAc;AAElB,QAAM,OAAO,MAAM;AAClB;AAEA,QAAI,MAAM,OAAO,GAAG;AACnB,YAAM,QAAO;IACb;AAAA,EACH;AAEC,QAAM,MAAM,OAAO,IAAI,SAAS,SAAS;AACxC;AAEA,UAAM,UAAU,YAAY,GAAG,GAAG,IAAI,GAAC;AAEvC,YAAQ,MAAM;AAEd,QAAI;AACH,YAAM;AAAA,IACN,QAAO;AAAA,IAAE;AAEV;EACF;AAEC,QAAM,UAAU,CAAC,IAAI,SAAS,SAAS;AACtC,UAAM,QAAQ,IAAI,KAAK,QAAW,IAAI,SAAS,IAAI,CAAC;AAEpD,KAAC,YAAY;AAKZ,YAAM,QAAQ;AAEd,UAAI,cAAc,eAAe,MAAM,OAAO,GAAG;AAChD,cAAM,QAAO;MACb;AAAA,IACJ;EACA;AAEC,QAAM,YAAY,CAAC,OAAO,SAAS,IAAI,QAAQ,aAAW;AACzD,YAAQ,IAAI,SAAS,IAAI;AAAA,EAC3B,CAAE;AAED,SAAO,iBAAiB,WAAW;AAAA,IAClC,aAAa;AAAA,MACZ,KAAK,MAAM;AAAA,IACX;AAAA,IACD,cAAc;AAAA,MACb,KAAK,MAAM,MAAM;AAAA,IACjB;AAAA,IACD,YAAY;AAAA,MACX,OAAO,MAAM;AACZ,cAAM,MAAK;AAAA,MACX;AAAA,IACD;AAAA,EACH,CAAE;AAED,SAAO;AACR;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/p-limit/index.js"],"sourcesContent":["import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n"],"names":["Queue"],"mappings":";;AAEe,SAAS,OAAO,aAAa;AAC3C,MAAI,GAAG,OAAO,UAAU,WAAW,KAAK,gBAAgB,OAAO,sBAAsB,cAAc,IAAI;AACtG,UAAM,IAAI,UAAU,qDAAqD;AAAA,EAC1E;AAEA,QAAM,QAAQ,IAAIA,MAAK;AACvB,MAAI,cAAc;AAElB,QAAM,OAAO,MAAM;AAClB;AAEA,QAAI,MAAM,OAAO,GAAG;AACnB,YAAM,QAAO,EAAE;AAAA,IAChB;AAAA,EACD;AAEA,QAAM,MAAM,OAAO,IAAI,SAAS,SAAS;AACxC;AAEA,UAAM,UAAU,YAAY,GAAG,GAAG,IAAI,GAAC;AAEvC,YAAQ,MAAM;AAEd,QAAI;AACH,YAAM;AAAA,IACP,QAAQ;AAAA,IAAC;AAET,SAAI;AAAA,EACL;AAEA,QAAM,UAAU,CAAC,IAAI,SAAS,SAAS;AACtC,UAAM,QAAQ,IAAI,KAAK,QAAW,IAAI,SAAS,IAAI,CAAC;AAEpD,KAAC,YAAY;AAKZ,YAAM,QAAQ,QAAO;AAErB,UAAI,cAAc,eAAe,MAAM,OAAO,GAAG;AAChD,cAAM,QAAO,EAAE;AAAA,MAChB;AAAA,IACD,GAAC;AAAA,EACF;AAEA,QAAM,YAAY,CAAC,OAAO,SAAS,IAAI,QAAQ,aAAW;AACzD,YAAQ,IAAI,SAAS,IAAI;AAAA,EAC1B,CAAC;AAED,SAAO,iBAAiB,WAAW;AAAA,IAClC,aAAa;AAAA,MACZ,KAAK,MAAM;AAAA,IACd;AAAA,IACE,cAAc;AAAA,MACb,KAAK,MAAM,MAAM;AAAA,IACpB;AAAA,IACE,YAAY;AAAA,MACX,OAAO,MAAM;AACZ,cAAM,MAAK;AAAA,MACZ;AAAA,IACH;AAAA,EACA,CAAE;AAED,SAAO;AACR;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/p-limit/index.js"],"sourcesContent":["import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n"],"names":[],"mappings":";AAEe,SAAS,OAAO,aAAa;AAC3C,MAAI,GAAG,OAAO,UAAU,WAAW,KAAK,gBAAgB,OAAO,sBAAsB,cAAc,IAAI;AACtG,UAAM,IAAI,UAAU,qDAAqD;AAAA,EACzE;AAED,QAAM,QAAQ,IAAI;AAClB,MAAI,cAAc;AAElB,QAAM,OAAO,MAAM;AAClB;AAEA,QAAI,MAAM,OAAO,GAAG;AACnB,YAAM,QAAO;IACb;AAAA,EACH;AAEC,QAAM,MAAM,OAAO,IAAI,SAAS,SAAS;AACxC;AAEA,UAAM,UAAU,YAAY,GAAG,GAAG,IAAI,GAAC;AAEvC,YAAQ,MAAM;AAEd,QAAI;AACH,YAAM;AAAA,IACN,QAAO;AAAA,IAAE;AAEV;EACF;AAEC,QAAM,UAAU,CAAC,IAAI,SAAS,SAAS;AACtC,UAAM,QAAQ,IAAI,KAAK,QAAW,IAAI,SAAS,IAAI,CAAC;AAEpD,KAAC,YAAY;AAKZ,YAAM,QAAQ;AAEd,UAAI,cAAc,eAAe,MAAM,OAAO,GAAG;AAChD,cAAM,QAAO;MACb;AAAA,IACJ;EACA;AAEC,QAAM,YAAY,CAAC,OAAO,SAAS,IAAI,QAAQ,aAAW;AACzD,YAAQ,IAAI,SAAS,IAAI;AAAA,EAC3B,CAAE;AAED,SAAO,iBAAiB,WAAW;AAAA,IAClC,aAAa;AAAA,MACZ,KAAK,MAAM;AAAA,IACX;AAAA,IACD,cAAc;AAAA,MACb,KAAK,MAAM,MAAM;AAAA,IACjB;AAAA,IACD,YAAY;AAAA,MACX,OAAO,MAAM;AACZ,cAAM,MAAK;AAAA,MACX;AAAA,IACD;AAAA,EACH,CAAE;AAED,SAAO;AACR;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/p-limit/index.js"],"sourcesContent":["import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n"],"names":[],"mappings":";AAEe,SAAS,OAAO,aAAa;AAC3C,MAAI,GAAG,OAAO,UAAU,WAAW,KAAK,gBAAgB,OAAO,sBAAsB,cAAc,IAAI;AACtG,UAAM,IAAI,UAAU,qDAAqD;AAAA,EAC1E;AAEA,QAAM,QAAQ,IAAI,MAAK;AACvB,MAAI,cAAc;AAElB,QAAM,OAAO,MAAM;AAClB;AAEA,QAAI,MAAM,OAAO,GAAG;AACnB,YAAM,QAAO,EAAE;AAAA,IAChB;AAAA,EACD;AAEA,QAAM,MAAM,OAAO,IAAI,SAAS,SAAS;AACxC;AAEA,UAAM,UAAU,YAAY,GAAG,GAAG,IAAI,GAAC;AAEvC,YAAQ,MAAM;AAEd,QAAI;AACH,YAAM;AAAA,IACP,QAAQ;AAAA,IAAC;AAET,SAAI;AAAA,EACL;AAEA,QAAM,UAAU,CAAC,IAAI,SAAS,SAAS;AACtC,UAAM,QAAQ,IAAI,KAAK,QAAW,IAAI,SAAS,IAAI,CAAC;AAEpD,KAAC,YAAY;AAKZ,YAAM,QAAQ,QAAO;AAErB,UAAI,cAAc,eAAe,MAAM,OAAO,GAAG;AAChD,cAAM,QAAO,EAAE;AAAA,MAChB;AAAA,IACD,GAAC;AAAA,EACF;AAEA,QAAM,YAAY,CAAC,OAAO,SAAS,IAAI,QAAQ,aAAW;AACzD,YAAQ,IAAI,SAAS,IAAI;AAAA,EAC1B,CAAC;AAED,SAAO,iBAAiB,WAAW;AAAA,IAClC,aAAa;AAAA,MACZ,KAAK,MAAM;AAAA,IACd;AAAA,IACE,cAAc;AAAA,MACb,KAAK,MAAM,MAAM;AAAA,IACpB;AAAA,IACE,YAAY;AAAA,MACX,OAAO,MAAM;AACZ,cAAM,MAAK;AAAA,MACZ;AAAA,IACH;AAAA,EACA,CAAE;AAED,SAAO;AACR;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/path-key/index.js"],"sourcesContent":["'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n"],"names":["pathKeyModule"],"mappings":";;;AAEA,MAAM,UAAU,CAAC,UAAU,OAAO;AACjC,QAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,QAAM,WAAW,QAAQ,YAAY,QAAQ;AAE7C,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACP;AAED,SAAO,OAAO,KAAK,WAAW,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,YAAW,MAAO,MAAM,KAAK;AACxF;AAEAA,MAAAA,SAAc,UAAG;AAEjBA,MAAAA,SAAA,QAAA,UAAyB;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/path-key/index.js"],"sourcesContent":["'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n"],"names":["pathKeyModule"],"mappings":";;;AAEA,MAAM,UAAU,CAAC,UAAU,OAAO;AACjC,QAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,QAAM,WAAW,QAAQ,YAAY,QAAQ;AAE7C,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACT;AAEC,SAAO,OAAO,KAAK,WAAW,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,kBAAkB,MAAM,KAAK;AACxF;AAEAA,MAAAA,SAAA,UAAiB;AAEjBA,MAAAA,SAAA,QAAA,UAAyB;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/path-key/index.js"],"sourcesContent":["'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n"],"names":["pathKeyModule"],"mappings":";AAEA,MAAM,UAAU,CAAC,UAAU,OAAO;AACjC,QAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,QAAM,WAAW,QAAQ,YAAY,QAAQ;AAE7C,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACP;AAED,SAAO,OAAO,KAAK,WAAW,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,YAAW,MAAO,MAAM,KAAK;AACxF;AAEAA,UAAc,UAAG;AAEjBA,UAAA,QAAA,UAAyB;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/path-key/index.js"],"sourcesContent":["'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n"],"names":["pathKeyModule"],"mappings":";AAEA,MAAM,UAAU,CAAC,UAAU,OAAO;AACjC,QAAM,cAAc,QAAQ,OAAO,QAAQ;AAC3C,QAAM,WAAW,QAAQ,YAAY,QAAQ;AAE7C,MAAI,aAAa,SAAS;AACzB,WAAO;AAAA,EACT;AAEC,SAAO,OAAO,KAAK,WAAW,EAAE,QAAO,EAAG,KAAK,SAAO,IAAI,kBAAkB,MAAM,KAAK;AACxF;AAEAA,UAAA,UAAiB;AAEjBA,UAAA,QAAA,UAAyB;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"EndOfFileStream.cjs","sources":["../../../../../../node_modules/peek-readable/lib/EndOfFileStream.js"],"sourcesContent":["export const defaultMessages = 'End-Of-Stream';\n/**\n * Thrown on read operation of the end of file or stream has been reached\n */\nexport class EndOfStreamError extends Error {\n constructor() {\n super(defaultMessages);\n }\n}\n"],"names":[],"mappings":";;AAAY,MAAC,kBAAkB;AAIxB,MAAM,yBAAyB,MAAM;AAAA,EACxC,cAAc;AACV,UAAM,eAAe;AAAA,EACxB;AACL;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"EndOfFileStream.cjs","sources":["../../../../../../node_modules/peek-readable/lib/EndOfFileStream.js"],"sourcesContent":["export const defaultMessages = 'End-Of-Stream';\n/**\n * Thrown on read operation of the end of file or stream has been reached\n */\nexport class EndOfStreamError extends Error {\n constructor() {\n super(defaultMessages);\n }\n}\n"],"names":[],"mappings":";;AAAY,MAAC,kBAAkB;AAIxB,MAAM,yBAAyB,MAAM;AAAA,EACxC,cAAc;AACV,UAAM,eAAe;AAAA,EACzB;AACJ;;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"EndOfFileStream.js","sources":["../../../../../../node_modules/peek-readable/lib/EndOfFileStream.js"],"sourcesContent":["export const defaultMessages = 'End-Of-Stream';\n/**\n * Thrown on read operation of the end of file or stream has been reached\n */\nexport class EndOfStreamError extends Error {\n constructor() {\n super(defaultMessages);\n }\n}\n"],"names":[],"mappings":"AAAY,MAAC,kBAAkB;AAIxB,MAAM,yBAAyB,MAAM;AAAA,EACxC,cAAc;AACV,UAAM,eAAe;AAAA,EACxB;AACL;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"EndOfFileStream.js","sources":["../../../../../../node_modules/peek-readable/lib/EndOfFileStream.js"],"sourcesContent":["export const defaultMessages = 'End-Of-Stream';\n/**\n * Thrown on read operation of the end of file or stream has been reached\n */\nexport class EndOfStreamError extends Error {\n constructor() {\n super(defaultMessages);\n }\n}\n"],"names":[],"mappings":"AAAY,MAAC,kBAAkB;AAIxB,MAAM,yBAAyB,MAAM;AAAA,EACxC,cAAc;AACV,UAAM,eAAe;AAAA,EACzB;AACJ;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"R19Error.cjs","sources":["../../../../../../node_modules/r19/dist/R19Error.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass R19Error extends Error {\n constructor(message, options = {}) {\n super();\n __publicField(this, \"procedurePath\");\n __publicField(this, \"procedureArgs\");\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, R19Error);\n }\n this.name = \"R19Error\";\n this.message = message;\n this.cause = options.cause;\n this.procedurePath = options.procedurePath;\n this.procedureArgs = options.procedureArgs;\n }\n}\nexport {\n R19Error\n};\n//# sourceMappingURL=R19Error.js.map\n"],"names":[],"mappings":";;AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAO,CAAA,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU;AACvC,kBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AACpE,SAAO;AACT;AACA,MAAM,iBAAiB,MAAM;AAAA,EAC3B,YAAY,SAAS,UAAU,IAAI;AACjC;AACA,kBAAc,MAAM,eAAe;AACnC,kBAAc,MAAM,eAAe;AACnC,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,QAAQ;AAAA,IACvC;AACD,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,QAAQ,QAAQ;AACrB,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,gBAAgB,QAAQ;AAAA,EAC9B;AACH;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"R19Error.cjs","sources":["../../../../../../node_modules/r19/dist/R19Error.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass R19Error extends Error {\n constructor(message, options = {}) {\n super();\n __publicField(this, \"procedurePath\");\n __publicField(this, \"procedureArgs\");\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, R19Error);\n }\n this.name = \"R19Error\";\n this.message = message;\n this.cause = options.cause;\n this.procedurePath = options.procedurePath;\n this.procedureArgs = options.procedureArgs;\n }\n}\nexport {\n R19Error\n};\n//# sourceMappingURL=R19Error.js.map\n"],"names":[],"mappings":";;AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAK,CAAE,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU;AACvC,kBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AACpE,SAAO;AACT;AACA,MAAM,iBAAiB,MAAM;AAAA,EAC3B,YAAY,SAAS,UAAU,IAAI;AACjC,UAAK;AACL,kBAAc,MAAM,eAAe;AACnC,kBAAc,MAAM,eAAe;AACnC,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,QAAQ;AAAA,IACxC;AACA,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,QAAQ,QAAQ;AACrB,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,gBAAgB,QAAQ;AAAA,EAC/B;AACF;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"R19Error.js","sources":["../../../../../../node_modules/r19/dist/R19Error.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass R19Error extends Error {\n constructor(message, options = {}) {\n super();\n __publicField(this, \"procedurePath\");\n __publicField(this, \"procedureArgs\");\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, R19Error);\n }\n this.name = \"R19Error\";\n this.message = message;\n this.cause = options.cause;\n this.procedurePath = options.procedurePath;\n this.procedureArgs = options.procedureArgs;\n }\n}\nexport {\n R19Error\n};\n//# sourceMappingURL=R19Error.js.map\n"],"names":[],"mappings":"AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAO,CAAA,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU;AACvC,kBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AACpE,SAAO;AACT;AACA,MAAM,iBAAiB,MAAM;AAAA,EAC3B,YAAY,SAAS,UAAU,IAAI;AACjC;AACA,kBAAc,MAAM,eAAe;AACnC,kBAAc,MAAM,eAAe;AACnC,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,QAAQ;AAAA,IACvC;AACD,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,QAAQ,QAAQ;AACrB,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,gBAAgB,QAAQ;AAAA,EAC9B;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"R19Error.js","sources":["../../../../../../node_modules/r19/dist/R19Error.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass R19Error extends Error {\n constructor(message, options = {}) {\n super();\n __publicField(this, \"procedurePath\");\n __publicField(this, \"procedureArgs\");\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, R19Error);\n }\n this.name = \"R19Error\";\n this.message = message;\n this.cause = options.cause;\n this.procedurePath = options.procedurePath;\n this.procedureArgs = options.procedureArgs;\n }\n}\nexport {\n R19Error\n};\n//# sourceMappingURL=R19Error.js.map\n"],"names":[],"mappings":"AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAK,CAAE,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU;AACvC,kBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AACpE,SAAO;AACT;AACA,MAAM,iBAAiB,MAAM;AAAA,EAC3B,YAAY,SAAS,UAAU,IAAI;AACjC,UAAK;AACL,kBAAc,MAAM,eAAe;AACnC,kBAAc,MAAM,eAAe;AACnC,QAAI,MAAM,mBAAmB;AAC3B,YAAM,kBAAkB,MAAM,QAAQ;AAAA,IACxC;AACA,SAAK,OAAO;AACZ,SAAK,UAAU;AACf,SAAK,QAAQ,QAAQ;AACrB,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,gBAAgB,QAAQ;AAAA,EAC/B;AACF;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"createRPCClient.cjs","sources":["../../../../../../../node_modules/r19/dist/client/createRPCClient.js"],"sourcesContent":["import { encode, decode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"../lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"../lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"../lib/replaceLeaves.js\";\nimport { R19Error } from \"../R19Error.js\";\nconst createArbitrarilyNestedFunction = (handler, path = []) => {\n return new Proxy(() => void 0, {\n apply(_target, _this, args) {\n return handler(path, args);\n },\n get(_target, property) {\n return createArbitrarilyNestedFunction(handler, [\n ...path,\n property.toString()\n ]);\n }\n });\n};\nconst createRPCClient = (args) => {\n const resolvedFetch = args.fetch || globalThis.fetch.bind(globalThis);\n return createArbitrarilyNestedFunction(async (procedurePath, procedureArgs) => {\n const preparedProcedureArgs = await replaceLeaves(procedureArgs, async (value) => {\n if (value instanceof Blob) {\n return new Uint8Array(await value.arrayBuffer());\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function arguments.\", {\n procedurePath,\n procedureArgs\n });\n }\n return value;\n });\n const body = encode({\n procedurePath,\n procedureArgs: preparedProcedureArgs\n }, { ignoreUndefined: true });\n const res = await resolvedFetch(args.serverURL, {\n method: \"POST\",\n body,\n headers: {\n \"Content-Type\": \"application/msgpack\"\n }\n });\n const arrayBuffer = await res.arrayBuffer();\n const resObject = decode(new Uint8Array(arrayBuffer));\n if (\"error\" in resObject) {\n const resError = resObject.error;\n if (isR19ErrorLike(resError)) {\n const error = new R19Error(resError.message, {\n procedurePath,\n procedureArgs\n });\n error.stack = resError.stack;\n throw error;\n } else if (isErrorLike(resError)) {\n const error = new Error(resError.message);\n error.name = resError.name;\n error.stack = resError.stack;\n throw error;\n } else {\n throw new R19Error(\"An unexpected response was received from the RPC server.\", {\n procedurePath,\n procedureArgs,\n cause: resObject\n });\n }\n } else {\n return replaceLeaves(resObject.data, async (value) => {\n if (value instanceof Uint8Array) {\n return new Blob([value]);\n }\n return value;\n });\n }\n });\n};\nexport {\n createRPCClient\n};\n//# sourceMappingURL=createRPCClient.js.map\n"],"names":["replaceLeaves","R19Error","encode","decode","isR19ErrorLike","isErrorLike"],"mappings":";;;;;;;;AAKA,MAAM,kCAAkC,CAAC,SAAS,OAAO,OAAO;AAC9D,SAAO,IAAI,MAAM,MAAM,QAAQ;AAAA,IAC7B,MAAM,SAAS,OAAO,MAAM;AAC1B,aAAO,QAAQ,MAAM,IAAI;AAAA,IAC1B;AAAA,IACD,IAAI,SAAS,UAAU;AACrB,aAAO,gCAAgC,SAAS;AAAA,QAC9C,GAAG;AAAA,QACH,SAAS,SAAU;AAAA,MAC3B,CAAO;AAAA,IACF;AAAA,EACL,CAAG;AACH;AACK,MAAC,kBAAkB,CAAC,SAAS;AAChC,QAAM,gBAAgB,KAAK,SAAS,WAAW,MAAM,KAAK,UAAU;AACpE,SAAO,gCAAgC,OAAO,eAAe,kBAAkB;AAC7E,UAAM,wBAAwB,MAAMA,cAAAA,cAAc,eAAe,OAAO,UAAU;AAChF,UAAI,iBAAiB,MAAM;AACzB,eAAO,IAAI,WAAW,MAAM,MAAM,YAAa,CAAA;AAAA,MAChD;AACD,UAAI,OAAO,UAAU,YAAY;AAC/B,cAAM,IAAIC,SAAQ,SAAC,4CAA4C;AAAA,UAC7D;AAAA,UACA;AAAA,QACV,CAAS;AAAA,MACF;AACD,aAAO;AAAA,IACb,CAAK;AACD,UAAM,OAAOC,OAAAA,OAAO;AAAA,MAClB;AAAA,MACA,eAAe;AAAA,IACrB,GAAO,EAAE,iBAAiB,KAAI,CAAE;AAC5B,UAAM,MAAM,MAAM,cAAc,KAAK,WAAW;AAAA,MAC9C,QAAQ;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,gBAAgB;AAAA,MACjB;AAAA,IACP,CAAK;AACD,UAAM,cAAc,MAAM,IAAI;AAC9B,UAAM,YAAYC,OAAM,OAAC,IAAI,WAAW,WAAW,CAAC;AACpD,QAAI,WAAW,WAAW;AACxB,YAAM,WAAW,UAAU;AAC3B,UAAIC,eAAAA,eAAe,QAAQ,GAAG;AAC5B,cAAM,QAAQ,IAAIH,kBAAS,SAAS,SAAS;AAAA,UAC3C;AAAA,UACA;AAAA,QACV,CAAS;AACD,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACd,WAAiBI,YAAAA,YAAY,QAAQ,GAAG;AAChC,cAAM,QAAQ,IAAI,MAAM,SAAS,OAAO;AACxC,cAAM,OAAO,SAAS;AACtB,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACd,OAAa;AACL,cAAM,IAAIJ,SAAQ,SAAC,4DAA4D;AAAA,UAC7E;AAAA,UACA;AAAA,UACA,OAAO;AAAA,QACjB,CAAS;AAAA,MACF;AAAA,IACP,OAAW;AACL,aAAOD,4BAAc,UAAU,MAAM,OAAO,UAAU;AACpD,YAAI,iBAAiB,YAAY;AAC/B,iBAAO,IAAI,KAAK,CAAC,KAAK,CAAC;AAAA,QACxB;AACD,eAAO;AAAA,MACf,CAAO;AAAA,IACF;AAAA,EACL,CAAG;AACH;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"createRPCClient.cjs","sources":["../../../../../../../node_modules/r19/dist/client/createRPCClient.js"],"sourcesContent":["import { encode, decode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"../lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"../lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"../lib/replaceLeaves.js\";\nimport { R19Error } from \"../R19Error.js\";\nconst createArbitrarilyNestedFunction = (handler, path = []) => {\n return new Proxy(() => void 0, {\n apply(_target, _this, args) {\n return handler(path, args);\n },\n get(_target, property) {\n return createArbitrarilyNestedFunction(handler, [\n ...path,\n property.toString()\n ]);\n }\n });\n};\nconst createRPCClient = (args) => {\n const resolvedFetch = args.fetch || globalThis.fetch.bind(globalThis);\n return createArbitrarilyNestedFunction(async (procedurePath, procedureArgs) => {\n const preparedProcedureArgs = await replaceLeaves(procedureArgs, async (value) => {\n if (value instanceof Blob) {\n return new Uint8Array(await value.arrayBuffer());\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function arguments.\", {\n procedurePath,\n procedureArgs\n });\n }\n return value;\n });\n const body = encode({\n procedurePath,\n procedureArgs: preparedProcedureArgs\n }, { ignoreUndefined: true });\n const res = await resolvedFetch(args.serverURL, {\n method: \"POST\",\n body,\n headers: {\n \"Content-Type\": \"application/msgpack\"\n }\n });\n const arrayBuffer = await res.arrayBuffer();\n const resObject = decode(new Uint8Array(arrayBuffer));\n if (\"error\" in resObject) {\n const resError = resObject.error;\n if (isR19ErrorLike(resError)) {\n const error = new R19Error(resError.message, {\n procedurePath,\n procedureArgs\n });\n error.stack = resError.stack;\n throw error;\n } else if (isErrorLike(resError)) {\n const error = new Error(resError.message);\n error.name = resError.name;\n error.stack = resError.stack;\n throw error;\n } else {\n throw new R19Error(\"An unexpected response was received from the RPC server.\", {\n procedurePath,\n procedureArgs,\n cause: resObject\n });\n }\n } else {\n return replaceLeaves(resObject.data, async (value) => {\n if (value instanceof Uint8Array) {\n return new Blob([value]);\n }\n return value;\n });\n }\n });\n};\nexport {\n createRPCClient\n};\n//# sourceMappingURL=createRPCClient.js.map\n"],"names":["replaceLeaves","R19Error","encode","decode","isR19ErrorLike","isErrorLike"],"mappings":";;;;;;;;AAKA,MAAM,kCAAkC,CAAC,SAAS,OAAO,OAAO;AAC9D,SAAO,IAAI,MAAM,MAAM,QAAQ;AAAA,IAC7B,MAAM,SAAS,OAAO,MAAM;AAC1B,aAAO,QAAQ,MAAM,IAAI;AAAA,IAC3B;AAAA,IACA,IAAI,SAAS,UAAU;AACrB,aAAO,gCAAgC,SAAS;AAAA,QAC9C,GAAG;AAAA,QACH,SAAS,SAAQ;AAAA,MACzB,CAAO;AAAA,IACH;AAAA,EACJ,CAAG;AACH;AACK,MAAC,kBAAkB,CAAC,SAAS;AAChC,QAAM,gBAAgB,KAAK,SAAS,WAAW,MAAM,KAAK,UAAU;AACpE,SAAO,gCAAgC,OAAO,eAAe,kBAAkB;AAC7E,UAAM,wBAAwB,MAAMA,cAAAA,cAAc,eAAe,OAAO,UAAU;AAChF,UAAI,iBAAiB,MAAM;AACzB,eAAO,IAAI,WAAW,MAAM,MAAM,YAAW,CAAE;AAAA,MACjD;AACA,UAAI,OAAO,UAAU,YAAY;AAC/B,cAAM,IAAIC,SAAAA,SAAS,4CAA4C;AAAA,UAC7D;AAAA,UACA;AAAA,QACV,CAAS;AAAA,MACH;AACA,aAAO;AAAA,IACT,CAAC;AACD,UAAM,OAAOC,OAAAA,OAAO;AAAA,MAClB;AAAA,MACA,eAAe;AAAA,IACrB,GAAO,EAAE,iBAAiB,MAAM;AAC5B,UAAM,MAAM,MAAM,cAAc,KAAK,WAAW;AAAA,MAC9C,QAAQ;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,gBAAgB;AAAA,MACxB;AAAA,IACA,CAAK;AACD,UAAM,cAAc,MAAM,IAAI,YAAW;AACzC,UAAM,YAAYC,OAAAA,OAAO,IAAI,WAAW,WAAW,CAAC;AACpD,QAAI,WAAW,WAAW;AACxB,YAAM,WAAW,UAAU;AAC3B,UAAIC,eAAAA,eAAe,QAAQ,GAAG;AAC5B,cAAM,QAAQ,IAAIH,kBAAS,SAAS,SAAS;AAAA,UAC3C;AAAA,UACA;AAAA,QACV,CAAS;AACD,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACR,WAAWI,wBAAY,QAAQ,GAAG;AAChC,cAAM,QAAQ,IAAI,MAAM,SAAS,OAAO;AACxC,cAAM,OAAO,SAAS;AACtB,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACR,OAAO;AACL,cAAM,IAAIJ,SAAAA,SAAS,4DAA4D;AAAA,UAC7E;AAAA,UACA;AAAA,UACA,OAAO;AAAA,QACjB,CAAS;AAAA,MACH;AAAA,IACF,OAAO;AACL,aAAOD,4BAAc,UAAU,MAAM,OAAO,UAAU;AACpD,YAAI,iBAAiB,YAAY;AAC/B,iBAAO,IAAI,KAAK,CAAC,KAAK,CAAC;AAAA,QACzB;AACA,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"createRPCClient.js","sources":["../../../../../../../node_modules/r19/dist/client/createRPCClient.js"],"sourcesContent":["import { encode, decode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"../lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"../lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"../lib/replaceLeaves.js\";\nimport { R19Error } from \"../R19Error.js\";\nconst createArbitrarilyNestedFunction = (handler, path = []) => {\n return new Proxy(() => void 0, {\n apply(_target, _this, args) {\n return handler(path, args);\n },\n get(_target, property) {\n return createArbitrarilyNestedFunction(handler, [\n ...path,\n property.toString()\n ]);\n }\n });\n};\nconst createRPCClient = (args) => {\n const resolvedFetch = args.fetch || globalThis.fetch.bind(globalThis);\n return createArbitrarilyNestedFunction(async (procedurePath, procedureArgs) => {\n const preparedProcedureArgs = await replaceLeaves(procedureArgs, async (value) => {\n if (value instanceof Blob) {\n return new Uint8Array(await value.arrayBuffer());\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function arguments.\", {\n procedurePath,\n procedureArgs\n });\n }\n return value;\n });\n const body = encode({\n procedurePath,\n procedureArgs: preparedProcedureArgs\n }, { ignoreUndefined: true });\n const res = await resolvedFetch(args.serverURL, {\n method: \"POST\",\n body,\n headers: {\n \"Content-Type\": \"application/msgpack\"\n }\n });\n const arrayBuffer = await res.arrayBuffer();\n const resObject = decode(new Uint8Array(arrayBuffer));\n if (\"error\" in resObject) {\n const resError = resObject.error;\n if (isR19ErrorLike(resError)) {\n const error = new R19Error(resError.message, {\n procedurePath,\n procedureArgs\n });\n error.stack = resError.stack;\n throw error;\n } else if (isErrorLike(resError)) {\n const error = new Error(resError.message);\n error.name = resError.name;\n error.stack = resError.stack;\n throw error;\n } else {\n throw new R19Error(\"An unexpected response was received from the RPC server.\", {\n procedurePath,\n procedureArgs,\n cause: resObject\n });\n }\n } else {\n return replaceLeaves(resObject.data, async (value) => {\n if (value instanceof Uint8Array) {\n return new Blob([value]);\n }\n return value;\n });\n }\n });\n};\nexport {\n createRPCClient\n};\n//# sourceMappingURL=createRPCClient.js.map\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,kCAAkC,CAAC,SAAS,OAAO,OAAO;AAC9D,SAAO,IAAI,MAAM,MAAM,QAAQ;AAAA,IAC7B,MAAM,SAAS,OAAO,MAAM;AAC1B,aAAO,QAAQ,MAAM,IAAI;AAAA,IAC1B;AAAA,IACD,IAAI,SAAS,UAAU;AACrB,aAAO,gCAAgC,SAAS;AAAA,QAC9C,GAAG;AAAA,QACH,SAAS,SAAU;AAAA,MAC3B,CAAO;AAAA,IACF;AAAA,EACL,CAAG;AACH;AACK,MAAC,kBAAkB,CAAC,SAAS;AAChC,QAAM,gBAAgB,KAAK,SAAS,WAAW,MAAM,KAAK,UAAU;AACpE,SAAO,gCAAgC,OAAO,eAAe,kBAAkB;AAC7E,UAAM,wBAAwB,MAAM,cAAc,eAAe,OAAO,UAAU;AAChF,UAAI,iBAAiB,MAAM;AACzB,eAAO,IAAI,WAAW,MAAM,MAAM,YAAa,CAAA;AAAA,MAChD;AACD,UAAI,OAAO,UAAU,YAAY;AAC/B,cAAM,IAAI,SAAS,4CAA4C;AAAA,UAC7D;AAAA,UACA;AAAA,QACV,CAAS;AAAA,MACF;AACD,aAAO;AAAA,IACb,CAAK;AACD,UAAM,OAAO,OAAO;AAAA,MAClB;AAAA,MACA,eAAe;AAAA,IACrB,GAAO,EAAE,iBAAiB,KAAI,CAAE;AAC5B,UAAM,MAAM,MAAM,cAAc,KAAK,WAAW;AAAA,MAC9C,QAAQ;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,gBAAgB;AAAA,MACjB;AAAA,IACP,CAAK;AACD,UAAM,cAAc,MAAM,IAAI;AAC9B,UAAM,YAAY,OAAO,IAAI,WAAW,WAAW,CAAC;AACpD,QAAI,WAAW,WAAW;AACxB,YAAM,WAAW,UAAU;AAC3B,UAAI,eAAe,QAAQ,GAAG;AAC5B,cAAM,QAAQ,IAAI,SAAS,SAAS,SAAS;AAAA,UAC3C;AAAA,UACA;AAAA,QACV,CAAS;AACD,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACd,WAAiB,YAAY,QAAQ,GAAG;AAChC,cAAM,QAAQ,IAAI,MAAM,SAAS,OAAO;AACxC,cAAM,OAAO,SAAS;AACtB,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACd,OAAa;AACL,cAAM,IAAI,SAAS,4DAA4D;AAAA,UAC7E;AAAA,UACA;AAAA,UACA,OAAO;AAAA,QACjB,CAAS;AAAA,MACF;AAAA,IACP,OAAW;AACL,aAAO,cAAc,UAAU,MAAM,OAAO,UAAU;AACpD,YAAI,iBAAiB,YAAY;AAC/B,iBAAO,IAAI,KAAK,CAAC,KAAK,CAAC;AAAA,QACxB;AACD,eAAO;AAAA,MACf,CAAO;AAAA,IACF;AAAA,EACL,CAAG;AACH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"createRPCClient.js","sources":["../../../../../../../node_modules/r19/dist/client/createRPCClient.js"],"sourcesContent":["import { encode, decode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"../lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"../lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"../lib/replaceLeaves.js\";\nimport { R19Error } from \"../R19Error.js\";\nconst createArbitrarilyNestedFunction = (handler, path = []) => {\n return new Proxy(() => void 0, {\n apply(_target, _this, args) {\n return handler(path, args);\n },\n get(_target, property) {\n return createArbitrarilyNestedFunction(handler, [\n ...path,\n property.toString()\n ]);\n }\n });\n};\nconst createRPCClient = (args) => {\n const resolvedFetch = args.fetch || globalThis.fetch.bind(globalThis);\n return createArbitrarilyNestedFunction(async (procedurePath, procedureArgs) => {\n const preparedProcedureArgs = await replaceLeaves(procedureArgs, async (value) => {\n if (value instanceof Blob) {\n return new Uint8Array(await value.arrayBuffer());\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function arguments.\", {\n procedurePath,\n procedureArgs\n });\n }\n return value;\n });\n const body = encode({\n procedurePath,\n procedureArgs: preparedProcedureArgs\n }, { ignoreUndefined: true });\n const res = await resolvedFetch(args.serverURL, {\n method: \"POST\",\n body,\n headers: {\n \"Content-Type\": \"application/msgpack\"\n }\n });\n const arrayBuffer = await res.arrayBuffer();\n const resObject = decode(new Uint8Array(arrayBuffer));\n if (\"error\" in resObject) {\n const resError = resObject.error;\n if (isR19ErrorLike(resError)) {\n const error = new R19Error(resError.message, {\n procedurePath,\n procedureArgs\n });\n error.stack = resError.stack;\n throw error;\n } else if (isErrorLike(resError)) {\n const error = new Error(resError.message);\n error.name = resError.name;\n error.stack = resError.stack;\n throw error;\n } else {\n throw new R19Error(\"An unexpected response was received from the RPC server.\", {\n procedurePath,\n procedureArgs,\n cause: resObject\n });\n }\n } else {\n return replaceLeaves(resObject.data, async (value) => {\n if (value instanceof Uint8Array) {\n return new Blob([value]);\n }\n return value;\n });\n }\n });\n};\nexport {\n createRPCClient\n};\n//# sourceMappingURL=createRPCClient.js.map\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,kCAAkC,CAAC,SAAS,OAAO,OAAO;AAC9D,SAAO,IAAI,MAAM,MAAM,QAAQ;AAAA,IAC7B,MAAM,SAAS,OAAO,MAAM;AAC1B,aAAO,QAAQ,MAAM,IAAI;AAAA,IAC3B;AAAA,IACA,IAAI,SAAS,UAAU;AACrB,aAAO,gCAAgC,SAAS;AAAA,QAC9C,GAAG;AAAA,QACH,SAAS,SAAQ;AAAA,MACzB,CAAO;AAAA,IACH;AAAA,EACJ,CAAG;AACH;AACK,MAAC,kBAAkB,CAAC,SAAS;AAChC,QAAM,gBAAgB,KAAK,SAAS,WAAW,MAAM,KAAK,UAAU;AACpE,SAAO,gCAAgC,OAAO,eAAe,kBAAkB;AAC7E,UAAM,wBAAwB,MAAM,cAAc,eAAe,OAAO,UAAU;AAChF,UAAI,iBAAiB,MAAM;AACzB,eAAO,IAAI,WAAW,MAAM,MAAM,YAAW,CAAE;AAAA,MACjD;AACA,UAAI,OAAO,UAAU,YAAY;AAC/B,cAAM,IAAI,SAAS,4CAA4C;AAAA,UAC7D;AAAA,UACA;AAAA,QACV,CAAS;AAAA,MACH;AACA,aAAO;AAAA,IACT,CAAC;AACD,UAAM,OAAO,OAAO;AAAA,MAClB;AAAA,MACA,eAAe;AAAA,IACrB,GAAO,EAAE,iBAAiB,MAAM;AAC5B,UAAM,MAAM,MAAM,cAAc,KAAK,WAAW;AAAA,MAC9C,QAAQ;AAAA,MACR;AAAA,MACA,SAAS;AAAA,QACP,gBAAgB;AAAA,MACxB;AAAA,IACA,CAAK;AACD,UAAM,cAAc,MAAM,IAAI,YAAW;AACzC,UAAM,YAAY,OAAO,IAAI,WAAW,WAAW,CAAC;AACpD,QAAI,WAAW,WAAW;AACxB,YAAM,WAAW,UAAU;AAC3B,UAAI,eAAe,QAAQ,GAAG;AAC5B,cAAM,QAAQ,IAAI,SAAS,SAAS,SAAS;AAAA,UAC3C;AAAA,UACA;AAAA,QACV,CAAS;AACD,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACR,WAAW,YAAY,QAAQ,GAAG;AAChC,cAAM,QAAQ,IAAI,MAAM,SAAS,OAAO;AACxC,cAAM,OAAO,SAAS;AACtB,cAAM,QAAQ,SAAS;AACvB,cAAM;AAAA,MACR,OAAO;AACL,cAAM,IAAI,SAAS,4DAA4D;AAAA,UAC7E;AAAA,UACA;AAAA,UACA,OAAO;AAAA,QACjB,CAAS;AAAA,MACH;AAAA,IACF,OAAO;AACL,aAAO,cAAc,UAAU,MAAM,OAAO,UAAU;AACpD,YAAI,iBAAiB,YAAY;AAC/B,iBAAO,IAAI,KAAK,CAAC,KAAK,CAAC;AAAA,QACzB;AACA,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"createRPCMiddleware.cjs","sources":["../../../../../../node_modules/r19/dist/createRPCMiddleware.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { handleRPCRequest } from \"./handleRPCRequest.js\";\nconst createRPCMiddleware = (args) => {\n const fn = (req, res, next) => {\n if (req.method !== \"POST\") {\n res.statusCode = 405;\n res.end();\n return next();\n }\n const requestBodyChunks = [];\n req.on(\"data\", (chunk) => {\n requestBodyChunks.push(chunk);\n });\n req.on(\"end\", async () => {\n const { body, headers, statusCode } = await handleRPCRequest({\n procedures: args.procedures,\n body: Buffer.concat(requestBodyChunks),\n onError: args.onError\n });\n if (statusCode) {\n res.statusCode = statusCode;\n }\n for (const headerName in headers) {\n res.setHeader(headerName, headers[headerName]);\n }\n res.end(Buffer.from(body), \"binary\");\n next();\n });\n };\n fn._procedures = args.procedures;\n return fn;\n};\nexport {\n createRPCMiddleware\n};\n//# sourceMappingURL=createRPCMiddleware.js.map\n"],"names":["handleRPCRequest","Buffer"],"mappings":";;;;AAEK,MAAC,sBAAsB,CAAC,SAAS;AACpC,QAAM,KAAK,CAAC,KAAK,KAAK,SAAS;AAC7B,QAAI,IAAI,WAAW,QAAQ;AACzB,UAAI,aAAa;AACjB,UAAI,IAAG;AACP,aAAO,KAAI;AAAA,IACZ;AACD,UAAM,oBAAoB,CAAA;AAC1B,QAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,wBAAkB,KAAK,KAAK;AAAA,IAClC,CAAK;AACD,QAAI,GAAG,OAAO,YAAY;AACxB,YAAM,EAAE,MAAM,SAAS,WAAY,IAAG,MAAMA,iBAAAA,iBAAiB;AAAA,QAC3D,YAAY,KAAK;AAAA,QACjB,MAAMC,YAAAA,OAAO,OAAO,iBAAiB;AAAA,QACrC,SAAS,KAAK;AAAA,MACtB,CAAO;AACD,UAAI,YAAY;AACd,YAAI,aAAa;AAAA,MAClB;AACD,iBAAW,cAAc,SAAS;AAChC,YAAI,UAAU,YAAY,QAAQ,UAAU,CAAC;AAAA,MAC9C;AACD,UAAI,IAAIA,YAAM,OAAC,KAAK,IAAI,GAAG,QAAQ;AACnC;IACN,CAAK;AAAA,EACL;AACE,KAAG,cAAc,KAAK;AACtB,SAAO;AACT;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"createRPCMiddleware.cjs","sources":["../../../../../../node_modules/r19/dist/createRPCMiddleware.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { handleRPCRequest } from \"./handleRPCRequest.js\";\nconst createRPCMiddleware = (args) => {\n const fn = (req, res, next) => {\n if (req.method !== \"POST\") {\n res.statusCode = 405;\n res.end();\n return next();\n }\n const requestBodyChunks = [];\n req.on(\"data\", (chunk) => {\n requestBodyChunks.push(chunk);\n });\n req.on(\"end\", async () => {\n const { body, headers, statusCode } = await handleRPCRequest({\n procedures: args.procedures,\n body: Buffer.concat(requestBodyChunks),\n onError: args.onError\n });\n if (statusCode) {\n res.statusCode = statusCode;\n }\n for (const headerName in headers) {\n res.setHeader(headerName, headers[headerName]);\n }\n res.end(Buffer.from(body), \"binary\");\n next();\n });\n };\n fn._procedures = args.procedures;\n return fn;\n};\nexport {\n createRPCMiddleware\n};\n//# sourceMappingURL=createRPCMiddleware.js.map\n"],"names":["handleRPCRequest","Buffer"],"mappings":";;;;AAEK,MAAC,sBAAsB,CAAC,SAAS;AACpC,QAAM,KAAK,CAAC,KAAK,KAAK,SAAS;AAC7B,QAAI,IAAI,WAAW,QAAQ;AACzB,UAAI,aAAa;AACjB,UAAI,IAAG;AACP,aAAO,KAAI;AAAA,IACb;AACA,UAAM,oBAAoB,CAAA;AAC1B,QAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,wBAAkB,KAAK,KAAK;AAAA,IAC9B,CAAC;AACD,QAAI,GAAG,OAAO,YAAY;AACxB,YAAM,EAAE,MAAM,SAAS,WAAU,IAAK,MAAMA,iBAAAA,iBAAiB;AAAA,QAC3D,YAAY,KAAK;AAAA,QACjB,MAAMC,YAAAA,OAAO,OAAO,iBAAiB;AAAA,QACrC,SAAS,KAAK;AAAA,MACtB,CAAO;AACD,UAAI,YAAY;AACd,YAAI,aAAa;AAAA,MACnB;AACA,iBAAW,cAAc,SAAS;AAChC,YAAI,UAAU,YAAY,QAAQ,UAAU,CAAC;AAAA,MAC/C;AACA,UAAI,IAAIA,YAAAA,OAAO,KAAK,IAAI,GAAG,QAAQ;AACnC,WAAI;AAAA,IACN,CAAC;AAAA,EACH;AACA,KAAG,cAAc,KAAK;AACtB,SAAO;AACT;;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"createRPCMiddleware.js","sources":["../../../../../../node_modules/r19/dist/createRPCMiddleware.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { handleRPCRequest } from \"./handleRPCRequest.js\";\nconst createRPCMiddleware = (args) => {\n const fn = (req, res, next) => {\n if (req.method !== \"POST\") {\n res.statusCode = 405;\n res.end();\n return next();\n }\n const requestBodyChunks = [];\n req.on(\"data\", (chunk) => {\n requestBodyChunks.push(chunk);\n });\n req.on(\"end\", async () => {\n const { body, headers, statusCode } = await handleRPCRequest({\n procedures: args.procedures,\n body: Buffer.concat(requestBodyChunks),\n onError: args.onError\n });\n if (statusCode) {\n res.statusCode = statusCode;\n }\n for (const headerName in headers) {\n res.setHeader(headerName, headers[headerName]);\n }\n res.end(Buffer.from(body), \"binary\");\n next();\n });\n };\n fn._procedures = args.procedures;\n return fn;\n};\nexport {\n createRPCMiddleware\n};\n//# sourceMappingURL=createRPCMiddleware.js.map\n"],"names":[],"mappings":";;AAEK,MAAC,sBAAsB,CAAC,SAAS;AACpC,QAAM,KAAK,CAAC,KAAK,KAAK,SAAS;AAC7B,QAAI,IAAI,WAAW,QAAQ;AACzB,UAAI,aAAa;AACjB,UAAI,IAAG;AACP,aAAO,KAAI;AAAA,IACZ;AACD,UAAM,oBAAoB,CAAA;AAC1B,QAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,wBAAkB,KAAK,KAAK;AAAA,IAClC,CAAK;AACD,QAAI,GAAG,OAAO,YAAY;AACxB,YAAM,EAAE,MAAM,SAAS,WAAY,IAAG,MAAM,iBAAiB;AAAA,QAC3D,YAAY,KAAK;AAAA,QACjB,MAAM,OAAO,OAAO,iBAAiB;AAAA,QACrC,SAAS,KAAK;AAAA,MACtB,CAAO;AACD,UAAI,YAAY;AACd,YAAI,aAAa;AAAA,MAClB;AACD,iBAAW,cAAc,SAAS;AAChC,YAAI,UAAU,YAAY,QAAQ,UAAU,CAAC;AAAA,MAC9C;AACD,UAAI,IAAI,OAAO,KAAK,IAAI,GAAG,QAAQ;AACnC;IACN,CAAK;AAAA,EACL;AACE,KAAG,cAAc,KAAK;AACtB,SAAO;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"createRPCMiddleware.js","sources":["../../../../../../node_modules/r19/dist/createRPCMiddleware.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { handleRPCRequest } from \"./handleRPCRequest.js\";\nconst createRPCMiddleware = (args) => {\n const fn = (req, res, next) => {\n if (req.method !== \"POST\") {\n res.statusCode = 405;\n res.end();\n return next();\n }\n const requestBodyChunks = [];\n req.on(\"data\", (chunk) => {\n requestBodyChunks.push(chunk);\n });\n req.on(\"end\", async () => {\n const { body, headers, statusCode } = await handleRPCRequest({\n procedures: args.procedures,\n body: Buffer.concat(requestBodyChunks),\n onError: args.onError\n });\n if (statusCode) {\n res.statusCode = statusCode;\n }\n for (const headerName in headers) {\n res.setHeader(headerName, headers[headerName]);\n }\n res.end(Buffer.from(body), \"binary\");\n next();\n });\n };\n fn._procedures = args.procedures;\n return fn;\n};\nexport {\n createRPCMiddleware\n};\n//# sourceMappingURL=createRPCMiddleware.js.map\n"],"names":[],"mappings":";;AAEK,MAAC,sBAAsB,CAAC,SAAS;AACpC,QAAM,KAAK,CAAC,KAAK,KAAK,SAAS;AAC7B,QAAI,IAAI,WAAW,QAAQ;AACzB,UAAI,aAAa;AACjB,UAAI,IAAG;AACP,aAAO,KAAI;AAAA,IACb;AACA,UAAM,oBAAoB,CAAA;AAC1B,QAAI,GAAG,QAAQ,CAAC,UAAU;AACxB,wBAAkB,KAAK,KAAK;AAAA,IAC9B,CAAC;AACD,QAAI,GAAG,OAAO,YAAY;AACxB,YAAM,EAAE,MAAM,SAAS,WAAU,IAAK,MAAM,iBAAiB;AAAA,QAC3D,YAAY,KAAK;AAAA,QACjB,MAAM,OAAO,OAAO,iBAAiB;AAAA,QACrC,SAAS,KAAK;AAAA,MACtB,CAAO;AACD,UAAI,YAAY;AACd,YAAI,aAAa;AAAA,MACnB;AACA,iBAAW,cAAc,SAAS;AAChC,YAAI,UAAU,YAAY,QAAQ,UAAU,CAAC;AAAA,MAC/C;AACA,UAAI,IAAI,OAAO,KAAK,IAAI,GAAG,QAAQ;AACnC,WAAI;AAAA,IACN,CAAC;AAAA,EACH;AACA,KAAG,cAAc,KAAK;AACtB,SAAO;AACT;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"handleRPCRequest.cjs","sources":["../../../../../../node_modules/r19/dist/handleRPCRequest.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { decode, encode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"./lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"./lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"./lib/replaceLeaves.js\";\nimport { R19Error } from \"./R19Error.js\";\nconst findProcedure = (procedures, path) => {\n path = [...path];\n let proceduresPointer = procedures;\n while (path.length > 0) {\n const pathSegment = path.shift();\n if (pathSegment) {\n proceduresPointer = proceduresPointer[pathSegment];\n if (typeof proceduresPointer === \"function\") {\n return proceduresPointer;\n } else if (proceduresPointer === void 0) {\n return;\n }\n }\n }\n};\nconst handleRPCRequest = async (args) => {\n var _a, _b, _c;\n if (!args.body) {\n throw new Error(\"Invalid request body. Only requests from an r19 client are accepted.\");\n }\n const clientArgs = decode(Buffer.from(args.body));\n const procedure = findProcedure(args.procedures, clientArgs.procedurePath);\n const headers = {\n \"Content-Type\": \"application/msgpack\"\n };\n if (!procedure) {\n const error = new R19Error(`Invalid procedure name: ${clientArgs.procedurePath.join(\".\")}`, {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs\n });\n const body = encode({\n error\n }, { ignoreUndefined: true });\n (_a = args.onError) == null ? void 0 : _a.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n let res;\n try {\n const procedureArgs = await replaceLeaves(clientArgs.procedureArgs, async (value) => {\n if (value instanceof ArrayBuffer) {\n return Buffer.from(value);\n }\n return value;\n });\n res = await procedure(...procedureArgs);\n res = await replaceLeaves(res, async (value) => {\n if (isErrorLike(value)) {\n return {\n name: value.name,\n message: value.message,\n stack: process.env.NODE_ENV === \"development\" ? value.stack : void 0\n };\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function return values.\", {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs\n });\n }\n return value;\n });\n } catch (error) {\n if (isErrorLike(error)) {\n const body = encode({\n error: isR19ErrorLike(error) ? error : {\n name: error.name,\n message: error.message,\n stack: process.env.NODE_ENV === \"development\" ? error.stack : void 0\n }\n }, { ignoreUndefined: true });\n (_b = args.onError) == null ? void 0 : _b.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n throw error;\n }\n try {\n const body = encode({\n data: res\n }, { ignoreUndefined: true });\n return {\n body,\n headers\n };\n } catch (error) {\n if (error instanceof Error) {\n const rpcError = new R19Error(\"Unable to serialize server response. Check the server log for details.\", {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs,\n cause: error\n });\n console.error(rpcError);\n const body = encode(rpcError);\n (_c = args.onError) == null ? void 0 : _c.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n throw error;\n }\n};\nexport {\n handleRPCRequest\n};\n//# sourceMappingURL=handleRPCRequest.js.map\n"],"names":["decode","Buffer","R19Error","encode","replaceLeaves","isErrorLike","isR19ErrorLike"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"handleRPCRequest.cjs","sources":["../../../../../../node_modules/r19/dist/handleRPCRequest.js"],"sourcesContent":["import { Buffer } from \"node:buffer\";\nimport { decode, encode } from \"@msgpack/msgpack\";\nimport { isErrorLike } from \"./lib/isErrorLike.js\";\nimport { isR19ErrorLike } from \"./lib/isR19ErrorLike.js\";\nimport { replaceLeaves } from \"./lib/replaceLeaves.js\";\nimport { R19Error } from \"./R19Error.js\";\nconst findProcedure = (procedures, path) => {\n path = [...path];\n let proceduresPointer = procedures;\n while (path.length > 0) {\n const pathSegment = path.shift();\n if (pathSegment) {\n proceduresPointer = proceduresPointer[pathSegment];\n if (typeof proceduresPointer === \"function\") {\n return proceduresPointer;\n } else if (proceduresPointer === void 0) {\n return;\n }\n }\n }\n};\nconst handleRPCRequest = async (args) => {\n var _a, _b, _c;\n if (!args.body) {\n throw new Error(\"Invalid request body. Only requests from an r19 client are accepted.\");\n }\n const clientArgs = decode(Buffer.from(args.body));\n const procedure = findProcedure(args.procedures, clientArgs.procedurePath);\n const headers = {\n \"Content-Type\": \"application/msgpack\"\n };\n if (!procedure) {\n const error = new R19Error(`Invalid procedure name: ${clientArgs.procedurePath.join(\".\")}`, {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs\n });\n const body = encode({\n error\n }, { ignoreUndefined: true });\n (_a = args.onError) == null ? void 0 : _a.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n let res;\n try {\n const procedureArgs = await replaceLeaves(clientArgs.procedureArgs, async (value) => {\n if (value instanceof ArrayBuffer) {\n return Buffer.from(value);\n }\n return value;\n });\n res = await procedure(...procedureArgs);\n res = await replaceLeaves(res, async (value) => {\n if (isErrorLike(value)) {\n return {\n name: value.name,\n message: value.message,\n stack: process.env.NODE_ENV === \"development\" ? value.stack : void 0\n };\n }\n if (typeof value === \"function\") {\n throw new R19Error(\"r19 does not support function return values.\", {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs\n });\n }\n return value;\n });\n } catch (error) {\n if (isErrorLike(error)) {\n const body = encode({\n error: isR19ErrorLike(error) ? error : {\n name: error.name,\n message: error.message,\n stack: process.env.NODE_ENV === \"development\" ? error.stack : void 0\n }\n }, { ignoreUndefined: true });\n (_b = args.onError) == null ? void 0 : _b.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n throw error;\n }\n try {\n const body = encode({\n data: res\n }, { ignoreUndefined: true });\n return {\n body,\n headers\n };\n } catch (error) {\n if (error instanceof Error) {\n const rpcError = new R19Error(\"Unable to serialize server response. Check the server log for details.\", {\n procedurePath: clientArgs.procedurePath,\n procedureArgs: clientArgs.procedureArgs,\n cause: error\n });\n console.error(rpcError);\n const body = encode(rpcError);\n (_c = args.onError) == null ? void 0 : _c.call(args, { error, ...clientArgs });\n return {\n body,\n headers,\n statusCode: 500\n };\n }\n throw error;\n }\n};\nexport {\n handleRPCRequest\n};\n//# sourceMappingURL=handleRPCRequest.js.map\n"],"names":["decode","Buffer","R19Error","encode","replaceLeaves","isErrorLike","isR19ErrorLike"],"mappings":"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","x_google_ignoreList":[0]}