@sip-protocol/sdk 0.7.3 → 0.7.4

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 (264) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +267 -0
  3. package/dist/{TransportWebUSB-TQ7WZ4LE.mjs → TransportWebUSB-YQMAGJAJ.mjs} +12 -9
  4. package/dist/browser.d.mts +10 -4
  5. package/dist/browser.d.ts +10 -4
  6. package/dist/browser.js +47556 -19603
  7. package/dist/browser.mjs +628 -48
  8. package/dist/chunk-4GRJ5MAW.mjs +152 -0
  9. package/dist/chunk-5D7A3L3W.mjs +717 -0
  10. package/dist/chunk-64AYA5F5.mjs +7834 -0
  11. package/dist/chunk-GMDGB22A.mjs +379 -0
  12. package/dist/chunk-I534WKN7.mjs +328 -0
  13. package/dist/chunk-IBZVA5Y7.mjs +1003 -0
  14. package/dist/chunk-PRRZAWJE.mjs +223 -0
  15. package/dist/{chunk-UJCSKKID.mjs → chunk-XGB3TDIC.mjs} +13 -1
  16. package/dist/{chunk-3M3HNQCW.mjs → chunk-YWGJ77A2.mjs} +28656 -13103
  17. package/dist/{chunk-6WGN57S2.mjs → chunk-Z3K7W5S3.mjs} +48 -0
  18. package/dist/constants-LHAAUC2T.mjs +51 -0
  19. package/dist/dist-2OGQ7FED.mjs +3957 -0
  20. package/dist/dist-IFHPYLDX.mjs +254 -0
  21. package/dist/fulfillment_proof-ANHVPKTB.mjs +21 -0
  22. package/dist/funding_proof-ICFZ5LHY.mjs +21 -0
  23. package/dist/{index-DIBZHOOQ.d.ts → index-DXh2IGkz.d.ts} +21239 -10304
  24. package/dist/{index-8MQz13eJ.d.mts → index-DeE1ZzA4.d.mts} +21239 -10304
  25. package/dist/index.d.mts +9 -3
  26. package/dist/index.d.ts +9 -3
  27. package/dist/index.js +48396 -19623
  28. package/dist/index.mjs +537 -19
  29. package/dist/interface-Bf7w1PLW.d.mts +679 -0
  30. package/dist/interface-Bf7w1PLW.d.ts +679 -0
  31. package/dist/{noir-DKfEzWy9.d.mts → noir-kzbLVTei.d.mts} +31 -21
  32. package/dist/{noir-DKfEzWy9.d.ts → noir-kzbLVTei.d.ts} +31 -21
  33. package/dist/proofs/halo2.d.mts +151 -0
  34. package/dist/proofs/halo2.d.ts +151 -0
  35. package/dist/proofs/halo2.js +350 -0
  36. package/dist/proofs/halo2.mjs +11 -0
  37. package/dist/proofs/kimchi.d.mts +160 -0
  38. package/dist/proofs/kimchi.d.ts +160 -0
  39. package/dist/proofs/kimchi.js +431 -0
  40. package/dist/proofs/kimchi.mjs +13 -0
  41. package/dist/proofs/noir.d.mts +1 -1
  42. package/dist/proofs/noir.d.ts +1 -1
  43. package/dist/proofs/noir.js +74 -18
  44. package/dist/proofs/noir.mjs +84 -24
  45. package/dist/solana-U3MEGU7W.mjs +280 -0
  46. package/dist/validity_proof-3POXLPNY.mjs +21 -0
  47. package/package.json +54 -21
  48. package/src/adapters/index.ts +41 -0
  49. package/src/adapters/jupiter.ts +571 -0
  50. package/src/adapters/near-intents.ts +135 -0
  51. package/src/advisor/advisor.ts +653 -0
  52. package/src/advisor/index.ts +54 -0
  53. package/src/advisor/tools.ts +303 -0
  54. package/src/advisor/types.ts +164 -0
  55. package/src/chains/ethereum/announcement.ts +536 -0
  56. package/src/chains/ethereum/bnb-optimizations.ts +474 -0
  57. package/src/chains/ethereum/commitment.ts +522 -0
  58. package/src/chains/ethereum/constants.ts +462 -0
  59. package/src/chains/ethereum/deployment.ts +596 -0
  60. package/src/chains/ethereum/gas-estimation.ts +538 -0
  61. package/src/chains/ethereum/index.ts +268 -0
  62. package/src/chains/ethereum/optimizations.ts +614 -0
  63. package/src/chains/ethereum/privacy-adapter.ts +855 -0
  64. package/src/chains/ethereum/registry.ts +584 -0
  65. package/src/chains/ethereum/rpc.ts +905 -0
  66. package/src/chains/ethereum/stealth.ts +491 -0
  67. package/src/chains/ethereum/token.ts +790 -0
  68. package/src/chains/ethereum/transfer.ts +637 -0
  69. package/src/chains/ethereum/types.ts +456 -0
  70. package/src/chains/ethereum/viewing-key.ts +455 -0
  71. package/src/chains/near/commitment.ts +608 -0
  72. package/src/chains/near/constants.ts +284 -0
  73. package/src/chains/near/function-call.ts +871 -0
  74. package/src/chains/near/history.ts +654 -0
  75. package/src/chains/near/implicit-account.ts +840 -0
  76. package/src/chains/near/index.ts +393 -0
  77. package/src/chains/near/native-transfer.ts +658 -0
  78. package/src/chains/near/nep141.ts +775 -0
  79. package/src/chains/near/privacy-adapter.ts +889 -0
  80. package/src/chains/near/resolver.ts +971 -0
  81. package/src/chains/near/rpc.ts +1016 -0
  82. package/src/chains/near/stealth.ts +419 -0
  83. package/src/chains/near/types.ts +317 -0
  84. package/src/chains/near/viewing-key.ts +876 -0
  85. package/src/chains/solana/anchor-transfer.ts +386 -0
  86. package/src/chains/solana/commitment.ts +577 -0
  87. package/src/chains/solana/constants.ts +126 -12
  88. package/src/chains/solana/ephemeral-keys.ts +543 -0
  89. package/src/chains/solana/index.ts +252 -1
  90. package/src/chains/solana/key-derivation.ts +418 -0
  91. package/src/chains/solana/kit-compat.ts +334 -0
  92. package/src/chains/solana/optimizations.ts +560 -0
  93. package/src/chains/solana/privacy-adapter.ts +605 -0
  94. package/src/chains/solana/providers/generic.ts +47 -6
  95. package/src/chains/solana/providers/helius-enhanced-types.ts +336 -0
  96. package/src/chains/solana/providers/helius-enhanced.ts +623 -0
  97. package/src/chains/solana/providers/helius.ts +186 -33
  98. package/src/chains/solana/providers/index.ts +31 -0
  99. package/src/chains/solana/providers/interface.ts +61 -18
  100. package/src/chains/solana/providers/quicknode.ts +409 -0
  101. package/src/chains/solana/providers/triton.ts +426 -0
  102. package/src/chains/solana/providers/webhook.ts +338 -67
  103. package/src/chains/solana/rpc-client.ts +1150 -0
  104. package/src/chains/solana/scan.ts +83 -66
  105. package/src/chains/solana/sol-transfer.ts +732 -0
  106. package/src/chains/solana/spl-transfer.ts +886 -0
  107. package/src/chains/solana/stealth-scanner.ts +703 -0
  108. package/src/chains/solana/sunspot-verifier.ts +453 -0
  109. package/src/chains/solana/transaction-builder.ts +755 -0
  110. package/src/chains/solana/transfer.ts +74 -5
  111. package/src/chains/solana/types.ts +57 -6
  112. package/src/chains/solana/utils.ts +110 -0
  113. package/src/chains/solana/viewing-key.ts +807 -0
  114. package/src/compliance/fireblocks.ts +921 -0
  115. package/src/compliance/index.ts +23 -0
  116. package/src/compliance/range-sas.ts +398 -33
  117. package/src/config/endpoints.ts +100 -0
  118. package/src/crypto.ts +11 -8
  119. package/src/errors.ts +82 -0
  120. package/src/evm/erc4337-relayer.ts +830 -0
  121. package/src/evm/index.ts +47 -0
  122. package/src/fees/calculator.ts +396 -0
  123. package/src/fees/index.ts +87 -0
  124. package/src/fees/near-contract.ts +429 -0
  125. package/src/fees/types.ts +268 -0
  126. package/src/index.ts +686 -1
  127. package/src/intent.ts +6 -3
  128. package/src/logger.ts +324 -0
  129. package/src/network/index.ts +80 -0
  130. package/src/network/proxy.ts +691 -0
  131. package/src/optimizations/index.ts +541 -0
  132. package/src/oracle/types.ts +1 -0
  133. package/src/privacy-backends/arcium-types.ts +727 -0
  134. package/src/privacy-backends/arcium.ts +719 -0
  135. package/src/privacy-backends/combined-privacy.ts +866 -0
  136. package/src/privacy-backends/cspl-token.ts +595 -0
  137. package/src/privacy-backends/cspl-types.ts +512 -0
  138. package/src/privacy-backends/cspl.ts +907 -0
  139. package/src/privacy-backends/health.ts +488 -0
  140. package/src/privacy-backends/inco-types.ts +323 -0
  141. package/src/privacy-backends/inco.ts +616 -0
  142. package/src/privacy-backends/index.ts +254 -4
  143. package/src/privacy-backends/interface.ts +649 -6
  144. package/src/privacy-backends/lru-cache.ts +343 -0
  145. package/src/privacy-backends/magicblock.ts +458 -0
  146. package/src/privacy-backends/mock.ts +258 -0
  147. package/src/privacy-backends/privacycash.ts +13 -17
  148. package/src/privacy-backends/private-swap.ts +570 -0
  149. package/src/privacy-backends/rate-limiter.ts +683 -0
  150. package/src/privacy-backends/registry.ts +414 -2
  151. package/src/privacy-backends/router.ts +283 -3
  152. package/src/privacy-backends/shadowwire.ts +449 -0
  153. package/src/privacy-backends/sip-native.ts +3 -0
  154. package/src/privacy-logger.ts +191 -0
  155. package/src/production-safety.ts +373 -0
  156. package/src/proofs/aggregator.ts +1029 -0
  157. package/src/proofs/browser-composer.ts +1150 -0
  158. package/src/proofs/browser.ts +113 -25
  159. package/src/proofs/cache/index.ts +127 -0
  160. package/src/proofs/cache/interface.ts +545 -0
  161. package/src/proofs/cache/key-generator.ts +188 -0
  162. package/src/proofs/cache/lru-cache.ts +481 -0
  163. package/src/proofs/cache/multi-tier-cache.ts +575 -0
  164. package/src/proofs/cache/persistent-cache.ts +788 -0
  165. package/src/proofs/compliance-proof.ts +872 -0
  166. package/src/proofs/composer/base.ts +923 -0
  167. package/src/proofs/composer/index.ts +25 -0
  168. package/src/proofs/composer/interface.ts +518 -0
  169. package/src/proofs/composer/types.ts +383 -0
  170. package/src/proofs/converters/halo2.ts +452 -0
  171. package/src/proofs/converters/index.ts +208 -0
  172. package/src/proofs/converters/interface.ts +363 -0
  173. package/src/proofs/converters/kimchi.ts +462 -0
  174. package/src/proofs/converters/noir.ts +451 -0
  175. package/src/proofs/fallback.ts +888 -0
  176. package/src/proofs/halo2.ts +42 -0
  177. package/src/proofs/index.ts +471 -0
  178. package/src/proofs/interface.ts +13 -0
  179. package/src/proofs/kimchi.ts +42 -0
  180. package/src/proofs/lazy.ts +1004 -0
  181. package/src/proofs/mock.ts +25 -1
  182. package/src/proofs/noir.ts +110 -29
  183. package/src/proofs/orchestrator.ts +960 -0
  184. package/src/proofs/parallel/concurrency.ts +297 -0
  185. package/src/proofs/parallel/dependency-graph.ts +602 -0
  186. package/src/proofs/parallel/executor.ts +420 -0
  187. package/src/proofs/parallel/index.ts +131 -0
  188. package/src/proofs/parallel/interface.ts +685 -0
  189. package/src/proofs/parallel/worker-pool.ts +644 -0
  190. package/src/proofs/providers/halo2.ts +560 -0
  191. package/src/proofs/providers/index.ts +34 -0
  192. package/src/proofs/providers/kimchi.ts +641 -0
  193. package/src/proofs/validator.ts +881 -0
  194. package/src/proofs/verifier.ts +867 -0
  195. package/src/quantum/index.ts +112 -0
  196. package/src/quantum/winternitz-vault.ts +639 -0
  197. package/src/quantum/wots.ts +611 -0
  198. package/src/settlement/backends/direct-chain.ts +1 -0
  199. package/src/settlement/index.ts +9 -0
  200. package/src/settlement/router.ts +732 -46
  201. package/src/solana/index.ts +72 -0
  202. package/src/solana/jito-relayer.ts +687 -0
  203. package/src/solana/noir-verifier-types.ts +430 -0
  204. package/src/solana/noir-verifier.ts +816 -0
  205. package/src/stealth/address-derivation.ts +193 -0
  206. package/src/stealth/ed25519.ts +431 -0
  207. package/src/stealth/index.ts +233 -0
  208. package/src/stealth/meta-address.ts +221 -0
  209. package/src/stealth/secp256k1.ts +368 -0
  210. package/src/stealth/utils.ts +194 -0
  211. package/src/stealth.ts +50 -1504
  212. package/src/sync/index.ts +106 -0
  213. package/src/sync/manager.ts +504 -0
  214. package/src/sync/mock-provider.ts +318 -0
  215. package/src/sync/oblivious.ts +625 -0
  216. package/src/tokens/index.ts +15 -0
  217. package/src/tokens/registry.ts +301 -0
  218. package/src/utils/deprecation.ts +94 -0
  219. package/src/utils/index.ts +9 -0
  220. package/src/wallet/ethereum/index.ts +68 -0
  221. package/src/wallet/ethereum/metamask-privacy.ts +420 -0
  222. package/src/wallet/ethereum/multi-wallet.ts +646 -0
  223. package/src/wallet/ethereum/privacy-adapter.ts +700 -0
  224. package/src/wallet/ethereum/types.ts +3 -1
  225. package/src/wallet/ethereum/walletconnect-adapter.ts +675 -0
  226. package/src/wallet/hardware/index.ts +10 -0
  227. package/src/wallet/hardware/ledger-privacy.ts +414 -0
  228. package/src/wallet/index.ts +71 -0
  229. package/src/wallet/near/adapter.ts +626 -0
  230. package/src/wallet/near/index.ts +86 -0
  231. package/src/wallet/near/meteor-wallet.ts +1153 -0
  232. package/src/wallet/near/my-near-wallet.ts +790 -0
  233. package/src/wallet/near/wallet-selector.ts +702 -0
  234. package/src/wallet/solana/adapter.ts +6 -4
  235. package/src/wallet/solana/index.ts +13 -0
  236. package/src/wallet/solana/privacy-adapter.ts +567 -0
  237. package/src/wallet/sui/types.ts +6 -4
  238. package/src/zcash/rpc-client.ts +13 -6
  239. package/dist/chunk-2XIVXWHA.mjs +0 -1930
  240. package/dist/chunk-3INS3PR5.mjs +0 -884
  241. package/dist/chunk-3OVABDRH.mjs +0 -17096
  242. package/dist/chunk-7RFRWDCW.mjs +0 -1504
  243. package/dist/chunk-DLDWZFYC.mjs +0 -1495
  244. package/dist/chunk-E6SZWREQ.mjs +0 -57
  245. package/dist/chunk-F6F73W35.mjs +0 -16166
  246. package/dist/chunk-G33LB27A.mjs +0 -16166
  247. package/dist/chunk-HGU6HZRC.mjs +0 -231
  248. package/dist/chunk-L2K34JCU.mjs +0 -1496
  249. package/dist/chunk-OFDBEIEK.mjs +0 -16166
  250. package/dist/chunk-SF7YSLF5.mjs +0 -1515
  251. package/dist/chunk-SN4ZDTVW.mjs +0 -16166
  252. package/dist/chunk-WWUSGOXE.mjs +0 -17129
  253. package/dist/constants-VOI7BSLK.mjs +0 -27
  254. package/dist/index-B71aXVzk.d.ts +0 -13264
  255. package/dist/index-BYZbDjal.d.ts +0 -11390
  256. package/dist/index-CHB3KuOB.d.mts +0 -11859
  257. package/dist/index-CzWPI6Le.d.ts +0 -11859
  258. package/dist/index-pOIIuwfV.d.mts +0 -13264
  259. package/dist/index-xbWjohNq.d.mts +0 -11390
  260. package/dist/solana-4O4K45VU.mjs +0 -46
  261. package/dist/solana-5EMCTPTS.mjs +0 -46
  262. package/dist/solana-NDABAZ6P.mjs +0 -56
  263. package/dist/solana-Q4NAVBTS.mjs +0 -46
  264. package/dist/solana-ZYO63LY5.mjs +0 -46
