gemi 0.5.0 → 0.5.2

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 (95) hide show
  1. package/dist/app/index.js +2 -2
  2. package/dist/app/index.js.map +1 -1
  3. package/dist/bin/index.js +77 -5778
  4. package/dist/broadcasting/index.js +1 -1
  5. package/dist/chunk-0643qpn8.js +4 -0
  6. package/dist/{chunk-vc1yv3v5.js.map → chunk-0643qpn8.js.map} +2 -2
  7. package/dist/chunk-0970v4jx.js +4 -0
  8. package/dist/chunk-0970v4jx.js.map +10 -0
  9. package/dist/{chunk-83snmykp.js → chunk-0rvh1r84.js} +2 -2
  10. package/dist/{chunk-83snmykp.js.map → chunk-0rvh1r84.js.map} +1 -1
  11. package/dist/chunk-0ykbtpxc.js +4 -0
  12. package/dist/{chunk-t34vnmky.js.map → chunk-0ykbtpxc.js.map} +1 -1
  13. package/dist/chunk-259kgv1j.js +18 -0
  14. package/dist/{chunk-1tpqxqmt.js.map → chunk-259kgv1j.js.map} +11 -29
  15. package/dist/{chunk-0s3yapam.js → chunk-39ynan33.js} +3 -3
  16. package/dist/{chunk-0s3yapam.js.map → chunk-39ynan33.js.map} +1 -1
  17. package/dist/{chunk-7v15p9nn.js → chunk-54v7tmfv.js} +3 -3
  18. package/dist/{chunk-7v15p9nn.js.map → chunk-54v7tmfv.js.map} +1 -1
  19. package/dist/chunk-5jvxqe5r.js +4 -0
  20. package/dist/{chunk-3pfpq2xc.js.map → chunk-5jvxqe5r.js.map} +1 -1
  21. package/dist/{chunk-ch0p7trm.js → chunk-5kh25wbv.js} +2 -2
  22. package/dist/{chunk-ch0p7trm.js.map → chunk-5kh25wbv.js.map} +1 -1
  23. package/dist/chunk-6twxqxj0.js +3 -0
  24. package/dist/chunk-6twxqxj0.js.map +16 -0
  25. package/dist/chunk-8pghf7ne.js +3 -0
  26. package/dist/{chunk-ac7dhq1c.js.map → chunk-8pghf7ne.js.map} +4 -4
  27. package/dist/chunk-99tdk5x5.js +4 -0
  28. package/dist/{chunk-sqgv2xyc.js.map → chunk-99tdk5x5.js.map} +2 -2
  29. package/dist/chunk-b5ke2zpg.js +4 -0
  30. package/dist/{chunk-9em80ypy.js.map → chunk-b5ke2zpg.js.map} +2 -2
  31. package/dist/chunk-bxwnddma.js +3 -0
  32. package/dist/chunk-bxwnddma.js.map +17 -0
  33. package/dist/{chunk-hnyegpzf.js → chunk-djfe1w23.js} +3 -3
  34. package/dist/{chunk-hnyegpzf.js.map → chunk-djfe1w23.js.map} +1 -1
  35. package/dist/chunk-e0yxdcan.js +4 -0
  36. package/dist/{chunk-k8t4vgx8.js.map → chunk-e0yxdcan.js.map} +2 -2
  37. package/dist/chunk-ee0c21b5.js +4 -0
  38. package/dist/{chunk-dfc3y8yn.js.map → chunk-ee0c21b5.js.map} +5 -5
  39. package/dist/{chunk-rr5j1686.js → chunk-exvtvmb6.js} +2 -2
  40. package/dist/{chunk-rr5j1686.js.map → chunk-exvtvmb6.js.map} +1 -1
  41. package/dist/chunk-fskmyztg.js +4 -0
  42. package/dist/{chunk-vp96f2zv.js.map → chunk-fskmyztg.js.map} +2 -2
  43. package/dist/{chunk-ewp71f92.js → chunk-g3838fme.js} +2 -2
  44. package/dist/{chunk-ewp71f92.js.map → chunk-g3838fme.js.map} +1 -1
  45. package/dist/{chunk-95hz1khz.js → chunk-hydta8h3.js} +2 -2
  46. package/dist/{chunk-95hz1khz.js.map → chunk-hydta8h3.js.map} +1 -1
  47. package/dist/{chunk-6y378xez.js → chunk-jwx1ymkq.js} +2 -2
  48. package/dist/{chunk-6y378xez.js.map → chunk-jwx1ymkq.js.map} +1 -1
  49. package/dist/chunk-n76mw527.js +11 -0
  50. package/dist/{chunk-hhbd5qn0.js.map → chunk-n76mw527.js.map} +5 -5
  51. package/dist/chunk-nwqqr50x.js +4 -0
  52. package/dist/{chunk-fn89vt9j.js.map → chunk-nwqqr50x.js.map} +6 -6
  53. package/dist/chunk-setbnv6k.js +7 -0
  54. package/dist/chunk-setbnv6k.js.map +66 -0
  55. package/dist/chunk-sywb9k1q.js +4 -0
  56. package/dist/{chunk-yq60hz8s.js.map → chunk-sywb9k1q.js.map} +6 -6
  57. package/dist/chunk-zq31anzs.js +8 -0
  58. package/dist/{chunk-hrf5jh5c.js.map → chunk-zq31anzs.js.map} +2 -2
  59. package/dist/chunk-zqcc4jxj.js +4 -0
  60. package/dist/{chunk-77gdtbj7.js.map → chunk-zqcc4jxj.js.map} +2 -2
  61. package/dist/email/index.js +1 -1
  62. package/dist/facades/index.js +2 -2
  63. package/dist/facades/index.js.map +1 -1
  64. package/dist/http/index.js +2 -2
  65. package/dist/http/index.js.map +1 -1
  66. package/dist/kernel/index.js +2 -2
  67. package/dist/kernel/index.js.map +1 -1
  68. package/dist/server/index.js +2 -2
  69. package/dist/server/index.js.map +1 -1
  70. package/dist/services/index.js +3 -12
  71. package/dist/services/index.js.map +4 -15
  72. package/package.json +2 -2
  73. package/dist/chunk-1tpqxqmt.js +0 -20
  74. package/dist/chunk-3pfpq2xc.js +0 -4
  75. package/dist/chunk-45df2pgm.js +0 -5
  76. package/dist/chunk-45df2pgm.js.map +0 -65
  77. package/dist/chunk-740bx4ar.js +0 -3
  78. package/dist/chunk-740bx4ar.js.map +0 -15
  79. package/dist/chunk-77gdtbj7.js +0 -4
  80. package/dist/chunk-9em80ypy.js +0 -4
  81. package/dist/chunk-ac7dhq1c.js +0 -3
  82. package/dist/chunk-dfc3y8yn.js +0 -4
  83. package/dist/chunk-fn89vt9j.js +0 -4
  84. package/dist/chunk-hhbd5qn0.js +0 -11
  85. package/dist/chunk-hrf5jh5c.js +0 -8
  86. package/dist/chunk-k8t4vgx8.js +0 -4
  87. package/dist/chunk-n34j31ss.js +0 -4
  88. package/dist/chunk-n34j31ss.js.map +0 -16
  89. package/dist/chunk-sqgv2xyc.js +0 -4
  90. package/dist/chunk-srsjrh5y.js +0 -4
  91. package/dist/chunk-srsjrh5y.js.map +0 -10
  92. package/dist/chunk-t34vnmky.js +0 -4
  93. package/dist/chunk-vc1yv3v5.js +0 -4
  94. package/dist/chunk-vp96f2zv.js +0 -4
  95. package/dist/chunk-yq60hz8s.js +0 -4
