| 9108 | constructor(opts) { |
| 9109 | var _a; |
| 9110 | super(); |
| 9111 | /** |
| 9112 | * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts |
| 9113 | * @returns {URL} |
| 9114 | */ |
| 9115 | __privateAdd(this, _getUrl); |
| 9116 | if (!opts || typeof opts === "object" && !(opts instanceof URL2) && !opts.uri) { |
| 9117 | throw new InvalidArgumentError("Proxy uri is mandatory"); |
| 9118 | } |
| 9119 | const { clientFactory = defaultFactory } = opts; |
| 9120 | if (typeof clientFactory !== "function") { |
| 9121 | throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); |
| 9122 | } |