@@ -0,0 +1,1003 @@
1
+ import {
2
+ __commonJS,
3
+ __require
4
+ } from "./chunk-XGB3TDIC.mjs";
5
+
6
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js
7
+ var require_helpers = __commonJS({
8
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js"(exports) {
9
+ "use strict";
10
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === void 0) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() {
15
+ return m[k];
16
+ } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
19
+ }) : (function(o, m, k, k2) {
20
+ if (k2 === void 0) k2 = k;
21
+ o[k2] = m[k];
22
+ }));
23
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
24
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25
+ }) : function(o, v) {
26
+ o["default"] = v;
27
+ });
28
+ var __importStar = exports && exports.__importStar || function(mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) {
32
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ }
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.req = exports.json = exports.toBuffer = void 0;
39
+ var http = __importStar(__require("http"));
40
+ var https = __importStar(__require("https"));
41
+ async function toBuffer(stream) {
42
+ let length = 0;
43
+ const chunks = [];
44
+ for await (const chunk of stream) {
45
+ length += chunk.length;
46
+ chunks.push(chunk);
47
+ }
48
+ return Buffer.concat(chunks, length);
49
+ }
50
+ exports.toBuffer = toBuffer;
51
+ async function json(stream) {
52
+ const buf = await toBuffer(stream);
53
+ const str = buf.toString("utf8");
54
+ try {
55
+ return JSON.parse(str);
56
+ } catch (_err) {
57
+ const err = _err;
58
+ err.message += ` (input: ${str})`;
59
+ throw err;
60
+ }
61
+ }
62
+ exports.json = json;
63
+ function req(url, opts = {}) {
64
+ const href = typeof url === "string" ? url : url.href;
65
+ const req2 = (href.startsWith("https:") ? https : http).request(url, opts);
66
+ const promise = new Promise((resolve, reject) => {
67
+ req2.once("response", resolve).once("error", reject).end();
68
+ });
69
+ req2.then = promise.then.bind(promise);
70
+ return req2;
71
+ }
72
+ exports.req = req;
73
+ }
74
+ });
75
+
76
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js
77
+ var require_dist = __commonJS({
78
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js"(exports) {
79
+ "use strict";
80
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
81
+ if (k2 === void 0) k2 = k;
82
+ var desc = Object.getOwnPropertyDescriptor(m, k);
83
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
84
+ desc = { enumerable: true, get: function() {
85
+ return m[k];
86
+ } };
87
+ }
88
+ Object.defineProperty(o, k2, desc);
89
+ }) : (function(o, m, k, k2) {
90
+ if (k2 === void 0) k2 = k;
91
+ o[k2] = m[k];
92
+ }));
93
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
94
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
95
+ }) : function(o, v) {
96
+ o["default"] = v;
97
+ });
98
+ var __importStar = exports && exports.__importStar || function(mod) {
99
+ if (mod && mod.__esModule) return mod;
100
+ var result = {};
101
+ if (mod != null) {
102
+ for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
103
+ }
104
+ __setModuleDefault(result, mod);
105
+ return result;
106
+ };
107
+ var __exportStar = exports && exports.__exportStar || function(m, exports2) {
108
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
109
+ };
110
+ Object.defineProperty(exports, "__esModule", { value: true });
111
+ exports.Agent = void 0;
112
+ var net = __importStar(__require("net"));
113
+ var http = __importStar(__require("http"));
114
+ var https_1 = __require("https");
115
+ __exportStar(require_helpers(), exports);
116
+ var INTERNAL = Symbol("AgentBaseInternalState");
117
+ var Agent = class extends http.Agent {
118
+ constructor(opts) {
119
+ super(opts);
120
+ this[INTERNAL] = {};
121
+ }
122
+ /**
123
+ * Determine whether this is an `http` or `https` request.
124
+ */
125
+ isSecureEndpoint(options) {
126
+ if (options) {
127
+ if (typeof options.secureEndpoint === "boolean") {
128
+ return options.secureEndpoint;
129
+ }
130
+ if (typeof options.protocol === "string") {
131
+ return options.protocol === "https:";
132
+ }
133
+ }
134
+ const { stack } = new Error();
135
+ if (typeof stack !== "string")
136
+ return false;
137
+ return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
138
+ }
139
+ // In order to support async signatures in `connect()` and Node's native
140
+ // connection pooling in `http.Agent`, the array of sockets for each origin
141
+ // has to be updated synchronously. This is so the length of the array is
142
+ // accurate when `addRequest()` is next called. We achieve this by creating a
143
+ // fake socket and adding it to `sockets[origin]` and incrementing
144
+ // `totalSocketCount`.
145
+ incrementSockets(name) {
146
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
147
+ return null;
148
+ }
149
+ if (!this.sockets[name]) {
150
+ this.sockets[name] = [];
151
+ }
152
+ const fakeSocket = new net.Socket({ writable: false });
153
+ this.sockets[name].push(fakeSocket);
154
+ this.totalSocketCount++;
155
+ return fakeSocket;
156
+ }
157
+ decrementSockets(name, socket) {
158
+ if (!this.sockets[name] || socket === null) {
159
+ return;
160
+ }
161
+ const sockets = this.sockets[name];
162
+ const index = sockets.indexOf(socket);
163
+ if (index !== -1) {
164
+ sockets.splice(index, 1);
165
+ this.totalSocketCount--;
166
+ if (sockets.length === 0) {
167
+ delete this.sockets[name];
168
+ }
169
+ }
170
+ }
171
+ // In order to properly update the socket pool, we need to call `getName()` on
172
+ // the core `https.Agent` if it is a secureEndpoint.
173
+ getName(options) {
174
+ const secureEndpoint = this.isSecureEndpoint(options);
175
+ if (secureEndpoint) {
176
+ return https_1.Agent.prototype.getName.call(this, options);
177
+ }
178
+ return super.getName(options);
179
+ }
180
+ createSocket(req, options, cb) {
181
+ const connectOpts = {
182
+ ...options,
183
+ secureEndpoint: this.isSecureEndpoint(options)
184
+ };
185
+ const name = this.getName(connectOpts);
186
+ const fakeSocket = this.incrementSockets(name);
187
+ Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
188
+ this.decrementSockets(name, fakeSocket);
189
+ if (socket instanceof http.Agent) {
190
+ try {
191
+ return socket.addRequest(req, connectOpts);
192
+ } catch (err) {
193
+ return cb(err);
194
+ }
195
+ }
196
+ this[INTERNAL].currentSocket = socket;
197
+ super.createSocket(req, options, cb);
198
+ }, (err) => {
199
+ this.decrementSockets(name, fakeSocket);
200
+ cb(err);
201
+ });
202
+ }
203
+ createConnection() {
204
+ const socket = this[INTERNAL].currentSocket;
205
+ this[INTERNAL].currentSocket = void 0;
206
+ if (!socket) {
207
+ throw new Error("No socket was returned in the `connect()` function");
208
+ }
209
+ return socket;
210
+ }
211
+ get defaultPort() {
212
+ return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
213
+ }
214
+ set defaultPort(v) {
215
+ if (this[INTERNAL]) {
216
+ this[INTERNAL].defaultPort = v;
217
+ }
218
+ }
219
+ get protocol() {
220
+ return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
221
+ }
222
+ set protocol(v) {
223
+ if (this[INTERNAL]) {
224
+ this[INTERNAL].protocol = v;
225
+ }
226
+ }
227
+ };
228
+ exports.Agent = Agent;
229
+ }
230
+ });
231
+
232
+ // ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
233
+ var require_ms = __commonJS({
234
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
235
+ "use strict";
236
+ var s = 1e3;
237
+ var m = s * 60;
238
+ var h = m * 60;
239
+ var d = h * 24;
240
+ var w = d * 7;
241
+ var y = d * 365.25;
242
+ module.exports = function(val, options) {
243
+ options = options || {};
244
+ var type = typeof val;
245
+ if (type === "string" && val.length > 0) {
246
+ return parse(val);
247
+ } else if (type === "number" && isFinite(val)) {
248
+ return options.long ? fmtLong(val) : fmtShort(val);
249
+ }
250
+ throw new Error(
251
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
252
+ );
253
+ };
254
+ function parse(str) {
255
+ str = String(str);
256
+ if (str.length > 100) {
257
+ return;
258
+ }
259
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
260
+ str
261
+ );
262
+ if (!match) {
263
+ return;
264
+ }
265
+ var n = parseFloat(match[1]);
266
+ var type = (match[2] || "ms").toLowerCase();
267
+ switch (type) {
268
+ case "years":
269
+ case "year":
270
+ case "yrs":
271
+ case "yr":
272
+ case "y":
273
+ return n * y;
274
+ case "weeks":
275
+ case "week":
276
+ case "w":
277
+ return n * w;
278
+ case "days":
279
+ case "day":
280
+ case "d":
281
+ return n * d;
282
+ case "hours":
283
+ case "hour":
284
+ case "hrs":
285
+ case "hr":
286
+ case "h":
287
+ return n * h;
288
+ case "minutes":
289
+ case "minute":
290
+ case "mins":
291
+ case "min":
292
+ case "m":
293
+ return n * m;
294
+ case "seconds":
295
+ case "second":
296
+ case "secs":
297
+ case "sec":
298
+ case "s":
299
+ return n * s;
300
+ case "milliseconds":
301
+ case "millisecond":
302
+ case "msecs":
303
+ case "msec":
304
+ case "ms":
305
+ return n;
306
+ default:
307
+ return void 0;
308
+ }
309
+ }
310
+ function fmtShort(ms) {
311
+ var msAbs = Math.abs(ms);
312
+ if (msAbs >= d) {
313
+ return Math.round(ms / d) + "d";
314
+ }
315
+ if (msAbs >= h) {
316
+ return Math.round(ms / h) + "h";
317
+ }
318
+ if (msAbs >= m) {
319
+ return Math.round(ms / m) + "m";
320
+ }
321
+ if (msAbs >= s) {
322
+ return Math.round(ms / s) + "s";
323
+ }
324
+ return ms + "ms";
325
+ }
326
+ function fmtLong(ms) {
327
+ var msAbs = Math.abs(ms);
328
+ if (msAbs >= d) {
329
+ return plural(ms, msAbs, d, "day");
330
+ }
331
+ if (msAbs >= h) {
332
+ return plural(ms, msAbs, h, "hour");
333
+ }
334
+ if (msAbs >= m) {
335
+ return plural(ms, msAbs, m, "minute");
336
+ }
337
+ if (msAbs >= s) {
338
+ return plural(ms, msAbs, s, "second");
339
+ }
340
+ return ms + " ms";
341
+ }
342
+ function plural(ms, msAbs, n, name) {
343
+ var isPlural = msAbs >= n * 1.5;
344
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
345
+ }
346
+ }
347
+ });
348
+
349
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
350
+ var require_common = __commonJS({
351
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
352
+ "use strict";
353
+ function setup(env) {
354
+ createDebug.debug = createDebug;
355
+ createDebug.default = createDebug;
356
+ createDebug.coerce = coerce;
357
+ createDebug.disable = disable;
358
+ createDebug.enable = enable;
359
+ createDebug.enabled = enabled;
360
+ createDebug.humanize = require_ms();
361
+ createDebug.destroy = destroy;
362
+ Object.keys(env).forEach((key) => {
363
+ createDebug[key] = env[key];
364
+ });
365
+ createDebug.names = [];
366
+ createDebug.skips = [];
367
+ createDebug.formatters = {};
368
+ function selectColor(namespace) {
369
+ let hash = 0;
370
+ for (let i = 0; i < namespace.length; i++) {
371
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
372
+ hash |= 0;
373
+ }
374
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
375
+ }
376
+ createDebug.selectColor = selectColor;
377
+ function createDebug(namespace) {
378
+ let prevTime;
379
+ let enableOverride = null;
380
+ let namespacesCache;
381
+ let enabledCache;
382
+ function debug(...args) {
383
+ if (!debug.enabled) {
384
+ return;
385
+ }
386
+ const self = debug;
387
+ const curr = Number(/* @__PURE__ */ new Date());
388
+ const ms = curr - (prevTime || curr);
389
+ self.diff = ms;
390
+ self.prev = prevTime;
391
+ self.curr = curr;
392
+ prevTime = curr;
393
+ args[0] = createDebug.coerce(args[0]);
394
+ if (typeof args[0] !== "string") {
395
+ args.unshift("%O");
396
+ }
397
+ let index = 0;
398
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
399
+ if (match === "%%") {
400
+ return "%";
401
+ }
402
+ index++;
403
+ const formatter = createDebug.formatters[format];
404
+ if (typeof formatter === "function") {
405
+ const val = args[index];
406
+ match = formatter.call(self, val);
407
+ args.splice(index, 1);
408
+ index--;
409
+ }
410
+ return match;
411
+ });
412
+ createDebug.formatArgs.call(self, args);
413
+ const logFn = self.log || createDebug.log;
414
+ logFn.apply(self, args);
415
+ }
416
+ debug.namespace = namespace;
417
+ debug.useColors = createDebug.useColors();
418
+ debug.color = createDebug.selectColor(namespace);
419
+ debug.extend = extend;
420
+ debug.destroy = createDebug.destroy;
421
+ Object.defineProperty(debug, "enabled", {
422
+ enumerable: true,
423
+ configurable: false,
424
+ get: () => {
425
+ if (enableOverride !== null) {
426
+ return enableOverride;
427
+ }
428
+ if (namespacesCache !== createDebug.namespaces) {
429
+ namespacesCache = createDebug.namespaces;
430
+ enabledCache = createDebug.enabled(namespace);
431
+ }
432
+ return enabledCache;
433
+ },
434
+ set: (v) => {
435
+ enableOverride = v;
436
+ }
437
+ });
438
+ if (typeof createDebug.init === "function") {
439
+ createDebug.init(debug);
440
+ }
441
+ return debug;
442
+ }
443
+ function extend(namespace, delimiter) {
444
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
445
+ newDebug.log = this.log;
446
+ return newDebug;
447
+ }
448
+ function enable(namespaces) {
449
+ createDebug.save(namespaces);
450
+ createDebug.namespaces = namespaces;
451
+ createDebug.names = [];
452
+ createDebug.skips = [];
453
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
454
+ for (const ns of split) {
455
+ if (ns[0] === "-") {
456
+ createDebug.skips.push(ns.slice(1));
457
+ } else {
458
+ createDebug.names.push(ns);
459
+ }
460
+ }
461
+ }
462
+ function matchesTemplate(search, template) {
463
+ let searchIndex = 0;
464
+ let templateIndex = 0;
465
+ let starIndex = -1;
466
+ let matchIndex = 0;
467
+ while (searchIndex < search.length) {
468
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
469
+ if (template[templateIndex] === "*") {
470
+ starIndex = templateIndex;
471
+ matchIndex = searchIndex;
472
+ templateIndex++;
473
+ } else {
474
+ searchIndex++;
475
+ templateIndex++;
476
+ }
477
+ } else if (starIndex !== -1) {
478
+ templateIndex = starIndex + 1;
479
+ matchIndex++;
480
+ searchIndex = matchIndex;
481
+ } else {
482
+ return false;
483
+ }
484
+ }
485
+ while (templateIndex < template.length && template[templateIndex] === "*") {
486
+ templateIndex++;
487
+ }
488
+ return templateIndex === template.length;
489
+ }
490
+ function disable() {
491
+ const namespaces = [
492
+ ...createDebug.names,
493
+ ...createDebug.skips.map((namespace) => "-" + namespace)
494
+ ].join(",");
495
+ createDebug.enable("");
496
+ return namespaces;
497
+ }
498
+ function enabled(name) {
499
+ for (const skip of createDebug.skips) {
500
+ if (matchesTemplate(name, skip)) {
501
+ return false;
502
+ }
503
+ }
504
+ for (const ns of createDebug.names) {
505
+ if (matchesTemplate(name, ns)) {
506
+ return true;
507
+ }
508
+ }
509
+ return false;
510
+ }
511
+ function coerce(val) {
512
+ if (val instanceof Error) {
513
+ return val.stack || val.message;
514
+ }
515
+ return val;
516
+ }
517
+ function destroy() {
518
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
519
+ }
520
+ createDebug.enable(createDebug.load());
521
+ return createDebug;
522
+ }
523
+ module.exports = setup;
524
+ }
525
+ });
526
+
527
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
528
+ var require_browser = __commonJS({
529
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
530
+ "use strict";
531
+ exports.formatArgs = formatArgs;
532
+ exports.save = save;
533
+ exports.load = load;
534
+ exports.useColors = useColors;
535
+ exports.storage = localstorage();
536
+ exports.destroy = /* @__PURE__ */ (() => {
537
+ let warned = false;
538
+ return () => {
539
+ if (!warned) {
540
+ warned = true;
541
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
542
+ }
543
+ };
544
+ })();
545
+ exports.colors = [
546
+ "#0000CC",
547
+ "#0000FF",
548
+ "#0033CC",
549
+ "#0033FF",
550
+ "#0066CC",
551
+ "#0066FF",
552
+ "#0099CC",
553
+ "#0099FF",
554
+ "#00CC00",
555
+ "#00CC33",
556
+ "#00CC66",
557
+ "#00CC99",
558
+ "#00CCCC",
559
+ "#00CCFF",
560
+ "#3300CC",
561
+ "#3300FF",
562
+ "#3333CC",
563
+ "#3333FF",
564
+ "#3366CC",
565
+ "#3366FF",
566
+ "#3399CC",
567
+ "#3399FF",
568
+ "#33CC00",
569
+ "#33CC33",
570
+ "#33CC66",
571
+ "#33CC99",
572
+ "#33CCCC",
573
+ "#33CCFF",
574
+ "#6600CC",
575
+ "#6600FF",
576
+ "#6633CC",
577
+ "#6633FF",
578
+ "#66CC00",
579
+ "#66CC33",
580
+ "#9900CC",
581
+ "#9900FF",
582
+ "#9933CC",
583
+ "#9933FF",
584
+ "#99CC00",
585
+ "#99CC33",
586
+ "#CC0000",
587
+ "#CC0033",
588
+ "#CC0066",
589
+ "#CC0099",
590
+ "#CC00CC",
591
+ "#CC00FF",
592
+ "#CC3300",
593
+ "#CC3333",
594
+ "#CC3366",
595
+ "#CC3399",
596
+ "#CC33CC",
597
+ "#CC33FF",
598
+ "#CC6600",
599
+ "#CC6633",
600
+ "#CC9900",
601
+ "#CC9933",
602
+ "#CCCC00",
603
+ "#CCCC33",
604
+ "#FF0000",
605
+ "#FF0033",
606
+ "#FF0066",
607
+ "#FF0099",
608
+ "#FF00CC",
609
+ "#FF00FF",
610
+ "#FF3300",
611
+ "#FF3333",
612
+ "#FF3366",
613
+ "#FF3399",
614
+ "#FF33CC",
615
+ "#FF33FF",
616
+ "#FF6600",
617
+ "#FF6633",
618
+ "#FF9900",
619
+ "#FF9933",
620
+ "#FFCC00",
621
+ "#FFCC33"
622
+ ];
623
+ function useColors() {
624
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
625
+ return true;
626
+ }
627
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
628
+ return false;
629
+ }
630
+ let m;
631
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
632
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
633
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
634
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
635
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
636
+ }
637
+ function formatArgs(args) {
638
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
639
+ if (!this.useColors) {
640
+ return;
641
+ }
642
+ const c = "color: " + this.color;
643
+ args.splice(1, 0, c, "color: inherit");
644
+ let index = 0;
645
+ let lastC = 0;
646
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
647
+ if (match === "%%") {
648
+ return;
649
+ }
650
+ index++;
651
+ if (match === "%c") {
652
+ lastC = index;
653
+ }
654
+ });
655
+ args.splice(lastC, 0, c);
656
+ }
657
+ exports.log = console.debug || console.log || (() => {
658
+ });
659
+ function save(namespaces) {
660
+ try {
661
+ if (namespaces) {
662
+ exports.storage.setItem("debug", namespaces);
663
+ } else {
664
+ exports.storage.removeItem("debug");
665
+ }
666
+ } catch (error) {
667
+ }
668
+ }
669
+ function load() {
670
+ let r;
671
+ try {
672
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
673
+ } catch (error) {
674
+ }
675
+ if (!r && typeof process !== "undefined" && "env" in process) {
676
+ r = process.env.DEBUG;
677
+ }
678
+ return r;
679
+ }
680
+ function localstorage() {
681
+ try {
682
+ return localStorage;
683
+ } catch (error) {
684
+ }
685
+ }
686
+ module.exports = require_common()(exports);
687
+ var { formatters } = module.exports;
688
+ formatters.j = function(v) {
689
+ try {
690
+ return JSON.stringify(v);
691
+ } catch (error) {
692
+ return "[UnexpectedJSONParseError]: " + error.message;
693
+ }
694
+ };
695
+ }
696
+ });
697
+
698
+ // ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
699
+ var require_has_flag = __commonJS({
700
+ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
701
+ "use strict";
702
+ module.exports = (flag, argv = process.argv) => {
703
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
704
+ const position = argv.indexOf(prefix + flag);
705
+ const terminatorPosition = argv.indexOf("--");
706
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
707
+ };
708
+ }
709
+ });
710
+
711
+ // ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
712
+ var require_supports_color = __commonJS({
713
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
714
+ "use strict";
715
+ var os = __require("os");
716
+ var tty = __require("tty");
717
+ var hasFlag = require_has_flag();
718
+ var { env } = process;
719
+ var forceColor;
720
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
721
+ forceColor = 0;
722
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
723
+ forceColor = 1;
724
+ }
725
+ if ("FORCE_COLOR" in env) {
726
+ if (env.FORCE_COLOR === "true") {
727
+ forceColor = 1;
728
+ } else if (env.FORCE_COLOR === "false") {
729
+ forceColor = 0;
730
+ } else {
731
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
732
+ }
733
+ }
734
+ function translateLevel(level) {
735
+ if (level === 0) {
736
+ return false;
737
+ }
738
+ return {
739
+ level,
740
+ hasBasic: true,
741
+ has256: level >= 2,
742
+ has16m: level >= 3
743
+ };
744
+ }
745
+ function supportsColor(haveStream, streamIsTTY) {
746
+ if (forceColor === 0) {
747
+ return 0;
748
+ }
749
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
750
+ return 3;
751
+ }
752
+ if (hasFlag("color=256")) {
753
+ return 2;
754
+ }
755
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
756
+ return 0;
757
+ }
758
+ const min = forceColor || 0;
759
+ if (env.TERM === "dumb") {
760
+ return min;
761
+ }
762
+ if (process.platform === "win32") {
763
+ const osRelease = os.release().split(".");
764
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
765
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
766
+ }
767
+ return 1;
768
+ }
769
+ if ("CI" in env) {
770
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
771
+ return 1;
772
+ }
773
+ return min;
774
+ }
775
+ if ("TEAMCITY_VERSION" in env) {
776
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
777
+ }
778
+ if (env.COLORTERM === "truecolor") {
779
+ return 3;
780
+ }
781
+ if ("TERM_PROGRAM" in env) {
782
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
783
+ switch (env.TERM_PROGRAM) {
784
+ case "iTerm.app":
785
+ return version >= 3 ? 3 : 2;
786
+ case "Apple_Terminal":
787
+ return 2;
788
+ }
789
+ }
790
+ if (/-256(color)?$/i.test(env.TERM)) {
791
+ return 2;
792
+ }
793
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
794
+ return 1;
795
+ }
796
+ if ("COLORTERM" in env) {
797
+ return 1;
798
+ }
799
+ return min;
800
+ }
801
+ function getSupportLevel(stream) {
802
+ const level = supportsColor(stream, stream && stream.isTTY);
803
+ return translateLevel(level);
804
+ }
805
+ module.exports = {
806
+ supportsColor: getSupportLevel,
807
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
808
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
809
+ };
810
+ }
811
+ });
812
+
813
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
814
+ var require_node = __commonJS({
815
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
816
+ "use strict";
817
+ var tty = __require("tty");
818
+ var util = __require("util");
819
+ exports.init = init;
820
+ exports.log = log;
821
+ exports.formatArgs = formatArgs;
822
+ exports.save = save;
823
+ exports.load = load;
824
+ exports.useColors = useColors;
825
+ exports.destroy = util.deprecate(
826
+ () => {
827
+ },
828
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
829
+ );
830
+ exports.colors = [6, 2, 3, 4, 5, 1];
831
+ try {
832
+ const supportsColor = require_supports_color();
833
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
834
+ exports.colors = [
835
+ 20,
836
+ 21,
837
+ 26,
838
+ 27,
839
+ 32,
840
+ 33,
841
+ 38,
842
+ 39,
843
+ 40,
844
+ 41,
845
+ 42,
846
+ 43,
847
+ 44,
848
+ 45,
849
+ 56,
850
+ 57,
851
+ 62,
852
+ 63,
853
+ 68,
854
+ 69,
855
+ 74,
856
+ 75,
857
+ 76,
858
+ 77,
859
+ 78,
860
+ 79,
861
+ 80,
862
+ 81,
863
+ 92,
864
+ 93,
865
+ 98,
866
+ 99,
867
+ 112,
868
+ 113,
869
+ 128,
870
+ 129,
871
+ 134,
872
+ 135,
873
+ 148,
874
+ 149,
875
+ 160,
876
+ 161,
877
+ 162,
878
+ 163,
879
+ 164,
880
+ 165,
881
+ 166,
882
+ 167,
883
+ 168,
884
+ 169,
885
+ 170,
886
+ 171,
887
+ 172,
888
+ 173,
889
+ 178,
890
+ 179,
891
+ 184,
892
+ 185,
893
+ 196,
894
+ 197,
895
+ 198,
896
+ 199,
897
+ 200,
898
+ 201,
899
+ 202,
900
+ 203,
901
+ 204,
902
+ 205,
903
+ 206,
904
+ 207,
905
+ 208,
906
+ 209,
907
+ 214,
908
+ 215,
909
+ 220,
910
+ 221
911
+ ];
912
+ }
913
+ } catch (error) {
914
+ }
915
+ exports.inspectOpts = Object.keys(process.env).filter((key) => {
916
+ return /^debug_/i.test(key);
917
+ }).reduce((obj, key) => {
918
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
919
+ return k.toUpperCase();
920
+ });
921
+ let val = process.env[key];
922
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
923
+ val = true;
924
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
925
+ val = false;
926
+ } else if (val === "null") {
927
+ val = null;
928
+ } else {
929
+ val = Number(val);
930
+ }
931
+ obj[prop] = val;
932
+ return obj;
933
+ }, {});
934
+ function useColors() {
935
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
936
+ }
937
+ function formatArgs(args) {
938
+ const { namespace: name, useColors: useColors2 } = this;
939
+ if (useColors2) {
940
+ const c = this.color;
941
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
942
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
943
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
944
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
945
+ } else {
946
+ args[0] = getDate() + name + " " + args[0];
947
+ }
948
+ }
949
+ function getDate() {
950
+ if (exports.inspectOpts.hideDate) {
951
+ return "";
952
+ }
953
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
954
+ }
955
+ function log(...args) {
956
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
957
+ }
958
+ function save(namespaces) {
959
+ if (namespaces) {
960
+ process.env.DEBUG = namespaces;
961
+ } else {
962
+ delete process.env.DEBUG;
963
+ }
964
+ }
965
+ function load() {
966
+ return process.env.DEBUG;
967
+ }
968
+ function init(debug) {
969
+ debug.inspectOpts = {};
970
+ const keys = Object.keys(exports.inspectOpts);
971
+ for (let i = 0; i < keys.length; i++) {
972
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
973
+ }
974
+ }
975
+ module.exports = require_common()(exports);
976
+ var { formatters } = module.exports;
977
+ formatters.o = function(v) {
978
+ this.inspectOpts.colors = this.useColors;
979
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
980
+ };
981
+ formatters.O = function(v) {
982
+ this.inspectOpts.colors = this.useColors;
983
+ return util.inspect(v, this.inspectOpts);
984
+ };
985
+ }
986
+ });
987
+
988
+ // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
989
+ var require_src = __commonJS({
990
+ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
991
+ "use strict";
992
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
993
+ module.exports = require_browser();
994
+ } else {
995
+ module.exports = require_node();
996
+ }
997
+ }
998
+ });
999
+
1000
+ export {
1001
+ require_dist,
1002
+ require_src
1003
+ };