@@ -0,0 +1,66 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../node_modules/@smithy/middleware-stack/dist-cjs/index.js", "../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js", "../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js", "../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js", "../../../node_modules/@smithy/util-utf8/dist-cjs/index.js", "../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js", "../../../node_modules/@smithy/util-base64/dist-cjs/index.js", "../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js", "../../../node_modules/@smithy/types/dist-cjs/index.js", "../../../node_modules/@smithy/protocol-http/dist-cjs/index.js", "../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js", "../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js", "../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js", "../../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js", "../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js", "../../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js", "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js", "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/index.js", "../../../node_modules/@smithy/smithy-client/dist-es/client.js", "../../../node_modules/@smithy/smithy-client/dist-es/command.js", "../../../node_modules/@smithy/smithy-client/dist-es/constants.js", "../../../node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js", "../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js", "../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js", "../../../node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js", "../../../node_modules/@smithy/smithy-client/dist-es/parse-utils.js", "../../../node_modules/@smithy/smithy-client/dist-es/date-utils.js", "../../../node_modules/@smithy/smithy-client/dist-es/default-error-handler.js", "../../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js", "../../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js", "../../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js", "../../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js", "../../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js", "../../../node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js", "../../../node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js", "../../../node_modules/@smithy/smithy-client/dist-es/lazy-json.js", "../../../node_modules/@smithy/smithy-client/dist-es/object-mapping.js", "../../../node_modules/@smithy/smithy-client/dist-es/ser-utils.js", "../../../node_modules/@smithy/smithy-client/dist-es/serde-json.js", "../../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js", "../../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js", "../../../node_modules/@smithy/protocol-http/dist-es/httpResponse.js", "../../../node_modules/@smithy/querystring-builder/dist-es/index.js", "../../../node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js", "../../../node_modules/@smithy/node-http-handler/dist-es/constants.js", "../../../node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js", "../../../node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js", "../../../node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js", "../../../node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js", "../../../node_modules/@smithy/node-http-handler/dist-es/write-request-body.js", "../../../node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js", "../../../node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js"],
4
+ "sourcesContent": [
5
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n constructStack: () => constructStack\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MiddlewareStack.ts\nvar getAllAliases = /* @__PURE__ */ __name((name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n}, \"getAllAliases\");\nvar getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n}, \"getMiddlewareNameWithAliases\");\nvar constructStack = /* @__PURE__ */ __name(() => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = /* @__PURE__ */ new Set();\n const sort = /* @__PURE__ */ __name((entries) => entries.sort(\n (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]\n ), \"sort\");\n const removeByName = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByName\");\n const removeByReference = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByReference\");\n const cloneTo = /* @__PURE__ */ __name((toStack) => {\n var _a;\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve());\n return toStack;\n }, \"cloneTo\");\n const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n }, \"expandRelativeMiddlewareList\");\n const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === void 0) {\n if (debug) {\n return;\n }\n throw new Error(\n `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`\n );\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce(\n (wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n },\n []\n );\n return mainChain;\n }, \"getMiddlewareList\");\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ${entry.priority} priority in ${entry.step} step.`\n );\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`\n );\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n var _a;\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(\n identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false)\n );\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ?? mw.relation + \" \" + mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n }\n };\n return stack;\n}, \"constructStack\");\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n constructStack\n});\n\n",
6
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n",
7
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n",
8
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n",
9
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n",
10
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = (0, util_utf8_1.fromUtf8)(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\nexports.toBase64 = toBase64;\n",
11
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n",
12
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n",
13
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig)\n };\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n ...resolveChecksumRuntimeConfig(config)\n };\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n",
14
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n IHttpRequest: () => import_types.HttpRequest,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let httpHandler = runtimeConfig.httpHandler;\n return {\n setHttpHandler(handler) {\n httpHandler = handler;\n },\n httpHandler() {\n return httpHandler;\n },\n updateHttpClientConfig(key, value) {\n httpHandler.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar _Field = class _Field {\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n__name(_Field, \"Field\");\nvar Field = _Field;\n\n// src/Fields.ts\nvar _Fields = class _Fields {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n__name(_Fields, \"Fields\");\nvar Fields = _Fields;\n\n// src/httpRequest.ts\n\nvar _HttpRequest = class _HttpRequest {\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n /**\n * Note: this does not deep-clone the body.\n */\n static clone(request) {\n const cloned = new _HttpRequest({\n ...request,\n headers: { ...request.headers }\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n /**\n * This method only actually asserts that request is the interface {@link IHttpRequest},\n * and not necessarily this concrete class. Left in place for API stability.\n *\n * Do not call instance methods on the input of this function, and\n * do not assume it has the HttpRequest prototype.\n */\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n /**\n * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call\n * this method because {@link HttpRequest.isInstance} incorrectly\n * asserts that IHttpRequest (interface) objects are of type HttpRequest (class).\n */\n clone() {\n return _HttpRequest.clone(this);\n }\n};\n__name(_HttpRequest, \"HttpRequest\");\nvar HttpRequest = _HttpRequest;\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar _HttpResponse = class _HttpResponse {\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n__name(_HttpResponse, \"HttpResponse\");\nvar HttpResponse = _HttpResponse;\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHttpHandlerExtensionConfiguration,\n resolveHttpHandlerRuntimeConfig,\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n isValidHostname\n});\n\n",
15
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n",
16
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n",
17
+ "var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/set-connection-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME = 1e3;\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeoutId = setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs - offset);\n const doWithSocket = /* @__PURE__ */ __name((socket) => {\n if (socket == null ? void 0 : socket.connecting) {\n socket.on(\"connect\", () => {\n clearTimeout(timeoutId);\n });\n } else {\n clearTimeout(timeoutId);\n }\n }, \"doWithSocket\");\n if (request.socket) {\n doWithSocket(request.socket);\n } else {\n request.on(\"socket\", doWithSocket);\n }\n }, \"registerTimeout\");\n if (timeoutInMs < 2e3) {\n registerTimeout(0);\n return 0;\n }\n return setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar DEFER_EVENT_LISTENER_TIME2 = 3e3;\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = /* @__PURE__ */ __name(() => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n } else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n }, \"registerListener\");\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return setTimeout(registerListener, deferTimeMs);\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME3 = 3e3;\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n request.setTimeout(timeoutInMs - offset, () => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n });\n }, \"registerTimeout\");\n if (0 < timeoutInMs && timeoutInMs < 6e3) {\n registerTimeout(0);\n return 0;\n }\n return setTimeout(\n registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3),\n DEFER_EVENT_LISTENER_TIME3\n );\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 1e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let hasError = false;\n if (expect === \"100-continue\") {\n await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n clearTimeout(timeoutId);\n resolve();\n });\n httpRequest.on(\"error\", () => {\n hasError = true;\n clearTimeout(timeoutId);\n resolve();\n });\n })\n ]);\n }\n if (!hasError) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" && uint8.buffer && typeof uint8.byteOffset === \"number\" && typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar _NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n this.socketWarningTimestamp = 0;\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n /**\n * @internal\n *\n * @param agent - http(s) agent in use by the NodeHttpHandler instance.\n * @param socketWarningTimestamp - last socket usage check timestamp.\n * @param logger - channel for the warning.\n * @returns timestamp of last emitted warning.\n */\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n var _a, _b, _c;\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15e3;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0;\n const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call(\n logger,\n `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`\n );\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === \"function\") {\n return httpAgent;\n }\n return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === \"function\") {\n return httpsAgent;\n }\n return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger: console\n };\n }\n destroy() {\n var _a, _b, _c, _d;\n (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy();\n (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const timeouts = [];\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(clearTimeout);\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(clearTimeout);\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n timeouts.push(\n setTimeout(\n () => {\n this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(\n agent,\n this.socketWarningTimestamp,\n this.config.logger\n );\n },\n this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)\n )\n );\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n } else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.destroy();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));\n timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n timeouts.push(\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n })\n );\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {\n timeouts.forEach(clearTimeout);\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n__name(_NodeHttpHandler, \"NodeHttpHandler\");\nvar NodeHttpHandler = _NodeHttpHandler;\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n__name(_NodeHttp2ConnectionPool, \"NodeHttp2ConnectionPool\");\nvar NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;\n\n// src/node-http2-connection-manager.ts\nvar _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n var _a;\n const cacheKey = this.getUrlString(requestContext);\n (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n__name(_NodeHttp2ConnectionManager, \"NodeHttp2ConnectionManager\");\nvar NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;\n\n// src/node-http2-handler.ts\nvar _NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n var _a;\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session The session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n__name(_NodeHttp2Handler, \"NodeHttp2Handler\");\nvar NodeHttp2Handler = _NodeHttp2Handler;\n\n// src/stream-collector/collector.ts\n\nvar _Collector = class _Collector extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n__name(_Collector, \"Collector\");\nvar Collector = _Collector;\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n}, \"streamCollector\");\nvar isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream, \"isReadableStreamInstance\");\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectReadableStream, \"collectReadableStream\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttpHandler,\n NodeHttp2Handler,\n streamCollector\n});\n\n",
18
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n FetchHttpHandler: () => FetchHttpHandler,\n keepAliveSupport: () => keepAliveSupport,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fetch-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\n\n// src/request-timeout.ts\nfunction requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n__name(requestTimeout, \"requestTimeout\");\n\n// src/fetch-http-handler.ts\nvar keepAliveSupport = {\n supported: void 0\n};\nvar _FetchHttpHandler = class _FetchHttpHandler {\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n } else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === void 0) {\n keepAliveSupport.supported = Boolean(\n typeof Request !== \"undefined\" && \"keepalive\" in new Request(\"https://[::1]\")\n );\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal } = {}) {\n var _a;\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? void 0 : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method,\n credentials\n };\n if ((_a = this.config) == null ? void 0 : _a.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = /* @__PURE__ */ __name(() => {\n }, \"removeSignalEventListener\");\n const fetchRequest = new Request(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != void 0;\n if (!hasReadableStream) {\n return response.blob().then((body2) => ({\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: body2\n })\n }));\n }\n return {\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body\n })\n };\n }),\n requestTimeout(requestTimeoutInMs)\n ];\n if (abortSignal) {\n raceOfPromises.push(\n new Promise((resolve, reject) => {\n const onAbort = /* @__PURE__ */ __name(() => {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener(\"abort\", onAbort), \"removeSignalEventListener\");\n } else {\n abortSignal.onabort = onAbort;\n }\n })\n );\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n__name(_FetchHttpHandler, \"FetchHttpHandler\");\nvar FetchHttpHandler = _FetchHttpHandler;\n\n// src/stream-collector.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar streamCollector = /* @__PURE__ */ __name((stream) => {\n if (typeof Blob === \"function\" && stream instanceof Blob) {\n return collectBlob(stream);\n }\n return collectStream(stream);\n}, \"streamCollector\");\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = (0, import_util_base64.fromBase64)(base64);\n return new Uint8Array(arrayBuffer);\n}\n__name(collectBlob, \"collectBlob\");\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectStream, \"collectStream\");\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = reader.result ?? \"\";\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n__name(readToBase64, \"readToBase64\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n keepAliveSupport,\n FetchHttpHandler,\n streamCollector\n});\n\n",
19
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n",
20
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isReadableStream = void 0;\nconst isReadableStream = (stream) => {\n var _a;\n return typeof ReadableStream === \"function\" &&\n (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream);\n};\nexports.isReadableStream = isReadableStream;\n",
21
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst fetch_http_handler_1 = require(\"@smithy/fetch-http-handler\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_hex_encoding_1 = require(\"@smithy/util-hex-encoding\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, fetch_http_handler_1.streamCollector)(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return (0, util_base64_1.toBase64)(buf);\n }\n else if (encoding === \"hex\") {\n return (0, util_hex_encoding_1.toHex)(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return (0, util_utf8_1.toUtf8)(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n",
22
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst util_1 = require(\"util\");\nconst sdk_stream_mixin_browser_1 = require(\"./sdk-stream-mixin.browser\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n try {\n return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);\n }\n catch (e) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new util_1.TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n",
23
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = void 0;\nasync function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\nexports.splitStream = splitStream;\n",
24
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = void 0;\nconst stream_1 = require(\"stream\");\nconst splitStream_browser_1 = require(\"./splitStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nasync function splitStream(stream) {\n if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return (0, splitStream_browser_1.splitStream)(stream);\n }\n const stream1 = new stream_1.PassThrough();\n const stream2 = new stream_1.PassThrough();\n stream.pipe(stream1);\n stream.pipe(stream2);\n return [stream1, stream2];\n}\nexports.splitStream = splitStream;\n",
25
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nasync function headStream(stream, bytes) {\n var _a;\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\nexports.headStream = headStream;\n",
26
+ "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nconst stream_1 = require(\"stream\");\nconst headStream_browser_1 = require(\"./headStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst headStream = (stream, bytes) => {\n if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return (0, headStream_browser_1.headStream)(stream, bytes);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n collector.limit = bytes;\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.buffers));\n resolve(bytes);\n });\n });\n};\nexports.headStream = headStream;\nclass Collector extends stream_1.Writable {\n constructor() {\n super(...arguments);\n this.buffers = [];\n this.limit = Infinity;\n this.bytesBuffered = 0;\n }\n _write(chunk, encoding, callback) {\n var _a;\n this.buffers.push(chunk);\n this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0;\n if (this.bytesBuffered >= this.limit) {\n const excess = this.bytesBuffered - this.limit;\n const tailBuffer = this.buffers[this.buffers.length - 1];\n this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);\n this.emit(\"finish\");\n }\n callback();\n }\n}\n",
27
+ "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n__name(_Uint8ArrayBlobAdapter, \"Uint8ArrayBlobAdapter\");\nvar Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter;\n\n// src/index.ts\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n__reExport(src_exports, require(\"././splitStream\"), module.exports);\n__reExport(src_exports, require(\"././headStream\"), module.exports);\n__reExport(src_exports, require(\"././stream-type-check\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n getAwsChunkedEncodingStream,\n sdkStreamMixin,\n splitStream,\n headStream,\n isReadableStream\n});\n\n",
28
+ "import { constructStack } from \"@smithy/middleware-stack\";\nexport class Client {\n constructor(config) {\n this.config = config;\n this.middlewareStack = constructStack();\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : undefined;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n }\n else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n }\n else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command)\n .then((result) => callback(null, result.output), (err) => callback(err))\n .catch(() => { });\n }\n else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n}\n",
29
+ "import { constructStack } from \"@smithy/middleware-stack\";\nimport { SMITHY_CONTEXT_KEY } from \"@smithy/types\";\nexport class Command {\n constructor() {\n this.middlewareStack = constructStack();\n }\n static classBuilder() {\n return new ClassBuilder();\n }\n resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext,\n },\n ...additionalContext,\n };\n const { requestHandler } = configuration;\n return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);\n }\n}\nclass ClassBuilder {\n constructor() {\n this._init = () => { };\n this._ep = {};\n this._middlewareFn = () => [];\n this._commandName = \"\";\n this._clientName = \"\";\n this._additionalContext = {};\n this._smithyContext = {};\n this._inputFilterSensitiveLog = (_) => _;\n this._outputFilterSensitiveLog = (_) => _;\n this._serializer = null;\n this._deserializer = null;\n }\n init(cb) {\n this._init = cb;\n }\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext,\n };\n return this;\n }\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n build() {\n const closure = this;\n let CommandRef;\n return (CommandRef = class extends Command {\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n constructor(...[input]) {\n super();\n this.serialize = closure._serializer;\n this.deserialize = closure._deserializer;\n this.input = input ?? {};\n closure._init(this);\n }\n resolveMiddleware(stack, configuration, options) {\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog,\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog,\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext,\n });\n }\n });\n }\n}\n",
30
+ "export const SENSITIVE_STRING = \"***SensitiveInformation***\";\n",
31
+ "export const createAggregatedClient = (commands, Client) => {\n for (const command of Object.keys(commands)) {\n const CommandCtor = commands[command];\n const methodImpl = async function (args, optionsOrCb, cb) {\n const command = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command, optionsOrCb);\n }\n else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command, optionsOrCb || {}, cb);\n }\n else {\n return this.send(command, optionsOrCb);\n }\n };\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client.prototype[methodName] = methodImpl;\n }\n};\n",
32
+ "export class ServiceException extends Error {\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, ServiceException.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n}\nexport const decorateServiceException = (exception, additions = {}) => {\n Object.entries(additions)\n .filter(([, v]) => v !== undefined)\n .forEach(([k, v]) => {\n if (exception[k] == undefined || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n};\n",
33
+ "export class NoOpLogger {\n trace() { }\n debug() { }\n info() { }\n warn() { }\n error() { }\n}\n",
34
+ "import { Uint8ArrayBlobAdapter } from \"@smithy/util-stream\";\nexport const collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n",
35
+ "export const parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nexport const expectBoolean = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nexport const expectNumber = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nconst MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nexport const expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nexport const expectLong = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nexport const expectInt = expectLong;\nexport const expectInt32 = (value) => expectSizedInt(value, 32);\nexport const expectShort = (value) => expectSizedInt(value, 16);\nexport const expectByte = (value) => expectSizedInt(value, 8);\nconst expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== undefined && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nconst castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nexport const expectNonNull = (value, location) => {\n if (value === null || value === undefined) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nexport const expectObject = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nexport const expectString = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nexport const expectUnion = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject)\n .filter(([, v]) => v != null)\n .map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nexport const strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nexport const strictParseFloat = strictParseDouble;\nexport const strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nconst NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nconst parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nexport const limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nexport const handleFloat = limitedParseDouble;\nexport const limitedParseFloat = limitedParseDouble;\nexport const limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nconst parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nexport const strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nexport const strictParseInt = strictParseLong;\nexport const strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nexport const strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nexport const strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nconst stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message)\n .split(\"\\n\")\n .slice(0, 5)\n .filter((s) => !s.includes(\"stackTraceWarning\"))\n .join(\"\\n\");\n};\nexport const logger = {\n warn: console.warn,\n};\n",
36
+ "import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n",
37
+ "import { decorateServiceException } from \"./exceptions\";\nexport const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : undefined;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata,\n });\n throw decorateServiceException(response, parsedBody);\n};\nexport const withBaseException = (ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n};\nconst deserializeMetadata = (output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n",
38
+ "export const loadConfigsForDefaultMode = (mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100,\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100,\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 30000,\n };\n default:\n return {};\n }\n};\n",
39
+ "let warningEmitted = false;\nexport const emitWarningIfUnsupportedVersion = (version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n};\n",
40
+ "import { AlgorithmId } from \"@smithy/types\";\nexport { AlgorithmId };\nexport const getChecksumConfiguration = (runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in AlgorithmId) {\n const algorithmId = AlgorithmId[id];\n if (runtimeConfig[algorithmId] === undefined) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId],\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n },\n };\n};\nexport const resolveChecksumRuntimeConfig = (clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n};\n",
41
+ "export const getRetryConfiguration = (runtimeConfig) => {\n let _retryStrategy = runtimeConfig.retryStrategy;\n return {\n setRetryStrategy(retryStrategy) {\n _retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return _retryStrategy;\n },\n };\n};\nexport const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n};\n",
42
+ "import { getChecksumConfiguration, resolveChecksumRuntimeConfig } from \"./checksum\";\nimport { getRetryConfiguration, resolveRetryRuntimeConfig } from \"./retry\";\nexport const getDefaultExtensionConfiguration = (runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig),\n ...getRetryConfiguration(runtimeConfig),\n };\n};\nexport const getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nexport const resolveDefaultRuntimeConfig = (config) => {\n return {\n ...resolveChecksumRuntimeConfig(config),\n ...resolveRetryRuntimeConfig(config),\n };\n};\n",
43
+ "export function extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n",
44
+ "export const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];\n",
45
+ "export const StringWrapper = function () {\n const Class = Object.getPrototypeOf(this).constructor;\n const Constructor = Function.bind.apply(String, [null, ...arguments]);\n const instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n};\nStringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n});\nObject.setPrototypeOf(StringWrapper, String);\nexport class LazyJsonString extends StringWrapper {\n deserializeJSON() {\n return JSON.parse(super.toString());\n }\n toJSON() {\n return super.toString();\n }\n static fromObject(object) {\n if (object instanceof LazyJsonString) {\n return object;\n }\n else if (object instanceof String || typeof object === \"string\") {\n return new LazyJsonString(object);\n }\n return new LazyJsonString(JSON.stringify(object));\n }\n}\n",
46
+ "export function map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n }\n else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n }\n else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\nexport const convertMap = (target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n};\nexport const take = (source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n};\nconst mapWithFilter = (target, filter, instructions) => {\n return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n }\n else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n }\n else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n }, {}));\n};\nconst applyInstruction = (target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if ((typeof filter === \"function\" && filter(source[sourceKey])) || (typeof filter !== \"function\" && !!filter)) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === undefined && (_value = value()) != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(void 0)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n }\n else if (customFilterPassed) {\n target[targetKey] = value();\n }\n }\n else {\n const defaultFilterPassed = filter === undefined && value != null;\n const customFilterPassed = (typeof filter === \"function\" && !!filter(value)) || (typeof filter !== \"function\" && !!filter);\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n};\nconst nonNullish = (_) => _ != null;\nconst pass = (_) => _;\n",
47
+ "export const serializeFloat = (value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n};\nexport const serializeDateTime = (date) => date.toISOString().replace(\".000Z\", \"Z\");\n",
48
+ "export const _json = (obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n};\n",
49
+ "export const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n let httpHandler = runtimeConfig.httpHandler;\n return {\n setHttpHandler(handler) {\n httpHandler = handler;\n },\n httpHandler() {\n return httpHandler;\n },\n updateHttpClientConfig(key, value) {\n httpHandler.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return httpHandler.httpHandlerConfigs();\n },\n };\n};\nexport const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n",
50
+ "export class HttpRequest {\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n",
51
+ "export class HttpResponse {\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n",
52
+ "import { escapeUri } from \"@smithy/util-uri-escape\";\nexport function buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = escapeUri(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${escapeUri(value[i])}`);\n }\n }\n else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${escapeUri(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n",
53
+ "import { HttpResponse } from \"@smithy/protocol-http\";\nimport { buildQueryString } from \"@smithy/querystring-builder\";\nimport { Agent as hAgent, request as hRequest } from \"http\";\nimport { Agent as hsAgent, request as hsRequest } from \"https\";\nimport { NODEJS_TIMEOUT_ERROR_CODES } from \"./constants\";\nimport { getTransformedHeaders } from \"./get-transformed-headers\";\nimport { setConnectionTimeout } from \"./set-connection-timeout\";\nimport { setSocketKeepAlive } from \"./set-socket-keep-alive\";\nimport { setSocketTimeout } from \"./set-socket-timeout\";\nimport { writeRequestBody } from \"./write-request-body\";\nexport const DEFAULT_REQUEST_TIMEOUT = 0;\nexport class NodeHttpHandler {\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new NodeHttpHandler(instanceOrOptions);\n }\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15000;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n constructor(options) {\n this.socketWarningTimestamp = 0;\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options()\n .then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n })\n .catch(reject);\n }\n else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === \"function\") {\n return httpAgent;\n }\n return new hAgent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof hsAgent || typeof httpsAgent?.destroy === \"function\") {\n return httpsAgent;\n }\n return new hsAgent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger: console,\n };\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = undefined;\n const timeouts = [];\n const resolve = async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(clearTimeout);\n _resolve(arg);\n };\n const reject = async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(clearTimeout);\n _reject(arg);\n };\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n timeouts.push(setTimeout(() => {\n this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger);\n }, this.config.socketAcquisitionWarningTimeout ??\n (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000)));\n const queryString = buildQueryString(request.query || {});\n let auth = undefined;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n }\n else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth,\n };\n const requestFunc = isSSL ? hsRequest : hRequest;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res,\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n }\n else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = () => {\n req.destroy();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n }\n else {\n abortSignal.onabort = onAbort;\n }\n }\n timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));\n timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n timeouts.push(setSocketKeepAlive(req, {\n keepAlive: httpAgent.keepAlive,\n keepAliveMsecs: httpAgent.keepAliveMsecs,\n }));\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {\n timeouts.forEach(clearTimeout);\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = undefined;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value,\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n}\n",
54
+ "export const NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n",
55
+ "const getTransformedHeaders = (headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n};\nexport { getTransformedHeaders };\n",
56
+ "const DEFER_EVENT_LISTENER_TIME = 1000;\nexport const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = (offset) => {\n const timeoutId = setTimeout(() => {\n request.destroy();\n reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\",\n }));\n }, timeoutInMs - offset);\n const doWithSocket = (socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n clearTimeout(timeoutId);\n });\n }\n else {\n clearTimeout(timeoutId);\n }\n };\n if (request.socket) {\n doWithSocket(request.socket);\n }\n else {\n request.on(\"socket\", doWithSocket);\n }\n };\n if (timeoutInMs < 2000) {\n registerTimeout(0);\n return 0;\n }\n return setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n",
57
+ "const DEFER_EVENT_LISTENER_TIME = 3000;\nexport const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = () => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n }\n else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n };\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return setTimeout(registerListener, deferTimeMs);\n};\n",
58
+ "const DEFER_EVENT_LISTENER_TIME = 3000;\nexport const setSocketTimeout = (request, reject, timeoutInMs = 0) => {\n const registerTimeout = (offset) => {\n request.setTimeout(timeoutInMs - offset, () => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n });\n };\n if (0 < timeoutInMs && timeoutInMs < 6000) {\n registerTimeout(0);\n return 0;\n }\n return setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n};\n",
59
+ "import { Readable } from \"stream\";\nconst MIN_WAIT_TIME = 1000;\nexport async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let hasError = false;\n if (expect === \"100-continue\") {\n await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n clearTimeout(timeoutId);\n resolve();\n });\n httpRequest.on(\"error\", () => {\n hasError = true;\n clearTimeout(timeoutId);\n resolve();\n });\n }),\n ]);\n }\n if (!hasError) {\n writeBody(httpRequest, request.body);\n }\n}\nfunction writeBody(httpRequest, body) {\n if (body instanceof Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" &&\n uint8.buffer &&\n typeof uint8.byteOffset === \"number\" &&\n typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n",
60
+ "import { Writable } from \"stream\";\nexport class Collector extends Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n}\n",
61
+ "import { Collector } from \"./collector\";\nexport const streamCollector = (stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n};\nconst isReadableStreamInstance = (stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream;\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n"
62
+ ],
63
+ "mappings": "6HAAA,FAAuB,eAAnB,EAC0B,yBAA1B,GAC2B,oBAA3B,IADmB,OAEnB,GAAe,OAAO,UAAU,eAChC,EAAS,CAAC,EAAQ,IAAU,EAAU,EAAQ,OAAQ,CAAE,QAAO,aAAc,EAAK,CAAC,EACnF,GAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS,KAAQ,EACf,EAAU,EAAQ,EAAM,CAAE,IAAK,EAAI,GAAO,WAAY,EAAK,CAAC,GAE5D,GAAc,CAAC,EAAI,EAAM,EAAQ,IAAS,CAC5C,GAAI,UAAe,IAAS,iBAAmB,IAAS,YACtD,QAAS,KAAO,GAAkB,CAAI,EACpC,IAAK,GAAa,KAAK,EAAI,CAAG,GAAK,IAAQ,EACzC,EAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAK,GAAM,aAAc,EAAO,GAAiB,EAAM,CAAG,IAAM,EAAK,UAAW,CAAC,EAEvH,OAAO,GAEL,GAAe,CAAC,IAAQ,GAAY,EAAU,CAAC,EAAG,aAAc,CAAE,MAAO,EAAK,CAAC,EAAG,CAAG,EAGrF,GAAc,CAAC,EACnB,GAAS,GAAa,CACpB,eAAgB,IAAM,EACxB,CAAC,EACD,GAA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