@readmagic/workmate 0.0.1

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 (552) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-BSLHrjbt.js +1 -0
  2. package/dist/chunks/App-DY5O6IKw.js +1 -0
  3. package/dist/chunks/ApproveApiKey-BEzfC6r3.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DfAPwDix.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-Ce3PraaD.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-Dvhcgahe.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-B68V1bCq.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-CTWhpIm8.js +1 -0
  10. package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +1 -0
  11. package/dist/chunks/DesktopHandoff-BRbU4is4.js +1 -0
  12. package/dist/chunks/Dialog-vfLXEPed.js +1 -0
  13. package/dist/chunks/DiffDialog-CBluIK-x.js +6 -0
  14. package/dist/chunks/Doctor-B0CRtxi2.js +1 -0
  15. package/dist/chunks/Doctor-WxNv49HC.js +3 -0
  16. package/dist/chunks/ExitFlow-CRPgptCN.js +2 -0
  17. package/dist/chunks/Feedback-CEtzaLr3.js +2 -0
  18. package/dist/chunks/Grove--kttLxvs.js +11 -0
  19. package/dist/chunks/Grove-CelgLWH4.js +1 -0
  20. package/dist/chunks/HybridTransport-BgV5_7Az.js +4 -0
  21. package/dist/chunks/InvalidConfigDialog-DCGwXW_p.js +1 -0
  22. package/dist/chunks/InvalidSettingsDialog-jTwsdXWr.js +1 -0
  23. package/dist/chunks/ListItem-vfLXEPed.js +1 -0
  24. package/dist/chunks/MCPConnectionManager-BX0LMz9J.js +1 -0
  25. package/dist/chunks/McpParsingWarnings-WQrWJeWP.js +1 -0
  26. package/dist/chunks/MessageSelector-_UZB8cGb.js +3 -0
  27. package/dist/chunks/Messages-jCoW_1Rr.js +11 -0
  28. package/dist/chunks/Onboarding-BoIVNCgc.js +1 -0
  29. package/dist/chunks/OverageCreditUpsell-1FCN8bH3.js +1 -0
  30. package/dist/chunks/PermissionDialog-0ya1CU5k.js +1 -0
  31. package/dist/chunks/PluginSettings-BD9JLV9-.js +17 -0
  32. package/dist/chunks/PressEnterToContinue-Dl9Hg9Mf.js +1 -0
  33. package/dist/chunks/PromptInputFooterSuggestions-CrGST0Cq.js +1 -0
  34. package/dist/chunks/PromptInputHelpMenu-B2TDpbpw.js +1 -0
  35. package/dist/chunks/QueryEngine-D2HUnwmU.js +1 -0
  36. package/dist/chunks/REPL-BV4WyYMg.js +142 -0
  37. package/dist/chunks/REPL-DcpN3MRC.js +1 -0
  38. package/dist/chunks/RemoteCallout-DS_EV6Fh.js +1 -0
  39. package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +2 -0
  40. package/dist/chunks/ResumeConversation-Cw3vP4G8.js +1 -0
  41. package/dist/chunks/SSETransport-BXiEBMpb.js +4 -0
  42. package/dist/chunks/SearchBox-vfLXEPed.js +1 -0
  43. package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +1 -0
  44. package/dist/chunks/Settings-ns6mRsDc.js +2 -0
  45. package/dist/chunks/TeleportProgress-CcDzMC5L.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-DZbxl4sD.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-EowJO5nm.js +1 -0
  48. package/dist/chunks/ThemePicker-BYbChJpu.js +1 -0
  49. package/dist/chunks/TrustDialog-DA3YTk_k.js +1 -0
  50. package/dist/chunks/TungstenTool-Cb7gJvq4.js +1 -0
  51. package/dist/chunks/TungstenTool-CxMQVCuF.js +1 -0
  52. package/dist/chunks/ValidationErrorsList-Cx-hoRwG.js +2 -0
  53. package/dist/chunks/WelcomeV2-BTfttGcv.js +1 -0
  54. package/dist/chunks/add-dir-CWt69NAZ.js +1 -0
  55. package/dist/chunks/agentDisplay-CQ4mZWFH.js +1 -0
  56. package/dist/chunks/agents-C6jzKOit.js +2 -0
  57. package/dist/chunks/agents-D4clhuCl.js +103 -0
  58. package/dist/chunks/ajv-5vMo9UcX.js +8 -0
  59. package/dist/chunks/allErrors-HMPqE0jK.js +1 -0
  60. package/dist/chunks/analytics-BotDBGh0.js +1 -0
  61. package/dist/chunks/ant-9Z5bppVC.js +1 -0
  62. package/dist/chunks/api-L2IgleTV.js +1 -0
  63. package/dist/chunks/api-TgV7fl9V.js +1 -0
  64. package/dist/chunks/asciicast-DYbkzGCN.js +1 -0
  65. package/dist/chunks/asciicast-n-BBfgDq.js +4 -0
  66. package/dist/chunks/assistant-BA9_Mo9U.js +1 -0
  67. package/dist/chunks/assistant-BiNOSla3.js +1 -0
  68. package/dist/chunks/assistant-YvbVKjVh.js +1 -0
  69. package/dist/chunks/attributionHooks-CUAoGkU6.js +1 -0
  70. package/dist/chunks/attributionTrailer-oKKrF3z8.js +1 -0
  71. package/dist/chunks/auth-CEig4Gxp.js +1 -0
  72. package/dist/chunks/auth-CbGDlhyO.js +1 -0
  73. package/dist/chunks/auth-DHyCIxCk.js +15 -0
  74. package/dist/chunks/autoMode-Db4QrgFr.js +45 -0
  75. package/dist/chunks/autoModeDenials-BxNzGJdR.js +1 -0
  76. package/dist/chunks/autonomy-BkAMA7du.js +1 -0
  77. package/dist/chunks/autonomy-D4Vy-RPQ.js +15 -0
  78. package/dist/chunks/autonomyPanel-EjfO8jvg.js +1 -0
  79. package/dist/chunks/axios-BHBm_hhU.js +1 -0
  80. package/dist/chunks/axios-DaWTGg7G.js +16 -0
  81. package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +1 -0
  82. package/dist/chunks/backgroundHousekeeping-hDDE8mJC.js +17 -0
  83. package/dist/chunks/banner-hD6wZygx.js +2 -0
  84. package/dist/chunks/base64-js-0wLHn8zB.js +1 -0
  85. package/dist/chunks/bedrockClient-DxE_mHFI.js +15 -0
  86. package/dist/chunks/bg-BzG63WOm.js +1 -0
  87. package/dist/chunks/bg-DQ0Q3Qv-.js +9 -0
  88. package/dist/chunks/branch-CeQ9IyZk.js +3 -0
  89. package/dist/chunks/break-cache-Bd0clV2N.js +8 -0
  90. package/dist/chunks/bridge-yerAiaK2.js +2 -0
  91. package/dist/chunks/bridgeConfig-CCtXe8ak.js +1 -0
  92. package/dist/chunks/bridgeConfig-D5dB38xD.js +1 -0
  93. package/dist/chunks/bridgeEnabled--F-6TUi4.js +1 -0
  94. package/dist/chunks/bridgeEnabled-DKX8-T_H.js +1 -0
  95. package/dist/chunks/bridgeMain--R1HFbOv.js +68 -0
  96. package/dist/chunks/bridgeMain-d06JByZn.js +1 -0
  97. package/dist/chunks/bridgeMessaging-CqbLTDcx.js +1 -0
  98. package/dist/chunks/bridgePointer-W_jdQ8zf.js +1 -0
  99. package/dist/chunks/browser-Bd7GeBH1.js +1 -0
  100. package/dist/chunks/btw-CVGRmL9a.js +1 -0
  101. package/dist/chunks/bundledMode--fG1S62b.js +1 -0
  102. package/dist/chunks/caches-BtmAri4e.js +3 -0
  103. package/dist/chunks/caches-BuTIAOtY.js +1 -0
  104. package/dist/chunks/capacityWake-CV_x9H8j.js +1 -0
  105. package/dist/chunks/ccrClient-HqMi5Kfu.js +1 -0
  106. package/dist/chunks/checksum-DgbnMdM-.js +1 -0
  107. package/dist/chunks/classPrivateFieldSet2-D4U5K-I3.js +1 -0
  108. package/dist/chunks/classPrivateMethodInitSpec-BXQD0Vh4.js +1 -0
  109. package/dist/chunks/claudeDesktop-aUMx06RK.js +1 -0
  110. package/dist/chunks/clear-C6nRzIQE.js +1 -0
  111. package/dist/chunks/cliLaunch-2AUoMnqx.js +1 -0
  112. package/dist/chunks/client-BeET1hnC.js +1 -0
  113. package/dist/chunks/client-DchQnIJD.js +36 -0
  114. package/dist/chunks/client-DvAL7lY8.js +8 -0
  115. package/dist/chunks/color-DXI_4ibU.js +1 -0
  116. package/dist/chunks/color-convert-p91EwGT7.js +1 -0
  117. package/dist/chunks/commands-VjcG4qFq.js +1 -0
  118. package/dist/chunks/commitAttribution-Cm40fdNU.js +2 -0
  119. package/dist/chunks/commitAttribution-Lb3qUlAR.js +1 -0
  120. package/dist/chunks/compact-DPTVpJ4D.js +2 -0
  121. package/dist/chunks/completionCache-BQaLkB4d.js +4 -0
  122. package/dist/chunks/completionCache-CW8lKIgy.js +1 -0
  123. package/dist/chunks/config-0cRberzR.js +1 -0
  124. package/dist/chunks/config-BSXLgwpD.js +1 -0
  125. package/dist/chunks/config-BrxKpHpR.js +1 -0
  126. package/dist/chunks/config-C7YHKCPV.js +3 -0
  127. package/dist/chunks/config-CLmFk-5V.js +1 -0
  128. package/dist/chunks/connectHeadless-CqRoEtrg.js +1 -0
  129. package/dist/chunks/context-C_cKrBUn.js +1 -0
  130. package/dist/chunks/context-noninteractive-DnH6Q9Lu.js +54 -0
  131. package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +1 -0
  132. package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +1 -0
  133. package/dist/chunks/conversation-GJxfkr6M.js +1 -0
  134. package/dist/chunks/conversation-oK3aFzqO.js +1 -0
  135. package/dist/chunks/createSSHSession--bWmmIk9.js +6 -0
  136. package/dist/chunks/createSession-DIr4sUp6.js +1 -0
  137. package/dist/chunks/createSession-DM4acqaC.js +1 -0
  138. package/dist/chunks/cron-3LntnnhJ.js +1 -0
  139. package/dist/chunks/crossProjectResume-DKrtjTpm.js +40 -0
  140. package/dist/chunks/cwd-BuJhkTrc.js +1 -0
  141. package/dist/chunks/cwd-D-tY2NKc.js +1 -0
  142. package/dist/chunks/daemon-B9lBPdBJ.js +2 -0
  143. package/dist/chunks/dangerousBackend-DwcP0P08.js +1 -0
  144. package/dist/chunks/datadog-ByS7LGGa.js +1 -0
  145. package/dist/chunks/datadog-DNCsyfSO.js +1 -0
  146. package/dist/chunks/debug-DzZUT2Wv.js +1 -0
  147. package/dist/chunks/debug-IKW-jE7K.js +39 -0
  148. package/dist/chunks/debugUtils-D2981c0Z.js +1 -0
  149. package/dist/chunks/defineProperty-C-QyHrDq.js +1 -0
  150. package/dist/chunks/desktop-B5cvrcOQ.js +1 -0
  151. package/dist/chunks/detached-rfIUyc-B.js +5 -0
  152. package/dist/chunks/detect-libc-CxbBtWJu.js +1 -0
  153. package/dist/chunks/detectRepository-6nw-Aw3v.js +1 -0
  154. package/dist/chunks/detectRepository-ReZ0Fz8Z.js +1 -0
  155. package/dist/chunks/diff-cXAp9cNN.js +1 -0
  156. package/dist/chunks/directoryCompletion-DBM2o5kx.js +1 -0
  157. package/dist/chunks/dist-CXlEpGqr.js +20 -0
  158. package/dist/chunks/dist-DESLAofA.js +1 -0
  159. package/dist/chunks/dist-DIee4wq1.js +29 -0
  160. package/dist/chunks/dist-Dopnn8wS.js +5 -0
  161. package/dist/chunks/dist-es-5t7v8oaj.js +1 -0
  162. package/dist/chunks/dist-es-BF6bR-Ik.js +2 -0
  163. package/dist/chunks/dist-es-BIjDeceU.js +1 -0
  164. package/dist/chunks/dist-es-BOPBJQo3.js +1 -0
  165. package/dist/chunks/dist-es-Bfr4TzQe.js +3 -0
  166. package/dist/chunks/dist-es-Byxccz_-.js +1 -0
  167. package/dist/chunks/dist-es-C-OjW2Ao.js +1 -0
  168. package/dist/chunks/dist-es-C3reqy7X.js +1 -0
  169. package/dist/chunks/dist-es-C7vygWzp.js +1 -0
  170. package/dist/chunks/dist-es-CEk66gUu.js +1 -0
  171. package/dist/chunks/dist-es-CIULjvtA2.js +1 -0
  172. package/dist/chunks/dist-es-CMtO44xC.js +1 -0
  173. package/dist/chunks/dist-es-CQMt6zRM.js +1 -0
  174. package/dist/chunks/dist-es-CYPVg66r.js +9 -0
  175. package/dist/chunks/dist-es-Cd_AeqMK.js +6 -0
  176. package/dist/chunks/dist-es-Cgsa8pb82.js +1 -0
  177. package/dist/chunks/dist-es-Cwru7c2B2.js +1 -0
  178. package/dist/chunks/dist-es-D1Y8zSMI.js +1 -0
  179. package/dist/chunks/dist-es-D1wHe_zh.js +1 -0
  180. package/dist/chunks/dist-es-DKFm0FJ7.js +1 -0
  181. package/dist/chunks/dist-es-DKIwwJME.js +1 -0
  182. package/dist/chunks/dist-es-DNFTCbrP.js +1 -0
  183. package/dist/chunks/dist-es-DXIR5NLi2.js +1 -0
  184. package/dist/chunks/dist-es-DelBIxNM.js +1 -0
  185. package/dist/chunks/dist-es-DmdZmEJ-.js +1 -0
  186. package/dist/chunks/dist-es-Gt_DpXlP.js +1 -0
  187. package/dist/chunks/dist-es-gUzZ_7Vf.js +1 -0
  188. package/dist/chunks/dist-es-kj-F5A132.js +1 -0
  189. package/dist/chunks/dist-es-yHGBqhBe.js +1 -0
  190. package/dist/chunks/doctor-CTMHXZvQ.js +1 -0
  191. package/dist/chunks/earlyInput-BTC_Wucv.js +2 -0
  192. package/dist/chunks/earlyInput-xcoTbKQn.js +1 -0
  193. package/dist/chunks/effort-Br8KKHdx.js +9 -0
  194. package/dist/chunks/entry-4lIRMrLI.js +14 -0
  195. package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +1 -0
  196. package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +1 -0
  197. package/dist/chunks/envUtils-DSxRz_kt.js +1 -0
  198. package/dist/chunks/esm-BYnFh4pG.js +1 -0
  199. package/dist/chunks/esm-Bx6rTxIs.js +1 -0
  200. package/dist/chunks/esm-C367Cyo-.js +1 -0
  201. package/dist/chunks/esm-C8Zkk1Ux.js +1 -0
  202. package/dist/chunks/esm-CGx9qY3q.js +56 -0
  203. package/dist/chunks/esm-CXM9jqO_.js +1 -0
  204. package/dist/chunks/esm-CXczu_-W.js +1 -0
  205. package/dist/chunks/esm-CXt5K8Xt.js +1 -0
  206. package/dist/chunks/esm-Cb-L4oAk.js +1 -0
  207. package/dist/chunks/esm-D6ZZCdtk.js +1 -0
  208. package/dist/chunks/esm-DhRjocaU.js +1 -0
  209. package/dist/chunks/esm-DklLYEuz.js +1 -0
  210. package/dist/chunks/esm-IYgGg4wR.js +1 -0
  211. package/dist/chunks/esm-lWlUmoUA.js +1 -0
  212. package/dist/chunks/esm-lyfry1WB.js +10 -0
  213. package/dist/chunks/esm-wGnzjq4Z.js +1 -0
  214. package/dist/chunks/event-streams-C0Zy0Uqv.js +1 -0
  215. package/dist/chunks/event-streams-DoqJmjFN.js +1 -0
  216. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +1 -0
  217. package/dist/chunks/execAsync-Bv2yxuGe.js +1 -0
  218. package/dist/chunks/execFileNoThrow-COKYqVQj.js +34 -0
  219. package/dist/chunks/execSyncWrapper-DZJ3tNWF.js +1 -0
  220. package/dist/chunks/exit-BOhGfSlm.js +2 -0
  221. package/dist/chunks/exit-Z9oWrqE4.js +1 -0
  222. package/dist/chunks/extra-usage-BS4aVOt5.js +1 -0
  223. package/dist/chunks/extra-usage-DtAIhW74.js +1 -0
  224. package/dist/chunks/extra-usage-core-CdL1ltqq.js +1 -0
  225. package/dist/chunks/extra-usage-noninteractive-DxxRI0Yx.js +1 -0
  226. package/dist/chunks/extraUsage-BYZdi44Y.js +1 -0
  227. package/dist/chunks/extractMemories-C4f9JWuI.js +1 -0
  228. package/dist/chunks/fast-B0OB4x7K.js +1 -0
  229. package/dist/chunks/fast-DKqiojzf.js +1 -0
  230. package/dist/chunks/featureCheck-CrJeuheQ.js +1 -0
  231. package/dist/chunks/featureCheck-HslM03dr.js +1 -0
  232. package/dist/chunks/feedback-yB19xph5.js +1 -0
  233. package/dist/chunks/figures-5ThXQEtq.js +1 -0
  234. package/dist/chunks/file-D1cN3LMK.js +12 -0
  235. package/dist/chunks/fileStateCache-DDW5toIs.js +1 -0
  236. package/dist/chunks/files-DAzGtmzz.js +2 -0
  237. package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +1 -0
  238. package/dist/chunks/firstPartyEventLogger-hU-LPkje.js +5 -0
  239. package/dist/chunks/flushGate-ZFr8yv7F.js +1 -0
  240. package/dist/chunks/foundry-sdk-BdeF2aBu.js +1 -0
  241. package/dist/chunks/fpsMetrics-Cf_hdtiJ.js +1 -0
  242. package/dist/chunks/from-CgDRRLiX.js +4 -0
  243. package/dist/chunks/gemini-DqAv8_GY.js +1 -0
  244. package/dist/chunks/generateRecap-lO2PDlx8.js +1 -0
  245. package/dist/chunks/generateSessionName-48veu5dv.js +1 -0
  246. package/dist/chunks/genericProcessUtils-F1Qcb1sO.js +23 -0
  247. package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +1 -0
  248. package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +2 -0
  249. package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +1 -0
  250. package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +1 -0
  251. package/dist/chunks/getMachineId-win-DamF2CH_.js +1 -0
  252. package/dist/chunks/git-BE_FiJZp.js +1 -0
  253. package/dist/chunks/git-tyaWOgRL.js +6 -0
  254. package/dist/chunks/githubRepoPathMapping-BlR0BphY.js +1 -0
  255. package/dist/chunks/goal-Bn8Kz2Dp.js +3 -0
  256. package/dist/chunks/graceful-fs-DDVg0cja.js +2 -0
  257. package/dist/chunks/grok-DhnO_KDC.js +1 -0
  258. package/dist/chunks/grove-DotW04-v.js +7 -0
  259. package/dist/chunks/hash-Tu-My5Vp.js +1 -0
  260. package/dist/chunks/heapdump-DkZSKNbp.js +5 -0
  261. package/dist/chunks/help-DU_BcZtU.js +1 -0
  262. package/dist/chunks/hooks-BTMWE5Qx.js +79 -0
  263. package/dist/chunks/hooks-DONAb_nq.js +1 -0
  264. package/dist/chunks/hostGuard-Dh296c6q.js +1 -0
  265. package/dist/chunks/inboundAttachments-BcEgi49j.js +1 -0
  266. package/dist/chunks/inboundAttachments-DVs3_m48.js +1 -0
  267. package/dist/chunks/index.min-D75yiGLN.js +1 -0
  268. package/dist/chunks/initReplBridge-D0Xec8S-.js +1 -0
  269. package/dist/chunks/install-BkfXeXpv.js +1 -0
  270. package/dist/chunks/instinctParser-Dt-lqnDe.js +1 -0
  271. package/dist/chunks/instrumentation-H0XRS1yG.js +21 -0
  272. package/dist/chunks/intl-cKc-V6Mq.js +1 -0
  273. package/dist/chunks/isObject-C6qM3WEW.js +1 -0
  274. package/dist/chunks/isSymbol-BO6cdPI7.js +1 -0
  275. package/dist/chunks/job-DKtLkF8V.js +2 -0
  276. package/dist/chunks/json-bigint-bonnP-Hz.js +8 -0
  277. package/dist/chunks/jsx-runtime-Bb4Xn-E0.js +1 -0
  278. package/dist/chunks/jws-BscXOT9I.js +3 -0
  279. package/dist/chunks/jwtUtils-C-ojmb8W.js +1 -0
  280. package/dist/chunks/keybindings-ez51eHHp.js +2 -0
  281. package/dist/chunks/language-BuRSO2sR.js +1 -0
  282. package/dist/chunks/language-Da4KNbjm.js +1 -0
  283. package/dist/chunks/launchAgentsPlatform-BQyPdrHp.js +1 -0
  284. package/dist/chunks/launchCommand-1qkTCKpf.js +1 -0
  285. package/dist/chunks/launchLocalMemory-CWHAj7CX.js +3 -0
  286. package/dist/chunks/launchLocalVault-D8iJdtsP.js +3 -0
  287. package/dist/chunks/launchMemoryStores-W7jWG2uH.js +1 -0
  288. package/dist/chunks/launchOnboarding-q__LaLy1.js +8 -0
  289. package/dist/chunks/launchSchedule-BWi9F5vh.js +1 -0
  290. package/dist/chunks/launchSkillStore-4wd4MQBc.js +1 -0
  291. package/dist/chunks/launchTeleport-BlCf2QM_.js +3 -0
  292. package/dist/chunks/launchVault-C7u7LZV7.js +1 -0
  293. package/dist/chunks/lazySchema-uxlVVNM1.js +1 -0
  294. package/dist/chunks/lib-BSzUGQb_.js +2 -0
  295. package/dist/chunks/lib-BlVGipXx.js +14 -0
  296. package/dist/chunks/lib-rQZENxQg.js +8 -0
  297. package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +1 -0
  298. package/dist/chunks/loadAgentsDir-nzr38hai.js +3990 -0
  299. package/dist/chunks/loadPluginHooks-z1-zvBLw.js +1 -0
  300. package/dist/chunks/loadSso-DSxfVpgX.js +1 -0
  301. package/dist/chunks/localSearch-B-L_ldos.js +1 -0
  302. package/dist/chunks/localSearch-D-FprOMr.js +1 -0
  303. package/dist/chunks/lockfile-D5-j7HOZ.js +1 -0
  304. package/dist/chunks/log-B3eB4EFv.js +1 -0
  305. package/dist/chunks/logoV2Utils-RQ160dI2.js +1 -0
  306. package/dist/chunks/magicDocs-BqZ0GewA.js +57 -0
  307. package/dist/chunks/main-DeFMhaFE.js +31 -0
  308. package/dist/chunks/main-y7LJ5qUc.js +1243 -0
  309. package/dist/chunks/mappers-CWykjGfP.js +1 -0
  310. package/dist/chunks/mcp-CSFPAfaW.js +2 -0
  311. package/dist/chunks/mcp-DBwT4pa9.js +6 -0
  312. package/dist/chunks/mcp-DvZTaHZE.js +1 -0
  313. package/dist/chunks/memoize-BK3gG5ob.js +1 -0
  314. package/dist/chunks/memoize-BO31Ws9Q.js +1 -0
  315. package/dist/chunks/memory-DcpPpYN0.js +1 -0
  316. package/dist/chunks/metadata-BRLJvh61.js +1 -0
  317. package/dist/chunks/modalContext-DFjKLCB6.js +1 -0
  318. package/dist/chunks/mode-BkViT_0o.js +2 -0
  319. package/dist/chunks/model--z4Di9QO.js +1 -0
  320. package/dist/chunks/model-CZktWw6o.js +1 -0
  321. package/dist/chunks/model-DfFA3qMO.js +1 -0
  322. package/dist/chunks/multipart-parser-DDLYsngd.js +2 -0
  323. package/dist/chunks/nativeInstaller-GcIk7G2Y.js +1 -0
  324. package/dist/chunks/oauth-BqJqV-2M.js +1 -0
  325. package/dist/chunks/oauth-C8X_p8Gc.js +1 -0
  326. package/dist/chunks/observationStore-DzCdXq8U.js +4 -0
  327. package/dist/chunks/onChangeAppState-DwGVi-BC.js +1 -0
  328. package/dist/chunks/open-BtQHzzL9.js +1 -0
  329. package/dist/chunks/openai-B2wxZDQx.js +10 -0
  330. package/dist/chunks/openaiShared-G2-w4gJt.js +1 -0
  331. package/dist/chunks/output-style-BM3qAHLA.js +1 -0
  332. package/dist/chunks/overageCreditGrant-CjK49axw.js +1 -0
  333. package/dist/chunks/p-map-B1EeBuI8.js +1 -0
  334. package/dist/chunks/p-map-HKDr3iDo.js +1 -0
  335. package/dist/chunks/package-BC0bllK8.js +1 -0
  336. package/dist/chunks/panel-B-nrcHpm.js +1 -0
  337. package/dist/chunks/panel-R4ue6pSW.js +1 -0
  338. package/dist/chunks/panelCall-I_fbgub5.js +1 -0
  339. package/dist/chunks/parseConnectUrl-BiyKR5-x.js +1 -0
  340. package/dist/chunks/parser-BlM_Fk4J.js +1 -0
  341. package/dist/chunks/parser-CQrasoUB.js +1 -0
  342. package/dist/chunks/partition-CxRF7T-f.js +1 -0
  343. package/dist/chunks/passes-U_h-hNu-.js +1 -0
  344. package/dist/chunks/path-BCSE0S-c.js +1 -0
  345. package/dist/chunks/permissions-B8epy16o.js +3 -0
  346. package/dist/chunks/permissions-CeYKbtSC.js +1 -0
  347. package/dist/chunks/permissions-Cn_6f8CB.js +1 -0
  348. package/dist/chunks/pidLock-CBJDnBG_.js +3 -0
  349. package/dist/chunks/pipeTransport-D3Qx9v1V.js +1 -0
  350. package/dist/chunks/plan-BAhStVci.js +1 -0
  351. package/dist/chunks/platform-EtecGacO.js +2 -0
  352. package/dist/chunks/plist-Bzo2VMe9.js +6 -0
  353. package/dist/chunks/plugin-D9huNnv6.js +1 -0
  354. package/dist/chunks/pluginAutoupdate-BfmyxR5g.js +1 -0
  355. package/dist/chunks/pluginBlocklist-03sZaZa6.js +1 -0
  356. package/dist/chunks/pluginCliCommands-P2Ndi1r1.js +1 -0
  357. package/dist/chunks/pluginFlagging-BVy7Xv_0.js +1 -0
  358. package/dist/chunks/pluginOperations-Cz37qcjF.js +2 -0
  359. package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +1 -0
  360. package/dist/chunks/pluginStartupCheck-w24D-wwk.js +1 -0
  361. package/dist/chunks/plugins-B0hiIN4q.js +4 -0
  362. package/dist/chunks/policyLimits-Dem-XJ_h.js +1 -0
  363. package/dist/chunks/pollConfig-C2Ac8WMU.js +1 -0
  364. package/dist/chunks/poller-CpLBoB-N.js +1 -0
  365. package/dist/chunks/poor-CfbMKZNJ.js +1 -0
  366. package/dist/chunks/poorMode-Bsw2V-V_.js +1 -0
  367. package/dist/chunks/poorMode-jvImnkty.js +1 -0
  368. package/dist/chunks/postCommitAttribution-DoSP9wZD.js +1 -0
  369. package/dist/chunks/print-ozjC0Mhg.js +23 -0
  370. package/dist/chunks/privacy-settings-DeGoBRrZ.js +1 -0
  371. package/dist/chunks/process-CNfq37LF.js +1 -0
  372. package/dist/chunks/process-gEbdy6uY.js +1 -0
  373. package/dist/chunks/processBashCommand-loWZ8MSE.js +1 -0
  374. package/dist/chunks/processSlashCommand-BdouajZb.js +5 -0
  375. package/dist/chunks/projectContext-BaDZBAoK.js +1 -0
  376. package/dist/chunks/projectContext-D9MDwJUF.js +1 -0
  377. package/dist/chunks/prompt-Bef63FhB.js +132 -0
  378. package/dist/chunks/prompt-C7wd1H_i.js +1 -0
  379. package/dist/chunks/prompt-DIoNqZvO.js +1 -0
  380. package/dist/chunks/promptEditor-foiayhdY.js +4 -0
  381. package/dist/chunks/protocolHandler-BsiB1oW_.js +13 -0
  382. package/dist/chunks/protocols-CCsohXid.js +18 -0
  383. package/dist/chunks/protocols-CnYQjBlj.js +2 -0
  384. package/dist/chunks/proxy-Cn2YwITp.js +99 -0
  385. package/dist/chunks/rate-limit-options-DTJPDcTr.js +1 -0
  386. package/dist/chunks/rcDebugLog-BUuD-X1D.js +11 -0
  387. package/dist/chunks/reconciler-DqXTmV3J.js +4 -0
  388. package/dist/chunks/referral-DP_GshTS.js +1 -0
  389. package/dist/chunks/refresh-CNzXPAFw.js +1 -0
  390. package/dist/chunks/registerProtocol-CjxlFsKw.js +36 -0
  391. package/dist/chunks/release-notes-BxgK8zWO.js +4 -0
  392. package/dist/chunks/releaseNotes-CbSktIJW.js +2 -0
  393. package/dist/chunks/reload-plugins-CDu6yU5-.js +1 -0
  394. package/dist/chunks/remote-env-B4HnhISc.js +1 -0
  395. package/dist/chunks/remoteBridgeCore-D-wG5jau.js +1 -0
  396. package/dist/chunks/remoteManagedSettings-B7gt0VAX.js +1 -0
  397. package/dist/chunks/rename-DlbMb24l.js +1 -0
  398. package/dist/chunks/renderOptions-5kWQpVr2.js +1 -0
  399. package/dist/chunks/resume-BB5iBogS.js +2 -0
  400. package/dist/chunks/rewind-D12hCfZD.js +1 -0
  401. package/dist/chunks/ripgrep-BQgJ02F9.js +1 -0
  402. package/dist/chunks/ripgrep-BvDwiKJ3.js +5 -0
  403. package/dist/chunks/rollback-BPWRKlIZ.js +11 -0
  404. package/dist/chunks/rolldown-runtime-DaDcL9Zw.js +1 -0
  405. package/dist/chunks/runtimeObserver-BNH2WGE3.js +1 -0
  406. package/dist/chunks/runtimeObserver-Ci-5gvYg.js +10 -0
  407. package/dist/chunks/sandbox-adapter-Coe1GDAE.js +1 -0
  408. package/dist/chunks/sandbox-toggle-B2Yk4y2V.js +1 -0
  409. package/dist/chunks/sanitization-DV-94a9Z.js +1 -0
  410. package/dist/chunks/satisfies-DQJHNtpQ.js +1 -0
  411. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +1 -0
  412. package/dist/chunks/searchExtraTools-BnWZ9roi.js +1 -0
  413. package/dist/chunks/semver-BMRJYn3q.js +1 -0
  414. package/dist/chunks/semver-DQo45qGo.js +1 -0
  415. package/dist/chunks/serde-f76bObzR.js +4 -0
  416. package/dist/chunks/server-LdbAb0sV.js +1 -0
  417. package/dist/chunks/serverBanner-BdExKFHT.js +1 -0
  418. package/dist/chunks/serverLog-BFmvyJ93.js +1 -0
  419. package/dist/chunks/session-Bmx7L3Mt.js +2 -0
  420. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +1 -0
  421. package/dist/chunks/sessionDiscovery-DcEAr5vJ.js +1 -0
  422. package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +1 -0
  423. package/dist/chunks/sessionManager-CPa049BO.js +1 -0
  424. package/dist/chunks/sessionMemory-Bsg2unYX.js +1 -0
  425. package/dist/chunks/sessionMemory-CIbCojm-.js +1 -0
  426. package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +1 -0
  427. package/dist/chunks/sessionObserver-CRU1qWnP.js +1 -0
  428. package/dist/chunks/sessionObserver-DQwHsDrM.js +20 -0
  429. package/dist/chunks/sessionStorage-BxDN8qRc.js +1 -0
  430. package/dist/chunks/sessionStoragePortable-Cx6JQ5Ye.js +3 -0
  431. package/dist/chunks/sessionTitle-B8jcexkQ.js +14 -0
  432. package/dist/chunks/sessionTracing-BuLsL6qA.js +11 -0
  433. package/dist/chunks/settings-5PQdphqC.js +19 -0
  434. package/dist/chunks/settingsSync-BDeuErb5.js +1 -0
  435. package/dist/chunks/setup-BKEnSLR9.js +3 -0
  436. package/dist/chunks/shadowedRuleDetection-7Z8ezTKF.js +1 -0
  437. package/dist/chunks/shellQuote-fB02N16J.js +4 -0
  438. package/dist/chunks/sideQuestion-CYdNATPW.js +20 -0
  439. package/dist/chunks/signin-CPaEtsnK.js +1 -0
  440. package/dist/chunks/sink-DjKoYMsA.js +1 -0
  441. package/dist/chunks/sink-iYxWapbU.js +1 -0
  442. package/dist/chunks/sinks-GryGVRT8.js +2 -0
  443. package/dist/chunks/sinks-jfaIjsRJ.js +1 -0
  444. package/dist/chunks/skill-learning-E8tQed-Q.js +5 -0
  445. package/dist/chunks/skillChangeDetector-A8SAuyo9.js +1 -0
  446. package/dist/chunks/skillGapStore-B5rl12bV.js +1 -0
  447. package/dist/chunks/skillGapStore-CjJrxxjk.js +5 -0
  448. package/dist/chunks/skillGenerator-BDR_z3-X.js +8 -0
  449. package/dist/chunks/skillLearning-BQtfFE0g.js +1 -0
  450. package/dist/chunks/skillLearning-C8ihdryM.js +1 -0
  451. package/dist/chunks/skillPanel-yR8Oi-mO.js +28 -0
  452. package/dist/chunks/skillSearchPanel-DUQQUCUS.js +21 -0
  453. package/dist/chunks/skills-NAZQ3j-t.js +1 -0
  454. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +1 -0
  455. package/dist/chunks/src-CDCSSo0U2.js +53 -0
  456. package/dist/chunks/src-CHw1lvBc.js +3 -0
  457. package/dist/chunks/src-CST_jFnT.js +1 -0
  458. package/dist/chunks/src-CgZmCiiH.js +2 -0
  459. package/dist/chunks/src-CiJCsqUl.js +9 -0
  460. package/dist/chunks/src-D06Xyj4g.js +2 -0
  461. package/dist/chunks/src-DCUgdrYl.js +5 -0
  462. package/dist/chunks/src-DLz3FZm1.js +1 -0
  463. package/dist/chunks/src-DPUAq5Ty.js +1 -0
  464. package/dist/chunks/src-DQOX_xI1.js +1 -0
  465. package/dist/chunks/src-Dt5IJd3C.js +1 -0
  466. package/dist/chunks/src-Dvp6-vB7.js +19 -0
  467. package/dist/chunks/src-PM8NIIu_.js +1 -0
  468. package/dist/chunks/src-l6_O0K-a.js +1 -0
  469. package/dist/chunks/src-xRRBgNzF.js +25 -0
  470. package/dist/chunks/sso-oidc-DFJ7SBvI.js +1 -0
  471. package/dist/chunks/startupProfiler-B0m6crkd.js +1 -0
  472. package/dist/chunks/startupProfiler-DxRQteII.js +3 -0
  473. package/dist/chunks/state-4KQ3kaqz.js +1 -0
  474. package/dist/chunks/state-53JDbNQM.js +1 -0
  475. package/dist/chunks/state-Cn_m2NOf.js +1 -0
  476. package/dist/chunks/staticRender-BIxpgNUq.js +1 -0
  477. package/dist/chunks/stats-h4yu84Q-.js +1 -0
  478. package/dist/chunks/status-BbdeubJG.js +1 -0
  479. package/dist/chunks/status-is_Bg_IB.js +2 -0
  480. package/dist/chunks/statusNoticeHelpers-CQ7CUugR.js +1 -0
  481. package/dist/chunks/stdio-4S7b8Uhx.js +1 -0
  482. package/dist/chunks/stdio-W_Kokrkh.js +3 -0
  483. package/dist/chunks/stickers-qJoNhPk4.js +1 -0
  484. package/dist/chunks/store-Z8rTjDHe.js +1 -0
  485. package/dist/chunks/stringUtils-CvXbHQRH.js +4 -0
  486. package/dist/chunks/sts-C2Gf2WYN.js +1 -0
  487. package/dist/chunks/subprocessEnv-BSQSomcK.js +1 -0
  488. package/dist/chunks/subprocessEnv-vrwzMgKn.js +1 -0
  489. package/dist/chunks/supports-color-uJ1LqA-P.js +1 -0
  490. package/dist/chunks/systemPromptSections-CgpggIYX.js +1 -0
  491. package/dist/chunks/systemPromptSections-IePG5K8r.js +1 -0
  492. package/dist/chunks/systemTheme-Ceakddth.js +1 -0
  493. package/dist/chunks/tag-i3HZ4lhj.js +11 -0
  494. package/dist/chunks/tasks-HzsYNTZ1.js +1 -0
  495. package/dist/chunks/teleport-hN3cAbYC.js +1 -0
  496. package/dist/chunks/templateJobs-CIv_ysje.js +12 -0
  497. package/dist/chunks/terminalSetup-C0PF87iu.js +33 -0
  498. package/dist/chunks/terminalSetup-CxniwSF-.js +1 -0
  499. package/dist/chunks/theme-BKIHX_Dx.js +1 -0
  500. package/dist/chunks/thinkback-BA4cMz4D.js +1 -0
  501. package/dist/chunks/thinkback-mT-8FIT-.js +1 -0
  502. package/dist/chunks/thinkback-play-Cfk49mvF.js +1 -0
  503. package/dist/chunks/tmux-CbsW-VDJ.js +1 -0
  504. package/dist/chunks/toolEventObserver-8FQtxeVv.js +1 -0
  505. package/dist/chunks/toolEventObserver-B1xvyKdE.js +1 -0
  506. package/dist/chunks/toolPool-CHVDZqh7.js +1 -0
  507. package/dist/chunks/trustedDevice-BYCh1ff7.js +1 -0
  508. package/dist/chunks/trustedDevice-DnIWErCt.js +1 -0
  509. package/dist/chunks/tui-fTa_pzdA.js +6 -0
  510. package/dist/chunks/types-BUyOCzUt.js +1 -0
  511. package/dist/chunks/types-Czs-_G1S.js +3 -0
  512. package/dist/chunks/types-a7X-tJpJ.js +17 -0
  513. package/dist/chunks/udsClient-Cg9bBD0p.js +1 -0
  514. package/dist/chunks/ultrareviewCommand-DCFRZsKp.js +3 -0
  515. package/dist/chunks/undercover-B-kKUWtK.js +1 -0
  516. package/dist/chunks/undercover-CsLPQb-a.js +31 -0
  517. package/dist/chunks/up-dO5BcPaq.js +12 -0
  518. package/dist/chunks/updateCCB-CfUnkOLT.js +11 -0
  519. package/dist/chunks/upgrade-CngUwvY4.js +1 -0
  520. package/dist/chunks/upgrade-kpttjebY.js +1 -0
  521. package/dist/chunks/upload-DDhQqV8n.js +1 -0
  522. package/dist/chunks/upstreamproxy-CvcjNY7J.js +11 -0
  523. package/dist/chunks/usage-CJ5w0907.js +1 -0
  524. package/dist/chunks/usage-eZRwLa77.js +1 -0
  525. package/dist/chunks/useExitOnCtrlCDWithKeybindings-yAroCqu4.js +1 -0
  526. package/dist/chunks/useMainLoopModel-BNFW-g8E.js +1 -0
  527. package/dist/chunks/useManagePlugins-CTtPaQRP.js +1 -0
  528. package/dist/chunks/useMergedTools-CZJffsmf.js +1 -0
  529. package/dist/chunks/useSearchInput-C-CqUK6w.js +1 -0
  530. package/dist/chunks/useSettingsErrors-BWlJCgYF.js +1 -0
  531. package/dist/chunks/util-DJV0joAW.js +1 -0
  532. package/dist/chunks/v4-jw6qOKwQ.js +65 -0
  533. package/dist/chunks/validatePlugin-CRmpIGLV.js +1 -0
  534. package/dist/chunks/vertex-sdk-DjXcZ2J7.js +9 -0
  535. package/dist/chunks/vim-n8-UT5w-.js +1 -0
  536. package/dist/chunks/which-BBCjXfI2.js +1 -0
  537. package/dist/chunks/windowsPaths-D6T_3XaU.js +1 -0
  538. package/dist/chunks/windowsPaths-DUKTzBck.js +1 -0
  539. package/dist/chunks/workSecret-C_lv0dRh.js +1 -0
  540. package/dist/chunks/workerRegistry-BdHi7_sN.js +1 -0
  541. package/dist/chunks/worktree-YDeHMlHZ.js +1 -0
  542. package/dist/chunks/worktreeModeEnabled-BFOYTTTr.js +1 -0
  543. package/dist/chunks/worktreeModeEnabled-D68iEHpC.js +1 -0
  544. package/dist/chunks/wrapper-K8ZapJVu.js +6 -0
  545. package/dist/chunks/xdg-DcF9ejUM.js +1 -0
  546. package/dist/chunks/zod-CuNujUwx.js +1 -0
  547. package/dist/cli-bun.js +2 -0
  548. package/dist/cli-node.js +2 -0
  549. package/dist/cli.js +2 -0
  550. package/dist/vendor/ripgrep/x64-linux/rg +0 -0
  551. package/package.json +218 -0
  552. package/scripts/postinstall.cjs +389 -0
@@ -0,0 +1,5 @@
1
+ import{i as e,t}from"./rolldown-runtime-DaDcL9Zw.js";import{t as n}from"./src-DCUgdrYl.js";var r=t((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.json=t.toBuffer=void 0;var a=i(e(`http`)),o=i(e(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}t.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}t.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}t.req=l})),i=t((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),a=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=t&&t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Agent=void 0;var s=a(e(`net`)),c=a(e(`http`)),l=e(`https`);o(r(),t);var u=Symbol(`AgentBaseInternalState`);t.Agent=class extends c.Agent{constructor(e){super(e),this[u]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
2
+ `).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new s.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?l.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof c.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[u].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[u].currentSocket;if(this[u].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[u].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[u]&&(this[u].defaultPort=e)}get protocol(){return this[u].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[u]&&(this[u].protocol=e)}}})),a=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;var r=(0,t(n()).default)(`https-proxy-agent:parse-proxy-response`);function i(e){return new Promise((t,n)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),r(`onend`),n(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),r(`onerror %o`,e),n(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r
3
+ \r
4
+ `);if(u===-1){r(`have not received end of HTTP headers yet...`),o();return}let d=l.slice(0,u).toString(`ascii`).split(`\r
5
+ `),f=d.shift();if(!f)return e.destroy(),n(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let r=t.indexOf(`:`);if(r===-1)return e.destroy(),n(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,r).toLowerCase(),a=t.slice(r+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}r(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=i})),o=t((t=>{var r=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),o=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),s=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},c=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpsProxyAgent=void 0;var l=s(e(`net`)),u=s(e(`tls`)),d=c(e(`assert`)),f=c(n()),p=i(),m=e(`url`),h=a(),g=(0,f.default)(`https-proxy-agent`),_=e=>e.servername===void 0&&e.host&&!l.isIP(e.host)?{...e,servername:e.host}:e,v=class extends p.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new m.URL(e):e,this.proxyHeaders=t?.headers??{},g(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?b(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(g("Creating `tls.Socket`: %o",this.connectOpts),r=u.connect(_(this.connectOpts))):(g("Creating `net.Socket`: %o",this.connectOpts),r=l.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=l.isIPv6(t.host)?`[${t.host}]`:t.host,o=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||(i[`Proxy-Connection`]=this.keepAlive?`Keep-Alive`:`close`);for(let e of Object.keys(i))o+=`${e}: ${i[e]}\r\n`;let s=(0,h.parseProxyResponse)(r);r.write(`${o}\r\n`);let{connect:c,buffered:f}=await s;if(e.emit(`proxyConnect`,c),this.emit(`proxyConnect`,c,e),c.statusCode===200)return e.once(`socket`,y),t.secureEndpoint?(g(`Upgrading socket connection to TLS`),u.connect({...b(_(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let p=new l.Socket({writable:!1});return p.readable=!0,e.once(`socket`,e=>{g(`Replaying proxy buffer for failed request`),(0,d.default)(e.listenerCount(`data`)>0),e.push(f),e.push(null)}),p}};v.protocols=[`http`,`https`],t.HttpsProxyAgent=v;function y(e){e.resume()}function b(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}}));export{i as n,o as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-C3reqy7X.js";t();export{e as fromTokenFile};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{I as r,Y as i,q as a,t as o}from"./protocols-CnYQjBlj.js";var s,c=e((()=>{s=(e,t)=>{if(!t||t.length===0)return e;let n=[];for(let r of t)for(let t of e)t.schemeId.split(`#`)[1]===r&&n.push(t);for(let t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n}}));function l(e){let t=new Map;for(let n of e)t.set(n.schemeId,n);return t}var u,d=e((()=>{r(),c(),u=(e,t)=>(n,r)=>async a=>{let o=s(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,a.input)),e.authSchemePreference?await e.authSchemePreference():[]),c=l(e.httpAuthSchemes),u=i(r),d=[];for(let n of o){let i=c.get(n.schemeId);if(!i){d.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}let a=i.identityProvider(await t.identityProviderConfigProvider(e));if(!a){d.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:o={},signingProperties:s={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},o),n.signingProperties=Object.assign(n.signingProperties||{},s),u.selectedHttpAuthScheme={httpAuthOption:n,identity:await a(n.identityProperties),signer:i.signer};break}if(!u.selectedHttpAuthScheme)throw Error(d.join(`
2
+ `));return n(a)}})),f,p,m=e((()=>{d(),f={step:`serialize`,tags:[`HTTP_AUTH_SCHEME`],name:`httpAuthSchemeMiddleware`,override:!0,relation:`before`,toMiddleware:`endpointV2Middleware`},p=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(u(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),f)}})})),h=e((()=>{d(),m()})),g,_,v,y=e((()=>{o(),r(),g=e=>e=>{throw e},_=(e,t)=>{},v=e=>(e,t)=>async n=>{if(!a.isInstance(n.request))return e(n);let r=i(t).selectedHttpAuthScheme;if(!r)throw Error(`No HttpAuthScheme was selected: unable to sign request`);let{httpAuthOption:{signingProperties:o={}},identity:s,signer:c}=r,l=await e({...n,request:await c.sign(n.request,s,o)}).catch((c.errorHandler||g)(o));return(c.successHandler||_)(l.response,o),l}})),b,x,S=e((()=>{y(),b={step:`finalizeRequest`,tags:[`HTTP_SIGNING`],name:`httpSigningMiddleware`,aliases:[`apiKeyMiddleware`,`tokenMiddleware`,`awsAuthMiddleware`],override:!0,relation:`after`,toMiddleware:`retryMiddleware`},x=e=>({applyToStack:t=>{t.addRelativeTo(v(e),b)}})})),C=e((()=>{y(),S()})),w,T=e((()=>{w=e=>{if(typeof e==`function`)return e;let t=Promise.resolve(e);return()=>t}}));function E(e,t,n,r,i){return async function*(a,o,...s){let c=o,l=a.startingToken??c[n],u=!0,d;for(;u;){if(c[n]=l,i&&(c[i]=c[i]??a.pageSize),a.client instanceof e)d=await D(t,a.client,o,a.withCommand,...s);else throw Error(`Invalid client, expected instance of ${e.name}`);yield d;let f=l;l=O(d,r),u=!!(l&&(!a.stopOnSameToken||l!==f))}return void 0}}var D,O,k=e((()=>{D=async(e,t,n,r=e=>e,...i)=>{let a=new e(n);return a=r(a)??a,await t.send(a,...i)},O=(e,t)=>{let n=e,r=t.split(`.`);for(let e of r){if(!n||typeof n!=`object`)return;n=n[e]}return n}})),A,j=e((()=>{t(),A=class{constructor(e){n(this,`authSchemes`,new Map);for(let t in e){let n=e[t];n!==void 0&&this.authSchemes.set(t,n)}}getIdentityProvider(e){return this.authSchemes.get(e)}}})),M,N=e((()=>{o(),M=class{async sign(e,t,n){let r=a.clone(e);if(!t.token)throw Error("request could not be signed with `token` since the `token` is not defined");return r.headers.Authorization=`Bearer ${t.token}`,r}}})),P,F=e((()=>{P=class{async sign(e,t,n){return e}}})),I=e((()=>{N(),F()})),L,R,z,B,V,H=e((()=>{L=e=>function(t){return B(t)&&t.expiration.getTime()-Date.now()<e},R=3e5,z=L(R),B=e=>e.expiration!==void 0,V=(e,t,n)=>{if(e===void 0)return;let r=typeof e==`function`?e:async()=>Promise.resolve(e),i,a,o,s=!1,c=async e=>{a||(a=r(e));try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return t===void 0?async e=>((!o||e?.forceRefresh)&&(i=await c(e)),i):async e=>((!o||e?.forceRefresh)&&(i=await c(e)),s?i:n(i)?(t(i)&&await c(e),i):(s=!0,i))}})),U=e((()=>{j(),I(),H()})),W=e((()=>{h(),C(),T(),k(),U()}));export{p as C,d as D,u as E,y as S,m as T,w as _,H as a,S as b,P as c,N as d,A as f,T as g,k as h,B as i,F as l,E as m,R as n,z as o,j as p,L as r,V as s,W as t,M as u,x as v,f as w,v as x,b as y};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{d as r,f as i,l as a}from"./protocols-CCsohXid.js";var o,s=e((()=>{o={CrtSignerV4:null}}));function c(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function l(e,t){let n=e.credentialProvider;e.credentialProvider=()=>(e.credentialProvider=n,Promise.resolve(t))}var u,d,f,p=e((()=>{a(),u=`X-Amz-S3session-Token`,d=u.toLowerCase(),f=class extends i{async signWithCredentials(e,t,n){let r=c(t);e.headers[d]=t.sessionToken;let i=this;return l(i,r),i.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let r=c(t);return delete e.headers[d],e.headers[u]=t.sessionToken,e.query=e.query??{},e.query[u]=t.sessionToken,l(this,r),this.presign(e,n)}}})),m,h=e((()=>{a(),s(),p(),t(),m=class{static sigv4aDependency(){return typeof o.CrtSignerV4==`function`?`crt`:typeof r.SignatureV4a==`function`?`js`:`none`}constructor(e){n(this,`sigv4aSigner`,void 0),n(this,`sigv4Signer`,void 0),n(this,`signerOptions`,void 0),this.sigv4Signer=new f(e),this.signerOptions=e}async sign(e,t={}){return t.signingRegion===`*`?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if(n.signingRegion===`*`){let r=this.getSigv4aSigner(),i=o.CrtSignerV4;if(i&&r instanceof i)return r.signWithCredentials(e,t,n);throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(e,t,n)}async presign(e,t={}){if(t.signingRegion===`*`){let n=this.getSigv4aSigner(),r=o.CrtSignerV4;if(r&&n instanceof r)return n.presign(e,t);throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,n={}){if(n.signingRegion===`*`)throw Error(`Method presignWithCredentials is not supported for [signingRegion=*].`);return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=o.CrtSignerV4,t=r.SignatureV4a;if(this.signerOptions.runtime===`node`){if(!e&&!t)throw Error(`Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);if(e&&typeof e==`function`)this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(t&&typeof t==`function`)this.sigv4aSigner=new t({...this.signerOptions});else throw Error(`Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}else{if(!t||typeof t!=`function`)throw Error(`JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a`);this.sigv4aSigner=new t({...this.signerOptions})}}return this.sigv4aSigner}}})),g=e((()=>{h(),s(),p()}));export{m as n,h as r,g as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{C as r,D as i,E as ee,F as a,I as te,L as ne,M as re,O as ie,P as ae,U as oe,V as se,X as ce,Y as le,_ as ue,d as de,et as fe,g as pe,i as me,j as he,k as ge,l as _e,mt as ve,n as ye,nt as be,ot as xe,p as Se,q as o,rt as Ce,s as we,st as Te,t as s,vt as Ee,x as De,y as Oe,z as ke}from"./client-DvAL7lY8.js";import{B as Ae,D as je,H as Me,M as Ne,O as Pe,Y as Fe,c as Ie,o as Le,q as Re,t as c,u as ze}from"./protocols-CnYQjBlj.js";import{B as Be,H as Ve,L as He,c as Ue,d as We,r as Ge,z as Ke}from"./serde-f76bObzR.js";import{a as qe,d as Je,l as Ye,m as l,o as Xe,r as Ze,s as Qe,t as $e}from"./config-BSXLgwpD.js";import{C as et,f as tt,i as nt,o as rt,s as it,t as u,u as at,v as ot}from"./dist-es-BF6bR-Ik.js";import{n as st,t as ct}from"./checksum-DgbnMdM-.js";import{C as lt,a as ut,s as dt,t as d}from"./event-streams-DoqJmjFN.js";import{C as ft,_ as pt,c as mt,i as ht,o as gt,t as _t}from"./protocols-CCsohXid.js";import{i as vt,t as yt}from"./dist-es-CYPVg66r.js";import{i as bt,r as xt,t as St}from"./dist-es-DKIwwJME.js";import{n as Ct,t as wt}from"./dist-es-Bfr4TzQe.js";import{PassThrough as Tt,Readable as Et,Transform as Dt,pipeline as Ot}from"node:stream";function kt(e){let t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}var At=e((()=>{})),jt=e((()=>{At()})),Mt,Nt=e((()=>{Mt=e=>e.protocol===`ws:`||e.protocol===`wss:`})),Pt,Ft=e((()=>{c(),Nt(),t(),Pt=class{constructor(e){n(this,`signer`,void 0),this.signer=e.signer}presign(e,t={}){return this.signer.presign(e,t)}async sign(e,t){return Re.isInstance(e)&&Mt(e)?{...await this.signer.presign({...e,body:``},{...t,expiresIn:60,unsignableHeaders:new Set(Object.keys(e.headers).filter(e=>e!==`host`))}),body:e.body}:this.signer.sign(e,t)}signMessage(e,t){return this.signer.signMessage(e,t)}}})),It,Lt,Rt=e((()=>{Ft(),It=e=>{let{signer:t}=e;return Object.assign(e,{signer:async e=>{let n=await t(e);if(Lt(n))return new Pt({signer:n});throw Error(`Expected WebsocketSignatureV4 signer, please check the client constructor.`)}})},Lt=e=>!!e})),zt=e((()=>{Nt(),Rt()}));function Bt(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`bedrock`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Vt(e){return{schemeId:`smithy.api#httpBearerAuth`,propertiesExtractor:({profile:e,filepath:t,configFilepath:n,ignoreCache:r},i)=>({identityProperties:{profile:e,filepath:t,configFilepath:n,ignoreCache:r}})}}var Ht,Ut,Wt,Gt=e((()=>{gt(),u(),o(),Ht=async(e,t,n)=>({operation:Fe(t).operation,region:await Me(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Ut=e=>{let t=[];switch(e.operation){default:t.push(Bt(e)),t.push(Vt(e))}return t},Wt=e=>{let t=it(e.token,rt,nt),n=mt(e);return Object.assign(n,{authSchemePreference:Me(e.authSchemePreference??[]),token:t})}})),Kt,qt,Jt=e((()=>{Kt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`bedrock`}),qt={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn=e((()=>{Yt=`@aws-sdk/client-bedrock-runtime`,Xt=`AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native`,Zt=`3.1085.0`,Qt={build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service`,test:`yarn g:vitest run --passWithNoTests`,"test:watch":`yarn g:vitest watch --passWithNoTests`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:browser":`yarn g:vitest run -c vitest.config.browser.e2e.mts`,"test:browser:watch":`yarn g:vitest watch -c vitest.config.browser.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`},$t=`./dist-cjs/index.js`,en=`./dist-types/index.d.ts`,tn=`./dist-es/index.js`,nn={"@aws-sdk/core":`^3.975.1`,"@aws-sdk/credential-provider-node":`^3.972.66`,"@aws-sdk/eventstream-handler-node":`^3.972.26`,"@aws-sdk/middleware-eventstream":`^3.972.22`,"@aws-sdk/middleware-websocket":`^3.972.39`,"@aws-sdk/token-providers":`3.1085.0`,"@aws-sdk/types":`^3.974.0`,"@smithy/core":`^3.29.2`,"@smithy/fetch-http-handler":`^5.6.4`,"@smithy/node-http-handler":`^4.9.4`,"@smithy/types":`^4.16.0`,tslib:`^2.6.2`},rn={"@smithy/snapshot-testing":`^2.2.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},an={node:`>=20.0.0`},on={"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},sn=[`dist-*/**`],cn={name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},ln=`Apache-2.0`,un={"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},dn=`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime`,fn={type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-bedrock-runtime`},pn={name:Yt,description:Xt,version:Zt,scripts:Qt,main:$t,types:en,module:tn,sideEffects:!1,dependencies:nn,devDependencies:rn,engines:an,typesVersions:on,files:sn,author:cn,license:ln,browser:un,"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:dn,repository:fn}}));function hn(e){let t=Buffer.from(e,`hex`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)}var gn,_n=e((()=>{t(),gn=class extends Dt{constructor(e){super({autoDestroy:!0,readableObjectMode:!0,writableObjectMode:!0,...e}),n(this,`priorSignature`,void 0),n(this,`messageSigner`,void 0),n(this,`eventStreamCodec`,void 0),n(this,`systemClockOffsetProvider`,void 0),n(this,`staticCredentials`,void 0),this.priorSignature=e.priorSignature,this.eventStreamCodec=e.eventStreamCodec,this.messageSigner=e.messageSigner,this.systemClockOffsetProvider=e.systemClockOffsetProvider,this.staticCredentials=e.credentials?.()}async _transform(e,t,n){try{let t=new Date(Date.now()+await this.systemClockOffsetProvider()),r={":date":{type:`timestamp`,value:t}},i=await this.messageSigner.sign({message:{body:e,headers:r},priorSignature:this.priorSignature},{signingDate:t,eventStreamCredentials:await this.staticCredentials});this.priorSignature=i.signature;let ee=this.eventStreamCodec.encode({headers:{...r,":chunk-signature":{type:`binary`,value:hn(i.signature)}},body:e});return this.push(ee),n()}catch(e){n(e)}}}})),vn,yn=e((()=>{d(),_n(),t(),vn=class{constructor(e){n(this,`messageSigner`,void 0),n(this,`eventStreamCodec`,void 0),n(this,`systemClockOffsetProvider`,void 0),n(this,`credentials`,void 0),this.messageSigner=e.messageSigner,this.eventStreamCodec=new lt(e.utf8Encoder,e.utf8Decoder),this.systemClockOffsetProvider=async()=>e.systemClockOffset??0,this.credentials=e.credentials}async handle(e,t,n={}){let r=t.request,{body:i,query:ee}=r;if(!(i instanceof Et))throw Error(`Eventstream payload must be a Readable stream.`);let a=i;r.body=new Tt({objectMode:!0});let te=r.headers?.authorization?.match(/Signature=([\w]+)$/)?.[1]??ee?.[`X-Amz-Signature`]??``;n.__staticSignature&&(te=``);let ne=new gn({priorSignature:te,eventStreamCodec:this.eventStreamCodec,messageSigner:await this.messageSigner(),systemClockOffsetProvider:this.systemClockOffsetProvider,credentials:this.credentials}),re,ie=new Promise((e,t)=>{re=()=>e(void 0),Ot(a,ne,r.body,e=>{e&&t(Error(`Pipeline error in @aws-sdk/eventstream-handler-node: ${e.message}`,{cause:e}))})}),ae;try{ae=await Promise.race([e(t),ie])}catch(e){throw r.body.end(),e}finally{re()}return ae}}})),bn,xn=e((()=>{yn(),bn=e=>new vn(e)})),Sn=e((()=>{xn()})),f,p,m,Cn,wn,h,Tn,En,g,_,v,Dn,On,kn,An,jn=e((()=>{a(),f=`ref`,p=-1,m=!0,Cn=`isSet`,wn=`PartitionResult`,h=`booleanEquals`,Tn=`getAttr`,En={[f]:`Endpoint`},g={[f]:wn},_={},v=[{[f]:`Region`}],Dn={conditions:[[Cn,[En]],[Cn,v],[`aws.partition`,v,wn],[h,[{[f]:`UseFIPS`},m]],[h,[{[f]:`UseDualStack`},m]],[h,[{fn:Tn,argv:[g,`supportsDualStack`]},m]],[h,[{fn:Tn,argv:[g,`supportsFIPS`]},m]]],results:[[p],[p,`Invalid Configuration: FIPS and custom endpoint are not supported`],[p,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[En,_],[`https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,_],[p,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}`,_],[p,`FIPS is enabled but this partition does not support FIPS`],[`https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}`,_],[p,`DualStack is enabled but this partition does not support DualStack`],[`https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}`,_],[p,`Invalid Configuration: Missing Region`]]},On=2,kn=new Int32Array([-1,1,-1,0,12,3,1,4,100000011,2,5,100000011,3,8,6,4,7,100000010,5,100000008,100000009,4,10,9,6,100000006,100000007,5,11,100000005,6,100000004,100000005,3,100000001,13,4,100000002,100000003]),An=oe.from(kn,On,Dn.conditions,Dn.results)})),Mn,Nn,Pn=e((()=>{s(),a(),jn(),Mn=new se({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Nn=(e,t={})=>Mn.get(e,()=>ne(An,{endpointParams:e,logger:t.logger})),ke.aws=we})),y,b=e((()=>{o(),y=class e extends Te{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn=e((()=>{b(),t(),Fn=class e extends y{constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),n(this,`name`,`AccessDeniedException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},In=class e extends y{constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),n(this,`name`,`InternalServerException`),n(this,`$fault`,`server`),Object.setPrototypeOf(this,e.prototype)}},Ln=class e extends y{constructor(t){super({name:`ThrottlingException`,$fault:`client`,...t}),n(this,`name`,`ThrottlingException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Rn=class e extends y{constructor(t){super({name:`ValidationException`,$fault:`client`,...t}),n(this,`name`,`ValidationException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},zn=class e extends y{constructor(t){super({name:`ConflictException`,$fault:`client`,...t}),n(this,`name`,`ConflictException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Bn=class e extends y{constructor(t){super({name:`ResourceNotFoundException`,$fault:`client`,...t}),n(this,`name`,`ResourceNotFoundException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Vn=class e extends y{constructor(t){super({name:`ServiceQuotaExceededException`,$fault:`client`,...t}),n(this,`name`,`ServiceQuotaExceededException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Hn=class e extends y{constructor(t){super({name:`ServiceUnavailableException`,$fault:`server`,...t}),n(this,`name`,`ServiceUnavailableException`),n(this,`$fault`,`server`),Object.setPrototypeOf(this,e.prototype)}},Un=class e extends y{constructor(t){super({name:`ModelErrorException`,$fault:`client`,...t}),n(this,`name`,`ModelErrorException`),n(this,`$fault`,`client`),n(this,`originalStatusCode`,void 0),n(this,`resourceName`,void 0),Object.setPrototypeOf(this,e.prototype),this.originalStatusCode=t.originalStatusCode,this.resourceName=t.resourceName}},Wn=class e extends y{constructor(t){super({name:`ModelNotReadyException`,$fault:`client`,...t}),n(this,`name`,`ModelNotReadyException`),n(this,`$fault`,`client`),n(this,`$retryable`,{}),Object.setPrototypeOf(this,e.prototype)}},Gn=class e extends y{constructor(t){super({name:`ModelTimeoutException`,$fault:`client`,...t}),n(this,`name`,`ModelTimeoutException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Kn=class e extends y{constructor(t){super({name:`ModelStreamErrorException`,$fault:`client`,...t}),n(this,`name`,`ModelStreamErrorException`),n(this,`$fault`,`client`),n(this,`originalStatusCode`,void 0),n(this,`originalMessage`,void 0),Object.setPrototypeOf(this,e.prototype),this.originalStatusCode=t.originalStatusCode,this.originalMessage=t.originalMessage}}})),Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,x,yi,bi,S,xi,C,w,T,Si,Ci,wi,Ti,E,Ei,Di,Oi,D,O,ki,k,A,j,Ai,M,ji,Mi,Ni,Pi,N,Fi,Ii,P,Li,Ri,F,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,I,Yi,Xi,Zi,Qi,$i,ea,L,ta,R,na,ra,ia,aa,oa,sa,ca,la,ua,z,da,fa,pa,B,ma,ha,ga,_a,V,va,ya,H,ba,xa,Sa,Ca,wa,U,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,W,Ia,G,La,Ra,za,Ba,K,Va,Ha,Ua,q,Wa,Ga,J,Ka,qa,Ja,Y,X,Ya,Xa,Za,Qa,$a,eo,to,no,Z,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Q,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,$=e((()=>{je(),b(),qn(),Jn=`AudioBlock`,Yn=`AccessDeniedException`,Xn=`AudioSource`,Zn=`AnyToolChoice`,Qn=`AutoToolChoice`,$n=`Body`,er=`Citation`,tr=`ContentBlocks`,nr=`ContentBlock`,rr=`CitationsConfig`,ir=`CitationsContentBlock`,ar=`ConflictException`,or=`CitationGeneratedContent`,sr=`CitationGeneratedContentList`,cr=`CitationLocation`,lr=`CachePointBlock`,ur=`CitationSourceContent`,dr=`CitationSourceContentList`,fr=`CountTokensInput`,pr=`ConverseTokensRequest`,mr=`CountTokensRequest`,hr=`CountTokensResponse`,gr=`CountTokens`,_r=`Citations`,vr=`DocumentBlock`,yr=`DocumentContentBlocks`,br=`DocumentContentBlock`,xr=`DocumentCharLocation`,Sr=`DocumentChunkLocation`,Cr=`DocumentPageLocation`,wr=`DocumentSource`,Tr=`ErrorBlock`,Er=`GuardrailConverseContentBlock`,Dr=`GuardrailConverseImageBlock`,Or=`GuardrailConverseImageSource`,kr=`GuardrailConverseTextBlock`,Ar=`ImageBlock`,jr=`InvokeModelTokensRequest`,Mr=`ImageSource`,Nr=`InternalServerException`,Pr=`Message`,Fr=`ModelErrorException`,Ir=`ModelNotReadyException`,Lr=`ModelStreamErrorException`,Rr=`ModelTimeoutException`,zr=`Messages`,Br=`ReasoningContentBlock`,Vr=`ResourceNotFoundException`,Hr=`ReasoningTextBlock`,Ur=`SystemContentBlocks`,Wr=`SystemContentBlock`,Gr=`S3Location`,Kr=`ServiceQuotaExceededException`,qr=`SearchResultBlock`,Jr=`SearchResultContentBlock`,Yr=`SearchResultContentBlocks`,Xr=`SearchResultLocation`,Zr=`SpecificToolChoice`,Qr=`SystemTool`,$r=`ServiceUnavailableException`,ei=`ToolConfiguration`,ti=`ToolChoice`,ni=`ThrottlingException`,ri=`ToolInputSchema`,ii=`ToolResultBlock`,ai=`ToolResultContentBlocks`,oi=`ToolResultContentBlock`,si=`ToolSpecification`,ci=`ToolUseBlock`,li=`Tools`,ui=`Tool`,di=`VideoBlock`,fi=`ValidationException`,pi=`VideoSource`,mi=`WebLocation`,hi=`additionalModelRequestFields`,gi=`any`,_i=`audio`,vi=`auto`,x=`bytes`,yi=`bucketOwner`,bi=`body`,S=`client`,xi=`citationsContent`,C=`cachePoint`,w=`citations`,T=`content`,Si=`context`,Ci=`converse`,wi=`documentChar`,Ti=`documentChunk`,E=`documentIndex`,Ei=`documentPage`,Di=`description`,Oi=`domain`,D=`document`,O=`error`,ki=`enabled`,k=`end`,A=`format`,j=`guardContent`,Ai=`http`,M=`httpError`,ji=`input`,Mi=`invokeModel`,Ni=`inputSchema`,Pi=`inputTokens`,N=`image`,Fi=`json`,Ii=`location`,P=`message`,Li=`modelId`,Ri=`messages`,F=`name`,zi=`originalMessage`,Bi=`originalStatusCode`,Vi=`qualifiers`,Hi=`reasoningContent`,Ui=`redactedContent`,Wi=`resourceName`,Gi=`reasoningText`,Ki=`role`,qi=`smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime`,Ji=`sourceContent`,I=`s3Location`,Yi=`searchResultIndex`,Xi=`searchResultLocation`,Zi=`searchResult`,Qi=`systemTool`,$i=`server`,ea=`signature`,L=`source`,ta=`status`,R=`start`,na=`strict`,ra=`system`,ia=`ttl`,aa=`toolConfig`,oa=`toolChoice`,sa=`toolResult`,ca=`toolSpec`,la=`toolUseId`,ua=`toolUse`,z=`text`,da=`title`,fa=`tools`,pa=`tool`,B=`type`,ma=`uri`,ha=`url`,ga=`video`,_a=`web`,V=`com.amazonaws.bedrockruntime`,va=Pe.for(qi),ya=[-3,qi,`BedrockRuntimeServiceException`,0,[],[]],va.registerError(ya,y),H=Pe.for(V),ba=[-3,V,Yn,{[O]:S,[M]:403},[P],[0]],H.registerError(ba,Fn),xa=[-3,V,ar,{[O]:S,[M]:400},[P],[0]],H.registerError(xa,zn),Sa=[-3,V,Nr,{[O]:$i,[M]:500},[P],[0]],H.registerError(Sa,In),Ca=[-3,V,Fr,{[O]:S,[M]:424},[P,Bi,Wi],[0,1,0]],H.registerError(Ca,Un),wa=[-3,V,Ir,{[O]:S,[M]:429},[P],[0]],H.registerError(wa,Wn),U=[-3,V,Lr,{[O]:S,[M]:424},[P,Bi,zi],[0,1,0]],H.registerError(U,Kn),Ta=[-3,V,Rr,{[O]:S,[M]:408},[P],[0]],H.registerError(Ta,Gn),Ea=[-3,V,Vr,{[O]:S,[M]:404},[P],[0]],H.registerError(Ea,Bn),Da=[-3,V,Kr,{[O]:S,[M]:400},[P],[0]],H.registerError(Da,Vn),Oa=[-3,V,$r,{[O]:$i,[M]:503},[P],[0]],H.registerError(Oa,Hn),ka=[-3,V,ni,{[O]:S,[M]:429},[P],[0]],H.registerError(ka,Ln),Aa=[-3,V,fi,{[O]:S,[M]:400},[P],[0]],H.registerError(Aa,Rn),ja=[va,H],Ma=[0,V,$n,8,21],Na=[3,V,Zn,0,[],[]],Pa=[3,V,Jn,0,[A,L,O],[0,[()=>ho,0],[()=>q,0]],2],Fa=[3,V,Qn,0,[],[]],W=[3,V,lr,0,[B,ia],[0,0],1],Ia=[3,V,er,0,[da,L,Ji,Ii],[0,0,()=>oo,()=>_o]],G=[3,V,rr,0,[ki],[2],1],La=[3,V,ir,0,[T,w],[()=>io,()=>ao]],Ra=[3,V,pr,0,[Ri,ra,aa,hi],[[()=>lo,0],[()=>fo,0],()=>$a,15]],za=[3,V,mr,0,[Li,ji],[[0,1],[()=>bo,0]],2],Ba=[3,V,hr,0,[Pi],[1],1],K=[3,V,vr,0,[F,L,A,Si,w],[0,()=>So,0,0,()=>G],2],Va=[3,V,xr,0,[E,R,k],[1,1,1]],Ha=[3,V,Sr,0,[E,R,k],[1,1,1]],Ua=[3,V,Cr,0,[E,R,k],[1,1,1]],q=[3,V,Tr,8,[P],[0]],Wa=[3,V,Dr,8,[A,L],[0,[()=>Co,0]],2],Ga=[3,V,kr,0,[z,Vi],[0,64],1],J=[3,V,Ar,0,[A,L,O],[0,[()=>wo,0],[()=>q,0]],2],Ka=[3,V,jr,0,[bi],[[()=>Ma,0]],1],qa=[3,V,Pr,0,[Ki,T],[0,[()=>so,0]],2],Ja=[3,V,Hr,8,[z,ea],[0,0],1],Y=[3,V,Gr,0,[ma,yi],[0,0],1],X=[3,V,qr,0,[L,da,T,w],[0,0,()=>uo,()=>G],3],Ya=[3,V,Jr,0,[z],[0],1],Xa=[3,V,Xr,0,[Yi,R,k],[1,1,1]],Za=[3,V,Zr,0,[F],[0],1],Qa=[3,V,Qr,0,[F],[0],1],$a=[3,V,ei,0,[fa,oa],[()=>mo,()=>Oo],1],eo=[3,V,ii,0,[la,T,ta,B],[0,[()=>po,0],0,0],2],to=[3,V,si,0,[F,Ni,Di,na],[0,()=>ko,0,2],2],no=[3,V,ci,0,[la,F,ji,B],[0,0,15,0],3],Z=[3,V,di,0,[A,L],[0,()=>jo],2],ro=[3,V,mi,0,[ha,Oi],[0,0]],io=[1,V,sr,0,()=>go],ao=[1,V,_r,0,()=>Ia],oo=[1,V,dr,0,()=>vo],so=[1,V,tr,0,[()=>yo,0]],co=[1,V,yr,0,()=>xo],lo=[1,V,zr,0,[()=>qa,0]],uo=[1,V,Yr,0,()=>Ya],fo=[1,V,Ur,0,[()=>Eo,0]],po=[1,V,ai,0,[()=>Ao,0]],mo=[1,V,li,0,()=>Do],ho=[4,V,Xn,8,[x,I],[21,()=>Y]],go=[4,V,or,0,[z],[0]],_o=[4,V,cr,0,[_a,wi,Ei,Ti,Xi],[()=>ro,()=>Va,()=>Ua,()=>Ha,()=>Xa]],vo=[4,V,ur,0,[z],[0]],yo=[4,V,nr,0,[z,N,D,ga,_i,ua,sa,j,C,Hi,xi,Zi],[0,[()=>J,0],()=>K,()=>Z,[()=>Pa,0],()=>no,[()=>eo,0],[()=>Q,0],()=>W,[()=>To,0],()=>La,()=>X]],bo=[4,V,fr,0,[Mi,Ci],[[()=>Ka,0],[()=>Ra,0]]],xo=[4,V,br,0,[z],[0]],So=[4,V,wr,0,[x,I,z,T],[21,()=>Y,0,()=>co]],Q=[4,V,Er,0,[z,N],[()=>Ga,[()=>Wa,0]]],Co=[4,V,Or,8,[x],[21]],wo=[4,V,Mr,8,[x,I],[21,()=>Y]],To=[4,V,Br,8,[Gi,Ui],[[()=>Ja,0],21]],Eo=[4,V,Wr,0,[z,j,C],[0,[()=>Q,0],()=>W]],Do=[4,V,ui,0,[ca,Qi,C],[()=>to,()=>Qa,()=>W]],Oo=[4,V,ti,0,[vi,gi,pa],[()=>Fa,()=>Na,()=>Za]],ko=[4,V,ri,0,[Fi],[15]],Ao=[4,V,oi,0,[Fi,z,N,D,ga,Zi],[15,0,[()=>J,0],()=>K,()=>Z,()=>X]],jo=[4,V,pi,0,[x,I],[21,()=>Y]],Mo=[9,V,gr,{[Ai]:[`POST`,`/model/{modelId}/count-tokens`,200]},()=>za,()=>Ba]})),No,Po=e((()=>{gt(),_t(),u(),ct(),o(),c(),Ge(),Gt(),Pn(),$(),No=e=>({apiVersion:`2023-09-30`,base64Decoder:e?.base64Decoder??Ve,base64Encoder:e?.base64Encoder??Ke,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Nn,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ut,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new ft},{schemeId:`smithy.api#httpBearerAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#httpBearerAuth`),signer:new at}],logger:e?.logger??new ce,protocol:e?.protocol??ht,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.bedrockruntime`,errorTypeRegistries:ja,version:`2023-09-30`,serviceTarget:`AmazonBedrockFrontendService`},serviceId:e?.serviceId??`Bedrock Runtime`,sha256:e?.sha256??st,urlParser:e?.urlParser??Ae,utf8Decoder:e?.utf8Decoder??Be,utf8Encoder:e?.utf8Encoder??He})})),Fo,Io=e((()=>{mn(),s(),gt(),yt(),Sn(),St(),u(),o(),$e(),d(),i(),Ge(),wt(),Po(),Fo=e=>{Ce(process.version);let t=Ze(e),n=()=>t().then(xe),r=No(e);Ee(process.version);let i={profile:e?.profile,logger:r.logger,signingName:`bedrock`};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??l(pt,i),bodyLengthChecker:e?.bodyLengthChecker??We,credentialDefaultProvider:e?.credentialDefaultProvider??vt,defaultUserAgentProvider:e?.defaultUserAgentProvider??de({serviceId:r.serviceId,clientVersion:pn.version}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??bn,eventStreamSerdeProvider:e?.eventStreamSerdeProvider??dt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new ft},{schemeId:`smithy.api#httpBearerAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#httpBearerAuth`)||(async e=>{try{return await bt({signingName:`bedrock`})()}catch{return await xt(e)(e)}}),signer:new at}],maxAttempts:e?.maxAttempts??l(ie,e),region:e?.region??l(Qe,{...Xe,...i}),requestHandler:Ct.create(e?.requestHandler??(async()=>({...await n(),disableConcurrentStreams:!0}))),retryMode:e?.retryMode??l({...ge,default:async()=>(await n()).retryMode||re},e),streamCollector:e?.streamCollector??Ue,useDualstackEndpoint:e?.useDualstackEndpoint??l(Je,i),useFipsEndpoint:e?.useFipsEndpoint??l(Ye,i),userAgentAppId:e?.userAgentAppId??l(_e,i)}}})),Lo,Ro,zo=e((()=>{Lo=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials,i=e.token;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r},setToken(e){i=e},token(){return i}}},Ro=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials(),token:e.token()})})),Bo,Vo=e((()=>{s(),o(),c(),zo(),Bo=(e,t)=>{let n=Object.assign(ye(e),fe(e),Ie(e),Lo(e));return t.forEach(e=>e.configure(n)),Object.assign(e,me(n),be(n),ze(n),Ro(n))}})),Ho,Uo=e((()=>{s(),jt(),zt(),u(),o(),$e(),a(),d(),c(),i(),je(),Gt(),Jt(),Io(),Vo(),t(),Ho=class extends ve{constructor(...[e]){let t=Fo(e||{});super(t),n(this,`config`,void 0),this.initConfig=t;let i=Bo(It(kt(Wt(ut(te(r(qe(he(pe(Kt(t)))))))))),e?.extensions||[]);this.config=i,this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use(Se(this.config)),this.middlewareStack.use(ee(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(De(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(ue(this.config)),this.middlewareStack.use(et(this.config,{httpAuthSchemeParametersProvider:Ht,identityProviderConfigProvider:async e=>new tt({"aws.auth#sigv4":e.credentials,"smithy.api#httpBearerAuth":e.token})})),this.middlewareStack.use(ot(this.config))}destroy(){super.destroy()}}})),Wo,Go,Ko,qo=e((()=>{o(),a(),Jt(),Wo=le(qt,`AmazonBedrockFrontendService`,`BedrockRuntimeClient`,ae),Go={},Ko=(e,t,n,r)=>[]})),Jo=e((()=>{})),Yo=e((()=>{})),Xo=e((()=>{})),Zo,Qo=e((()=>{qo(),$(),Zo=class extends Wo(Go,Ko,`CountTokens`,Mo){}})),$o=e((()=>{})),es=e((()=>{})),ts=e((()=>{})),ns=e((()=>{})),rs=e((()=>{})),is=e((()=>{})),as=e((()=>{})),os=e((()=>{})),ss=e((()=>{})),cs=e((()=>{Jo(),Yo(),Xo(),Qo(),$o(),es(),ts(),ns(),rs(),is(),as()})),ls=e((()=>{})),us=e((()=>{ls(),os()})),ds=e((()=>{})),fs=e((()=>{})),ps=e((()=>{Uo(),ss(),cs(),$(),us(),ds(),qn(),fs(),b()}));export{Ka as $,G as A,ja as At,Va as B,Vn as Bt,Fa as C,Ao as Ct,go as D,Z as Dt,Ia as E,Aa as Et,Mo as F,Un as Ft,q as G,y as Gt,xo as H,Ln as Ht,bo as I,Wn as It,Co as J,Q as K,b as Kt,za as L,Kn as Lt,xa as M,Fn as Mt,yo as N,zn as Nt,_o as O,jo as Ot,Ra as P,In as Pt,Sa as Q,Ba as R,Gn as Rt,ho as S,eo as St,W as T,no as Tt,Ua as U,Rn as Ut,Ha as V,Hn as Vt,So as W,qn as Wt,J as X,Ga as Y,wo as Z,Ho as _,ka as _t,as as a,To as at,Na as b,$a as bt,ns as c,Y as ct,$o as d,Xa as dt,qa as et,Zo as f,Da as ft,Jo as g,Qa as gt,Yo as h,Eo as ht,os as i,Ta as it,La as j,$ as jt,vo as k,ro as kt,ts as l,X as lt,Xo as m,Za as mt,ds as n,wa as nt,is as o,Ja as ot,Qo as p,Oa as pt,Wa as q,ss as r,U as rt,rs as s,Ea as st,ps as t,Ca as tt,es as u,Ya as ut,Uo as v,Do as vt,ya as w,to as wt,Pa as x,ko as xt,ba as y,Oo as yt,K as z,Bn as zt};
@@ -0,0 +1,3 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{G as r,n as i,t as a}from"./protocols-CnYQjBlj.js";import{r as o}from"./serde-f76bObzR.js";import{Readable as s}from"node:stream";import c from"node:https";import l,{default as u}from"node:http2";function d(e){let t=e&&typeof e==`object`&&`reason`in e?e.reason:void 0;if(t){if(t instanceof Error){let e=Error(`Request aborted`);return e.name=`AbortError`,e.cause=t,e}let e=Error(String(t));return e.name=`AbortError`,e}let n=Error(`Request aborted`);return n.name=`AbortError`,n}var f=e((()=>{})),p,m=e((()=>{p=[`ECONNRESET`,`EPIPE`,`ETIMEDOUT`]})),h,g=e((()=>{h=e=>{let t={};for(let n in e){let r=e[n];t[n]=Array.isArray(r)?r.join(`,`):r}return t}})),_=e((()=>{})),v,y=e((()=>{v={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)}})),b,x,S=e((()=>{y(),b=1e3,x=(e,t,n=0)=>{if(!n)return-1;let r=r=>{let i=v.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:`TimeoutError`}))},n-r),a=e=>{e?.connecting?e.on(`connect`,()=>{v.clearTimeout(i)}):v.clearTimeout(i)};e.socket?a(e.socket):e.on(`socket`,a)};return n<2e3?(r(0),0):v.setTimeout(r.bind(null,b),b)}})),C,w=e((()=>{y(),C=(e,t,n=0,r,i)=>n?v.setTimeout(()=>{let a=`@smithy/node-http-handler - [${r?`ERROR`:`WARN`}] a request has exceeded the configured ${n} ms requestTimeout.`;if(r){let n=Object.assign(Error(a),{name:`TimeoutError`,code:`ETIMEDOUT`});e.destroy(n),t(n)}else a+=` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`,i?.warn?.(a)},n):-1})),T,E,D=e((()=>{y(),T=3e3,E=(e,{keepAlive:t,keepAliveMsecs:n},r=T)=>{if(t!==!0)return-1;let i=()=>{e.socket?e.socket.setKeepAlive(t,n||0):e.on(`socket`,e=>{e.setKeepAlive(t,n||0)})};return r===0?(i(),0):v.setTimeout(i,r)}})),O,k,A=e((()=>{y(),O=3e3,k=(e,t,n=0)=>{let r=r=>{let i=n-r,a=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:`TimeoutError`}))};e.socket?(e.socket.setTimeout(i,a),e.on(`close`,()=>e.socket?.removeListener(`timeout`,a))):e.setTimeout(i,a)};return 0<n&&n<6e3?(r(0),0):v.setTimeout(r.bind(null,n===0?0:O),O)}}));async function j(e,t,n=N,r=!1){let i=t.headers,a=i?i.Expect||i.expect:void 0,o=-1,s=!0;!r&&a===`100-continue`&&(s=await Promise.race([new Promise(e=>{o=Number(v.setTimeout(()=>e(!0),Math.max(N,n)))}),new Promise(t=>{e.on(`continue`,()=>{v.clearTimeout(o),t(!0)}),e.on(`response`,()=>{v.clearTimeout(o),t(!1)}),e.on(`error`,()=>{v.clearTimeout(o),t(!1)})})])),s&&M(e,t.body)}function M(e,t){if(t instanceof s){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==`string`){n&&t.byteLength===0?e.end():e.end(t);return}let r=t;if(typeof r==`object`&&r.buffer&&typeof r.byteOffset==`number`&&typeof r.byteLength==`number`){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}var N,P=e((()=>{y(),N=6e3})),F,I,L,R,z=e((()=>{a(),f(),m(),g(),_(),S(),w(),D(),A(),y(),P(),t(),F=0,I=void 0,L=void 0,R=class e{static create(t){return typeof t?.handle==`function`?t:new e(t)}static checkSocketUsage(e,t,n=console){let{sockets:r,requests:i,maxSockets:a}=e;if(typeof a!=`number`||a===1/0||Date.now()-15e3<t)return t;if(r&&i)for(let e in r){let t=r[e]?.length??0,o=i[e]?.length??0;if(t>=a&&o>=2*a)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${t} and ${o} additional requests are enqueued.
2
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){n(this,`config`,void 0),n(this,`configProvider`,void 0),n(this,`socketWarningTimestamp`,0),n(this,`externalAgent`,!1),n(this,`metadata`,{handlerProtocol:`http/1.1`}),this.configProvider=new Promise((t,n)=>{typeof e==`function`?e().then(e=>{t(this.resolveDefaultConfig(e))}).catch(n):t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(t,{abortSignal:n,requestTimeout:a}={}){this.config||(this.config=await this.configProvider);let o=this.config,s=t.protocol===`https:`;return!s&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((l,u)=>{let f,m=-1,g=-1,_=-1,y=-1,b=-1,S=()=>{v.clearTimeout(m),v.clearTimeout(g),v.clearTimeout(_),v.clearTimeout(y),v.clearTimeout(b)},w=async e=>{await f,S(),l(e)},T=async e=>{await f,S(),u(e)};if(n?.aborted){T(d(n));return}let D=t.headers,O=D?(D.Expect??D.expect)===`100-continue`:!1,A=s?o.httpsAgent:o.httpAgent;O&&!this.externalAgent&&(A=new(s?c.Agent:I)({keepAlive:!1,maxSockets:1/0})),m=v.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(A,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2e3)+(o.connectionTimeout??1e3));let M=t.query?i(t.query):``,N;(t.username!=null||t.password!=null)&&(N=`${t.username??``}:${t.password??``}`);let P=t.path;M&&(P+=`?${M}`),t.fragment&&(P+=`#${t.fragment}`);let F=t.hostname??``;F=F[0]===`[`&&F.endsWith(`]`)?t.hostname.slice(1,-1):t.hostname;let R={headers:t.headers,host:F,method:t.method,path:P,port:t.port,agent:A,auth:N},z=(s?c.request:L)(R,e=>{let t=new r({statusCode:e.statusCode||-1,reason:e.statusMessage,headers:h(e.headers),body:e});w({response:t})});if(z.on(`error`,e=>{p.includes(e.code)?T(Object.assign(e,{name:`TimeoutError`})):T(e)}),n){let e=()=>{z.destroy();let e=d(n);T(e)};if(typeof n.addEventListener==`function`){let t=n;t.addEventListener(`abort`,e,{once:!0}),z.once(`close`,()=>t.removeEventListener(`abort`,e))}else n.onabort=e}let B=a??o.requestTimeout;g=x(z,T,o.connectionTimeout),_=C(z,T,B,o.throwOnRequestTimeout,o.logger??console),y=k(z,T,o.socketTimeout);let V=R.agent;typeof V==`object`&&`keepAlive`in V&&(b=E(z,{keepAlive:V.keepAlive,keepAliveMsecs:V.keepAliveMsecs})),f=j(z,t,B,this.externalAgent).catch(e=>(S(),u(e)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:r,socketAcquisitionWarningTimeout:i,httpAgent:a,httpsAgent:o,throwOnRequestTimeout:s,logger:l}=e||{};return{connectionTimeout:n,requestTimeout:t,socketTimeout:r,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:s,httpAgentProvider:async()=>{let e=await import(`node:http`),{Agent:t,request:n}=e.default??e;return L=n,I=t,a instanceof I||typeof a?.destroy==`function`?(this.externalAgent=!0,a):new I({keepAlive:!0,maxSockets:50,...a})},httpsAgent:o instanceof c.Agent||typeof o?.destroy==`function`?(this.externalAgent=!0,o):new c.Agent({keepAlive:!0,maxSockets:50,...o}),logger:l}}}})),B=e((()=>{})),V,H,U=e((()=>{t(),V=new Uint16Array(1),H=class{constructor(e){n(this,`id`,V[0]++),n(this,`total`,0),n(this,`max`,0),n(this,`session`,void 0),n(this,`refs`,0),e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error(`@smithy/node-http-handler - cannot acquire reference to destroyed session.`);this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(--this.refs,this.refs===0&&this.session.unref(),this.refs<0))throw Error(`@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.`)}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}}})),W,G,K=e((()=>{U(),t(),W=Symbol.iterator,G=class{constructor(e){n(this,`sessions`,[]),n(this,`maxConcurrency`,0),this.sessions=(e??[]).map(e=>new H(e))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e)for(let e of this.sessions)e.deref().destroyed&&this.remove(e)}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);t>-1&&this.sessions.splice(t,1)}[W](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}})),q,J=e((()=>{U(),K(),t(),q=class{constructor(e){if(n(this,`config`,void 0),n(this,`connectOptions`,void 0),n(this,`connectionPools`,new Map),this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError(`maxConcurrency must be greater than zero.`)}lease(e,t){let n=this.getUrlString(e),r=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let e=r.poll();if(e)return e.retain(),e}let i=new H(this.connect(n)),a=i.deref();this.config.maxConcurrency&&a.settings({maxConcurrentStreams:this.config.maxConcurrency},t=>{if(t)throw Error(`Fail to set maxConcurrentStreams to `+this.config.maxConcurrency+`when creating new session for `+e.destination.toString())});let o=()=>{this.removeFromPoolAndClose(n,i)},s=()=>{this.removeFromPoolAndCheckedDestroy(n,i)};return a.on(`goaway`,o),a.on(`error`,s),a.on(`frameError`,s),a.on(`close`,s),t.requestTimeout&&a.setTimeout(t.requestTimeout,s),r.offerLast(i),i.retain(),i}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),r=new H(this.connect(n)),i=r.deref();i.settings({maxConcurrentStreams:1});let a=()=>{r.destroy()};return i.on(`error`,a),i.on(`frameError`,a),i.on(`close`,a),t.requestTimeout&&i.setTimeout(t.requestTimeout,a),r.retain(),r}destroy(){for(let[e,t]of this.connectionPools){for(let e of[...t])e.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError(`maxConcurrentStreams must be greater than zero.`);this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,n]of this.connectionPools){let r=[];for(let e of n)r.push({id:e.id,active:e.useCount(),maxConcurrent:e.max,totalRequests:e.total});e[t]={sessions:r}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new G;this.config.maxConcurrency&&t.setMaxConcurrency(this.config.maxConcurrency),this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?l.connect(e):l.connect(e,this.connectOptions)}}})),Y,X,Z=e((()=>{a(),f(),g(),B(),J(),P(),t(),{constants:Y}=u,X=class e{static create(t){return typeof t?.handle==`function`?t:new e(t)}constructor(e){n(this,`config`,void 0),n(this,`configProvider`,void 0),n(this,`metadata`,{handlerProtocol:`h2`}),n(this,`connectionManager`,new q({})),this.configProvider=new Promise((t,n)=>{typeof e==`function`?e().then(e=>{t(e||{})}).catch(n):t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:a}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:e,maxConcurrentStreams:t,nodeHttp2ConnectOptions:n}=this.config;this.connectionManager.setDisableConcurrentStreams(e??!1),t&&this.connectionManager.setMaxConcurrentStreams(t),n&&this.connectionManager.setNodeHttp2ConnectOptions(n)}let{requestTimeout:o,disableConcurrentStreams:s}=this.config,c=s||a,l=n??o;return new Promise((n,o)=>{let s=!1,u,f=async e=>{await u,n(e)},p=async e=>{await u,o(e)};if(t?.aborted){s=!0,p(d(t));return}let{hostname:m,method:g,port:_,protocol:v,query:y}=e,b=``;(e.username!=null||e.password!=null)&&(b=`${e.username??``}:${e.password??``}@`);let x=`${v}//${b}${m}${_?`:${_}`:``}`,S={destination:new URL(x)},C={requestTimeout:this.config?.sessionTimeout,isEventStream:a},w=c?this.connectionManager.createIsolatedSession(S,C):this.connectionManager.lease(S,C),T=w.deref(),E=e=>{c&&w.destroy(),s=!0,p(e)},D=y?i(y):``,O=e.path;D&&(O+=`?${D}`),e.fragment&&(O+=`#${e.fragment}`);let k=T.request({...e.headers,[Y.HTTP2_HEADER_PATH]:O,[Y.HTTP2_HEADER_METHOD]:g});if(l&&k.setTimeout(l,()=>{k.close();let e=Error(`Stream timed out because of no activity for ${l} ms`);e.name=`TimeoutError`,E(e)}),t){let e=()=>{k.close();let e=d(t);E(e)};if(typeof t.addEventListener==`function`){let n=t;n.addEventListener(`abort`,e,{once:!0}),k.once(`close`,()=>n.removeEventListener(`abort`,e))}else t.onabort=e}k.on(`frameError`,(e,t,n)=>{E(Error(`Frame type id ${e} in stream id ${n} has failed with code ${t}.`))}),k.on(`error`,E),k.on(`aborted`,()=>{E(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${k.rstCode}.`))}),k.on(`response`,e=>{let t=new r({statusCode:e[`:status`]??-1,headers:h(e),body:k});s=!0,f({response:t}),c&&T.close()}),k.on(`close`,()=>{c?w.destroy():this.connectionManager.release(S,w),s||E(Error(`Unexpected error: http2 request did not get a response`))}),u=j(k,e,l)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}})),Q=e((()=>{z(),Z(),o()}));export{R as a,F as i,X as n,z as o,Z as r,Q as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-Cd_AeqMK.js";t();export{e as fromHttp};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{C as r,D as i,E as a,F as o,I as ee,K as s,L as c,M as l,O as u,P as te,U as ne,V as re,X as ie,Y as ae,_ as oe,d as se,et as ce,g as le,i as ue,j as de,k as fe,l as pe,mt as me,n as he,nt as ge,ot as _e,p as ve,q as d,rt as ye,s as be,st as xe,t as f,vt as Se,x as Ce,y as we,z as Te}from"./client-DvAL7lY8.js";import{B as Ee,D as De,H as Oe,M as ke,O as Ae,Y as je,c as Me,o as Ne,t as p,u as Pe}from"./protocols-CnYQjBlj.js";import{B as Fe,H as Ie,L as Le,c as Re,d as ze,r as m,z as Be}from"./serde-f76bObzR.js";import{a as Ve,d as He,l as Ue,m as h,o as We,r as Ge,s as Ke,t as g}from"./config-BSXLgwpD.js";import{C as qe,c as _,f as Je,t as v,v as Ye}from"./dist-es-BF6bR-Ik.js";import{n as Xe,t as Ze}from"./checksum-DgbnMdM-.js";import{C as Qe,_ as $e,c as et,g as tt,m as nt,n as rt,o as y,t as it,x as at}from"./protocols-CCsohXid.js";import{i as ot,t as st}from"./dist-es-CYPVg66r.js";import{a as ct,t as lt}from"./dist-es-Bfr4TzQe.js";import{n as ut,t as dt}from"./dist-es-BIjDeceU.js";var b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,ft,pt,mt,ht=e((()=>{o(),b=`ref`,x=-1,S=!0,C=`isSet`,w=`PartitionResult`,T=`booleanEquals`,E=`stringEquals`,D=`getAttr`,O=`us-east-1`,k=`sigv4`,A=`sts`,j=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,M={[b]:`Endpoint`},N={[b]:`Region`},P={[b]:w},F={},I=[N],L={conditions:[[C,[M]],[C,I],[`aws.partition`,I,w],[T,[{[b]:`UseFIPS`},S]],[T,[{[b]:`UseDualStack`},S]],[E,[N,`aws-global`]],[T,[{[b]:`UseGlobalEndpoint`},S]],[E,[N,`eu-central-1`]],[T,[{fn:D,argv:[P,`supportsDualStack`]},S]],[T,[{fn:D,argv:[P,`supportsFIPS`]},S]],[E,[N,`ap-south-1`]],[E,[N,`eu-north-1`]],[E,[N,`eu-west-1`]],[E,[N,`eu-west-2`]],[E,[N,`eu-west-3`]],[E,[N,`sa-east-1`]],[E,[N,O]],[E,[N,`us-east-2`]],[E,[N,`us-west-2`]],[E,[N,`us-west-1`]],[E,[N,`ca-central-1`]],[E,[N,`ap-southeast-1`]],[E,[N,`ap-northeast-1`]],[E,[N,`ap-southeast-2`]],[E,[{fn:D,argv:[P,`name`]},`aws-us-gov`]]],results:[[x],[`https://sts.amazonaws.com`,{authSchemes:[{name:k,signingName:A,signingRegion:O}]}],[j,{authSchemes:[{name:k,signingName:A,signingRegion:`{Region}`}]}],[x,`Invalid Configuration: FIPS and custom endpoint are not supported`],[x,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[M,F],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,F],[x,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,F],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,F],[x,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,F],[x,`DualStack is enabled but this partition does not support DualStack`],[j,F],[x,`Invalid Configuration: Missing Region`]]},ft=2,pt=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),mt=ne.from(pt,ft,L.conditions,L.results)})),gt,R,_t=e((()=>{f(),o(),ht(),gt=new re({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),R=(e,t={})=>gt.get(e,()=>c(mt,{endpointParams:e,logger:t.logger})),Te.aws=be}));function vt(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function z(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function B(e){return{schemeId:`smithy.api#noAuth`}}var yt,bt,xt,St,Ct,wt,Tt,Et=e((()=>{y(),dt(),d(),o(),_t(),yt=e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=je(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await s(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)},bt=async(e,t,n)=>({operation:je(t).operation,region:await Oe(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),xt=yt(bt),St=(e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...ee}=e,s=t.toLowerCase();t!==s&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${s}'`);let c;if(s===`sigv4a`){c=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(ut.sigv4aDependency()===`none`&&e)continue}else if(s.startsWith(`sigv4`))c=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${s}'`);let l=n[c];if(!l)throw Error(`Could not find HttpAuthOption create function for '${c}'`);let u=l(r);u.schemeId=c,u.signingProperties={...u.signingProperties||{},...ee,...o},a.push(u)}return a},Ct=e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(B(e)),t.push(z(e));break;case`AssumeRoleWithWebIdentity`:t.push(B(e)),t.push(z(e));break;default:t.push(vt(e)),t.push(z(e))}return t},wt=St(R,Ct,{"aws.auth#sigv4":vt,"aws.auth#sigv4a":z,"smithy.api#noAuth":B}),Tt=e=>{let t=tt(et(e));return Object.assign(t,{authSchemePreference:Oe(e.authSchemePreference??[])})}})),Dt,Ot,kt=e((()=>{Dt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),Ot={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),At,jt,Mt,V,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt=e((()=>{At=`@aws-sdk/client-sts`,jt=`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,Mt=`3.1085.0`,V={build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service`,test:`yarn g:vitest run --passWithNoTests`,"test:watch":`yarn g:vitest watch --passWithNoTests`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`},Nt=`./dist-cjs/index.js`,Pt=`./dist-types/index.d.ts`,Ft=`./dist-es/index.js`,It={"@aws-sdk/core":`^3.975.1`,"@aws-sdk/credential-provider-node":`^3.972.66`,"@aws-sdk/signature-v4-multi-region":`^3.996.39`,"@aws-sdk/types":`^3.974.0`,"@smithy/core":`^3.29.2`,"@smithy/fetch-http-handler":`^5.6.4`,"@smithy/node-http-handler":`^4.9.4`,"@smithy/types":`^4.16.0`,tslib:`^2.6.2`},Lt={"@smithy/snapshot-testing":`^2.2.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},Rt={node:`>=20.0.0`},zt={"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},Bt=[`dist-*/**`],Vt={name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},Ht=`Apache-2.0`,Ut={"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},Wt=`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,Gt={type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`},Kt={name:At,description:jt,version:Mt,scripts:V,main:Nt,types:Pt,module:Ft,sideEffects:!1,dependencies:It,devDependencies:Lt,engines:Rt,typesVersions:zt,files:Bt,author:Vt,license:Ht,browser:Ut,"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:Wt,repository:Gt}})),H,U=e((()=>{d(),H=class e extends xe{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn=e((()=>{U(),t(),Jt=class e extends H{constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),n(this,`name`,`ExpiredTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Yt=class e extends H{constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),n(this,`name`,`MalformedPolicyDocumentException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Xt=class e extends H{constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),n(this,`name`,`PackedPolicyTooLargeException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Zt=class e extends H{constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),n(this,`name`,`RegionDisabledException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},Qt=class e extends H{constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),n(this,`name`,`IDPRejectedClaimException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},$t=class e extends H{constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),n(this,`name`,`InvalidIdentityTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},en=class e extends H{constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),n(this,`name`,`IDPCommunicationErrorException`),n(this,`$fault`,`client`),n(this,`$retryable`,{}),Object.setPrototypeOf(this,e.prototype)}},tn=class e extends H{constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),n(this,`name`,`InvalidAuthorizationMessageException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},nn=class e extends H{constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),n(this,`name`,`ExpiredTradeInTokenException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},rn=class e extends H{constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),n(this,`name`,`JWTPayloadSizeExceededException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},an=class e extends H{constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),n(this,`name`,`OutboundWebIdentityFederationDisabledException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}},on=class e extends H{constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),n(this,`name`,`SessionDurationEscalationException`),n(this,`$fault`,`client`),Object.setPrototypeOf(this,e.prototype)}}})),cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,W,G,K,q,J,Y,X,Z,En,Q,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,$=e((()=>{De(),sn(),U(),cn=`Arn`,ln=`Account`,un=`ExpiredTokenException`,dn=`ExpiredTradeInTokenException`,fn=`GetCallerIdentity`,pn=`GetCallerIdentityRequest`,mn=`GetCallerIdentityResponse`,hn=`InvalidAuthorizationMessageException`,gn=`IDPCommunicationErrorException`,_n=`IDPRejectedClaimException`,vn=`InvalidIdentityTokenException`,yn=`JWTPayloadSizeExceededException`,bn=`MalformedPolicyDocumentException`,xn=`OutboundWebIdentityFederationDisabledException`,Sn=`PackedPolicyTooLargeException`,Cn=`RegionDisabledException`,wn=`SessionDurationEscalationException`,Tn=`UserId`,W=`awsQueryError`,G=`client`,K=`error`,q=`httpError`,J=`message`,Y=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,X=`com.amazonaws.sts`,Z=Ae.for(Y),En=[-3,Y,`STSServiceException`,0,[],[]],Z.registerError(En,H),Q=Ae.for(X),Dn=[-3,X,un,{[W]:[`ExpiredTokenException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Dn,Jt),On=[-3,X,dn,{[W]:[`ExpiredTradeInTokenException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(On,nn),kn=[-3,X,gn,{[W]:[`IDPCommunicationError`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(kn,en),An=[-3,X,_n,{[W]:[`IDPRejectedClaim`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(An,Qt),jn=[-3,X,hn,{[W]:[`InvalidAuthorizationMessageException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(jn,tn),Mn=[-3,X,vn,{[W]:[`InvalidIdentityToken`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Mn,$t),Nn=[-3,X,yn,{[W]:[`JWTPayloadSizeExceededException`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Nn,rn),Pn=[-3,X,bn,{[W]:[`MalformedPolicyDocument`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(Pn,Yt),Fn=[-3,X,xn,{[W]:[`OutboundWebIdentityFederationDisabledException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Fn,an),In=[-3,X,Sn,{[W]:[`PackedPolicyTooLarge`,400],[K]:G,[q]:400},[J],[0]],Q.registerError(In,Xt),Ln=[-3,X,Cn,{[W]:[`RegionDisabledException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Ln,Zt),Rn=[-3,X,wn,{[W]:[`SessionDurationEscalationException`,403],[K]:G,[q]:403},[J],[0]],Q.registerError(Rn,on),zn=[Z,Q],Bn=[3,X,pn,0,[],[]],Vn=[3,X,mn,0,[Tn,ln,cn],[0,0,0]],Hn=[9,X,fn,0,()=>Bn,()=>Vn]})),Un,Wn=e((()=>{y(),it(),dt(),v(),Ze(),d(),p(),m(),Et(),_t(),$(),Un=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Ie,base64Encoder:e?.base64Encoder??Be,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??R,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??wt,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Qe},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new at},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new _}],logger:e?.logger??new ie,protocol:e?.protocol??rt,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:zn,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,sha256:e?.sha256??Xe,signerConstructor:e?.signerConstructor??ut,urlParser:e?.urlParser??Ee,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??Le})})),Gn,Kn=e((()=>{qt(),f(),y(),st(),v(),d(),g(),i(),m(),lt(),Wn(),Gn=e=>{ye(process.version);let t=Ge(e),n=()=>t().then(_e),r=Un(e);Se(process.version);let i={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??h($e,i),bodyLengthChecker:e?.bodyLengthChecker??ze,credentialDefaultProvider:e?.credentialDefaultProvider??ot,defaultUserAgentProvider:e?.defaultUserAgentProvider??se({serviceId:r.serviceId,clientVersion:Kt.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`)||(async e=>await ot(e?.__config||{})()),signer:new Qe},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new at},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new _}],maxAttempts:e?.maxAttempts??h(u,e),region:e?.region??h(Ke,{...We,...i}),requestHandler:ct.create(e?.requestHandler??n),retryMode:e?.retryMode??h({...fe,default:async()=>(await n()).retryMode||l},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??h(nt,i),streamCollector:e?.streamCollector??Re,useDualstackEndpoint:e?.useDualstackEndpoint??h(He,i),useFipsEndpoint:e?.useFipsEndpoint??h(Ue,i),userAgentAppId:e?.userAgentAppId??h(pe,i)}}})),qn,Jn,Yn=e((()=>{qn=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Jn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),Xn,Zn=e((()=>{f(),d(),p(),Yn(),Xn=(e,t)=>{let n=Object.assign(he(e),ce(e),Me(e),qn(e));return t.forEach(e=>e.configure(n)),Object.assign(e,ue(n),ge(n),Pe(n),Jn(n))}})),Qn,$n=e((()=>{f(),v(),d(),g(),o(),p(),i(),De(),Et(),kt(),Kn(),Zn(),t(),Qn=class extends me{constructor(...[e]){let t=Gn(e||{});super(t),n(this,`config`,void 0),this.initConfig=t;let i=Xn(Tt(ee(r(Ve(de(le(Dt(t))))))),e?.extensions||[]);this.config=i,this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(ve(this.config)),this.middlewareStack.use(a(this.config)),this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(oe(this.config)),this.middlewareStack.use(qe(this.config,{httpAuthSchemeParametersProvider:xt,identityProviderConfigProvider:async e=>new Je({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(Ye(this.config))}destroy(){super.destroy()}}})),er,tr,nr,rr=e((()=>{d(),o(),kt(),er=ae(Ot,`AWSSecurityTokenServiceV20110615`,`STSClient`,te),tr={},nr=(e,t,n,r)=>[]})),ir=e((()=>{})),ar=e((()=>{})),or=e((()=>{})),sr=e((()=>{})),cr=e((()=>{})),lr=e((()=>{})),ur,dr=e((()=>{rr(),$(),ur=class extends er(tr,nr,`GetCallerIdentity`,Hn){}})),fr=e((()=>{})),pr=e((()=>{})),mr=e((()=>{})),hr=e((()=>{})),gr=e((()=>{})),_r=e((()=>{ir(),ar(),or(),sr(),cr(),lr(),dr(),fr(),pr(),mr(),hr()})),vr=e((()=>{})),yr=e((()=>{}));e((()=>{$n(),gr(),_r(),$(),sn(),vr(),yr(),U()}))();export{ur as GetCallerIdentityCommand,Qn as STSClient};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{L as r,h as i,t as a}from"./config-BSXLgwpD.js";import{readFileSync as o}from"node:fs";var s,c=e((()=>{s=e=>async t=>{e.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromWebToken`);let{roleArn:n,roleSessionName:r,webIdentityToken:i,providerId:a,policyArns:o,policy:s,durationSeconds:c}=e,{roleAssumerWithWebIdentity:l}=e;if(!l){let{getDefaultRoleAssumerWithWebIdentity:n}=await import(`./sts-C2Gf2WYN.js`);l=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:n,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:a,PolicyArns:o,Policy:s,DurationSeconds:c})}})),l,u,d,f,p=e((()=>{n(),a(),c(),l=`AWS_WEB_IDENTITY_TOKEN_FILE`,u=`AWS_ROLE_ARN`,d=`AWS_ROLE_SESSION_NAME`,f=(e={})=>async n=>{e.logger?.debug(`@aws-sdk/credential-provider-web-identity - fromTokenFile`);let a=e?.webIdentityTokenFile??process.env[l],c=e?.roleArn??process.env[u],f=e?.roleSessionName??process.env[d];if(!a||!c)throw new r(`Web identity configuration not specified`,{logger:e.logger});let p=await s({...e,webIdentityToken:i?.getTokenRecord?.()[a]??o(a,{encoding:`ascii`}),roleArn:c,roleSessionName:f})(n);return a===process.env[l]&&t(p,`CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN`,`h`),p}})),m=e((()=>{p(),c()}));export{c as a,s as i,f as n,p as r,m as t};
@@ -0,0 +1 @@
1
+ import{c as e}from"./serde-f76bObzR.js";import{a as t,i as n,n as r,t as i}from"./dist-es-Bfr4TzQe.js";i();export{n as DEFAULT_REQUEST_TIMEOUT,r as NodeHttp2Handler,t as NodeHttpHandler,e as streamCollector};
@@ -0,0 +1 @@
1
+ import{i as e,n as t,r as n,t as r}from"./dist-es-CYPVg66r.js";r();export{t as credentialsTreatedAsExpired,n as credentialsWillNeedRefresh,e as defaultProvider};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{i as t,t as n}from"./dist-es-CYPVg66r.js";import"./dist-es-Cd_AeqMK.js";import{n as r,t as i}from"./dist-es-CMtO44xC.js";var a=e((()=>{})),o=e((()=>{})),s=e((()=>{})),c=e((()=>{})),l=e((()=>{})),u,d=e((()=>{i(),u=(e={})=>r({...e})})),f=e((()=>{})),p=e((()=>{})),m,h=e((()=>{n(),m=(e={})=>t({...e})})),g=e((()=>{})),_=e((()=>{})),v=e((()=>{})),y=e((()=>{})),b=e((()=>{}));e((()=>{a(),o(),s(),c(),l(),d(),f(),p(),h(),g(),_(),v(),y(),b()}))();export{u as fromIni,m as fromNodeProviderChain};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{L as r,N as i,k as a,t as o,v as s}from"./config-BSXLgwpD.js";var c,l,u=e((()=>{n(),o(),c=(e,t,n)=>{let a={EcsContainer:async e=>{let{fromHttp:t}=await import(`./dist-es-Byxccz_-.js`),{fromContainerMetadata:r}=await import(`./dist-es-Cwru7c2B2.js`);return n?.debug(`@aws-sdk/credential-provider-ini - credential_source is EcsContainer`),async()=>i(t(e??{}),r(e))().then(l)},Ec2InstanceMetadata:async e=>{n?.debug(`@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata`);let{fromInstanceMetadata:t}=await import(`./dist-es-Cwru7c2B2.js`);return async()=>t(e)().then(l)},Environment:async e=>{n?.debug(`@aws-sdk/credential-provider-ini - credential_source is Environment`);let{fromEnv:t}=await import(`./dist-es-D1wHe_zh.js`);return async()=>t(e)().then(l)}};if(e in a)return a[e];throw new r(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:n})},l=e=>t(e,`CREDENTIALS_PROFILE_NAMED_PROVIDER`,`p`)})),d,f,p,m,h,g=e((()=>{n(),o(),u(),d=(e,{profile:t=`default`,logger:n}={})=>!!e&&typeof e==`object`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1&&[`undefined`,`string`].indexOf(typeof e.external_id)>-1&&[`undefined`,`string`].indexOf(typeof e.mfa_serial)>-1&&(f(e,{profile:t,logger:n})||p(e,{profile:t,logger:n})),f=(e,{profile:t,logger:n})=>{let r=typeof e.source_profile==`string`&&e.credential_source===void 0;return r&&n?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`),r},p=(e,{profile:t,logger:n})=>{let r=typeof e.credential_source==`string`&&e.source_profile===void 0;return r&&n?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`),r},m=async(e,n,i,o,s={},l)=>{i.logger?.debug(`@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)`);let u=n[e],{source_profile:d,region:f}=u;if(!i.roleAssumer){let{getDefaultRoleAssumer:e}=await import(`./sts-C2Gf2WYN.js`);i.roleAssumer=e({...i.clientConfig,credentialProviderLogger:i.logger,parentClientConfig:{...o,...i?.parentClientConfig,region:f??i?.parentClientConfig?.region??o?.region}},i.clientPlugins)}if(d&&d in s)throw new r(`Detected a cycle attempting to resolve credentials for profile ${a(i)}. Profiles visited: `+Object.keys(s).join(`, `),{logger:i.logger});i.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${d?`source_profile=[${d}]`:`profile=[${e}]`}`);let p=d?l(d,n,i,o,{...s,[d]:!0},h(n[d]??{})):(await c(u.credential_source,e,i.logger)(i))();if(h(u))return p.then(e=>t(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`));{let n={RoleArn:u.role_arn,RoleSessionName:u.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:u.external_id,DurationSeconds:parseInt(u.duration_seconds||`3600`,10)},{mfa_serial:a}=u;if(a){if(!i.mfaCodeProvider)throw new r(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:i.logger,tryNextLink:!1});n.SerialNumber=a,n.TokenCode=await i.mfaCodeProvider(a)}let o=await p;return i.roleAssumer(o,n).then(e=>t(e,`CREDENTIALS_PROFILE_SOURCE_PROFILE`,`o`))}},h=e=>!e.role_arn&&!!e.credential_source})),_,v,y=e((()=>{n(),_=e=>!!(e&&e.login_session),v=async(e,n,r)=>{let{fromLoginCredentials:i}=await import(`./dist-es-DKFm0FJ7.js`);return t(await i({...n,profile:e})({callerClientConfig:r}),`CREDENTIALS_PROFILE_LOGIN`,`AC`)}})),b,x,S=e((()=>{n(),b=e=>!!e&&typeof e==`object`&&typeof e.credential_process==`string`,x=async(e,n)=>{let{fromProcess:r}=await import(`./dist-es-DXIR5NLi2.js`);return t(await r({...e,profile:n})(),`CREDENTIALS_PROFILE_PROCESS`,`v`)}})),C,w,T=e((()=>{n(),C=async(e,n,r={},i)=>{let{fromSSO:a}=await import(`./dist-es-kj-F5A132.js`);return a({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:i}).then(e=>n.sso_session?t(e,`CREDENTIALS_PROFILE_SSO`,`r`):t(e,`CREDENTIALS_PROFILE_SSO_LEGACY`,`t`))},w=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`)})),E,D,O=e((()=>{n(),E=e=>!!e&&typeof e==`object`&&typeof e.aws_access_key_id==`string`&&typeof e.aws_secret_access_key==`string`&&[`undefined`,`string`].indexOf(typeof e.aws_session_token)>-1&&[`undefined`,`string`].indexOf(typeof e.aws_account_id)>-1,D=async(e,n)=>(n?.logger?.debug(`@aws-sdk/credential-provider-ini - resolveStaticCredentials`),t({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}},`CREDENTIALS_PROFILE`,`n`))})),k,A,j=e((()=>{n(),k=e=>!!e&&typeof e==`object`&&typeof e.web_identity_token_file==`string`&&typeof e.role_arn==`string`&&[`undefined`,`string`].indexOf(typeof e.role_session_name)>-1,A=async(e,n,r)=>{let{fromTokenFile:i}=await import(`./dist-es-5t7v8oaj.js`);return t(await i({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:n.roleAssumerWithWebIdentity,logger:n.logger,parentClientConfig:n.parentClientConfig})({callerClientConfig:r}),`CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN`,`q`)}})),M,N=e((()=>{o(),g(),y(),S(),T(),O(),j(),M=async(e,t,n,i,a={},o=!1)=>{let s=t[e];if(Object.keys(a).length>0&&E(s))return D(s,n);if(o||d(s,{profile:e,logger:n.logger}))return m(e,t,n,i,a,M);if(E(s))return D(s,n);if(k(s))return A(s,n,i);if(b(s))return x(n,e);if(w(s))return await C(e,s,n,i);if(_(s))return v(e,n,i);throw new r(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:n.logger})}})),P,F=e((()=>{o(),N(),P=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-ini - fromIni`);let n=await s(e);return M(a({profile:e.profile??t?.profile}),n,e,t)}})),I=e((()=>{F()}));export{P as n,F as r,I as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{L as r,h as i,k as a,t as o,v as s}from"./config-BSXLgwpD.js";import{promisify as c}from"node:util";import{exec as l}from"node:child_process";var u,d=e((()=>{n(),u=(e,n,r)=>{if(n.Version!==1)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(n.Expiration){let t=new Date;if(new Date(n.Expiration)<t)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let i=n.AccountId;!i&&r?.[e]?.aws_account_id&&(i=r[e].aws_account_id);let a={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...i&&{accountId:i}};return t(a,`CREDENTIALS_PROCESS`,`w`),a}})),f,p=e((()=>{o(),d(),f=async(e,t,n)=>{let a=t[e];if(t[e]){let o=a.credential_process;if(o!==void 0){let a=c(i?.getTokenRecord?.().exec??l);try{let{stdout:n}=await a(o),r;try{r=JSON.parse(n.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return u(e,r,t)}catch(e){throw new r(e.message,{logger:n})}}else throw new r(`Profile ${e} did not contain credential_process.`,{logger:n})}else throw new r(`Profile ${e} could not be found in shared credentials file.`,{logger:n})}})),m,h=e((()=>{o(),p(),m=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-process - fromProcess`);let n=await s(e);return f(a({profile:e.profile??t?.profile}),n,e.logger)}})),g=e((()=>{h()}));export{m as n,h as r,g as t};
@@ -0,0 +1,9 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{L as t,N as n,t as r}from"./config-BSXLgwpD.js";import{c as i,t as a}from"./dist-es-DelBIxNM.js";var o,s=e((()=>{r(),o=async e=>{let{ENV_CMDS_FULL_URI:r,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:a,fromInstanceMetadata:o}=await import(`./dist-es-Cwru7c2B2.js`);if(process.env[i]||process.env[r]){e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata`);let{fromHttp:t}=await import(`./dist-es-Byxccz_-.js`);return n(t(e),a(e))}return process.env.AWS_EC2_METADATA_DISABLED&&process.env.AWS_EC2_METADATA_DISABLED!==`false`?async()=>{throw new t(`EC2 Instance Metadata Service access disabled`,{logger:e.logger})}:(e.logger?.debug(`@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata`),o(e))}}));function c(e,t){let n=l(e),r,i,a,o,s=async e=>{if(e?.forceRefresh)return o||(o=n(e).then(e=>{a=e}).finally(()=>{o=void 0})),await o,a;if(a?.expiration&&a?.expiration?.getTime()<Date.now()&&(a=void 0),r)await r;else if(!a||t?.(a))if(a)i||(i=n(e).then(e=>{a=e}).finally(()=>{i=void 0}));else return r=n(e).then(e=>{a=e}).finally(()=>{r=void 0}),s(e);return a};return s}var l,u=e((()=>{l=e=>async t=>{let n;for(let r of e)try{return await r(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n}})),d,f,p,m,h=e((()=>{a(),r(),s(),u(),d=!1,f=(e={})=>c([async()=>{if(e.profile??process.env.AWS_PROFILE)throw process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY&&(d||((e.logger?.warn&&e.logger?.constructor?.name!==`NoOpLogger`?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
2
+ Multiple credential sources detected:
3
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
4
+ This SDK will proceed with the AWS_PROFILE value.
5
+
6
+ However, a future version may change this behavior to prefer the ENV static credentials.
7
+ Please ensure that your environment only sets either the AWS_PROFILE or the
8
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
9
+ `),d=!0)),new t(`AWS_PROFILE is set, skipping fromEnv provider.`,{logger:e.logger,tryNextLink:!0});return e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv`),i(e)()},async n=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromSSO`);let{ssoStartUrl:r,ssoAccountId:i,ssoRegion:a,ssoRoleName:o,ssoSession:s}=e;if(!r&&!i&&!a&&!o&&!s)throw new t(`Skipping SSO provider in default chain (inputs do not include SSO fields).`,{logger:e.logger});let{fromSSO:c}=await import(`./dist-es-kj-F5A132.js`);return c(e)(n)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromIni`);let{fromIni:n}=await import(`./dist-es-D1Y8zSMI.js`);return n(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromProcess`);let{fromProcess:n}=await import(`./dist-es-DXIR5NLi2.js`);return n(e)(t)},async t=>{e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile`);let{fromTokenFile:n}=await import(`./dist-es-5t7v8oaj.js`);return n(e)(t)},async()=>(e.logger?.debug(`@aws-sdk/credential-provider-node - defaultProvider::remoteProvider`),(await o(e))()),async()=>{throw new t(`Could not load credentials from any providers`,{tryNextLink:!1,logger:e.logger})}],m),p=e=>e?.expiration!==void 0,m=e=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5})),g=e((()=>{h()}));export{h as a,f as i,m as n,p as r,g as t};
@@ -0,0 +1,6 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{q as r,t as i}from"./protocols-CnYQjBlj.js";import{N as a,o,r as s}from"./serde-f76bObzR.js";import{L as c,t as l}from"./config-BSXLgwpD.js";import{a as u,t as d}from"./dist-es-Bfr4TzQe.js";import f from"node:fs/promises";var p,m,h,g,_=e((()=>{l(),p=`169.254.170.2`,m=`169.254.170.23`,h=`[fd00:ec2::23]`,g=(e,t)=>{if(e.protocol!==`https:`&&!(e.hostname===p||e.hostname===m||e.hostname===h)){if(e.hostname.includes(`[`)){if(e.hostname===`[::1]`||e.hostname===`[0000:0000:0000:0000:0000:0000:0000:0001]`)return}else{if(e.hostname===`localhost`)return;let t=e.hostname.split(`.`),n=e=>{let t=parseInt(e,10);return 0<=t&&t<=255};if(t[0]===`127`&&n(t[1])&&n(t[2])&&n(t[3])&&t.length===4)return}throw new c(`URL not accepted. It must either be HTTPS or match one of the following:
2
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
3
+ - ECS container host 169.254.170.2
4
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}}}));function v(e){return new r({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((e,[t,n])=>(e[t]=n,e),{}),fragment:e.hash})}async function y(e,t){let n=await o(e.body).transformToString();if(e.statusCode===200){let e=JSON.parse(n);if(typeof e.AccessKeyId!=`string`||typeof e.SecretAccessKey!=`string`||typeof e.Token!=`string`||typeof e.Expiration!=`string`)throw new c(`HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }`,{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:a(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let r={};try{r=JSON.parse(n)}catch{}throw Object.assign(new c(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:r.Code,Message:r.Message})}throw new c(`Server responded with status: ${e.statusCode}`,{logger:t})}var b=e((()=>{l(),i(),s()})),x,S=e((()=>{x=(e,t,n)=>async()=>{for(let r=0;r<t;++r)try{return await e()}catch{await new Promise(e=>setTimeout(e,n))}return await e()}})),C,w,T,E,D,O,k,A=e((()=>{n(),l(),d(),_(),b(),S(),C=`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`,w=`http://169.254.170.2`,T=`AWS_CONTAINER_CREDENTIALS_FULL_URI`,E=`AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE`,D=`AWS_CONTAINER_AUTHORIZATION_TOKEN`,O=(e={})=>{e.logger?.debug(`@aws-sdk/credential-provider-http - fromHttp`);let n,r=e.awsContainerCredentialsRelativeUri??process.env[C],i=e.awsContainerCredentialsFullUri??process.env[T],a=e.awsContainerAuthorizationToken??process.env[D],o=e.awsContainerAuthorizationTokenFile??process.env[E],s=e.logger?.constructor?.name===`NoOpLogger`||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(r&&i&&(s(`@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.`),s(`awsContainerCredentialsRelativeUri will take precedence.`)),a&&o&&(s(`@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.`),s(`awsContainerAuthorizationTokenFile will take precedence.`)),r)n=`${w}${r}`;else if(i)n=i;else throw new c(`No HTTP credential provider host provided.
5
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let l=new URL(n);g(l,e.logger);let d=u.create({connectionTimeout:e.timeout??1e3}),p=e.timeout??1e3,m=x(async()=>{let n=v(l);o?n.headers.Authorization=k((await f.readFile(o)).toString()):a&&(n.headers.Authorization=k(a));try{return y((await d.handle(n,{requestTimeout:p})).response).then(e=>t(e,`CREDENTIALS_HTTP`,`z`))}catch(t){throw new c(String(t),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3);return async()=>{try{return await m()}finally{d.destroy?.()}}},k=e=>{if(e.includes(`\r
6
+ `))throw new c(`Authorization token contains invalid \\r\\n sequence.`);return e}})),j=e((()=>{A()}));export{O as n,A as r,j as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{E as r,F as i,L as a,b as o,k as s,t as c,v as l,w as u}from"./config-BSXLgwpD.js";import{promises as d}from"node:fs";var f,p=e((()=>{f=e=>e&&(typeof e.sso_start_url==`string`||typeof e.sso_account_id==`string`||typeof e.sso_session==`string`||typeof e.sso_region==`string`||typeof e.sso_role_name==`string`)})),m,h=e((()=>{m=`To refresh this SSO session run 'aws sso login' with the corresponding profile.`})),g,_=e((()=>{g=async(e,t={},n)=>{let{SSOOIDCClient:r}=await import(`./sso-oidc-DFJ7SBvI.js`),i=e=>t.clientConfig?.[e]??t.parentClientConfig?.[e]??n?.[e];return new r(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:i(`logger`),userAgentAppId:i(`userAgentAppId`)}))}})),v,y=e((()=>{_(),v=async(e,t,n={},r)=>{let{CreateTokenCommand:i}=await import(`./sso-oidc-DFJ7SBvI.js`);return(await g(t,n,r)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:`refresh_token`}))}})),b,x=e((()=>{c(),h(),b=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new i(`Token is expired. ${m}`,!1)}})),S,C=e((()=>{c(),h(),S=(e,t,n=!1)=>{if(t===void 0)throw new i(`Value not present for '${e}' in SSO Token${n?`. Cannot refresh`:``}. ${m}`,!1)}})),w,T,E=e((()=>{c(),{writeFile:w}=d,T=(e,t)=>{let n=r(e),i=JSON.stringify(t,null,2);return w(n,i)}})),D,O,k=e((()=>{c(),h(),y(),x(),C(),E(),D=new Date(0),O=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/token-providers - fromSso`);let n=await l(e),r=s({profile:e.profile??t?.profile}),a=n[r];if(!a)throw new i(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new i(`Profile '${r}' is missing required property 'sso_session'.`);let c=a.sso_session,d=(await o(e))[c];if(!d)throw new i(`Sso session '${c}' could not be found in shared credentials file.`,!1);for(let e of[`sso_start_url`,`sso_region`])if(!d[e])throw new i(`Sso session '${c}' is missing required property '${e}'.`,!1);d.sso_start_url;let f=d.sso_region,p;try{p=await u(c)}catch{throw new i(`The SSO session token associated with profile=${r} was not found or is invalid. ${m}`,!1)}S(`accessToken`,p.accessToken),S(`expiresAt`,p.expiresAt);let{accessToken:h,expiresAt:g}=p,_={token:h,expiration:new Date(g)};if(_.expiration.getTime()-Date.now()>3e5)return _;if(Date.now()-D.getTime()<30*1e3)return b(_),_;S(`clientId`,p.clientId,!0),S(`clientSecret`,p.clientSecret,!0),S(`refreshToken`,p.refreshToken,!0);try{D.setTime(Date.now());let n=await v(p,f,e,t);S(`accessToken`,n.accessToken),S(`expiresIn`,n.expiresIn);let r=new Date(Date.now()+n.expiresIn*1e3);try{await T(c,{...p,accessToken:n.accessToken,expiresAt:r.toISOString(),refreshToken:n.refreshToken})}catch{}return{token:n.accessToken,expiration:r}}catch{return b(_),_}}})),A=e((()=>{k()})),j,M,N=e((()=>{n(),A(),c(),j=!1,M=async({ssoStartUrl:e,ssoSession:n,ssoAccountId:r,ssoRegion:i,ssoRoleName:o,ssoClient:s,clientConfig:c,parentClientConfig:l,callerClientConfig:d,profile:f,filepath:p,configFilepath:m,ignoreCache:h,logger:g})=>{let _,v=`To refresh this SSO session run aws sso login with the corresponding profile.`;if(n)try{let e=await O({profile:f,filepath:p,configFilepath:m,ignoreCache:h,clientConfig:c,parentClientConfig:l,logger:g})({callerClientConfig:d});_={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new a(e.message,{tryNextLink:j,logger:g})}else try{_=await u(e)}catch{throw new a(`The SSO session associated with this profile is invalid. ${v}`,{tryNextLink:j,logger:g})}if(new Date(_.expiresAt).getTime()-Date.now()<=0)throw new a(`The SSO session associated with this profile has expired. ${v}`,{tryNextLink:j,logger:g});let{accessToken:y}=_,{SSOClient:b,GetRoleCredentialsCommand:x}=await import(`./loadSso-DSxfVpgX.js`),S=s||new b(Object.assign({},c??{},{logger:c?.logger??d?.logger??l?.logger,region:c?.region??i,userAgentAppId:c?.userAgentAppId??d?.userAgentAppId??l?.userAgentAppId})),C;try{C=await S.send(new x({accountId:r,roleName:o,accessToken:y}))}catch(e){throw new a(e,{tryNextLink:j,logger:g})}let{roleCredentials:{accessKeyId:w,secretAccessKey:T,sessionToken:E,expiration:D,credentialScope:k,accountId:A}={}}=C;if(!w||!T||!E||!D)throw new a(`SSO returns an invalid temporary credential.`,{tryNextLink:j,logger:g});let M={accessKeyId:w,secretAccessKey:T,sessionToken:E,expiration:new Date(D),...k&&{credentialScope:k},...A&&{accountId:A}};return n?t(M,`CREDENTIALS_SSO`,`s`):t(M,`CREDENTIALS_SSO_LEGACY`,`u`),M}})),P,F=e((()=>{c(),P=(e,t)=>{let{sso_start_url:n,sso_account_id:r,sso_region:i,sso_role_name:o}=e;if(!n||!r||!i||!o)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(`, `)}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:t});return e}})),I,L=e((()=>{c(),p(),N(),F(),I=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/credential-provider-sso - fromSSO`);let{ssoStartUrl:n,ssoAccountId:r,ssoRegion:i,ssoRoleName:c,ssoSession:u}=e,{ssoClient:d}=e,p=s({profile:e.profile??t?.profile});if(!n&&!r&&!i&&!c&&!u){let t=(await l(e))[p];if(!t)throw new a(`Profile ${p} was not found.`,{logger:e.logger});if(!f(t))throw new a(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(t?.sso_session){let r=(await o(e))[t.sso_session],s=` configurations in profile ${p} and sso-session ${t.sso_session}`;if(i&&i!==r.sso_region)throw new a(`Conflicting SSO region`+s,{tryNextLink:!1,logger:e.logger});if(n&&n!==r.sso_start_url)throw new a(`Conflicting SSO start_url`+s,{tryNextLink:!1,logger:e.logger});t.sso_region=r.sso_region,t.sso_start_url=r.sso_start_url}let{sso_start_url:r,sso_account_id:s,sso_region:c,sso_role_name:u,sso_session:m}=P(t,e.logger);return M({ssoStartUrl:r,ssoSession:m,ssoAccountId:s,ssoRegion:c,ssoRoleName:u,ssoClient:d,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!n||!r||!i||!c)throw new a(`Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"`,{tryNextLink:!1,logger:e.logger});else return M({ssoStartUrl:n,ssoSession:u,ssoAccountId:r,ssoRegion:i,ssoRoleName:c,ssoClient:d,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:p,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}})),R=e((()=>{L(),p(),F()}));export{P as a,F as i,I as n,p as o,L as r,f as s,R as t};
@@ -0,0 +1 @@
1
+ import{d as e,l as t,n,t as r,u as i}from"./dist-es-DmdZmEJ-.js";r();export{t as ENV_CMDS_FULL_URI,i as ENV_CMDS_RELATIVE_URI,e as fromContainerMetadata,n as fromInstanceMetadata};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-CMtO44xC.js";t();export{e as fromIni};
@@ -0,0 +1 @@
1
+ import{c as e,t}from"./dist-es-DelBIxNM.js";t();export{e as fromEnv};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-DNFTCbrP.js";t();export{e as fromLoginCredentials};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{T as t,t as n}from"./client-DvAL7lY8.js";import{E as r,F as i,M as a,N as o,b as s,k as c,t as l,v as u,w as d}from"./config-BSXLgwpD.js";import{o as f,y as p}from"./protocols-CCsohXid.js";import{promises as m}from"node:fs";var h,g=e((()=>{n(),f(),l(),h=({logger:e,signingName:n}={})=>async()=>{if(e?.debug?.(`@aws-sdk/token-providers - fromEnvSigningName`),!n)throw new i(`Please pass 'signingName' to compute environment variable key`,{logger:e});let r=p(n);if(!(r in process.env))throw new i(`Token not present in '${r}' environment variable`,{logger:e});let a={token:process.env[r]};return t(a,`BEARER_SERVICE_ENV_VARS`,`3`),a}})),_,v=e((()=>{_=`To refresh this SSO session run 'aws sso login' with the corresponding profile.`})),y,b=e((()=>{y=async(e,t={},n)=>{let{SSOOIDCClient:r}=await import(`./sso-oidc-DFJ7SBvI.js`),i=e=>t.clientConfig?.[e]??t.parentClientConfig?.[e]??n?.[e];return new r(Object.assign({},t.clientConfig??{},{region:e??t.clientConfig?.region,logger:i(`logger`),userAgentAppId:i(`userAgentAppId`)}))}})),x,S=e((()=>{b(),x=async(e,t,n={},r)=>{let{CreateTokenCommand:i}=await import(`./sso-oidc-DFJ7SBvI.js`);return(await y(t,n,r)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:`refresh_token`}))}})),C,w=e((()=>{l(),v(),C=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new i(`Token is expired. ${_}`,!1)}})),T,E=e((()=>{l(),v(),T=(e,t,n=!1)=>{if(t===void 0)throw new i(`Value not present for '${e}' in SSO Token${n?`. Cannot refresh`:``}. ${_}`,!1)}})),D,O,k=e((()=>{l(),{writeFile:D}=m,O=(e,t)=>{let n=r(e),i=JSON.stringify(t,null,2);return D(n,i)}})),A,j,M=e((()=>{l(),v(),S(),w(),E(),k(),A=new Date(0),j=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug(`@aws-sdk/token-providers - fromSso`);let n=await u(e),r=c({profile:e.profile??t?.profile}),a=n[r];if(!a)throw new i(`Profile '${r}' could not be found in shared credentials file.`,!1);if(!a.sso_session)throw new i(`Profile '${r}' is missing required property 'sso_session'.`);let o=a.sso_session,l=(await s(e))[o];if(!l)throw new i(`Sso session '${o}' could not be found in shared credentials file.`,!1);for(let e of[`sso_start_url`,`sso_region`])if(!l[e])throw new i(`Sso session '${o}' is missing required property '${e}'.`,!1);l.sso_start_url;let f=l.sso_region,p;try{p=await d(o)}catch{throw new i(`The SSO session token associated with profile=${r} was not found or is invalid. ${_}`,!1)}T(`accessToken`,p.accessToken),T(`expiresAt`,p.expiresAt);let{accessToken:m,expiresAt:h}=p,g={token:m,expiration:new Date(h)};if(g.expiration.getTime()-Date.now()>3e5)return g;if(Date.now()-A.getTime()<30*1e3)return C(g),g;T(`clientId`,p.clientId,!0),T(`clientSecret`,p.clientSecret,!0),T(`refreshToken`,p.refreshToken,!0);try{A.setTime(Date.now());let n=await x(p,f,e,t);T(`accessToken`,n.accessToken),T(`expiresIn`,n.expiresIn);let r=new Date(Date.now()+n.expiresIn*1e3);try{await O(o,{...p,accessToken:n.accessToken,expiresAt:r.toISOString(),refreshToken:n.refreshToken})}catch{}return{token:n.accessToken,expiration:r}}catch{return C(g),g}}})),N,P=e((()=>{l(),M(),N=(e={})=>a(o(j(e),async()=>{throw new i(`Could not load token from any providers`,!1)}),e=>e.expiration!==void 0&&e.expiration.getTime()-Date.now()<3e5,e=>e.expiration!==void 0)})),F=e((()=>{g(),M(),P()}));export{g as a,h as i,P as n,N as r,F as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{_t as r,t as i}from"./client-DvAL7lY8.js";import{q as a,t as o}from"./protocols-CnYQjBlj.js";import{L as s,S as c,k as l,t as u,v as d}from"./config-BSXLgwpD.js";import{dirname as f,join as p}from"node:path";import{promises as m}from"node:fs";import{homedir as h}from"node:os";import{createHash as g,createPrivateKey as _,createPublicKey as v,sign as y}from"node:crypto";var b,x=e((()=>{u(),o(),t(),b=class e{constructor(e,t,r){n(this,`profileData`,void 0),n(this,`init`,void 0),n(this,`callerClientConfig`,void 0),this.profileData=e,this.init=t,this.callerClientConfig=r}async loadCredentials(){let t=await this.loadToken();if(!t)throw new s(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let n=t.accessToken,r=Date.now();return new Date(n.expiresAt).getTime()-r<=e.REFRESH_THRESHOLD?this.refresh(t):{accessKeyId:n.accessKeyId,secretAccessKey:n.secretAccessKey,sessionToken:n.sessionToken,accountId:n.accountId,expiration:new Date(n.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:t,CreateOAuth2TokenCommand:n}=await import(`./signin-CPaEtsnK.js`),{logger:r,userAgentAppId:i}=this.callerClientConfig??{},a=(e=>e?.metadata?.handlerProtocol===`h2`)(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,o=new t({credentials:{accessKeyId:``,secretAccessKey:``},region:this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,requestHandler:a,logger:r,userAgentAppId:i,...this.init?.clientConfig});this.createDPoPInterceptor(o.middlewareStack);let c={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:`refresh_token`}};try{let t=await o.send(new n(c)),{accessKeyId:r,secretAccessKey:i,sessionToken:a}=t.tokenOutput?.accessToken??{},{refreshToken:l,expiresIn:u}=t.tokenOutput??{};if(!r||!i||!a||!l)throw new s(`Token refresh response missing required fields`,{logger:this.logger,tryNextLink:!1});let d=(u??900)*1e3,f=new Date(Date.now()+d),p={...e,accessToken:{...e.accessToken,accessKeyId:r,secretAccessKey:i,sessionToken:a,expiresAt:f.toISOString()},refreshToken:l};await this.saveToken(p);let m=p.accessToken;return{accessKeyId:m.accessKeyId,secretAccessKey:m.secretAccessKey,sessionToken:m.sessionToken,accountId:m.accountId,expiration:f}}catch(e){if(e.name===`AccessDeniedException`){let t=e.error,n;switch(t){case`TOKEN_EXPIRED`:n=`Your session has expired. Please reauthenticate.`;break;case`USER_CREDENTIALS_CHANGED`:n=`Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.`;break;case`INSUFFICIENT_PERMISSIONS`:n=`Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.`;break;default:n=`Failed to refresh token: ${String(e)}. Please re-authenticate using \`aws login\``}throw new s(n,{logger:this.logger,tryNextLink:!1})}throw new s(`Failed to refresh token: ${String(e)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let t;try{t=await c(e,{ignoreCache:this.init?.ignoreCache})}catch{t=await m.readFile(e,`utf8`)}let n=JSON.parse(t),r=[`accessToken`,`clientId`,`refreshToken`,`dpopKey`].filter(e=>!n[e]);if(n.accessToken?.accountId||r.push(`accountId`),r.length>0)throw new s(`Token validation failed, missing fields: ${r.join(`, `)}`,{logger:this.logger,tryNextLink:!1});return n}catch(t){throw new s(`Failed to load token from ${e}: ${String(t)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let t=this.getTokenFilePath(),n=f(t);try{await m.mkdir(n,{recursive:!0})}catch{}await m.writeFile(t,JSON.stringify(e,null,2),`utf8`)}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??p(h(),`.aws`,`login`,`cache`),t=Buffer.from(this.loginSession,`utf8`);return p(e,`${g(`sha256`).update(t).digest(`hex`)}.json`)}derToRawSignature(e){let t=2;if(e[t]!==2)throw Error(`Invalid DER signature`);t++;let n=e[t++],r=e.subarray(t,t+n);if(t+=n,e[t]!==2)throw Error(`Invalid DER signature`);t++;let i=e[t++],a=e.subarray(t,t+i);r=r[0]===0?r.subarray(1):r,a=a[0]===0?a.subarray(1):a;let o=Buffer.concat([Buffer.alloc(32-r.length),r]),s=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([o,s])}createDPoPInterceptor(e){e.add(e=>async t=>{if(a.isInstance(t.request)){let e=t.request,n=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:``}${e.path}`,r=await this.generateDpop(e.method,n);e.headers={...e.headers,DPoP:r}}return e(t)},{step:`finalizeRequest`,name:`dpopInterceptor`,override:!0})}async generateDpop(e=`POST`,t){let n=await this.loadToken();try{let r=_({key:n.dpopKey,format:`pem`,type:`sec1`}),i=v(r).export({format:`der`,type:`spki`}),a=-1;for(let e=0;e<i.length;e++)if(i[e]===4){a=e;break}let o=i.slice(a+1,a+33),s=i.slice(a+33,a+65),c={alg:`ES256`,typ:`dpop+jwt`,jwk:{kty:`EC`,crv:`P-256`,x:o.toString(`base64url`),y:s.toString(`base64url`)}},l={jti:crypto.randomUUID(),htm:e,htu:t,iat:Math.floor(Date.now()/1e3)},u=`${Buffer.from(JSON.stringify(c)).toString(`base64url`)}.${Buffer.from(JSON.stringify(l)).toString(`base64url`)}`,d=y(`sha256`,Buffer.from(u),r);return`${u}.${this.derToRawSignature(d).toString(`base64url`)}`}catch(e){throw new s(`Failed to generate Dpop proof: ${e instanceof Error?e.message:String(e)}`,{logger:this.logger,tryNextLink:!1})}}},n(b,`REFRESH_THRESHOLD`,300*1e3)})),S,C=e((()=>{i(),u(),x(),S=e=>async({callerClientConfig:t}={})=>{e?.logger?.debug?.(`@aws-sdk/credential-providers - fromLoginCredentials`);let n=await d(e||{}),i=l({profile:e?.profile??t?.profile}),a=n[i];if(!a?.login_session)throw new s(`Profile ${i} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});return r(await new b(a,e,t).loadCredentials(),`CREDENTIALS_LOGIN`,`AD`)}})),w=e((()=>{C()}));export{S as n,C as r,w as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-CQMt6zRM.js";t();export{e as fromProcess};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{_t as t,t as n}from"./client-DvAL7lY8.js";import{L as r,t as i}from"./config-BSXLgwpD.js";var a,o,s,c,l,u,d,f=e((()=>{n(),i(),a=`AWS_ACCESS_KEY_ID`,o=`AWS_SECRET_ACCESS_KEY`,s=`AWS_SESSION_TOKEN`,c=`AWS_CREDENTIAL_EXPIRATION`,l=`AWS_CREDENTIAL_SCOPE`,u=`AWS_ACCOUNT_ID`,d=e=>async()=>{e?.logger?.debug(`@aws-sdk/credential-provider-env - fromEnv`);let n=process.env[a],i=process.env[o],d=process.env[s],f=process.env[c],p=process.env[l],m=process.env[u];if(n&&i){let e={accessKeyId:n,secretAccessKey:i,...d&&{sessionToken:d},...f&&{expiration:new Date(f)},...p&&{credentialScope:p},...m&&{accountId:m}};return t(e,`CREDENTIALS_ENV_VARS`,`g`),e}throw new r(`Unable to find environment variable credentials.`,{logger:e?.logger})}})),p=e((()=>{f()}));export{a,d as c,c as i,f as l,u as n,o,l as r,s,p as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{B as r,t as i}from"./protocols-CnYQjBlj.js";import{L as a,m as o,t as s,z as c}from"./config-BSXLgwpD.js";import ee from"node:http";var l,u,d=e((()=>{l=e=>!!e&&typeof e==`object`&&typeof e.AccessKeyId==`string`&&typeof e.SecretAccessKey==`string`&&typeof e.Token==`string`&&typeof e.Expiration==`string`,u=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}})})),f,p,m=e((()=>{f=1e3,p=({maxRetries:e=0,timeout:t=f})=>({maxRetries:e,timeout:t})})),te=e((()=>{}));function h(e){return new Promise((t,n)=>{let r=ee.request({method:`GET`,...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,`$1`)});r.on(`error`,e=>{n(Object.assign(new c(`Unable to connect to instance metadata service`),e)),r.destroy()}),r.on(`timeout`,()=>{n(new c(`TimeoutError from instance metadata service`)),r.destroy()}),r.on(`response`,e=>{let{statusCode:i=400}=e;(i<200||300<=i)&&(n(Object.assign(new c(`Error response received from instance metadata service`),{statusCode:i})),r.destroy());let a=[];e.on(`data`,e=>{a.push(e)}),e.on(`end`,()=>{t(Buffer.concat(a)),r.destroy()})}),r.end()})}var g=e((()=>{s(),te()})),_,v=e((()=>{_=(e,t)=>{let n=e();for(let r=0;r<t;r++)n=n.catch(e);return n}})),y,b,x,S,C,w,T,E,D,O=e((()=>{s(),d(),m(),g(),v(),y=`AWS_CONTAINER_CREDENTIALS_FULL_URI`,b=`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`,x=`AWS_CONTAINER_AUTHORIZATION_TOKEN`,S=(e={})=>{let{timeout:t,maxRetries:n}=p(e);return()=>_(async()=>{let n=await D({logger:e.logger}),r=JSON.parse(await C(t,n));if(!l(r))throw new a(`Invalid response received from instance metadata service.`,{logger:e.logger});return u(r)},n)},C=async(e,t)=>(process.env.AWS_CONTAINER_AUTHORIZATION_TOKEN&&(t.headers={...t.headers,Authorization:process.env[x]}),(await h({...t,timeout:e})).toString()),w=`169.254.170.2`,T=new Set([`localhost`,`127.0.0.1`]),E=new Set([`http:`,`https:`]),D=async({logger:e})=>{if(process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)return{hostname:w,path:process.env[b]};if(process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI){let t;try{t=new URL(process.env[y])}catch{throw new a(`${process.env[y]} is not a valid container metadata service URL`,{tryNextLink:!1,logger:e})}if(!t.hostname||!T.has(t.hostname))throw new a(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!E.has(t.protocol))throw new a(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{protocol:t.protocol,hostname:t.hostname,path:t.pathname+t.search,port:t.port?parseInt(t.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${b} or ${y} environment variable is set`,{tryNextLink:!1,logger:e})}})),k,ne=e((()=>{s(),t(),k=class e extends a{constructor(t,r=!0){super(t,r),n(this,`tryNextLink`,void 0),n(this,`name`,`InstanceMetadataV1FallbackError`),this.tryNextLink=r,Object.setPrototypeOf(this,e.prototype)}}})),A,j=e((()=>{(function(e){e.IPv4=`http://169.254.169.254`,e.IPv6=`http://[fd00:ec2::254]`})(A||(A={}))})),M,N,P,re=e((()=>{M=`AWS_EC2_METADATA_SERVICE_ENDPOINT`,N=`ec2_metadata_service_endpoint`,P={environmentVariableSelector:e=>e[M],configFileSelector:e=>e[N],default:void 0}})),F,I=e((()=>{(function(e){e.IPv4=`IPv4`,e.IPv6=`IPv6`})(F||(F={}))})),L,R,z,ie=e((()=>{I(),L=`AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE`,R=`ec2_metadata_service_endpoint_mode`,z={environmentVariableSelector:e=>e[L],configFileSelector:e=>e[R],default:F.IPv4}})),B,V,ae,H=e((()=>{s(),i(),j(),re(),I(),ie(),B=async()=>r(await V()||await ae()),V=async()=>o(P)(),ae=async()=>{let e=await o(z)();switch(e){case F.IPv4:return A.IPv4;case F.IPv6:return A.IPv6;default:throw Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(F)}`)}}})),U,W,G,oe=e((()=>{U=300,W=300,G=(e,t)=>{let n=U+Math.floor(Math.random()*W),r=new Date(Date.now()+n*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(r)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let i=e.originalExpiration??e.expiration;return{...e,...i?{originalExpiration:i}:{},expiration:r}}})),K,se=e((()=>{oe(),K=(e,t={})=>{let n=t?.logger||console,r;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=G(t,n))}catch(e){if(r)n.warn(`Credential renew failed: `,e),t=G(r,n);else throw e}return r=t,t}}})),q,J,Y,X,Z,Q,ce,le,ue,de,$=e((()=>{s(),ne(),d(),m(),g(),v(),H(),se(),q=`/latest/meta-data/iam/security-credentials/`,J=`/latest/api/token`,Y=`AWS_EC2_METADATA_V1_DISABLED`,X=`ec2_metadata_v1_disabled`,Z=`x-aws-ec2-metadata-token`,Q=(e={})=>K(ce(e),{logger:e.logger}),ce=(e={})=>{let t=!1,{logger:n,profile:r}=e,{timeout:i,maxRetries:s}=p(e),c=async(n,i)=>{if(t||i.headers?.[Z]==null){let t=!1,n=!1,i=await o({environmentVariableSelector:t=>{let r=t[Y];if(n=!!r&&r!==`false`,r===void 0)throw new a(`${Y} not set in env, checking config file next.`,{logger:e.logger});return n},configFileSelector:e=>{let n=e[X];return t=!!n&&n!==`false`,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||i){let r=[];throw e.ec2MetadataV1Disabled&&r.push(`credential provider initialization (runtime option ec2MetadataV1Disabled)`),t&&r.push(`config file profile (${X})`),n&&r.push(`process environment variable (${Y})`),new k(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${r.join(`, `)}].`)}}let s=(await _(async()=>{let e;try{e=await ue(i)}catch(e){throw e.statusCode===401&&(t=!1),e}return e},n)).trim();return _(async()=>{let n;try{n=await de(s,i,e)}catch(e){throw e.statusCode===401&&(t=!1),e}return n},n)};return async()=>{let e=await B();if(t)return n?.debug(`AWS SDK Instance Metadata`,`using v1 fallback (no token fetch)`),c(s,{...e,timeout:i});{let r;try{r=(await le({...e,timeout:i})).toString()}catch(r){if(r?.statusCode===400)throw Object.assign(r,{message:`EC2 Metadata token request returned error`});return(r.message===`TimeoutError`||[403,404,405].includes(r.statusCode))&&(t=!0),n?.debug(`AWS SDK Instance Metadata`,`using v1 fallback (initial)`),c(s,{...e,timeout:i})}return c(s,{...e,headers:{[Z]:r},timeout:i})}}},le=async e=>h({...e,path:J,method:`PUT`,headers:{"x-aws-ec2-metadata-token-ttl-seconds":`21600`}}),ue=async e=>(await h({...e,path:q})).toString(),de=async(e,t,n)=>{let r=JSON.parse((await h({...t,path:q+e})).toString());if(!l(r))throw new a(`Invalid response received from instance metadata service.`,{logger:n.logger});return u(r)}})),fe=e((()=>{O(),$(),m(),g(),H(),j()}));export{p as _,H as a,x as c,S as d,O as f,m as g,f as h,B as i,y as l,g as m,Q as n,A as o,h as p,$ as r,j as s,fe as t,b as u};
@@ -0,0 +1 @@
1
+ import"./client-DvAL7lY8.js";import{_ as e,f as t,t as n}from"./dist-es-BOPBJQo3.js";n();export{e as BedrockRuntimeClient,t as CountTokensCommand};
@@ -0,0 +1 @@
1
+ import"./protocols-CnYQjBlj.js";import{c as e,t}from"./dist-es-BF6bR-Ik.js";t();export{e as NoAuthSigner};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./dist-es-Cgsa8pb82.js";t();export{e as fromSSO};