@qitqode/qitqode-android-arm64 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/bundle/{chunk-ztyy3ga3.js → chunk-01e3v1xz.js} +2 -2
  2. package/bundle/{chunk-p54bzjtv.js → chunk-060wbpz4.js} +1 -1
  3. package/bundle/{chunk-ypdt9mmr.js → chunk-0am156m5.js} +2 -2
  4. package/bundle/{chunk-xhtcegk0.js → chunk-0bgssfvq.js} +1 -1
  5. package/bundle/{chunk-dnnkq5y4.js → chunk-0crgymtr.js} +2 -2
  6. package/bundle/chunk-0dzpjk7x.js +2 -0
  7. package/bundle/{chunk-bwbqkfv0.js → chunk-0ffmwhw7.js} +1 -1
  8. package/bundle/{chunk-h62chdmw.js → chunk-0g0jpw0z.js} +1 -1
  9. package/bundle/{chunk-mn9end71.js → chunk-0ggvqmnm.js} +1 -1
  10. package/bundle/{chunk-y7hgevfv.js → chunk-0gsw04hw.js} +2 -2
  11. package/bundle/{chunk-tkrwcjkr.js → chunk-0qpqd7nz.js} +2 -2
  12. package/bundle/{chunk-nty5z2cj.js → chunk-0tqmm8b8.js} +1 -1
  13. package/bundle/chunk-12fwmmcp.js +2 -0
  14. package/bundle/{chunk-bch1rj72.js → chunk-14d301ze.js} +1 -1
  15. package/bundle/{chunk-3cqrz7g1.js → chunk-16srrzjr.js} +1 -1
  16. package/bundle/{chunk-45a4n21f.js → chunk-19pspc1p.js} +1 -1
  17. package/bundle/chunk-1a95ysv3.js +2 -0
  18. package/bundle/chunk-1akh8pk2.js +2 -0
  19. package/bundle/{chunk-5tky3csh.js → chunk-1ay97v74.js} +1 -1
  20. package/bundle/{chunk-6ar91jvd.js → chunk-1c0yp2gv.js} +1 -1
  21. package/bundle/{chunk-2md6sx8d.js → chunk-1rgt2vmt.js} +1 -1
  22. package/bundle/{chunk-3kpse7zy.js → chunk-1vpx7szf.js} +1 -1
  23. package/bundle/chunk-22qetqnp.js +2 -0
  24. package/bundle/{chunk-tm34qp8j.js → chunk-2bjfz4fb.js} +1 -1
  25. package/bundle/{chunk-jxwey5py.js → chunk-2c26kxp4.js} +5 -5
  26. package/bundle/{chunk-xe69cnsk.js → chunk-2c41dncf.js} +1 -1
  27. package/bundle/{chunk-m7v4ky0y.js → chunk-2cjfezfr.js} +1 -1
  28. package/bundle/chunk-2d2a92kj.js +2 -0
  29. package/bundle/{chunk-m5dm7a1t.js → chunk-2pex3ak9.js} +1 -1
  30. package/bundle/chunk-2qrvkef8.js +2 -0
  31. package/bundle/chunk-2tppw8j9.js +2 -0
  32. package/bundle/chunk-2y87m7pe.js +2 -0
  33. package/bundle/{chunk-sfw5qddj.js → chunk-33jcxsbe.js} +1 -1
  34. package/bundle/{chunk-d0x5pbkm.js → chunk-3623jvcm.js} +1 -1
  35. package/bundle/{chunk-953pqp3w.js → chunk-368jx5dp.js} +1 -1
  36. package/bundle/chunk-3ft1dn9j.js +2 -0
  37. package/bundle/{chunk-rn83r0js.js → chunk-3k7016c2.js} +1 -1
  38. package/bundle/chunk-3rgct4bd.js +11 -0
  39. package/bundle/{chunk-68v3b6ns.js → chunk-3xdmxm5t.js} +2 -2
  40. package/bundle/{chunk-dt5aae7t.js → chunk-42q8vj0w.js} +1 -1
  41. package/bundle/{chunk-yhj01dz9.js → chunk-438faz6b.js} +2 -2
  42. package/bundle/chunk-4656qm05.js +2 -0
  43. package/bundle/chunk-46knch5z.js +2 -0
  44. package/bundle/{chunk-n23d0q00.js → chunk-4bewbvvr.js} +1 -1
  45. package/bundle/{chunk-pmg53fdd.js → chunk-4byvnx78.js} +1 -1
  46. package/bundle/chunk-4ftjx7ss.js +2 -0
  47. package/bundle/{chunk-jqk3v8d6.js → chunk-4fvbexr8.js} +1 -1
  48. package/bundle/{chunk-k1nh5sd2.js → chunk-4fy08jcj.js} +1 -1
  49. package/bundle/{chunk-0smnwqk6.js → chunk-4j76bf4j.js} +2 -2
  50. package/bundle/{chunk-5nrc5rhh.js → chunk-4jpab7ag.js} +1 -1
  51. package/bundle/{chunk-0j5rzaxx.js → chunk-4ngmjk8j.js} +2 -2
  52. package/bundle/{chunk-vnrjk2be.js → chunk-4rpgwgx9.js} +1 -1
  53. package/bundle/chunk-4sgy87h5.js +2 -0
  54. package/bundle/{chunk-65bmsp2t.js → chunk-4vzjdmts.js} +1 -1
  55. package/bundle/{chunk-zc0cdvcv.js → chunk-4zhrg3rv.js} +2 -2
  56. package/bundle/{chunk-5pzs51sp.js → chunk-52rdms56.js} +1 -1
  57. package/bundle/chunk-54hktc8h.js +2 -0
  58. package/bundle/{chunk-smznrv7k.js → chunk-55way0em.js} +1 -1
  59. package/bundle/{chunk-k4gsktts.js → chunk-59kk0mce.js} +1 -1
  60. package/bundle/chunk-59m55866.js +2 -0
  61. package/bundle/{chunk-a9a0cwmf.js → chunk-5b3v1x2c.js} +2 -2
  62. package/bundle/chunk-5js5nw7r.js +2 -0
  63. package/bundle/{chunk-5gsdnejs.js → chunk-5nhwqg7c.js} +1 -1
  64. package/bundle/{chunk-13rsd5vv.js → chunk-5r05d901.js} +3 -3
  65. package/bundle/{chunk-avefgbjg.js → chunk-5zh91zk2.js} +2 -2
  66. package/bundle/chunk-61jn7908.js +2 -0
  67. package/bundle/chunk-61txdqz1.js +2 -0
  68. package/bundle/chunk-668g9wkg.js +2 -0
  69. package/bundle/chunk-6frhjpmt.js +2 -0
  70. package/bundle/{chunk-920z7g7j.js → chunk-6gqs1k7m.js} +1 -1
  71. package/bundle/chunk-6k14c8x1.js +5 -0
  72. package/bundle/{chunk-g42krp0z.js → chunk-6nxebcf8.js} +1 -1
  73. package/bundle/chunk-6r1jpj0h.js +2 -0
  74. package/bundle/{chunk-7bcm7gg1.js → chunk-6r48fje7.js} +1 -1
  75. package/bundle/{chunk-bqn6bqws.js → chunk-6ychs4wx.js} +1 -1
  76. package/bundle/{chunk-21rq4592.js → chunk-705xnxbc.js} +2 -2
  77. package/bundle/chunk-73fn4dqd.js +2 -0
  78. package/bundle/{chunk-2b3fn9xv.js → chunk-73xryfgn.js} +2 -2
  79. package/bundle/{chunk-ct693qsd.js → chunk-76h0f86f.js} +1 -1
  80. package/bundle/{chunk-cq9sd32h.js → chunk-77h8tytk.js} +1 -1
  81. package/bundle/chunk-78j2c2je.js +2 -0
  82. package/bundle/chunk-78jt24ht.js +2 -0
  83. package/bundle/chunk-7j2vpavd.js +2 -0
  84. package/bundle/chunk-7nkxgm72.js +2 -0
  85. package/bundle/{chunk-f31yvp20.js → chunk-7p6mxch0.js} +1 -1
  86. package/bundle/{chunk-mhhtf0v3.js → chunk-7sq5dyv1.js} +1 -1
  87. package/bundle/{chunk-804vmbcd.js → chunk-7x2q1w0f.js} +1 -1
  88. package/bundle/{chunk-ac7482n2.js → chunk-7z96r2px.js} +2 -2
  89. package/bundle/chunk-84pjdenq.js +2 -0
  90. package/bundle/chunk-859pkecc.js +2 -0
  91. package/bundle/{chunk-y0527cg0.js → chunk-8hmt3avx.js} +1 -1
  92. package/bundle/{chunk-7ayb3k5p.js → chunk-8jvfqh3b.js} +1 -1
  93. package/bundle/{chunk-8wwdrwf2.js → chunk-8p0t8qah.js} +1 -1
  94. package/bundle/chunk-8p249svd.js +2 -0
  95. package/bundle/{chunk-z1932c3f.js → chunk-8rfqv5he.js} +1 -1
  96. package/bundle/chunk-8rqbx4jw.js +2 -0
  97. package/bundle/chunk-8s3krfsm.js +2 -0
  98. package/bundle/{chunk-pb30kkbs.js → chunk-93pmbdz7.js} +6 -6
  99. package/bundle/{chunk-vcygx6hs.js → chunk-95am490c.js} +2 -2
  100. package/bundle/{chunk-52frd9p0.js → chunk-9a6p1gdn.js} +8 -8
  101. package/bundle/chunk-9aafddkw.js +3 -0
  102. package/bundle/{chunk-0xrb12s8.js → chunk-9g9katgy.js} +2 -2
  103. package/bundle/{chunk-24rkf2gk.js → chunk-9qzwmt76.js} +1 -1
  104. package/bundle/chunk-9sv53kb4.js +2 -0
  105. package/bundle/chunk-9wbe0dkx.js +2 -0
  106. package/bundle/{chunk-bne5w117.js → chunk-9xxnwb33.js} +4 -4
  107. package/bundle/{chunk-fjbv3jht.js → chunk-a610qd3x.js} +1 -1
  108. package/bundle/{chunk-5c2438af.js → chunk-a76w2jwm.js} +1 -1
  109. package/bundle/{chunk-at22twxx.js → chunk-aa2n02qk.js} +2 -2
  110. package/bundle/{chunk-3akv2xqh.js → chunk-abv0fskc.js} +1 -1
  111. package/bundle/{chunk-7g66qc1v.js → chunk-acd72413.js} +2 -2
  112. package/bundle/{chunk-wkg3c643.js → chunk-ae7b11np.js} +2 -2
  113. package/bundle/{chunk-gy21fw82.js → chunk-agqss9ga.js} +2 -2
  114. package/bundle/chunk-aj5z8qd5.js +2 -0
  115. package/bundle/{chunk-fxx0z4yb.js → chunk-ajp53ksp.js} +1 -1
  116. package/bundle/{chunk-j164q40b.js → chunk-amp6mvbp.js} +2 -2
  117. package/bundle/{chunk-44723rmb.js → chunk-aqcpk2vg.js} +1 -1
  118. package/bundle/chunk-b0c2mvc0.js +2 -0
  119. package/bundle/{chunk-pxv12ctq.js → chunk-b6eypnbj.js} +1 -1
  120. package/bundle/chunk-b79z8f94.js +2 -0
  121. package/bundle/chunk-bbwcsdy9.js +2 -0
  122. package/bundle/chunk-bbzjdbb9.js +2 -0
  123. package/bundle/{chunk-6evh2ke8.js → chunk-bd505nsd.js} +1 -1
  124. package/bundle/{chunk-p4027t94.js → chunk-bd84t3fb.js} +1 -1
  125. package/bundle/chunk-bh4s1yct.js +2 -0
  126. package/bundle/{chunk-rrv0n73b.js → chunk-bk7f59fn.js} +1 -1
  127. package/bundle/{chunk-venprxdp.js → chunk-bn71wqqf.js} +1 -1
  128. package/bundle/{chunk-j9h1sp4g.js → chunk-c3szabpf.js} +2 -2
  129. package/bundle/{chunk-z6sbjvtv.js → chunk-c6cajbyj.js} +1 -1
  130. package/bundle/{chunk-p6crzjtf.js → chunk-c8prg3jx.js} +2 -2
  131. package/bundle/chunk-crqcppwq.js +2 -0
  132. package/bundle/{chunk-t239rvej.js → chunk-cth373se.js} +2 -2
  133. package/bundle/chunk-d09zpgj1.js +2 -0
  134. package/bundle/{chunk-np12r26m.js → chunk-d1tb1jd0.js} +1 -1
  135. package/bundle/{chunk-mmjgf680.js → chunk-dbpkq7ba.js} +2 -2
  136. package/bundle/{chunk-36xm6mgm.js → chunk-dd4qnh8s.js} +2 -2
  137. package/bundle/{chunk-p169ee92.js → chunk-defj5zs6.js} +1 -1
  138. package/bundle/chunk-dexcptaz.js +3 -0
  139. package/bundle/chunk-dgqkak21.js +2 -0
  140. package/bundle/{chunk-jww55nk9.js → chunk-dgva3y5v.js} +1 -1
  141. package/bundle/chunk-dhgvh7c3.js +2 -0
  142. package/bundle/{chunk-c55f729m.js → chunk-djqxbnwc.js} +2 -2
  143. package/bundle/chunk-dmd101ja.js +2 -0
  144. package/bundle/{chunk-vygkwwjd.js → chunk-drnj1a14.js} +2 -2
  145. package/bundle/{chunk-g3wvtyw3.js → chunk-dt1wwt7m.js} +1 -1
  146. package/bundle/{chunk-cz5vta94.js → chunk-dw70wds9.js} +1 -1
  147. package/bundle/{chunk-xdd3553a.js → chunk-dw7yrk1g.js} +1 -1
  148. package/bundle/chunk-dwb39jdf.js +2 -0
  149. package/bundle/chunk-dx4zxex7.js +2 -0
  150. package/bundle/{chunk-ph8hn1wt.js → chunk-dy2k5rdx.js} +2 -2
  151. package/bundle/{chunk-wwdpw27v.js → chunk-dz3bec8g.js} +1 -1
  152. package/bundle/{chunk-t0761rhq.js → chunk-e0zb6sw6.js} +2 -2
  153. package/bundle/chunk-e2pqvscp.js +2 -0
  154. package/bundle/{chunk-vsz4s6zt.js → chunk-e4g4mvak.js} +1 -1
  155. package/bundle/{chunk-fhqfqd5v.js → chunk-eeq0krp7.js} +2 -2
  156. package/bundle/chunk-efe6kj3d.js +2 -0
  157. package/bundle/{chunk-qp1n7kwe.js → chunk-egkhynj5.js} +1 -1
  158. package/bundle/chunk-emac0dss.js +2 -0
  159. package/bundle/chunk-encfnt6w.js +2 -0
  160. package/bundle/{chunk-y29ejqg2.js → chunk-etv6c77a.js} +1 -1
  161. package/bundle/{chunk-32j0q58h.js → chunk-eyr5ymt8.js} +1 -1
  162. package/bundle/{chunk-r9w0thdk.js → chunk-f2pv705d.js} +1 -1
  163. package/bundle/{chunk-5w76kdjr.js → chunk-f4mnp6xd.js} +1 -1
  164. package/bundle/{chunk-xdteq9bd.js → chunk-f84hw65n.js} +1 -1
  165. package/bundle/chunk-fg2nyz2x.js +2 -0
  166. package/bundle/chunk-ga6wc979.js +2 -0
  167. package/bundle/{chunk-nw3e93y8.js → chunk-gbxf6e5d.js} +3 -3
  168. package/bundle/chunk-gdew7bwm.js +2 -0
  169. package/bundle/{chunk-w9gzfsy7.js → chunk-gdj7mqrd.js} +2 -2
  170. package/bundle/chunk-ge19ff9d.js +2 -0
  171. package/bundle/{chunk-wmezdcdh.js → chunk-ghap1n1m.js} +4 -4
  172. package/bundle/chunk-gt0q07xq.js +2 -0
  173. package/bundle/{chunk-7mppvhv9.js → chunk-gwrnxcdn.js} +2 -2
  174. package/bundle/{chunk-e8p92vz4.js → chunk-gww0skmn.js} +2 -2
  175. package/bundle/chunk-h4dnjfr2.js +2 -0
  176. package/bundle/{chunk-has2rz35.js → chunk-h7658zxy.js} +1 -1
  177. package/bundle/chunk-h8fx619t.js +2 -0
  178. package/bundle/{chunk-313zqzc1.js → chunk-hfefq104.js} +1 -1
  179. package/bundle/{chunk-ff548b0j.js → chunk-hhk2sp5n.js} +2 -2
  180. package/bundle/{chunk-47k5jy1p.js → chunk-hqjc4wgg.js} +2 -2
  181. package/bundle/{chunk-48r70n4s.js → chunk-hrtze4c5.js} +1 -1
  182. package/bundle/{chunk-r5zy4za0.js → chunk-hwsqqkrv.js} +2 -2
  183. package/bundle/{chunk-ehb4hd9c.js → chunk-j6xmgn63.js} +1 -1
  184. package/bundle/chunk-jnvb3s7f.js +2 -0
  185. package/bundle/chunk-jrq2xw6e.js +2 -0
  186. package/bundle/chunk-jwckmhjm.js +2 -0
  187. package/bundle/{chunk-xqnzmr7a.js → chunk-jxkrhrp0.js} +2 -2
  188. package/bundle/chunk-jz27ypm5.js +2 -0
  189. package/bundle/chunk-jzrs878d.js +2 -0
  190. package/bundle/chunk-jzx700tb.js +2 -0
  191. package/bundle/chunk-k1x8469r.js +3 -0
  192. package/bundle/{chunk-0g7acwt1.js → chunk-k3g28tbw.js} +1 -1
  193. package/bundle/{chunk-wy3a4cab.js → chunk-k6zwfstj.js} +1 -1
  194. package/bundle/{chunk-0qd3567w.js → chunk-kfj37631.js} +1 -1
  195. package/bundle/{chunk-khzzmyk2.js → chunk-kmzpeq8k.js} +1 -1
  196. package/bundle/{chunk-bd21p9zz.js → chunk-kre93a89.js} +2 -2
  197. package/bundle/{chunk-j8fcfhr2.js → chunk-kry4vcrf.js} +2 -2
  198. package/bundle/chunk-ktp2b4t4.js +2 -0
  199. package/bundle/chunk-m483jvn8.js +2 -0
  200. package/bundle/chunk-makecdh6.js +8 -0
  201. package/bundle/{chunk-tr6rdr6h.js → chunk-mbbxedsq.js} +2 -2
  202. package/bundle/chunk-menbcmkq.js +2 -0
  203. package/bundle/{chunk-hwrrrbqd.js → chunk-mghnkwp8.js} +1 -1
  204. package/bundle/{chunk-pr7z5dj8.js → chunk-mhxyv9c8.js} +1 -1
  205. package/bundle/{chunk-k5q9px67.js → chunk-mjrqhbp2.js} +1 -1
  206. package/bundle/{chunk-9zm6r55d.js → chunk-msh249db.js} +2 -2
  207. package/bundle/{chunk-bbdp6dj4.js → chunk-n0g4983e.js} +1 -1
  208. package/bundle/{chunk-dnsh1v42.js → chunk-n4qxj391.js} +2 -2
  209. package/bundle/{chunk-ptqk1j2r.js → chunk-n5p7cn4w.js} +1 -1
  210. package/bundle/{chunk-5zkj5xv9.js → chunk-n9twhc5d.js} +2 -2
  211. package/bundle/{chunk-p5be5ddp.js → chunk-na1wr2qf.js} +1 -1
  212. package/bundle/{chunk-4agaj51z.js → chunk-nbckdba0.js} +1 -1
  213. package/bundle/{chunk-ezrqhqkp.js → chunk-nftbj8g9.js} +1 -1
  214. package/bundle/{chunk-93gdcrbc.js → chunk-nfzpegqx.js} +1 -1
  215. package/bundle/chunk-np8h66t0.js +2 -0
  216. package/bundle/{chunk-af81r4v7.js → chunk-npzx3yd5.js} +1 -1
  217. package/bundle/chunk-nr2j8ytn.js +3 -0
  218. package/bundle/{chunk-w46g7kdq.js → chunk-nrk29616.js} +2 -2
  219. package/bundle/{chunk-826r9svy.js → chunk-ns8xnkjb.js} +2 -2
  220. package/bundle/{chunk-7vmx8bg9.js → chunk-ntpn0w9m.js} +2 -2
  221. package/bundle/chunk-nwwmns3w.js +2 -0
  222. package/bundle/{chunk-ksme3gj1.js → chunk-p40z6510.js} +1 -1
  223. package/bundle/{chunk-xmb8jy13.js → chunk-p847g35y.js} +1 -1
  224. package/bundle/{chunk-vf492zs6.js → chunk-p8ak162p.js} +1 -1
  225. package/bundle/chunk-pe5dpzec.js +2 -0
  226. package/bundle/{chunk-bbng1cea.js → chunk-pf3nqf00.js} +1 -1
  227. package/bundle/{chunk-9hz56z6a.js → chunk-ppy0jy6j.js} +1 -1
  228. package/bundle/{chunk-et3804wr.js → chunk-prbxhnza.js} +1 -1
  229. package/bundle/{chunk-nrat6ncm.js → chunk-ptwex14s.js} +1 -1
  230. package/bundle/{chunk-qey1efpx.js → chunk-q3pt4p9f.js} +1 -1
  231. package/bundle/{chunk-eb4y8bjv.js → chunk-q6mcnq9p.js} +1 -1
  232. package/bundle/{chunk-vp9scf28.js → chunk-q6p92zyn.js} +2 -2
  233. package/bundle/{chunk-yfzyzsr4.js → chunk-q87fw8dk.js} +2 -2
  234. package/bundle/chunk-q8f6a074.js +2 -0
  235. package/bundle/{chunk-5qsr1q4t.js → chunk-qbrj9wzd.js} +1 -1
  236. package/bundle/{chunk-j0bwa5dk.js → chunk-qdvnscxm.js} +2 -2
  237. package/bundle/{chunk-d6jhs818.js → chunk-qp3hxqg5.js} +2 -2
  238. package/bundle/{chunk-jg1ccs3j.js → chunk-qph2c2v7.js} +1 -1
  239. package/bundle/{chunk-3vvd7j14.js → chunk-qprbef09.js} +1 -1
  240. package/bundle/chunk-qqaevt32.js +2 -0
  241. package/bundle/chunk-qzpvz708.js +2 -0
  242. package/bundle/{chunk-41cq88js.js → chunk-r4kg0z96.js} +2 -2
  243. package/bundle/{chunk-faee8zgc.js → chunk-r73e8gsp.js} +1 -1
  244. package/bundle/chunk-reyjr2e0.js +2 -0
  245. package/bundle/{chunk-dxdggn90.js → chunk-rfzra502.js} +1 -1
  246. package/bundle/{chunk-tg226j37.js → chunk-rhrcgvb8.js} +1 -1
  247. package/bundle/{chunk-wyj8cpx5.js → chunk-rk0fnvp5.js} +1 -1
  248. package/bundle/{chunk-t8c4cs6z.js → chunk-rqedtjz9.js} +1 -1
  249. package/bundle/{chunk-eg3syjtv.js → chunk-s06t769q.js} +2 -2
  250. package/bundle/{chunk-cfjjx3sh.js → chunk-skxg3s8z.js} +1 -1
  251. package/bundle/{chunk-7x6yrtzn.js → chunk-spzd8rev.js} +1 -1
  252. package/bundle/chunk-t178njgb.js +2 -0
  253. package/bundle/{chunk-3jf3jhrs.js → chunk-t4b2fm7z.js} +1 -1
  254. package/bundle/{chunk-55fcmswd.js → chunk-t8sy5sgx.js} +2 -2
  255. package/bundle/{chunk-s4vx9x1v.js → chunk-t9qyzzsz.js} +1 -1
  256. package/bundle/{chunk-6scf311w.js → chunk-tc9xbn1t.js} +1 -1
  257. package/bundle/{chunk-qnvsqnz5.js → chunk-tezrgfc6.js} +2 -2
  258. package/bundle/chunk-tjpev5t6.js +2 -0
  259. package/bundle/{chunk-nymf08b4.js → chunk-tkzctbxq.js} +2 -2
  260. package/bundle/{chunk-t5xxs5kp.js → chunk-ts2k13g0.js} +1 -1
  261. package/bundle/{chunk-gszvgz76.js → chunk-twd6r7nf.js} +2 -2
  262. package/bundle/{chunk-qxcyz5hc.js → chunk-twfvrafb.js} +2 -2
  263. package/bundle/{chunk-70q8qcb2.js → chunk-twvmjsxf.js} +1 -1
  264. package/bundle/{chunk-ggxzf22k.js → chunk-tz3s8dvy.js} +1 -1
  265. package/bundle/chunk-tzq7wjgv.js +3 -0
  266. package/bundle/{chunk-n78f8hfk.js → chunk-v0c3k797.js} +1 -1
  267. package/bundle/chunk-v1s16wwd.js +2 -0
  268. package/bundle/{chunk-kj8cmn7z.js → chunk-v3nmnm57.js} +2 -2
  269. package/bundle/chunk-v6b29nx4.js +2 -0
  270. package/bundle/chunk-v6rgd1j5.js +2 -0
  271. package/bundle/chunk-v9dnetq8.js +2 -0
  272. package/bundle/{chunk-450fef7h.js → chunk-v9w88wpy.js} +2 -2
  273. package/bundle/{chunk-7hvf9dgx.js → chunk-va2qfh0x.js} +1 -1
  274. package/bundle/chunk-vd5mpvcc.js +2 -0
  275. package/bundle/{chunk-w4synhfg.js → chunk-vfb72vdy.js} +1 -1
  276. package/bundle/{chunk-45k7qm85.js → chunk-vhzx5bxd.js} +1 -1
  277. package/bundle/{chunk-cmb62jkt.js → chunk-vjn54xj5.js} +2 -2
  278. package/bundle/{chunk-ybane1en.js → chunk-vp3yf46q.js} +1 -1
  279. package/bundle/{chunk-jyt2xvha.js → chunk-vzrc2fmt.js} +1 -1
  280. package/bundle/{chunk-ejqzcdcx.js → chunk-w3zhy5vq.js} +1 -1
  281. package/bundle/{chunk-v3nqkqhz.js → chunk-w43kmnm9.js} +641 -635
  282. package/bundle/{chunk-w4brava0.js → chunk-wb1d3mqw.js} +1 -1
  283. package/bundle/{chunk-6m9jb0s9.js → chunk-wd8hbven.js} +2 -2
  284. package/bundle/{chunk-vshycswk.js → chunk-wgt1tqw9.js} +1 -1
  285. package/bundle/{chunk-0428v6mw.js → chunk-whw18cn9.js} +1 -1
  286. package/bundle/{chunk-pxm4qvqk.js → chunk-wjz42325.js} +2 -2
  287. package/bundle/{chunk-y67kaj0b.js → chunk-wvb17w0z.js} +1 -1
  288. package/bundle/chunk-wwct4z7j.js +2 -0
  289. package/bundle/{chunk-55ykn8nz.js → chunk-x55h5qdc.js} +4 -4
  290. package/bundle/{chunk-05ck7acg.js → chunk-x80d0zh7.js} +1 -1
  291. package/bundle/{chunk-mjjaezwq.js → chunk-x9fyt3vx.js} +2 -2
  292. package/bundle/{chunk-g22e4gw7.js → chunk-xb3sxa6f.js} +1 -1
  293. package/bundle/{chunk-yz25607t.js → chunk-xcxqt8ag.js} +1 -1
  294. package/bundle/{chunk-c36p881g.js → chunk-xhh70g8j.js} +3 -3
  295. package/bundle/chunk-xr9wz961.js +2 -0
  296. package/bundle/{chunk-0cnwsf8p.js → chunk-y0h3jfkj.js} +1 -1
  297. package/bundle/{chunk-m7ganre7.js → chunk-y2t5pmqw.js} +1 -1
  298. package/bundle/{chunk-g3y5xemb.js → chunk-y5q9v80n.js} +1 -1
  299. package/bundle/{chunk-kdj7xvz7.js → chunk-yd94wz5v.js} +2 -2
  300. package/bundle/{chunk-rn043d0r.js → chunk-yjqww6ag.js} +2 -2
  301. package/bundle/{chunk-2drzgtv3.js → chunk-yxttz5z5.js} +2 -2
  302. package/bundle/{chunk-2nv1scj9.js → chunk-yy7r3t3w.js} +2 -2
  303. package/bundle/{chunk-5pwv2p3s.js → chunk-yzpc5kj2.js} +1 -1
  304. package/bundle/{chunk-73r8bjjz.js → chunk-z6kcnpsj.js} +2 -2
  305. package/bundle/{chunk-nj1ntakd.js → chunk-z744mz4w.js} +2 -2
  306. package/bundle/{chunk-39z96pc6.js → chunk-z7kswv9r.js} +3 -3
  307. package/bundle/chunk-zfegnt1e.js +2 -0
  308. package/bundle/chunk-zg7kesbp.js +2 -0
  309. package/bundle/{chunk-t9pwz4ws.js → chunk-znmbfx70.js} +1 -1
  310. package/bundle/{chunk-24ygjbpf.js → chunk-zp5sr5nx.js} +2 -2
  311. package/bundle/{chunk-ha1w0xzh.js → chunk-zrhw1szj.js} +1 -1
  312. package/bundle/chunk-zy06fe4r.js +2 -0
  313. package/bundle/index.js +3 -3
  314. package/bundle/parser.worker.js +2 -2
  315. package/bundle/worker.js +1 -1
  316. package/package.json +1 -1
  317. package/bundle/chunk-03bp59wq.js +0 -2
  318. package/bundle/chunk-0ppnq3a4.js +0 -2
  319. package/bundle/chunk-0te0vcdn.js +0 -2
  320. package/bundle/chunk-11h06z17.js +0 -2
  321. package/bundle/chunk-28yv4fqe.js +0 -2
  322. package/bundle/chunk-34a52hyr.js +0 -2
  323. package/bundle/chunk-3n3gb3vd.js +0 -2
  324. package/bundle/chunk-3sq60y9f.js +0 -2
  325. package/bundle/chunk-49mbnqvc.js +0 -2
  326. package/bundle/chunk-4fr6kae9.js +0 -2
  327. package/bundle/chunk-516w1nc4.js +0 -2
  328. package/bundle/chunk-535nm66j.js +0 -2
  329. package/bundle/chunk-5kpxpm8e.js +0 -2
  330. package/bundle/chunk-5nm5s0h2.js +0 -2
  331. package/bundle/chunk-5ysbwr4x.js +0 -3
  332. package/bundle/chunk-6gpf2bjs.js +0 -2
  333. package/bundle/chunk-6sxx56b2.js +0 -2
  334. package/bundle/chunk-6t48g4x5.js +0 -2
  335. package/bundle/chunk-7bgzcpdw.js +0 -2
  336. package/bundle/chunk-7kjvcbwa.js +0 -2
  337. package/bundle/chunk-89b4k585.js +0 -2
  338. package/bundle/chunk-8jma2btf.js +0 -2
  339. package/bundle/chunk-93e0w75z.js +0 -2
  340. package/bundle/chunk-97gp818s.js +0 -2
  341. package/bundle/chunk-98b7ecrk.js +0 -2
  342. package/bundle/chunk-9epf2zbh.js +0 -2
  343. package/bundle/chunk-acpjrs02.js +0 -2
  344. package/bundle/chunk-agv04nt7.js +0 -2
  345. package/bundle/chunk-be7smmar.js +0 -2
  346. package/bundle/chunk-bryx5cx9.js +0 -2
  347. package/bundle/chunk-c13rrw41.js +0 -2
  348. package/bundle/chunk-c2kkv619.js +0 -2
  349. package/bundle/chunk-c5xj1y5v.js +0 -2
  350. package/bundle/chunk-ckpm4dvv.js +0 -2
  351. package/bundle/chunk-ct8twng1.js +0 -2
  352. package/bundle/chunk-d38y7bvh.js +0 -2
  353. package/bundle/chunk-d6hxsfm6.js +0 -2
  354. package/bundle/chunk-descb9jz.js +0 -2
  355. package/bundle/chunk-dvr2b9r1.js +0 -2
  356. package/bundle/chunk-ea5fktnn.js +0 -2
  357. package/bundle/chunk-f0t7rryn.js +0 -3
  358. package/bundle/chunk-f4mf6tpp.js +0 -2
  359. package/bundle/chunk-f97k17t8.js +0 -2
  360. package/bundle/chunk-g4ehhdzp.js +0 -2
  361. package/bundle/chunk-gd6qpdjw.js +0 -2
  362. package/bundle/chunk-gehn9fd9.js +0 -2
  363. package/bundle/chunk-h5pnng66.js +0 -2
  364. package/bundle/chunk-hgmqz75r.js +0 -2
  365. package/bundle/chunk-hhax4mxw.js +0 -2
  366. package/bundle/chunk-jvkzdap1.js +0 -2
  367. package/bundle/chunk-kf2f3mza.js +0 -2
  368. package/bundle/chunk-kg8fcv91.js +0 -2
  369. package/bundle/chunk-kgptyf7n.js +0 -3
  370. package/bundle/chunk-kjjjrjnb.js +0 -2
  371. package/bundle/chunk-kn8w69g9.js +0 -8
  372. package/bundle/chunk-kxwkab31.js +0 -2
  373. package/bundle/chunk-m5cfmhwh.js +0 -2
  374. package/bundle/chunk-m7qxxbns.js +0 -2
  375. package/bundle/chunk-mh19kwzw.js +0 -10
  376. package/bundle/chunk-mtpzcc14.js +0 -2
  377. package/bundle/chunk-n8wg5h5p.js +0 -2
  378. package/bundle/chunk-p6hcj3kv.js +0 -2
  379. package/bundle/chunk-pexmns0j.js +0 -2
  380. package/bundle/chunk-pt603np4.js +0 -2
  381. package/bundle/chunk-qk5bfcv8.js +0 -2
  382. package/bundle/chunk-qr06byhp.js +0 -2
  383. package/bundle/chunk-r1xh50b2.js +0 -5
  384. package/bundle/chunk-r7sq3maz.js +0 -2
  385. package/bundle/chunk-rmgs9nmj.js +0 -2
  386. package/bundle/chunk-rrd0fdra.js +0 -2
  387. package/bundle/chunk-rytavefg.js +0 -2
  388. package/bundle/chunk-sf5zc4kc.js +0 -2
  389. package/bundle/chunk-sh9vjnsh.js +0 -2
  390. package/bundle/chunk-st0c5wwc.js +0 -2
  391. package/bundle/chunk-teb3k2sf.js +0 -2
  392. package/bundle/chunk-ts798jvf.js +0 -2
  393. package/bundle/chunk-tx5aj02v.js +0 -2
  394. package/bundle/chunk-ty2vg1a5.js +0 -2
  395. package/bundle/chunk-v1t51rrq.js +0 -2
  396. package/bundle/chunk-vh9ptqn0.js +0 -2
  397. package/bundle/chunk-vwh6mv37.js +0 -2
  398. package/bundle/chunk-w2cb8cry.js +0 -2
  399. package/bundle/chunk-w72rctxz.js +0 -2
  400. package/bundle/chunk-wbw9zv3h.js +0 -2
  401. package/bundle/chunk-x6mw98c2.js +0 -2
  402. package/bundle/chunk-xy3c8f1h.js +0 -3
  403. package/bundle/chunk-xynwfaf1.js +0 -3
  404. package/bundle/chunk-y6p57wgh.js +0 -2
  405. package/bundle/chunk-y6xs8v17.js +0 -2
  406. package/bundle/chunk-yv5aehqq.js +0 -2
  407. package/bundle/chunk-z3xsfpc6.js +0 -2
  408. package/bundle/chunk-zgcabs1k.js +0 -2
  409. package/bundle/chunk-zn5pw733.js +0 -2
  410. package/bundle/chunk-zxwvnmea.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ee as Ij}from"./chunk-dnsh1v42.js";import{Ie as hj}from"./chunk-gszvgz76.js";import{Je as Oj}from"./chunk-68v3b6ns.js";import{Ke as _j,Le as vj,Me as $j}from"./chunk-bne5w117.js";import{Ne as mj}from"./chunk-j0bwa5dk.js";import{Ff as Rj,Gf as Pj,Hf as Tj,If as Aj,Jf as Dj}from"./chunk-2drzgtv3.js";import"./chunk-r9w0thdk.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
2
+ import{Fe as Ij}from"./chunk-n4qxj391.js";import{Je as hj}from"./chunk-twd6r7nf.js";import{Ke as Oj}from"./chunk-3xdmxm5t.js";import{Le as _j,Me as vj,Ne as $j}from"./chunk-9xxnwb33.js";import{Oe as mj}from"./chunk-qdvnscxm.js";import{Gf as Rj,Hf as Pj,If as Tj,Jf as Aj,Kf as Dj}from"./chunk-yxttz5z5.js";import"./chunk-f2pv705d.js";var Z=$j(),T=vj(),X=Pj(),Y=Tj(),w=Aj(),A=mj(),G=_j(),a=Rj(),S=Ij(),U=Dj(),r=Oj(),uj=hj(),lj=async(j,B,K)=>{return{operation:X.getSmithyContext(B).operation,region:await X.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function dj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:j.region},propertiesExtractor:(B,K)=>({signingProperties:{config:B,context:K}})}}function Cj(j){return{schemeId:"smithy.api#noAuth"}}var Ej=(j)=>{let B=[];switch(j.operation){case"CreateToken":{B.push(Cj());break}default:B.push(dj(j))}return B},xj=(j)=>{let B=S.resolveAwsSdkSigV4Config(j);return Object.assign(B,{authSchemePreference:X.normalizeProvider(j.authSchemePreference??[])})},aj=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},Sj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fj="3.997.14",gj={version:fj},k="ref",q=-1,R=!0,p="isSet",o="PartitionResult",P="booleanEquals",E="getAttr",c={[k]:"Endpoint"},x={[k]:o},z={},t=[{[k]:"Region"}],i={conditions:[[p,[c]],[p,t],["aws.partition",t,o],[P,[{[k]:"UseFIPS"},R]],[P,[{[k]:"UseDualStack"},R]],[P,[{fn:E,argv:[x,"supportsDualStack"]},R]],[P,[{fn:E,argv:[x,"supportsFIPS"]},R]],["stringEquals",[{fn:E,argv:[x,"name"]},"aws-us-gov"]]],results:[[q],[q,"Invalid Configuration: FIPS and custom endpoint are not supported"],[q,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[c,z],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",z],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",z],[q,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",z],[q,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",z],[q,"Invalid Configuration: Missing Region"]]},sj=2,W=1e8,rj=new Int32Array([-1,1,-1,0,13,3,1,4,W+12,2,5,W+12,3,8,6,4,7,W+11,5,W+9,W+10,4,11,9,6,10,W+8,7,W+6,W+7,5,12,W+5,6,W+4,W+5,3,W+1,14,4,W+2,W+3]),pj=w.BinaryDecisionDiagram.from(rj,sj,i.conditions,i.results),cj=new w.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tj=(j,B={})=>{return cj.get(j,()=>w.decideEndpoint(pj,{endpointParams:j,logger:B.logger}))};w.customEndpointFunctions.aws=Z.awsEndpointFunctions;class Q extends X.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,Q.prototype)}}class D extends Q{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(j){super({name:"AccessDeniedException",$fault:"client",...j});Object.setPrototypeOf(this,D.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class m extends Q{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(j){super({name:"AuthorizationPendingException",$fault:"client",...j});Object.setPrototypeOf(this,m.prototype),this.error=j.error,this.error_description=j.error_description}}class _ extends Q{name="ExpiredTokenException";$fault="client";error;error_description;constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,_.prototype),this.error=j.error,this.error_description=j.error_description}}class v extends Q{name="InternalServerException";$fault="server";error;error_description;constructor(j){super({name:"InternalServerException",$fault:"server",...j});Object.setPrototypeOf(this,v.prototype),this.error=j.error,this.error_description=j.error_description}}class $ extends Q{name="InvalidClientException";$fault="client";error;error_description;constructor(j){super({name:"InvalidClientException",$fault:"client",...j});Object.setPrototypeOf(this,$.prototype),this.error=j.error,this.error_description=j.error_description}}class I extends Q{name="InvalidGrantException";$fault="client";error;error_description;constructor(j){super({name:"InvalidGrantException",$fault:"client",...j});Object.setPrototypeOf(this,I.prototype),this.error=j.error,this.error_description=j.error_description}}class O extends Q{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(j){super({name:"InvalidRequestException",$fault:"client",...j});Object.setPrototypeOf(this,O.prototype),this.error=j.error,this.reason=j.reason,this.error_description=j.error_description}}class h extends Q{name="InvalidScopeException";$fault="client";error;error_description;constructor(j){super({name:"InvalidScopeException",$fault:"client",...j});Object.setPrototypeOf(this,h.prototype),this.error=j.error,this.error_description=j.error_description}}class u extends Q{name="SlowDownException";$fault="client";error;error_description;constructor(j){super({name:"SlowDownException",$fault:"client",...j});Object.setPrototypeOf(this,u.prototype),this.error=j.error,this.error_description=j.error_description}}class l extends Q{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(j){super({name:"UnauthorizedClientException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype),this.error=j.error,this.error_description=j.error_description}}class d extends Q{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(j){super({name:"UnsupportedGrantTypeException",$fault:"client",...j});Object.setPrototypeOf(this,d.prototype),this.error=j.error,this.error_description=j.error_description}}var ij="AccessDeniedException",oj="AuthorizationPendingException",ej="AccessToken",nj="ClientSecret",jB="CreateToken",BB="CreateTokenRequest",FB="CreateTokenResponse",JB="CodeVerifier",KB="ExpiredTokenException",LB="InvalidClientException",QB="InvalidGrantException",WB="InvalidRequestException",XB="InternalServerException",YB="InvalidScopeException",ZB="IdToken",NB="RefreshToken",MB="SlowDownException",bB="UnauthorizedClientException",VB="UnsupportedGrantTypeException",HB="accessToken",H="client",qB="clientId",zB="clientSecret",UB="codeVerifier",wB="code",GB="deviceCode",F="error",kB="expiresIn",b="error_description",yB="grantType",RB="http",V="httpError",PB="idToken",e="reason",n="refreshToken",TB="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",AB="scope",DB="server",mB="tokenType",J="com.amazonaws.ssooidc",Bj=a.TypeRegistry.for(jj),Fj=[-3,jj,"SSOOIDCServiceException",0,[],[]];Bj.registerError(Fj,Q);var N=a.TypeRegistry.for(J),Jj=[-3,J,ij,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Jj,D);var Kj=[-3,J,oj,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Kj,m);var Lj=[-3,J,KB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Lj,_);var Qj=[-3,J,XB,{[F]:DB,[V]:500},[F,b],[0,0]];N.registerError(Qj,v);var Wj=[-3,J,LB,{[F]:H,[V]:401},[F,b],[0,0]];N.registerError(Wj,$);var Xj=[-3,J,QB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Xj,I);var Yj=[-3,J,WB,{[F]:H,[V]:400},[F,e,b],[0,0,0]];N.registerError(Yj,O);var Zj=[-3,J,YB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Zj,h);var Nj=[-3,J,MB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Nj,u);var Mj=[-3,J,bB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(Mj,l);var bj=[-3,J,VB,{[F]:H,[V]:400},[F,b],[0,0]];N.registerError(bj,d);var Vj=[Bj,N],_B=[0,J,ej,8,0],vB=[0,J,nj,8,0],$B=[0,J,JB,8,0],IB=[0,J,ZB,8,0],Hj=[0,J,NB,8,0],qj=[3,J,BB,0,[qB,zB,yB,GB,wB,n,AB,TB,UB],[0,[()=>vB,0],0,0,0,[()=>Hj,0],64,0,[()=>$B,0]],3],zj=[3,J,FB,0,[HB,mB,kB,n,PB],[[()=>_B,0],0,1,[()=>Hj,0],[()=>IB,0]]],Uj=[9,J,jB,{[RB]:["POST","/token",200]},()=>qj,()=>zj],OB=(j)=>{return{apiVersion:"2019-06-10",base64Decoder:j?.base64Decoder??U.fromBase64,base64Encoder:j?.base64Encoder??U.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??tj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??Ej,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(B)=>B.getIdentityProvider("aws.auth#sigv4"),signer:new S.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(B)=>B.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new T.NoAuthSigner}],logger:j?.logger??new X.NoOpLogger,protocol:j?.protocol??uj.AwsRestJsonProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:Vj,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:j?.serviceId??"SSO OIDC",urlParser:j?.urlParser??A.parseUrl,utf8Decoder:j?.utf8Decoder??U.fromUtf8,utf8Encoder:j?.utf8Encoder??U.toUtf8}},hB=(j)=>{X.emitWarningIfUnsupportedVersion(process.version);let B=Y.resolveDefaultsModeConfig(j),K=()=>B().then(X.loadConfigsForDefaultMode),M=OB(j);Z.emitWarningIfUnsupportedVersion(process.version);let L={profile:j?.profile,logger:M.logger};return{...M,...j,runtime:"node",defaultsMode:B,authSchemePreference:j?.authSchemePreference??Y.loadConfig(S.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,L),bodyLengthChecker:j?.bodyLengthChecker??U.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Z.createDefaultUserAgentProvider({serviceId:M.serviceId,clientVersion:gj.version}),maxAttempts:j?.maxAttempts??Y.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??Y.loadConfig(Y.NODE_REGION_CONFIG_OPTIONS,{...Y.NODE_REGION_CONFIG_FILE_OPTIONS,...L}),requestHandler:r.NodeHttpHandler.create(j?.requestHandler??K),retryMode:j?.retryMode??Y.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||G.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??U.Hash.bind(null,"sha256"),streamCollector:j?.streamCollector??r.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??Y.loadConfig(Y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,L),useFipsEndpoint:j?.useFipsEndpoint??Y.loadConfig(Y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,L),userAgentAppId:j?.userAgentAppId??Y.loadConfig(Z.NODE_APP_ID_CONFIG_OPTIONS,L)}},uB=(j)=>{let{httpAuthSchemes:B,httpAuthSchemeProvider:K,credentials:M}=j;return{setHttpAuthScheme(L){let y=B.findIndex((C)=>C.schemeId===L.schemeId);if(y===-1)B.push(L);else B.splice(y,1,L)},httpAuthSchemes(){return B},setHttpAuthSchemeProvider(L){K=L},httpAuthSchemeProvider(){return K},setCredentials(L){M=L},credentials(){return M}}},lB=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},dB=(j,B)=>{let K=Object.assign(Z.getAwsRegionExtensionConfiguration(j),X.getDefaultExtensionConfiguration(j),A.getHttpHandlerExtensionConfiguration(j),uB(j));return B.forEach((M)=>M.configure(K)),Object.assign(j,Z.resolveAwsRegionExtensionConfiguration(K),X.resolveDefaultRuntimeConfig(K),A.resolveHttpHandlerRuntimeConfig(K),lB(K))};class f extends X.Client{config;constructor(...[j]){let B=hB(j||{});super(B);this.initConfig=B;let K=aj(B),M=Z.resolveUserAgentConfig(K),L=G.resolveRetryConfig(M),y=Y.resolveRegionConfig(L),C=Z.resolveHostHeaderConfig(y),wj=w.resolveEndpointConfig(C),Gj=xj(wj),kj=dB(Gj,j?.extensions||[]);this.config=kj,this.middlewareStack.use(a.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Z.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(A.getContentLengthPlugin(this.config)),this.middlewareStack.use(Z.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Z.getLoggerPlugin(this.config)),this.middlewareStack.use(Z.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(T.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lj,identityProviderConfigProvider:async(yj)=>new T.DefaultIdentityProviderConfig({"aws.auth#sigv4":yj.credentials})})),this.middlewareStack.use(T.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class g extends X.Command.classBuilder().ep(Sj).m(function(j,B,K,M){return[w.getEndpointPlugin(K,j.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Uj).build(){}var CB={CreateTokenCommand:g};class s extends f{}X.createAggregatedClient(CB,s);var EB={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},xB={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};var{Command:aB,Client:SB}=X,fB=D,gB=Jj,sB=EB,rB=m,pB=Kj,cB=Uj,tB=g,iB=qj,oB=zj,eB=_,nB=Lj,jF=v,BF=Qj,FF=$,JF=Wj,KF=I,LF=Xj,QF=O,WF=Yj,XF=xB,YF=h,ZF=Zj,NF=s,MF=f,bF=Q,VF=Fj,HF=u,qF=Nj,zF=l,UF=Mj,wF=d,GF=bj,kF=Vj;export{kF as errorTypeRegistries,SB as __Client,GF as UnsupportedGrantTypeException$,wF as UnsupportedGrantTypeException,UF as UnauthorizedClientException$,zF as UnauthorizedClientException,qF as SlowDownException$,HF as SlowDownException,VF as SSOOIDCServiceException$,bF as SSOOIDCServiceException,MF as SSOOIDCClient,NF as SSOOIDC,ZF as InvalidScopeException$,YF as InvalidScopeException,XF as InvalidRequestExceptionReason,WF as InvalidRequestException$,QF as InvalidRequestException,LF as InvalidGrantException$,KF as InvalidGrantException,JF as InvalidClientException$,FF as InvalidClientException,BF as InternalServerException$,jF as InternalServerException,nB as ExpiredTokenException$,eB as ExpiredTokenException,oB as CreateTokenResponse$,iB as CreateTokenRequest$,tB as CreateTokenCommand,cB as CreateToken$,pB as AuthorizationPendingException$,rB as AuthorizationPendingException,sB as AccessDeniedExceptionReason,gB as AccessDeniedException$,fB as AccessDeniedException,aB as $Command};export default {get errorTypeRegistries(){return kF},get __Client(){return SB},get UnsupportedGrantTypeException$(){return GF},get UnsupportedGrantTypeException(){return wF},get UnauthorizedClientException$(){return UF},get UnauthorizedClientException(){return zF},get SlowDownException$(){return qF},get SlowDownException(){return HF},get SSOOIDCServiceException$(){return VF},get SSOOIDCServiceException(){return bF},get SSOOIDCClient(){return MF},get SSOOIDC(){return NF},get InvalidScopeException$(){return ZF},get InvalidScopeException(){return YF},get InvalidRequestExceptionReason(){return XF},get InvalidRequestException$(){return WF},get InvalidRequestException(){return QF},get InvalidGrantException$(){return LF},get InvalidGrantException(){return KF},get InvalidClientException$(){return JF},get InvalidClientException(){return FF},get InternalServerException$(){return BF},get InternalServerException(){return jF},get ExpiredTokenException$(){return nB},get ExpiredTokenException(){return eB},get CreateTokenResponse$(){return oB},get CreateTokenRequest$(){return iB},get CreateTokenCommand(){return tB},get CreateToken$(){return cB},get AuthorizationPendingException$(){return pB},get AuthorizationPendingException(){return rB},get AccessDeniedExceptionReason(){return sB},get AccessDeniedException$(){return gB},get AccessDeniedException(){return fB},get $Command(){return aB}};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Me as w}from"./chunk-bne5w117.js";import{Ne as oe}from"./chunk-j0bwa5dk.js";import{Hf as l}from"./chunk-2drzgtv3.js";import{sO as i,wO as f}from"./chunk-r9w0thdk.js";var g=i(l(),1);var ce=i(l(),1);var O=i(w(),1),S=i(l(),1);var q=i(w(),1),b=i(l(),1),j=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-x6mw98c2.js"),{fromContainerMetadata:c}=await import("./chunk-516w1nc4.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>b.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-516w1nc4.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-6gpf2bjs.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new b.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>q.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var G=(e,{profile:s="default",logger:t}={})=>{return Boolean(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&&(re(e,{profile:s,logger:t})||ae(e,{profile:s,logger:t}))},re=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ae=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},J=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:o}=await import("./chunk-has2rz35.js");t.roleAssumer=o({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new S.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${S.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},U(s[h]??{})):(await j(c.credential_source,e,t.logger)(t))();if(U(c))return T.then((o)=>O.setCredentialFeature(o,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let o={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new S.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});o.SerialNumber=u,o.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,o).then((k)=>O.setCredentialFeature(k,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},U=(e)=>{return!e.role_arn&&!!e.credential_source};var z=i(w(),1);var Y=i(w(),1),x=i(l(),1);var d=i(l(),1),v=i(oe(),1);import{createHash as ie,createPrivateKey as he,createPublicKey as ye,sign as ue}from"crypto";import{promises as R}from"fs";import{homedir as de}from"os";import{dirname as we,join as N}from"path";class K{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new d.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=K.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-xdd3553a.js"),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((o)=>{return o?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let o=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:k}=o.tokenOutput?.accessToken??{},{refreshToken:E,expiresIn:B}=o.tokenOutput??{};if(!u||!y||!k||!E)throw new d.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(B??900)*1000,m=new Date(Date.now()+A),H={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:k,expiresAt:m.toISOString()},refreshToken:E};await this.saveToken(H);let _=H.accessToken;return{accessKeyId:_.accessKeyId,secretAccessKey:_.secretAccessKey,sessionToken:_.sessionToken,accountId:_.accountId,expiration:m}}catch(o){if(o.name==="AccessDeniedException"){let u=o.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(o)}. Please re-authenticate using \`aws login\``}throw new d.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new d.CredentialsProviderError(`Failed to refresh token: ${String(o)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await d.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await R.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new d.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new d.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=we(s);try{await R.mkdir(t,{recursive:!0})}catch(n){}await R.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??N(de(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=ie("sha256").update(s).digest("hex");return N(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(v.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=he({key:t.dpopKey,format:"pem",type:"sec1"}),a=ye(n).export({format:"der",type:"spki"}),c=-1;for(let m=0;m<a.length;m++)if(a[m]===4){c=m;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},o={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(o)).toString("base64url"),k=`${u}.${y}`,E=ue("sha256",Buffer.from(k),n),A=this.derToRawSignature(E).toString("base64url");return`${k}.${A}`}catch(n){throw new d.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var W=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await x.parseKnownFiles(e||{}),n=x.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new x.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new K(r,e,s).loadCredentials();return Y.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var C=(e)=>{return Boolean(e&&e.login_session)},X=async(e,s,t)=>{let n=await W({...s,profile:e})({callerClientConfig:t});return z.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var Q=i(w(),1),V=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",Z=async(e,s)=>import("./chunk-0te0vcdn.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>Q.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var D=i(w(),1),M=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-r7sq3maz.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},p=(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");var ee=i(w(),1),$=(e)=>Boolean(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,P=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let 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}};return ee.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var te=i(w(),1),se=(e)=>Boolean(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,ne=async(e,s,t)=>import("./chunk-f4mf6tpp.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>te.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var F=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&$(c))return P(c,t);if(a||G(c,{profile:e,logger:t.logger}))return J(e,s,t,n,r,F);if($(c))return P(c,t);if(se(c))return ne(c,t,n);if(V(c))return Z(t,e);if(p(c))return await M(e,c,t,n);if(C(c))return X(e,t,n);throw new ce.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var je=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return F(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{W as ge,je as he};
2
+ import{Ne as w}from"./chunk-9xxnwb33.js";import{Oe as oe}from"./chunk-qdvnscxm.js";import{If as l}from"./chunk-yxttz5z5.js";import{SP as i,WP as f}from"./chunk-f2pv705d.js";var g=i(l(),1);var ce=i(l(),1);var O=i(w(),1),S=i(l(),1);var q=i(w(),1),b=i(l(),1),j=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-efe6kj3d.js"),{fromContainerMetadata:c}=await import("./chunk-2y87m7pe.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>b.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-2y87m7pe.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-bbzjdbb9.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new b.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>q.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var G=(e,{profile:s="default",logger:t}={})=>{return Boolean(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&&(re(e,{profile:s,logger:t})||ae(e,{profile:s,logger:t}))},re=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ae=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},J=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:o}=await import("./chunk-h7658zxy.js");t.roleAssumer=o({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new S.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${S.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},U(s[h]??{})):(await j(c.credential_source,e,t.logger)(t))();if(U(c))return T.then((o)=>O.setCredentialFeature(o,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let o={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new S.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});o.SerialNumber=u,o.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,o).then((k)=>O.setCredentialFeature(k,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},U=(e)=>{return!e.role_arn&&!!e.credential_source};var z=i(w(),1);var Y=i(w(),1),x=i(l(),1);var d=i(l(),1),v=i(oe(),1);import{createHash as ie,createPrivateKey as he,createPublicKey as ye,sign as ue}from"crypto";import{promises as R}from"fs";import{homedir as de}from"os";import{dirname as we,join as N}from"path";class K{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new d.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=K.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-dw7yrk1g.js"),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((o)=>{return o?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let o=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:k}=o.tokenOutput?.accessToken??{},{refreshToken:E,expiresIn:B}=o.tokenOutput??{};if(!u||!y||!k||!E)throw new d.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(B??900)*1000,m=new Date(Date.now()+A),H={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:k,expiresAt:m.toISOString()},refreshToken:E};await this.saveToken(H);let _=H.accessToken;return{accessKeyId:_.accessKeyId,secretAccessKey:_.secretAccessKey,sessionToken:_.sessionToken,accountId:_.accountId,expiration:m}}catch(o){if(o.name==="AccessDeniedException"){let u=o.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(o)}. Please re-authenticate using \`aws login\``}throw new d.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new d.CredentialsProviderError(`Failed to refresh token: ${String(o)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await d.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await R.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new d.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new d.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=we(s);try{await R.mkdir(t,{recursive:!0})}catch(n){}await R.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??N(de(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=ie("sha256").update(s).digest("hex");return N(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(v.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=he({key:t.dpopKey,format:"pem",type:"sec1"}),a=ye(n).export({format:"der",type:"spki"}),c=-1;for(let m=0;m<a.length;m++)if(a[m]===4){c=m;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},o={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(o)).toString("base64url"),k=`${u}.${y}`,E=ue("sha256",Buffer.from(k),n),A=this.derToRawSignature(E).toString("base64url");return`${k}.${A}`}catch(n){throw new d.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var W=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await x.parseKnownFiles(e||{}),n=x.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new x.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new K(r,e,s).loadCredentials();return Y.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var C=(e)=>{return Boolean(e&&e.login_session)},X=async(e,s,t)=>{let n=await W({...s,profile:e})({callerClientConfig:t});return z.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var Q=i(w(),1),V=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",Z=async(e,s)=>import("./chunk-bbwcsdy9.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>Q.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var D=i(w(),1),M=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-m483jvn8.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return D.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},p=(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");var ee=i(w(),1),$=(e)=>Boolean(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,P=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let 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}};return ee.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var te=i(w(),1),se=(e)=>Boolean(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,ne=async(e,s,t)=>import("./chunk-dmd101ja.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>te.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var F=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&$(c))return P(c,t);if(a||G(c,{profile:e,logger:t.logger}))return J(e,s,t,n,r,F);if($(c))return P(c,t);if(se(c))return ne(c,t,n);if(V(c))return Z(t,e);if(p(c))return await M(e,c,t,n);if(C(c))return X(e,t,n);throw new ce.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var je=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return F(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{W as he,je as ie};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{uO as k}from"./chunk-r9w0thdk.js";var GY={};k(GY,{pipeArguments:()=>o,Prototype:()=>$M,Mixin:()=>fp,Class:()=>G5});var o=(X,Q)=>{switch(Q.length){case 0:return X;case 1:return Q[0](X);case 2:return Q[1](Q[0](X));case 3:return Q[2](Q[1](Q[0](X)));case 4:return Q[3](Q[2](Q[1](Q[0](X))));case 5:return Q[4](Q[3](Q[2](Q[1](Q[0](X)))));case 6:return Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))));case 7:return Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))));case 8:return Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))))));case 9:return Q[8](Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))))));default:{let Y=X;for(let G=0,J=Q.length;G<J;G++)Y=Q[G](Y);return Y}}},$M={pipe(){return o(this,arguments)}},G5=function(){function X(){}return X.prototype=$M,X}(),fp=(X)=>class extends X{pipe(){return o(this,arguments)}};var H_={};k(H_,{untupled:()=>ap,tupled:()=>rp,satisfies:()=>op,pipe:()=>U6,memoize:()=>b1,identity:()=>C,hole:()=>sp,flow:()=>QX,flip:()=>ip,dual:()=>W,constant:()=>I0,constVoid:()=>y8,constUndefined:()=>D6,constTrue:()=>r1,constNull:()=>qG,constFalse:()=>U7,compose:()=>np,cast:()=>ZM,apply:()=>lp,absurd:()=>HM,SK:()=>tp});var W=function(X,Q){if(typeof X==="function")return function(){return X(arguments)?Q.apply(this,arguments):(Y)=>Q(Y,...arguments)};switch(X){case 0:case 1:throw RangeError(`Invalid arity ${X}`);case 2:return function(Y,G){if(arguments.length>=2)return Q(Y,G);return function(J){return Q(J,Y)}};case 3:return function(Y,G,J){if(arguments.length>=3)return Q(Y,G,J);return function($){return Q($,Y,G)}};default:return function(){if(arguments.length>=X)return Q.apply(this,arguments);let Y=arguments;return function(G){return Q(G,...Y)}}}},lp=(X)=>(Q)=>Q(X),C=(X)=>X,op=()=>(X)=>X,ZM=C,I0=(X)=>()=>X,r1=I0(!0),U7=I0(!1),qG=I0(null),D6=I0(void 0),y8=D6,ip=(X)=>(...Q)=>(...Y)=>X(...Y)(...Q),np=W(2,(X,Q)=>(Y)=>Q(X(Y))),HM=(X)=>{throw Error("Called `absurd` function which should be uncallable")},rp=(X)=>(Q)=>X(...Q),ap=(X)=>(...Q)=>X(Q);function U6(X,...Q){return o(X,Q)}function QX(X,Q,Y,G,J,$,Z,H,K){switch(arguments.length){case 1:return X;case 2:return function(){return Q(X.apply(this,arguments))};case 3:return function(){return Y(Q(X.apply(this,arguments)))};case 4:return function(){return G(Y(Q(X.apply(this,arguments))))};case 5:return function(){return J(G(Y(Q(X.apply(this,arguments)))))};case 6:return function(){return $(J(G(Y(Q(X.apply(this,arguments))))))};case 7:return function(){return Z($(J(G(Y(Q(X.apply(this,arguments)))))))};case 8:return function(){return H(Z($(J(G(Y(Q(X.apply(this,arguments))))))))};case 9:return function(){return K(H(Z($(J(G(Y(Q(X.apply(this,arguments)))))))))}}return}var sp=ZM(HM),tp=(X,Q)=>Q;function b1(X){let Q=new WeakMap;return(Y)=>{if(Q.has(Y))return Q.get(Y);let G=X(Y);return Q.set(Y,G),G}}var s0={};k(s0,{xor:()=>Nc,some:()=>Mc,or:()=>Oc,not:()=>qc,nor:()=>Lc,nand:()=>wc,mapInput:()=>ep,isUnknown:()=>wZ,isUndefined:()=>B_,isUint8Array:()=>Wc,isTupleOfAtLeast:()=>W_,isTupleOf:()=>K_,isTruthy:()=>Xc,isTagged:()=>P1,isSymbol:()=>JY,isString:()=>b8,isSet:()=>Qc,isRegExp:()=>D_,isReadonlyObject:()=>Hc,isPropertyKey:()=>zG,isPromiseLike:()=>Vc,isPromise:()=>Bc,isObjectOrArray:()=>Zc,isObjectKeyword:()=>AZ,isObject:()=>h1,isNumber:()=>M9,isNullish:()=>$c,isNull:()=>Gc,isNotUndefined:()=>M1,isNotNullish:()=>NG,isNotNull:()=>Jc,isNever:()=>V_,isMap:()=>Yc,isIterable:()=>T9,isFunction:()=>g1,isError:()=>Kc,isDate:()=>__,isBoolean:()=>P9,isBigInt:()=>OG,implies:()=>Fc,hasProperty:()=>P,every:()=>Ac,eqv:()=>Rc,compose:()=>_c,and:()=>zc,Tuple:()=>Dc,Struct:()=>Uc});var ep=W(2,(X,Q)=>(Y)=>X(Q(Y))),K_=W(2,(X,Q)=>X.length===Q),W_=W(2,(X,Q)=>X.length>=Q);function Xc(X){return!!X}function Qc(X){return X instanceof Set}function Yc(X){return X instanceof Map}function b8(X){return typeof X==="string"}function M9(X){return typeof X==="number"}function P9(X){return typeof X==="boolean"}function OG(X){return typeof X==="bigint"}function JY(X){return typeof X==="symbol"}function zG(X){return b8(X)||M9(X)||JY(X)}function g1(X){return typeof X==="function"}function B_(X){return X===void 0}function M1(X){return X!==void 0}function Gc(X){return X===null}function Jc(X){return X!==null}function $c(X){return X===null||X===void 0}function NG(X){return X!=null}function V_(X){return!1}function wZ(X){return!0}function Zc(X){return typeof X==="object"&&X!==null}function h1(X){return typeof X==="object"&&X!==null&&!Array.isArray(X)}function Hc(X){return h1(X)}function AZ(X){return typeof X==="object"&&X!==null||g1(X)}var P=W(2,(X,Q)=>AZ(X)&&(Q in X)),P1=W(2,(X,Q)=>P(X,"_tag")&&X._tag===Q);function Kc(X){return X instanceof Error}function Wc(X){return X instanceof Uint8Array}function __(X){return X instanceof Date}function T9(X){return P(X,Symbol.iterator)||b8(X)}function Bc(X){return P(X,"then")&&"catch"in X&&g1(X.then)&&g1(X.catch)}function Vc(X){return P(X,"then")&&g1(X.then)}function D_(X){return X instanceof RegExp}var _c=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y));function Dc(X){return(Q)=>{for(let Y=0;Y<X.length;Y++)if(X[Y](Q[Y])===!1)return!1;return!0}}function Uc(X){let Q=Object.keys(X);return(Y)=>{for(let G of Q)if(!X[G](Y[G]))return!1;return!0}}function qc(X){return(Q)=>!X(Q)}var Oc=W(2,(X,Q)=>(Y)=>X(Y)||Q(Y)),zc=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y)),Nc=W(2,(X,Q)=>(Y)=>X(Y)!==Q(Y)),Rc=W(2,(X,Q)=>(Y)=>X(Y)===Q(Y)),Fc=W(2,(X,Q)=>(Y)=>X(Y)?Q(Y):!0),Lc=W(2,(X,Q)=>(Y)=>!(X(Y)||Q(Y))),wc=W(2,(X,Q)=>(Y)=>!(X(Y)&&Q(Y)));function Ac(X){return(Q)=>{for(let Y of X)if(!Y(Q))return!1;return!0}}function Mc(X){return(Q)=>{for(let Y of X)if(Y(Q))return!0;return!1}}var g8={};k(g8,{symbol:()=>L0,structureKeys:()=>MZ,structure:()=>PZ,string:()=>Y1,random:()=>FG,optimize:()=>LG,number:()=>I9,isHash:()=>KM,hash:()=>H0,combine:()=>t0,array:()=>S6});var RG=(X)=>{let Q=new Set(Reflect.ownKeys(X));if(X.constructor===Object)return Q;if(X instanceof Error)Q.delete("stack");let Y=Object.getPrototypeOf(X),G=Y;while(G!==null&&G!==Object.prototype){let J=Reflect.ownKeys(G);for(let $=0;$<J.length;$++)Q.add(J[$]);G=Object.getPrototypeOf(G)}if(Q.has("constructor")&&typeof X.constructor==="function"&&Y===X.constructor.prototype)Q.delete("constructor");return Q},$Y=new WeakSet;var L0="~effect/interfaces/Hash",H0=(X)=>{switch(typeof X){case"number":return I9(X);case"bigint":return Y1(X.toString(10));case"boolean":return Y1(String(X));case"symbol":return Y1(String(X));case"string":return Y1(X);case"undefined":return Y1("undefined");case"function":case"object":if(X===null)return Y1("null");else if(X instanceof Date)return Y1(X.toISOString());else if(X instanceof RegExp)return Y1(X.toString());else{if($Y.has(X))return FG(X);if(q_.has(X))return q_.get(X);let Q=Ic(X,()=>{if(KM(X))return X[L0]();else if(typeof X==="function")return FG(X);else if(Array.isArray(X)||ArrayBuffer.isView(X))return S6(X);else if(X instanceof Map)return Pc(X);else if(X instanceof Set)return Tc(X);return PZ(X)});return q_.set(X,Q),Q}default:throw Error(`BUG: unhandled typeof ${typeof X} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},FG=(X)=>{if(!U_.has(X))U_.set(X,I9(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return U_.get(X)},t0=W(2,(X,Q)=>X*53^Q),LG=(X)=>X&3221225471|X>>>1&1073741824,KM=(X)=>P(X,L0),I9=(X)=>{if(X!==X)return Y1("NaN");if(X===1/0)return Y1("Infinity");if(X===-1/0)return Y1("-Infinity");let Q=X|0;if(Q!==X)Q^=X*4294967295;while(X>4294967295)Q^=X/=4294967295;return LG(Q)},Y1=(X)=>{let Q=5381,Y=X.length;while(Y)Q=Q*33^X.charCodeAt(--Y);return LG(Q)},MZ=(X,Q)=>{let Y=12289;for(let G of Q)Y^=t0(H0(G),H0(X[G]));return LG(Y)},PZ=(X)=>MZ(X,RG(X)),z_=(X,Q)=>(Y)=>{let G=X;for(let J of Y)G^=Q(J);return LG(G)},S6=z_(6151,H0),Pc=z_(Y1("Map"),([X,Q])=>t0(H0(X),H0(Q))),Tc=z_(Y1("Set"),H0),U_=new WeakMap,q_=new WeakMap,O_=new WeakSet;function Ic(X,Q){if(O_.has(X))return Y1("[Circular]");O_.add(X);let Y=Q();return O_.delete(X),Y}var G1={};k(G1,{symbol:()=>w0,makeCompareSet:()=>AG,makeCompareMap:()=>wG,isEqual:()=>F_,equals:()=>Q0,byReferenceUnsafe:()=>IZ,byReference:()=>bc,asEquivalence:()=>Z8});var w0="~effect/interfaces/Equal";function Q0(){if(arguments.length===1)return(X)=>q7(X,arguments[0]);return q7(arguments[0],arguments[1])}function q7(X,Q){if(X===Q)return!0;if(X==null||Q==null)return!1;let Y=typeof X;if(Y!==typeof Q)return!1;if(Y==="number"&&X!==X&&Q!==Q)return!0;if(Y!=="object"&&Y!=="function")return!1;if($Y.has(X)||$Y.has(Q))return!1;return Ec(X,Q,jc)}function Cc(X,Q,Y){let G=N_.has(X),J=R_.has(Q);if(G&&J)return!0;if(G||J)return!1;N_.add(X),R_.add(Q);let $=Y();return N_.delete(X),R_.delete(Q),$}var N_=new WeakSet,R_=new WeakSet;function jc(X,Q){if(H0(X)!==H0(Q))return!1;else if(X instanceof Date){if(!(Q instanceof Date))return!1;return X.toISOString()===Q.toISOString()}else if(X instanceof RegExp){if(!(Q instanceof RegExp))return!1;return X.toString()===Q.toString()}let Y=F_(X),G=F_(Q);if(Y!==G)return!1;let J=Y&&G;if(typeof X==="function"&&!J)return!1;return Cc(X,Q,()=>{if(J)return X[w0](Q);else if(Array.isArray(X)){if(!Array.isArray(Q)||X.length!==Q.length)return!1;return Sc(X,Q)}else if(ArrayBuffer.isView(X)){if(!ArrayBuffer.isView(Q)||X.byteLength!==Q.byteLength)return!1;return xc(X,Q)}else if(X instanceof Map){if(!(Q instanceof Map)||X.size!==Q.size)return!1;return kc(X,Q)}else if(X instanceof Set){if(!(Q instanceof Set)||X.size!==Q.size)return!1;return yc(X,Q)}return vc(X,Q)})}function Ec(X,Q,Y){let G=TZ.get(X);if(!G)G=new WeakMap,TZ.set(X,G);else if(G.has(Q))return G.get(Q);let J=Y(X,Q);G.set(Q,J);let $=TZ.get(Q);if(!$)$=new WeakMap,TZ.set(Q,$);return $.set(X,J),J}var TZ=new WeakMap;function Sc(X,Q){for(let Y=0;Y<X.length;Y++)if(!q7(X[Y],Q[Y]))return!1;return!0}function xc(X,Q){if(X.length!==Q.length)return!1;for(let Y=0;Y<X.length;Y++)if(X[Y]!==Q[Y])return!1;return!0}function vc(X,Q){let Y=RG(X),G=RG(Q);if(Y.size!==G.size)return!1;for(let J of Y)if(!G.has(J)||!q7(X[J],Q[J]))return!1;return!0}function wG(X,Q){return function(G,J){for(let[$,Z]of G){let H=!1;for(let[K,B]of J)if(X($,K)&&Q(Z,B)){H=!0;break}if(!H)return!1}return!0}}var kc=wG(q7,q7);function AG(X){return function(Y,G){for(let J of Y){let $=!1;for(let Z of G)if(X(J,Z)){$=!0;break}if(!$)return!1}return!0}}var yc=AG(q7),F_=(X)=>P(X,w0),Z8=()=>Q0,bc=(X)=>IZ(new Proxy(X,{})),IZ=(X)=>{return $Y.add(X),X};var BM={};k(BM,{symbolRedactable:()=>MG,redact:()=>G4,isRedactable:()=>WM,getRedacted:()=>CZ,currentFiberTypeId:()=>O7});var MG=Symbol.for("~effect/Redactable"),WM=(X)=>P(X,MG);function G4(X){if(WM(X))return CZ(X);return X}function CZ(X){return X[MG](globalThis[O7]?.context??gc)}var O7="~effect/Fiber/currentFiber",gc={"~effect/Context":{},mapUnsafe:new Map,pipe(){return o(this,arguments)}};var _M={};k(_M,{formatPropertyKey:()=>YX,formatPath:()=>PG,formatJson:()=>ZY,formatDate:()=>jZ,format:()=>u});function u(X,Q){let Y=Q?.space??0,G=new WeakSet,J=!Y?"":typeof Y==="number"?" ".repeat(Y):Y,$=(B)=>J.repeat(B),Z=(B,V)=>{let _=B?.constructor;return _&&_!==Object.prototype.constructor&&_.name?`${_.name}(${V})`:V},H=(B)=>{try{return Reflect.ownKeys(B)}catch{return["[ownKeys threw]"]}};function K(B,V=0){if(Array.isArray(B)){if(G.has(B))return VM;if(G.add(B),!J||B.length<=1)return`[${B.map((D)=>K(D,V)).join(",")}]`;let _=B.map((D)=>K(D,V+1)).join(`,
2
+ import{UP as k}from"./chunk-f2pv705d.js";var GY={};k(GY,{pipeArguments:()=>o,Prototype:()=>$M,Mixin:()=>fp,Class:()=>G5});var o=(X,Q)=>{switch(Q.length){case 0:return X;case 1:return Q[0](X);case 2:return Q[1](Q[0](X));case 3:return Q[2](Q[1](Q[0](X)));case 4:return Q[3](Q[2](Q[1](Q[0](X))));case 5:return Q[4](Q[3](Q[2](Q[1](Q[0](X)))));case 6:return Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))));case 7:return Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))));case 8:return Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))))));case 9:return Q[8](Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))))));default:{let Y=X;for(let G=0,J=Q.length;G<J;G++)Y=Q[G](Y);return Y}}},$M={pipe(){return o(this,arguments)}},G5=function(){function X(){}return X.prototype=$M,X}(),fp=(X)=>class extends X{pipe(){return o(this,arguments)}};var H_={};k(H_,{untupled:()=>ap,tupled:()=>rp,satisfies:()=>op,pipe:()=>U6,memoize:()=>b1,identity:()=>C,hole:()=>sp,flow:()=>QX,flip:()=>ip,dual:()=>W,constant:()=>I0,constVoid:()=>y8,constUndefined:()=>D6,constTrue:()=>r1,constNull:()=>qG,constFalse:()=>U7,compose:()=>np,cast:()=>ZM,apply:()=>lp,absurd:()=>HM,SK:()=>tp});var W=function(X,Q){if(typeof X==="function")return function(){return X(arguments)?Q.apply(this,arguments):(Y)=>Q(Y,...arguments)};switch(X){case 0:case 1:throw RangeError(`Invalid arity ${X}`);case 2:return function(Y,G){if(arguments.length>=2)return Q(Y,G);return function(J){return Q(J,Y)}};case 3:return function(Y,G,J){if(arguments.length>=3)return Q(Y,G,J);return function($){return Q($,Y,G)}};default:return function(){if(arguments.length>=X)return Q.apply(this,arguments);let Y=arguments;return function(G){return Q(G,...Y)}}}},lp=(X)=>(Q)=>Q(X),C=(X)=>X,op=()=>(X)=>X,ZM=C,I0=(X)=>()=>X,r1=I0(!0),U7=I0(!1),qG=I0(null),D6=I0(void 0),y8=D6,ip=(X)=>(...Q)=>(...Y)=>X(...Y)(...Q),np=W(2,(X,Q)=>(Y)=>Q(X(Y))),HM=(X)=>{throw Error("Called `absurd` function which should be uncallable")},rp=(X)=>(Q)=>X(...Q),ap=(X)=>(...Q)=>X(Q);function U6(X,...Q){return o(X,Q)}function QX(X,Q,Y,G,J,$,Z,H,K){switch(arguments.length){case 1:return X;case 2:return function(){return Q(X.apply(this,arguments))};case 3:return function(){return Y(Q(X.apply(this,arguments)))};case 4:return function(){return G(Y(Q(X.apply(this,arguments))))};case 5:return function(){return J(G(Y(Q(X.apply(this,arguments)))))};case 6:return function(){return $(J(G(Y(Q(X.apply(this,arguments))))))};case 7:return function(){return Z($(J(G(Y(Q(X.apply(this,arguments)))))))};case 8:return function(){return H(Z($(J(G(Y(Q(X.apply(this,arguments))))))))};case 9:return function(){return K(H(Z($(J(G(Y(Q(X.apply(this,arguments)))))))))}}return}var sp=ZM(HM),tp=(X,Q)=>Q;function b1(X){let Q=new WeakMap;return(Y)=>{if(Q.has(Y))return Q.get(Y);let G=X(Y);return Q.set(Y,G),G}}var s0={};k(s0,{xor:()=>Nc,some:()=>Mc,or:()=>Oc,not:()=>qc,nor:()=>Lc,nand:()=>wc,mapInput:()=>ep,isUnknown:()=>wZ,isUndefined:()=>B_,isUint8Array:()=>Wc,isTupleOfAtLeast:()=>W_,isTupleOf:()=>K_,isTruthy:()=>Xc,isTagged:()=>P1,isSymbol:()=>JY,isString:()=>b8,isSet:()=>Qc,isRegExp:()=>D_,isReadonlyObject:()=>Hc,isPropertyKey:()=>zG,isPromiseLike:()=>Vc,isPromise:()=>Bc,isObjectOrArray:()=>Zc,isObjectKeyword:()=>AZ,isObject:()=>h1,isNumber:()=>M9,isNullish:()=>$c,isNull:()=>Gc,isNotUndefined:()=>M1,isNotNullish:()=>NG,isNotNull:()=>Jc,isNever:()=>V_,isMap:()=>Yc,isIterable:()=>T9,isFunction:()=>g1,isError:()=>Kc,isDate:()=>__,isBoolean:()=>P9,isBigInt:()=>OG,implies:()=>Fc,hasProperty:()=>P,every:()=>Ac,eqv:()=>Rc,compose:()=>_c,and:()=>zc,Tuple:()=>Dc,Struct:()=>Uc});var ep=W(2,(X,Q)=>(Y)=>X(Q(Y))),K_=W(2,(X,Q)=>X.length===Q),W_=W(2,(X,Q)=>X.length>=Q);function Xc(X){return!!X}function Qc(X){return X instanceof Set}function Yc(X){return X instanceof Map}function b8(X){return typeof X==="string"}function M9(X){return typeof X==="number"}function P9(X){return typeof X==="boolean"}function OG(X){return typeof X==="bigint"}function JY(X){return typeof X==="symbol"}function zG(X){return b8(X)||M9(X)||JY(X)}function g1(X){return typeof X==="function"}function B_(X){return X===void 0}function M1(X){return X!==void 0}function Gc(X){return X===null}function Jc(X){return X!==null}function $c(X){return X===null||X===void 0}function NG(X){return X!=null}function V_(X){return!1}function wZ(X){return!0}function Zc(X){return typeof X==="object"&&X!==null}function h1(X){return typeof X==="object"&&X!==null&&!Array.isArray(X)}function Hc(X){return h1(X)}function AZ(X){return typeof X==="object"&&X!==null||g1(X)}var P=W(2,(X,Q)=>AZ(X)&&(Q in X)),P1=W(2,(X,Q)=>P(X,"_tag")&&X._tag===Q);function Kc(X){return X instanceof Error}function Wc(X){return X instanceof Uint8Array}function __(X){return X instanceof Date}function T9(X){return P(X,Symbol.iterator)||b8(X)}function Bc(X){return P(X,"then")&&"catch"in X&&g1(X.then)&&g1(X.catch)}function Vc(X){return P(X,"then")&&g1(X.then)}function D_(X){return X instanceof RegExp}var _c=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y));function Dc(X){return(Q)=>{for(let Y=0;Y<X.length;Y++)if(X[Y](Q[Y])===!1)return!1;return!0}}function Uc(X){let Q=Object.keys(X);return(Y)=>{for(let G of Q)if(!X[G](Y[G]))return!1;return!0}}function qc(X){return(Q)=>!X(Q)}var Oc=W(2,(X,Q)=>(Y)=>X(Y)||Q(Y)),zc=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y)),Nc=W(2,(X,Q)=>(Y)=>X(Y)!==Q(Y)),Rc=W(2,(X,Q)=>(Y)=>X(Y)===Q(Y)),Fc=W(2,(X,Q)=>(Y)=>X(Y)?Q(Y):!0),Lc=W(2,(X,Q)=>(Y)=>!(X(Y)||Q(Y))),wc=W(2,(X,Q)=>(Y)=>!(X(Y)&&Q(Y)));function Ac(X){return(Q)=>{for(let Y of X)if(!Y(Q))return!1;return!0}}function Mc(X){return(Q)=>{for(let Y of X)if(Y(Q))return!0;return!1}}var g8={};k(g8,{symbol:()=>L0,structureKeys:()=>MZ,structure:()=>PZ,string:()=>Y1,random:()=>FG,optimize:()=>LG,number:()=>I9,isHash:()=>KM,hash:()=>H0,combine:()=>t0,array:()=>S6});var RG=(X)=>{let Q=new Set(Reflect.ownKeys(X));if(X.constructor===Object)return Q;if(X instanceof Error)Q.delete("stack");let Y=Object.getPrototypeOf(X),G=Y;while(G!==null&&G!==Object.prototype){let J=Reflect.ownKeys(G);for(let $=0;$<J.length;$++)Q.add(J[$]);G=Object.getPrototypeOf(G)}if(Q.has("constructor")&&typeof X.constructor==="function"&&Y===X.constructor.prototype)Q.delete("constructor");return Q},$Y=new WeakSet;var L0="~effect/interfaces/Hash",H0=(X)=>{switch(typeof X){case"number":return I9(X);case"bigint":return Y1(X.toString(10));case"boolean":return Y1(String(X));case"symbol":return Y1(String(X));case"string":return Y1(X);case"undefined":return Y1("undefined");case"function":case"object":if(X===null)return Y1("null");else if(X instanceof Date)return Y1(X.toISOString());else if(X instanceof RegExp)return Y1(X.toString());else{if($Y.has(X))return FG(X);if(q_.has(X))return q_.get(X);let Q=Ic(X,()=>{if(KM(X))return X[L0]();else if(typeof X==="function")return FG(X);else if(Array.isArray(X)||ArrayBuffer.isView(X))return S6(X);else if(X instanceof Map)return Pc(X);else if(X instanceof Set)return Tc(X);return PZ(X)});return q_.set(X,Q),Q}default:throw Error(`BUG: unhandled typeof ${typeof X} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},FG=(X)=>{if(!U_.has(X))U_.set(X,I9(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return U_.get(X)},t0=W(2,(X,Q)=>X*53^Q),LG=(X)=>X&3221225471|X>>>1&1073741824,KM=(X)=>P(X,L0),I9=(X)=>{if(X!==X)return Y1("NaN");if(X===1/0)return Y1("Infinity");if(X===-1/0)return Y1("-Infinity");let Q=X|0;if(Q!==X)Q^=X*4294967295;while(X>4294967295)Q^=X/=4294967295;return LG(Q)},Y1=(X)=>{let Q=5381,Y=X.length;while(Y)Q=Q*33^X.charCodeAt(--Y);return LG(Q)},MZ=(X,Q)=>{let Y=12289;for(let G of Q)Y^=t0(H0(G),H0(X[G]));return LG(Y)},PZ=(X)=>MZ(X,RG(X)),z_=(X,Q)=>(Y)=>{let G=X;for(let J of Y)G^=Q(J);return LG(G)},S6=z_(6151,H0),Pc=z_(Y1("Map"),([X,Q])=>t0(H0(X),H0(Q))),Tc=z_(Y1("Set"),H0),U_=new WeakMap,q_=new WeakMap,O_=new WeakSet;function Ic(X,Q){if(O_.has(X))return Y1("[Circular]");O_.add(X);let Y=Q();return O_.delete(X),Y}var G1={};k(G1,{symbol:()=>w0,makeCompareSet:()=>AG,makeCompareMap:()=>wG,isEqual:()=>F_,equals:()=>Q0,byReferenceUnsafe:()=>IZ,byReference:()=>bc,asEquivalence:()=>Z8});var w0="~effect/interfaces/Equal";function Q0(){if(arguments.length===1)return(X)=>q7(X,arguments[0]);return q7(arguments[0],arguments[1])}function q7(X,Q){if(X===Q)return!0;if(X==null||Q==null)return!1;let Y=typeof X;if(Y!==typeof Q)return!1;if(Y==="number"&&X!==X&&Q!==Q)return!0;if(Y!=="object"&&Y!=="function")return!1;if($Y.has(X)||$Y.has(Q))return!1;return Ec(X,Q,jc)}function Cc(X,Q,Y){let G=N_.has(X),J=R_.has(Q);if(G&&J)return!0;if(G||J)return!1;N_.add(X),R_.add(Q);let $=Y();return N_.delete(X),R_.delete(Q),$}var N_=new WeakSet,R_=new WeakSet;function jc(X,Q){if(H0(X)!==H0(Q))return!1;else if(X instanceof Date){if(!(Q instanceof Date))return!1;return X.toISOString()===Q.toISOString()}else if(X instanceof RegExp){if(!(Q instanceof RegExp))return!1;return X.toString()===Q.toString()}let Y=F_(X),G=F_(Q);if(Y!==G)return!1;let J=Y&&G;if(typeof X==="function"&&!J)return!1;return Cc(X,Q,()=>{if(J)return X[w0](Q);else if(Array.isArray(X)){if(!Array.isArray(Q)||X.length!==Q.length)return!1;return Sc(X,Q)}else if(ArrayBuffer.isView(X)){if(!ArrayBuffer.isView(Q)||X.byteLength!==Q.byteLength)return!1;return xc(X,Q)}else if(X instanceof Map){if(!(Q instanceof Map)||X.size!==Q.size)return!1;return kc(X,Q)}else if(X instanceof Set){if(!(Q instanceof Set)||X.size!==Q.size)return!1;return yc(X,Q)}return vc(X,Q)})}function Ec(X,Q,Y){let G=TZ.get(X);if(!G)G=new WeakMap,TZ.set(X,G);else if(G.has(Q))return G.get(Q);let J=Y(X,Q);G.set(Q,J);let $=TZ.get(Q);if(!$)$=new WeakMap,TZ.set(Q,$);return $.set(X,J),J}var TZ=new WeakMap;function Sc(X,Q){for(let Y=0;Y<X.length;Y++)if(!q7(X[Y],Q[Y]))return!1;return!0}function xc(X,Q){if(X.length!==Q.length)return!1;for(let Y=0;Y<X.length;Y++)if(X[Y]!==Q[Y])return!1;return!0}function vc(X,Q){let Y=RG(X),G=RG(Q);if(Y.size!==G.size)return!1;for(let J of Y)if(!G.has(J)||!q7(X[J],Q[J]))return!1;return!0}function wG(X,Q){return function(G,J){for(let[$,Z]of G){let H=!1;for(let[K,B]of J)if(X($,K)&&Q(Z,B)){H=!0;break}if(!H)return!1}return!0}}var kc=wG(q7,q7);function AG(X){return function(Y,G){for(let J of Y){let $=!1;for(let Z of G)if(X(J,Z)){$=!0;break}if(!$)return!1}return!0}}var yc=AG(q7),F_=(X)=>P(X,w0),Z8=()=>Q0,bc=(X)=>IZ(new Proxy(X,{})),IZ=(X)=>{return $Y.add(X),X};var BM={};k(BM,{symbolRedactable:()=>MG,redact:()=>G4,isRedactable:()=>WM,getRedacted:()=>CZ,currentFiberTypeId:()=>O7});var MG=Symbol.for("~effect/Redactable"),WM=(X)=>P(X,MG);function G4(X){if(WM(X))return CZ(X);return X}function CZ(X){return X[MG](globalThis[O7]?.context??gc)}var O7="~effect/Fiber/currentFiber",gc={"~effect/Context":{},mapUnsafe:new Map,pipe(){return o(this,arguments)}};var _M={};k(_M,{formatPropertyKey:()=>YX,formatPath:()=>PG,formatJson:()=>ZY,formatDate:()=>jZ,format:()=>u});function u(X,Q){let Y=Q?.space??0,G=new WeakSet,J=!Y?"":typeof Y==="number"?" ".repeat(Y):Y,$=(B)=>J.repeat(B),Z=(B,V)=>{let _=B?.constructor;return _&&_!==Object.prototype.constructor&&_.name?`${_.name}(${V})`:V},H=(B)=>{try{return Reflect.ownKeys(B)}catch{return["[ownKeys threw]"]}};function K(B,V=0){if(Array.isArray(B)){if(G.has(B))return VM;if(G.add(B),!J||B.length<=1)return`[${B.map((D)=>K(D,V)).join(",")}]`;let _=B.map((D)=>K(D,V+1)).join(`,
3
3
  `+$(V+1));return`[
4
4
  ${$(V+1)}${_}
5
5
  ${$(V)}]`}if(B instanceof Date)return jZ(B);if(!Q?.ignoreToString&&P(B,"toString")&&typeof B.toString==="function"&&B.toString!==Object.prototype.toString&&B.toString!==Array.prototype.toString){let _=hc(B);if(B instanceof Error&&B.cause)return`${_} (cause: ${K(B.cause,V)})`;return _}if(typeof B==="string")return JSON.stringify(B);if(typeof B==="number"||B==null||typeof B==="boolean"||typeof B==="symbol")return String(B);if(typeof B==="bigint")return String(B)+"n";if(typeof B==="object"||typeof B==="function"){if(G.has(B))return VM;if(G.add(B),MG in B)return u(CZ(B));if(Symbol.iterator in B)return`${B.constructor.name}(${K(Array.from(B),V)})`;let _=H(B);if(!J||_.length<=1){let U=`{${_.map((z)=>`${YX(z)}:${K(B[z],V)}`).join(",")}}`;return Z(B,U)}let D=`{
@@ -74,4 +74,4 @@ ${CH0(J)}`;return $}function xh(X){return pw(X,y1)}async function vh(X){let Q=[]
74
74
  `),J=J.replace(/\\r/g,"\r");Q[G]=J}return Q}function bz0(X){let Q={};for(let Y in X)Q[Y]=zp(X[Y],X).replace(/\\\$/g,"$");return Q}function zp(X,Q){let Y=gz0(X,/(?!(?<=\\))\$/g);if(Y===-1)return X;let G=X.slice(Y),J=/((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/,$=G.match(J);if($!==null){let[Z,H,K,B]=$;return zp(X.replace(H,B||Q[K]||""),Q)}return X}function gz0(X,Q){let Y=Array.from(X.matchAll(Q));return Y.length>0?Y.slice(-1)[0].index:-1}var hz0=Z0(function*(X){let Y=yield*(yield*oX).readFileString(X?.path??".env");return Q_({env:Op(Y)})}),mz0=Z0(function*(X){let Q=yield*T$,Y=yield*oX,G=X?.rootPath??"/";return QY((J)=>{let $=Q.join(G,...J.map(String)),Z=Y.readFileString($).pipe(E((K)=>DG(K.trim()))),H=Y.readDirectory($).pipe(E((K)=>{let B=K.map((V)=>typeof V==="string"?Q.basename(V):u(V?.name??""));return X_(new Set(B))}));return Z.pipe(M4(()=>H),X3((K)=>new eA({message:`Failed to read file at ${Q.join(G,...J.map(String))}`,cause:K})))})});var Fp={};k(Fp,{values:()=>QM,isLessThanOrEqualTo:()=>fz0,isLessThan:()=>uz0,isGreaterThanOrEqualTo:()=>cz0,isGreaterThan:()=>Rp,isEnabled:()=>lz0,getOrdinal:()=>pz0,Order:()=>Y_,Equivalence:()=>dz0});var QM=["All","Fatal","Error","Warn","Info","Debug","Trace","None"],Y_=eU,dz0=TG(),pz0=(X)=>tU(X),Rp=uH,cz0=O6(Y_),uz0=a8(Y_),fz0=q6(Y_),lz0=(X)=>n((Q)=>T(!Rp(Q.getRef(qq),X)));var VN0={};k(VN0,{withDefault:()=>Mp,url:()=>KN0,unwrap:()=>Pp,succeed:()=>vp,string:()=>sz0,schema:()=>E6,redacted:()=>HN0,port:()=>$N0,orElse:()=>Ap,option:()=>rz0,number:()=>ez0,nonEmptyString:()=>tz0,nested:()=>BN0,mapOrFail:()=>iz0,map:()=>wp,make:()=>w9,logLevel:()=>ZN0,literal:()=>YN0,isConfig:()=>Lp,int:()=>QN0,finite:()=>XN0,fail:()=>xp,duration:()=>JN0,date:()=>WN0,boolean:()=>GN0,all:()=>nz0,TrueValues:()=>Tp,Record:()=>az0,Port:()=>Ep,LogLevel:()=>Sp,FalseValues:()=>Ip,Duration:()=>jp,ConfigError:()=>J_,Boolean:()=>Cp});var YM="~effect/Config",Lp=(X)=>P(X,YM);class J_{_tag="ConfigError";name="ConfigError";cause;constructor(X){this.cause=X}get message(){return this.cause.toString()}toString(){return`ConfigError(${this.message})`}}var oz0={...z8,...ZX,[YM]:YM,asEffect(){return R(XY.asEffect(),(X)=>this.parse(X))},toJSON(){return{_id:"Config"}}};function w9(X){let Q=Object.create(oz0);return Q.parse=X,Q}var wp=W(2,(X,Q)=>{return w9((Y)=>E(X.parse(Y),Q))}),iz0=W(2,(X,Q)=>{return w9((Y)=>R(X.parse(Y),Q))}),Ap=W(2,(X,Q)=>{return w9((Y)=>M4(X.parse(Y),(G)=>Q(G).parse(Y)))});function nz0(X){let Q=Array.isArray(X)?X:(Symbol.iterator in X)?[...X]:X;if(Array.isArray(Q))return w9((Y)=>aJ(Q.map((G)=>G.parse(Y))));else return w9((Y)=>aJ(VX(Q,(G)=>G.parse(Y))))}function G_(X){switch(X._tag){case"MissingKey":return!0;case"InvalidType":case"InvalidValue":return d(X.actual)||$0(X.actual)&&X.actual.value===void 0;case"OneOf":return X.actual===void 0;case"Encoding":return d(X.actual)||$0(X.actual)&&X.actual.value===void 0?!0:G_(X.issue);case"Pointer":case"Filter":return G_(X.issue);case"UnexpectedKey":return!1;case"Forbidden":return!1;case"Composite":case"AnyOf":return X.issues.every(G_)}}var Mp=W(2,(X,Q)=>{return Ap(X,(Y)=>{if(mA(Y.cause)){let G=Y.cause.issue;if(G_(G))return vp(Q)}return xp(Y.cause)})}),rz0=(X)=>X.pipe(wp(q),Mp(w())),Pp=(X)=>{if(Lp(X))return X;return w9((Q)=>{let G=Object.entries(X).map(([J,$])=>Pp($).parse(Q).pipe(E((Z)=>[J,Z])));return aJ(G).pipe(E(Object.fromEntries))})},GM=Z0(function*(X,Q){let Y=yield*X.load(Q);if(Y===void 0)return;switch(Y._tag){case"Value":return Y.value;case"Record":{if(Y.value!==void 0)return Y.value;let G={};for(let J of Y.keys){let $=yield*GM(X,[...Q,J]);if($!==void 0)G[J]=$}return G}case"Array":{if(Y.value!==void 0)return Y.value;let G=[];for(let J=0;J<Y.length;J++)G.push(yield*GM(X,[...Q,J]));return G}}}),LZ=Z0(function*(X,Q,Y){switch(X._tag){case"Objects":{let G={};for(let J of X.propertySignatures){let $=J.name;if(typeof $==="string"){let Z=yield*LZ(J.type,Q,[...Y,$]);if(Z!==void 0)G[$]=Z}}if(X.indexSignatures.length>0){let J=yield*Q.load(Y);if(J&&J._tag==="Record")for(let $ of X.indexSignatures){let Z=Y7($.parameter);for(let H of J.keys)if(!Object.hasOwn(G,H)&&Z(H)){let K=yield*LZ($.type,Q,[...Y,H]);if(K!==void 0)G[H]=K}}}return G}case"Arrays":{let G=yield*Q.load(Y);if(G&&G._tag==="Value")return G.value;let J=[];for(let $=0;$<X.elements.length;$++)J.push(yield*LZ(X.elements[$],Q,[...Y,$]));return J}case"Union":return yield*GM(Q,Y);case"Suspend":return yield*LZ(X.thunk(),Q,Y);default:{let G=yield*Q.load(Y);if(G===void 0)return;if(G._tag==="Value")return G.value;if(G._tag==="Record"&&G.value!==void 0)return G.value;if(G._tag==="Array"&&G.value!==void 0)return G.value;return}}});function E6(X,Q){let Y=eV(X),G=U1(Y),J=Y8(Y.ast),$=typeof Q==="string"?[Q]:Q??[];return w9((Z)=>{let H=Z.prefix?[...Z.prefix,...$]:$;return LZ(J,Z,$).pipe(o8((K)=>G(K).pipe(l8((B)=>new N9(H.length>0?new j0(H,B):B)))),l8((K)=>new J_(K)))})}var Tp=D7(["true","yes","on","1","y"]),Ip=D7(["false","no","off","0","n"]),Cp=D7([...Tp.literals,...Ip.literals]).pipe(X0(pV,Z1({decode:(X)=>X==="true"||X==="yes"||X==="on"||X==="1"||X==="y",encode:(X)=>X?"true":"false"}))),jp=W0.pipe(X0(RZ,{decode:E8((X)=>{let Q=gD(X);return t8(Q,{onNone:()=>I(new P0(q(X))),onSome:O})}),encode:D2(()=>"Encoding Duration is not supported")})),Ep=FZ.check(NZ({minimum:1,maximum:65535})),Sp=D7(QM),az0=(X,Q,Y)=>{let G=VZ(X,Q),J=W0.pipe(X0(VZ(W0,W0),sz(Y)),X0(G));return i1([G,J])};function xp(X){return w9(()=>I(new J_(X)))}function vp(X){return w9(()=>O(X))}function sz0(X){return E6(W0,X)}function tz0(X){return E6(iA,X)}function ez0(X){return E6(e9,X)}function XN0(X){return E6(_G,X)}function QN0(X){return E6(FZ,X)}function YN0(X,Q){return E6(J8(X),Q)}function GN0(X){return E6(Cp,X)}function JN0(X){return E6(jp,X)}function $N0(X){return E6(Ep,X)}function ZN0(X){return E6(Sp,X)}function HN0(X){return E6(oV(W0),X)}function KN0(X){return E6(nV,X)}function WN0(X){return E6(rV,X)}var BN0=W(2,(X,Q)=>w9((Y)=>X.parse(XM(Y,Q))));var CN0={};k(CN0,{withLeveledConsole:()=>qN0,withConsoleLog:()=>$_,withConsoleError:()=>UN0,tracerLogger:()=>PN0,toFile:()=>IN0,map:()=>bp,make:()=>NN0,layer:()=>TN0,isLogger:()=>kp,formatStructured:()=>JM,formatSimple:()=>FN0,formatLogFmt:()=>mp,formatJson:()=>dp,defaultLogger:()=>RN0,consoleStructured:()=>AN0,consolePretty:()=>LN0,consoleLogFmt:()=>wN0,consoleJson:()=>MN0,batched:()=>pp,LogToStderr:()=>DN0,CurrentLoggers:()=>yp});var _N0="~effect/Logger",kp=(X)=>P(X,_N0),yp=M5,DN0=oY,bp=W(2,(X,Q)=>F6((Y)=>Q(X.log(Y)))),$_=(X)=>F6((Q)=>{return Q.fiber.getRef(u7).log(X.log(Q))}),UN0=(X)=>F6((Q)=>{return Q.fiber.getRef(u7).error(X.log(Q))}),qN0=(X)=>F6((Q)=>{let Y=Q.fiber.getRef(u7),G=X.log(Q);switch(Q.logLevel){case"Debug":return Y.debug(G);case"Info":return Y.info(G);case"Trace":return Y.trace(G);case"Warn":return Y.warn(G);case"Error":case"Fatal":return Y.error(G);default:return Y.log(G)}}),ON0=/^[^\s"=]*$/,zN0=(X)=>`"${X.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,gp=(X)=>`#${X}`,hp=(X,Q)=>({cause:Y,date:G,fiber:J,logLevel:$,message:Z})=>{let H=(N)=>N.match(ON0)?N:X(N),K=(N,L)=>`${Xq(N)}=${H(L)}`,B=(N,L)=>" "+K(N,L),V=K("timestamp",G.toISOString());V+=B("level",$),V+=B("fiber",gp(J.id));let _=MY(Z);for(let N=0;N<_.length;N++)V+=B("message",u(_[N],{space:Q}));if(Y.reasons.length>0)V+=B("cause",OX(Y));let D=G.getTime(),U=J.getRef(rY);for(let N of U)V+=" "+FJ(N,D);let z=J.getRef(nY);for(let[N,L]of Object.entries(z))V+=B(N,u(L,{space:Q}));return V},NN0=F6,RN0=Qq,FN0=F6(hp(zN0)),mp=F6(hp(JSON.stringify,0)),JM=F6(({cause:X,date:Q,fiber:Y,logLevel:G,message:J})=>{let $={},Z={},H=Y.getRef(nY);for(let[_,D]of Object.entries(H))$[_]=iY(D);let K=Q.getTime(),B=Y.getRef(rY);for(let[_,D]of B)Z[_]=K-D;let V=MY(J);return{message:V.length===1?iY(V[0]):V.map(iY),level:G.toUpperCase(),timestamp:Q.toISOString(),cause:X.reasons.length>0?OX(X):void 0,annotations:$,spans:Z,fiberId:gp(Y.id)}}),dp=bp(JM,ZY),pp=W(2,(X,Q)=>g(d7,(Y)=>{let G=[],J=f(()=>{if(G.length===0)return U0;let $=G;return G=[],Q.flush($)});return g6(($)=>$(wX(Q.window).pipe(t1(J),cY)).pipe(yH,g((Z)=>O4(Y,()=>gY(Z))),t1(A5(()=>J)),F8(F6((Z)=>{G.push(X.log(Z))}))))})),LN0=kC,wN0=$_(mp),AN0=$_(JM),MN0=$_(dp),PN0=Yq,TN0=(X,Q)=>G9(yp,n(DJ(function*(Y){let G=new Set(Q?.mergeWithExisting===!0?Y.getRef(M5):[]);for(let J of X)G.add(Y0(J)?yield*J:J);return G}))),IN0=W((X)=>kp(X[0]),(X,Q,Y)=>LH(function*(){let J=yield*(yield*oX).open(Q,{flag:"a+",...Y}),$=new TextEncoder;return yield*pp(X,{window:Y?.batchWindow??1000,flush:(Z)=>jH(J.write($.encode(Z.join(`
75
75
  `)+`
76
76
  `)))})}));
77
- export{o as Bz,GY as Cz,W as Dz,C as Ez,ZM as Fz,I0 as Gz,r1 as Hz,U7 as Iz,D6 as Jz,y8 as Kz,np as Lz,HM as Mz,U6 as Nz,QX as Oz,sp as Pz,H_ as Qz,b8 as Rz,M9 as Sz,P9 as Tz,OG as Uz,JY as Vz,B_ as Wz,M1 as Xz,Gc as Yz,Jc as Zz,h1 as _z,P as $z,__ as aA,Oc as bA,s0 as cA,L0 as dA,H0 as eA,t0 as fA,I9 as gA,Y1 as hA,PZ as iA,S6 as jA,g8 as kA,w0 as lA,Q0 as mA,G1 as nA,MG as oA,G4 as pA,BM as qA,u as rA,YX as sA,_M as tA,q1 as uA,T1 as vA,L_ as wA,mc as xA,UM as yA,qM as zA,cc as AA,z8 as BA,ZX as CA,Y0 as DA,v_ as EA,q0 as FA,a1 as GA,n as HA,w_ as IA,A_ as JA,KY as KA,b0 as LA,x6 as MA,n0 as NA,TG as OA,rc as PA,P8 as QA,p4 as RA,a8 as SA,s8 as TA,q6 as UA,O6 as VA,J4 as WA,$4 as XA,GX as YA,JX as ZA,m8 as _A,w as $A,q as aB,d as bB,$0 as cB,t8 as dB,yG as eB,qu as fB,bG as gB,C9 as hB,f4 as iB,O1 as jB,I7 as kB,S0 as lB,d1 as mB,W4 as nB,RY as oB,R8 as pB,W8 as qB,u_ as rB,ru as sB,l4 as tB,l0 as uB,l_ as vB,FY as wB,tu as xB,O0 as yB,F1 as zB,S as AB,y as BB,i_ as CB,Yf as DB,lZ as EB,b as FB,M0 as GB,e8 as HB,k6 as IB,I1 as JB,Sf as KB,e_ as LB,cf as MB,YD as NB,Yl as OB,JD as PB,sM as QB,ZD as RB,cG as SB,o4 as TB,i4 as UB,VX as VB,WD as WB,BD as XB,El as YB,bl as ZB,wY as _B,oZ as $B,x as aC,MY as bC,j7 as cC,PY as dC,V1 as eC,B0 as fC,OD as gC,sZ as hC,J1 as iC,D0 as jC,j1 as kC,S7 as lC,CD as mC,mo as nC,s1 as oC,x0 as pC,x7 as qC,v7 as rC,e0 as sC,p1 as tC,c1 as uC,xP as vC,$1 as wC,Qi as xC,dD as yC,gP as zC,y6 as AC,Ai as BC,Ti as CC,di as DC,fD as EC,lD as FC,x9 as GC,oP as HC,ci as IC,y7 as JC,b7 as KC,iD as LC,nP as MC,rD as NC,F5 as OC,bY as PC,T as QC,m as RC,f as SC,BU as TC,mY as UC,U0 as VC,DJ as WC,F8 as XC,dY as YC,ST as ZC,g as _C,r as $C,L5 as aD,qU as bD,b6 as cD,qJ as dD,w5 as eD,N6 as fD,R6 as gD,RJ as hD,CI as iD,c8 as jD,xI as kD,kI as lD,p7 as mD,g6 as nD,c7 as oD,nU as pD,Q6 as qD,u7 as rD,In as sD,yC as tD,Cn as uD,LJ as vD,yn as wD,bn as xD,AJ as yD,gn as zD,f7 as AD,ln as BD,rn as CD,an as DD,Hq as ED,sn as FD,Kq as GD,v as HD,Yr as ID,Dr as JD,gC as KD,z4 as LD,h6 as MD,Q9 as ND,Bq as OD,T8 as PD,u8 as QD,l7 as RD,N4 as SD,AX as TD,P5 as UD,T5 as VD,pr as WD,o7 as XD,fC as YD,oH as ZD,nY as _D,rY as $D,or as aE,rr as bE,lC as cE,L6 as dE,tr as eE,m6 as fE,w6 as gE,Y9 as hE,B8 as iE,er as jE,V8 as kE,d0 as lE,Xa as mE,I5 as nE,j5 as oE,aY as pE,r7 as qE,tC as rE,CJ as sE,A6 as tE,i7 as uE,Ja as vE,G9 as wE,Lq as xE,$a as yE,Nq as zE,aH as AE,sY as BE,Ka as CE,b9 as DE,Aq as EE,tH as FE,Mq as GE,g9 as HE,tY as IE,eY as JE,Tq as KE,sa as LE,XK as ME,Q2 as NE,qE as OE,zE as PE,K0 as QE,w4 as RE,At as SE,e7 as TE,MK as UE,It as VE,cJ as WE,Z2 as XE,uJ as YE,_e as ZE,fE as _E,VO as $E,bE as aF,d9 as bF,aJ as cF,CX as dF,M6 as eF,sJ as fF,GQ as gF,O as hF,h as iF,i as jF,p as kF,se as lF,NO as mF,$Q as nF,w8 as oF,I as pF,_1 as qF,G6 as rF,H9 as sF,RO as tF,d6 as uF,R as vF,FO as wF,p6 as xF,J6 as yF,H00 as zF,f8 as AF,E as BF,Q8 as CF,LO as DF,v5 as EF,M4 as FF,AO as GF,V00 as HF,_8 as IF,R00 as JF,X3 as KF,L00 as LF,kK as MF,aE as NF,T00 as OF,j00 as PF,x00 as QF,y00 as RF,b00 as SF,PO as TF,ZQ as UF,yK as VF,p00 as WF,u00 as XF,jO as YF,l00 as ZF,i00 as _F,K2 as $F,n00 as aG,HQ as bG,W2 as cG,c6 as dG,SO as eG,xO as fG,t00 as gG,P4 as hG,k5 as iG,hK as jG,KQ as kG,Q10 as lG,Y10 as mG,y5 as nG,kO as oG,p9 as pG,H10 as qG,u6 as rG,B10 as sG,WQ as tG,W9 as uG,jX as vG,g0 as wG,V10 as xG,U10 as yG,N10 as zG,C10 as AG,j10 as BG,S10 as CG,E1 as DG,Y3 as EG,k10 as FG,G3 as GG,b5 as HG,h10 as IG,m10 as JG,J3 as KG,gO as LG,d10 as MG,hO as NG,$3 as OG,p10 as PG,mK as QG,c10 as RG,Z0 as SG,u10 as TG,dK as UG,f10 as VG,i10 as WG,r10 as XG,t10 as YG,X80 as ZG,rJ as _G,Z80 as $G,B80 as aH,V80 as bH,B2 as cH,o8 as dH,D8 as eH,gF0 as fH,mO as gH,fK as hH,Qz as iH,Kz as jH,vF0 as kH,c9 as lH,Vz as mH,j0 as nH,vX as oH,P0 as pH,OQ as qH,zQ as rH,U8 as sH,F3 as tH,M3 as uH,nz as vH,E4 as wH,Z1 as xH,RW as yH,v4 as zH,N40 as AH,ON as BH,L2 as CH,Z6 as DH,I2 as EH,H1 as FH,Y8 as GH,c40 as HH,u40 as IH,l40 as JH,_9 as KH,kW as LH,Gx as MH,IQ as NH,QR as OH,bW as PH,r40 as QH,JR as RH,v2 as SH,Q90 as TH,J90 as UH,$90 as VH,S2 as WH,mX as XH,K90 as YH,gX as ZH,B90 as _H,O90 as $H,z90 as aI,N90 as bI,w90 as cI,ZR as dI,HR as eI,QX0 as fI,dX as gI,GX0 as hI,JX0 as iI,$X0 as jI,s3 as kI,i5 as lI,t3 as mI,I6 as nI,hW as oI,cW as pI,uW as qI,Y$ as rI,wx as sI,OR as tI,xX0 as uI,MR as vI,n8 as wI,TR as xI,K6 as yI,IR as zI,f1 as AI,n9 as BI,b2 as CI,r5 as DI,y4 as EI,$50 as FI,XB as GI,jQ as HI,vR as II,fx as JI,V0 as KI,K1 as LI,S50 as MI,VB as NI,n6 as OI,r9 as PI,vF as QI,V70 as RI,Hv as SI,Wv as TI,cF as UI,kQ as VI,HQ0 as WI,Rv as XI,U9 as YI,fF as ZI,KQ0 as _I,TB as $I,s5 as aJ,t5 as bJ,w$ as cJ,lF as dJ,oF as eJ,iF as fJ,IB as gJ,zQ0 as hJ,wv as iJ,Iv as jJ,T0 as kJ,j as lJ,Sv as mJ,xv as nJ,bQ as oJ,u2 as pJ,q9 as qJ,yQ as rJ,gQ as sJ,mQ0 as tJ,dQ0 as uJ,pQ0 as vJ,hQ as wJ,rQ0 as xJ,t6 as yJ,M$ as zJ,gv as AJ,eF as BJ,SY0 as CJ,lv as DJ,X20 as EJ,ov as FJ,I20 as GJ,E20 as HJ,S20 as IJ,g20 as JJ,m20 as KJ,f20 as LJ,n20 as MJ,r20 as NJ,Wk as OJ,Bk as PJ,BG0 as QJ,Vk as RJ,yB as SJ,DG0 as TJ,UG0 as UJ,$L as VJ,OG0 as WJ,Dk as XJ,e5 as YJ,oX as ZJ,jG0 as _J,EG0 as $J,qk as aK,xG0 as bK,Ok as cK,HL as dK,KL as eK,T$ as fK,uG0 as gK,Rk as hK,Lk as iK,KJ0 as jK,WJ0 as kK,x$ as lK,BJ0 as mK,VJ0 as nK,_J0 as oK,UJ0 as pK,qJ0 as qK,OJ0 as rK,zJ0 as sK,NJ0 as tK,RJ0 as uK,v$ as vK,FL as wK,TJ0 as xK,IJ0 as yK,CJ0 as zK,jJ0 as AK,EJ0 as BK,vJ0 as CK,kJ0 as DK,yJ0 as EK,bJ0 as FK,gJ0 as GK,hJ0 as HK,mJ0 as IK,nk as JK,cJ0 as KK,uJ0 as LK,y$ as MK,fJ0 as NK,lJ0 as OK,oJ0 as PK,PL as QK,iJ0 as RK,nJ0 as SK,rJ0 as TK,aJ0 as UK,sJ0 as VK,tJ0 as WK,eJ0 as XK,X30 as YK,Q30 as ZK,Y30 as _K,Wy as $K,oB as aL,q30 as bL,O30 as cL,_y as dL,rX as eL,p$ as fL,c$ as gL,s2 as hL,A30 as iL,ny as jL,J$0 as kL,$$0 as lL,ry as mL,Z$0 as nL,cL as oL,Ny as pL,S30 as qL,Py as rL,Cy as sL,rL as tL,hy as uL,Y5 as vL,KU0 as wL,mA as xL,Gd as yL,Jd as zL,qU0 as AL,Zd as BL,Hd as CL,mV as DL,sQ as EL,BG as FL,gU0 as GL,_6 as HL,J8 as IL,dU0 as JL,cU0 as KL,uU0 as LL,BZ as ML,dV as NL,dA as OL,pA as PL,W0 as QL,e9 as RL,pV as SL,Bd as TL,cV as UL,fU0 as VL,lU0 as WL,oU0 as XL,Q1 as YL,VZ as ZL,aU0 as _L,WG as $L,sU0 as aM,$8 as bM,tU0 as cM,i1 as dM,D7 as eM,uV as fM,Ud as gM,X0 as hM,lA as iM,tQ as jM,XX as kM,f0 as lM,Uq0 as mM,wd as nM,_Z as oM,qq0 as pM,Oq0 as qM,zq0 as rM,Rq0 as sM,Fq0 as tM,Ad as uM,Lq0 as vM,wq0 as wM,Aq0 as xM,Mq0 as yM,Pq0 as zM,Tq0 as AM,Iq0 as BM,Cq0 as CM,Md as DM,jq0 as EM,Td as FM,Eq0 as GM,Sq0 as HM,NZ as IM,xq0 as JM,lV as KM,Id as LM,yq0 as MM,bq0 as NM,gq0 as OM,hq0 as PM,mq0 as QM,dq0 as RM,Cd as SM,pq0 as TM,cq0 as UM,uq0 as VM,jd as WM,rq0 as XM,Sd as YM,aq0 as ZM,sq0 as _M,tq0 as $M,eq0 as aN,XO0 as bN,QO0 as cN,YO0 as dN,xd as eN,eQ as fN,BO0 as gN,oV as hN,yA as iN,bA as jN,md as kN,dd as lN,_O0 as mN,UO0 as nN,qO0 as oN,OO0 as pN,zO0 as qN,NO0 as rN,RO0 as sN,FO0 as tN,nV as uN,rA as vN,RZ as wN,fd as xN,TO0 as yN,ld as zN,od as AN,id as BN,nd as CN,_G as DN,FZ as EN,gA as FN,aV as GN,sV as HN,lO0 as IN,td as JN,Xp as KN,Yp as LN,$p as MN,eO0 as NN,Wp as ON,eV as PN,Nz0 as QN,Rz0 as RN,Fz0 as SN,Up as TN,Np as UN,QM as VN,pz0 as WN,Fp as XN,wp as YN,Mp as ZN,rz0 as _N,E6 as $N,az0 as aO,sz0 as bO,VN0 as cO,NN0 as dO,TN0 as eO,CN0 as fO};
77
+ export{o as $A,GY as aB,W as bB,C as cB,ZM as dB,I0 as eB,r1 as fB,U7 as gB,D6 as hB,y8 as iB,np as jB,HM as kB,U6 as lB,QX as mB,sp as nB,H_ as oB,b8 as pB,M9 as qB,P9 as rB,OG as sB,JY as tB,B_ as uB,M1 as vB,Gc as wB,Jc as xB,h1 as yB,P as zB,__ as AB,Oc as BB,s0 as CB,L0 as DB,H0 as EB,t0 as FB,I9 as GB,Y1 as HB,PZ as IB,S6 as JB,g8 as KB,w0 as LB,Q0 as MB,G1 as NB,MG as OB,G4 as PB,BM as QB,u as RB,YX as SB,_M as TB,q1 as UB,T1 as VB,L_ as WB,mc as XB,UM as YB,qM as ZB,cc as _B,z8 as $B,ZX as aC,Y0 as bC,v_ as cC,q0 as dC,a1 as eC,n as fC,w_ as gC,A_ as hC,KY as iC,b0 as jC,x6 as kC,n0 as lC,TG as mC,rc as nC,P8 as oC,p4 as pC,a8 as qC,s8 as rC,q6 as sC,O6 as tC,J4 as uC,$4 as vC,GX as wC,JX as xC,m8 as yC,w as zC,q as AC,d as BC,$0 as CC,t8 as DC,yG as EC,qu as FC,bG as GC,C9 as HC,f4 as IC,O1 as JC,I7 as KC,S0 as LC,d1 as MC,W4 as NC,RY as OC,R8 as PC,W8 as QC,u_ as RC,ru as SC,l4 as TC,l0 as UC,l_ as VC,FY as WC,tu as XC,O0 as YC,F1 as ZC,S as _C,y as $C,i_ as aD,Yf as bD,lZ as cD,b as dD,M0 as eD,e8 as fD,k6 as gD,I1 as hD,Sf as iD,e_ as jD,cf as kD,YD as lD,Yl as mD,JD as nD,sM as oD,ZD as pD,cG as qD,o4 as rD,i4 as sD,VX as tD,WD as uD,BD as vD,El as wD,bl as xD,wY as yD,oZ as zD,x as AD,MY as BD,j7 as CD,PY as DD,V1 as ED,B0 as FD,OD as GD,sZ as HD,J1 as ID,D0 as JD,j1 as KD,S7 as LD,CD as MD,mo as ND,s1 as OD,x0 as PD,x7 as QD,v7 as RD,e0 as SD,p1 as TD,c1 as UD,xP as VD,$1 as WD,Qi as XD,dD as YD,gP as ZD,y6 as _D,Ai as $D,Ti as aE,di as bE,fD as cE,lD as dE,x9 as eE,oP as fE,ci as gE,y7 as hE,b7 as iE,iD as jE,nP as kE,rD as lE,F5 as mE,bY as nE,T as oE,m as pE,f as qE,BU as rE,mY as sE,U0 as tE,DJ as uE,F8 as vE,dY as wE,ST as xE,g as yE,r as zE,L5 as AE,qU as BE,b6 as CE,qJ as DE,w5 as EE,N6 as FE,R6 as GE,RJ as HE,CI as IE,c8 as JE,xI as KE,kI as LE,p7 as ME,g6 as NE,c7 as OE,nU as PE,Q6 as QE,u7 as RE,In as SE,yC as TE,Cn as UE,LJ as VE,yn as WE,bn as XE,AJ as YE,gn as ZE,f7 as _E,ln as $E,rn as aF,an as bF,Hq as cF,sn as dF,Kq as eF,v as fF,Yr as gF,Dr as hF,gC as iF,z4 as jF,h6 as kF,Q9 as lF,Bq as mF,T8 as nF,u8 as oF,l7 as pF,N4 as qF,AX as rF,P5 as sF,T5 as tF,pr as uF,o7 as vF,fC as wF,oH as xF,nY as yF,rY as zF,or as AF,rr as BF,lC as CF,L6 as DF,tr as EF,m6 as FF,w6 as GF,Y9 as HF,B8 as IF,er as JF,V8 as KF,d0 as LF,Xa as MF,I5 as NF,j5 as OF,aY as PF,r7 as QF,tC as RF,CJ as SF,A6 as TF,i7 as UF,Ja as VF,G9 as WF,Lq as XF,$a as YF,Nq as ZF,aH as _F,sY as $F,Ka as aG,b9 as bG,Aq as cG,tH as dG,Mq as eG,g9 as fG,tY as gG,eY as hG,Tq as iG,sa as jG,XK as kG,Q2 as lG,qE as mG,zE as nG,K0 as oG,w4 as pG,At as qG,e7 as rG,MK as sG,It as tG,cJ as uG,Z2 as vG,uJ as wG,_e as xG,fE as yG,VO as zG,bE as AG,d9 as BG,aJ as CG,CX as DG,M6 as EG,sJ as FG,GQ as GG,O as HG,h as IG,i as JG,p as KG,se as LG,NO as MG,$Q as NG,w8 as OG,I as PG,_1 as QG,G6 as RG,H9 as SG,RO as TG,d6 as UG,R as VG,FO as WG,p6 as XG,J6 as YG,H00 as ZG,f8 as _G,E as $G,Q8 as aH,LO as bH,v5 as cH,M4 as dH,AO as eH,V00 as fH,_8 as gH,R00 as hH,X3 as iH,L00 as jH,kK as kH,aE as lH,T00 as mH,j00 as nH,x00 as oH,y00 as pH,b00 as qH,PO as rH,ZQ as sH,yK as tH,p00 as uH,u00 as vH,jO as wH,l00 as xH,i00 as yH,K2 as zH,n00 as AH,HQ as BH,W2 as CH,c6 as DH,SO as EH,xO as FH,t00 as GH,P4 as HH,k5 as IH,hK as JH,KQ as KH,Q10 as LH,Y10 as MH,y5 as NH,kO as OH,p9 as PH,H10 as QH,u6 as RH,B10 as SH,WQ as TH,W9 as UH,jX as VH,g0 as WH,V10 as XH,U10 as YH,N10 as ZH,C10 as _H,j10 as $H,S10 as aI,E1 as bI,Y3 as cI,k10 as dI,G3 as eI,b5 as fI,h10 as gI,m10 as hI,J3 as iI,gO as jI,d10 as kI,hO as lI,$3 as mI,p10 as nI,mK as oI,c10 as pI,Z0 as qI,u10 as rI,dK as sI,f10 as tI,i10 as uI,r10 as vI,t10 as wI,X80 as xI,rJ as yI,Z80 as zI,B80 as AI,V80 as BI,B2 as CI,o8 as DI,D8 as EI,gF0 as FI,mO as GI,fK as HI,Qz as II,Kz as JI,vF0 as KI,c9 as LI,Vz as MI,j0 as NI,vX as OI,P0 as PI,OQ as QI,zQ as RI,U8 as SI,F3 as TI,M3 as UI,nz as VI,E4 as WI,Z1 as XI,RW as YI,v4 as ZI,N40 as _I,ON as $I,L2 as aJ,Z6 as bJ,I2 as cJ,H1 as dJ,Y8 as eJ,c40 as fJ,u40 as gJ,l40 as hJ,_9 as iJ,kW as jJ,Gx as kJ,IQ as lJ,QR as mJ,bW as nJ,r40 as oJ,JR as pJ,v2 as qJ,Q90 as rJ,J90 as sJ,$90 as tJ,S2 as uJ,mX as vJ,K90 as wJ,gX as xJ,B90 as yJ,O90 as zJ,z90 as AJ,N90 as BJ,w90 as CJ,ZR as DJ,HR as EJ,QX0 as FJ,dX as GJ,GX0 as HJ,JX0 as IJ,$X0 as JJ,s3 as KJ,i5 as LJ,t3 as MJ,I6 as NJ,hW as OJ,cW as PJ,uW as QJ,Y$ as RJ,wx as SJ,OR as TJ,xX0 as UJ,MR as VJ,n8 as WJ,TR as XJ,K6 as YJ,IR as ZJ,f1 as _J,n9 as $J,b2 as aK,r5 as bK,y4 as cK,$50 as dK,XB as eK,jQ as fK,vR as gK,fx as hK,V0 as iK,K1 as jK,S50 as kK,VB as lK,n6 as mK,r9 as nK,vF as oK,V70 as pK,Hv as qK,Wv as rK,cF as sK,kQ as tK,HQ0 as uK,Rv as vK,U9 as wK,fF as xK,KQ0 as yK,TB as zK,s5 as AK,t5 as BK,w$ as CK,lF as DK,oF as EK,iF as FK,IB as GK,zQ0 as HK,wv as IK,Iv as JK,T0 as KK,j as LK,Sv as MK,xv as NK,bQ as OK,u2 as PK,q9 as QK,yQ as RK,gQ as SK,mQ0 as TK,dQ0 as UK,pQ0 as VK,hQ as WK,rQ0 as XK,t6 as YK,M$ as ZK,gv as _K,eF as $K,SY0 as aL,lv as bL,X20 as cL,ov as dL,I20 as eL,E20 as fL,S20 as gL,g20 as hL,m20 as iL,f20 as jL,n20 as kL,r20 as lL,Wk as mL,Bk as nL,BG0 as oL,Vk as pL,yB as qL,DG0 as rL,UG0 as sL,$L as tL,OG0 as uL,Dk as vL,e5 as wL,oX as xL,jG0 as yL,EG0 as zL,qk as AL,xG0 as BL,Ok as CL,HL as DL,KL as EL,T$ as FL,uG0 as GL,Rk as HL,Lk as IL,KJ0 as JL,WJ0 as KL,x$ as LL,BJ0 as ML,VJ0 as NL,_J0 as OL,UJ0 as PL,qJ0 as QL,OJ0 as RL,zJ0 as SL,NJ0 as TL,RJ0 as UL,v$ as VL,FL as WL,TJ0 as XL,IJ0 as YL,CJ0 as ZL,jJ0 as _L,EJ0 as $L,vJ0 as aM,kJ0 as bM,yJ0 as cM,bJ0 as dM,gJ0 as eM,hJ0 as fM,mJ0 as gM,nk as hM,cJ0 as iM,uJ0 as jM,y$ as kM,fJ0 as lM,lJ0 as mM,oJ0 as nM,PL as oM,iJ0 as pM,nJ0 as qM,rJ0 as rM,aJ0 as sM,sJ0 as tM,tJ0 as uM,eJ0 as vM,X30 as wM,Q30 as xM,Y30 as yM,Wy as zM,oB as AM,q30 as BM,O30 as CM,_y as DM,rX as EM,p$ as FM,c$ as GM,s2 as HM,A30 as IM,ny as JM,J$0 as KM,$$0 as LM,ry as MM,Z$0 as NM,cL as OM,Ny as PM,S30 as QM,Py as RM,Cy as SM,rL as TM,hy as UM,Y5 as VM,KU0 as WM,mA as XM,Gd as YM,Jd as ZM,qU0 as _M,Zd as $M,Hd as aN,mV as bN,sQ as cN,BG as dN,gU0 as eN,_6 as fN,J8 as gN,dU0 as hN,cU0 as iN,uU0 as jN,BZ as kN,dV as lN,dA as mN,pA as nN,W0 as oN,e9 as pN,pV as qN,Bd as rN,cV as sN,fU0 as tN,lU0 as uN,oU0 as vN,Q1 as wN,VZ as xN,aU0 as yN,WG as zN,sU0 as AN,$8 as BN,tU0 as CN,i1 as DN,D7 as EN,uV as FN,Ud as GN,X0 as HN,lA as IN,tQ as JN,XX as KN,f0 as LN,Uq0 as MN,wd as NN,_Z as ON,qq0 as PN,Oq0 as QN,zq0 as RN,Rq0 as SN,Fq0 as TN,Ad as UN,Lq0 as VN,wq0 as WN,Aq0 as XN,Mq0 as YN,Pq0 as ZN,Tq0 as _N,Iq0 as $N,Cq0 as aO,Md as bO,jq0 as cO,Td as dO,Eq0 as eO,Sq0 as fO,NZ as gO,xq0 as hO,lV as iO,Id as jO,yq0 as kO,bq0 as lO,gq0 as mO,hq0 as nO,mq0 as oO,dq0 as pO,Cd as qO,pq0 as rO,cq0 as sO,uq0 as tO,jd as uO,rq0 as vO,Sd as wO,aq0 as xO,sq0 as yO,tq0 as zO,eq0 as AO,XO0 as BO,QO0 as CO,YO0 as DO,xd as EO,eQ as FO,BO0 as GO,oV as HO,yA as IO,bA as JO,md as KO,dd as LO,_O0 as MO,UO0 as NO,qO0 as OO,OO0 as PO,zO0 as QO,NO0 as RO,RO0 as SO,FO0 as TO,nV as UO,rA as VO,RZ as WO,fd as XO,TO0 as YO,ld as ZO,od as _O,id as $O,nd as aP,_G as bP,FZ as cP,gA as dP,aV as eP,sV as fP,lO0 as gP,td as hP,Xp as iP,Yp as jP,$p as kP,eO0 as lP,Wp as mP,eV as nP,Nz0 as oP,Rz0 as pP,Fz0 as qP,Up as rP,Np as sP,QM as tP,pz0 as uP,Fp as vP,wp as wP,Mp as xP,rz0 as yP,E6 as zP,az0 as AP,sz0 as BP,VN0 as CP,NN0 as DP,TN0 as EP,CN0 as FP};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-f2pv705d.js";var E="./tree-sitter-markdown_inline-j5349f42.wasm";export{E as default};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{a as $B,b as zB}from"./chunk-7ayb3k5p.js";import"./chunk-5gsdnejs.js";import"./chunk-ehb4hd9c.js";import{B as XB}from"./chunk-gsez13bg.js";import{C as JB,E as VB}from"./chunk-c8k32724.js";import"./chunk-ct693qsd.js";import{X as YB,Y as ZB}from"./chunk-5ysbwr4x.js";import"./chunk-ff548b0j.js";import"./chunk-zc0cdvcv.js";import{ae as BB}from"./chunk-5w76kdjr.js";import{$f as i,Yf as g,Zf as w,_f as O}from"./chunk-41cq88js.js";import{dg as H}from"./chunk-eg3syjtv.js";import{Fg as r}from"./chunk-36xm6mgm.js";import{Bh as S}from"./chunk-v3nqkqhz.js";import"./chunk-w46g7kdq.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-6m9jb0s9.js";import"./chunk-vygkwwjd.js";import{Qj as o,Tk as e,xj as U}from"./chunk-52frd9p0.js";import"./chunk-xqnzmr7a.js";import{Ml as T}from"./chunk-r1xh50b2.js";import"./chunk-13rsd5vv.js";import"./chunk-mh19kwzw.js";import"./chunk-a9a0cwmf.js";import"./chunk-nw3e93y8.js";import"./chunk-9zm6r55d.js";import"./chunk-vcygx6hs.js";import"./chunk-khzzmyk2.js";import"./chunk-y7hgevfv.js";import"./chunk-47k5jy1p.js";import{ao as a,go as s,vo as t}from"./chunk-kn8w69g9.js";import"./chunk-ph8hn1wt.js";import"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import"./chunk-dnnkq5y4.js";import"./chunk-t239rvej.js";import"./chunk-yz25607t.js";import"./chunk-7hvf9dgx.js";import"./chunk-wkg3c643.js";import"./chunk-fhqfqd5v.js";import"./chunk-2b3fn9xv.js";import"./chunk-rn043d0r.js";import"./chunk-73r8bjjz.js";import{Gr as n}from"./chunk-t5xxs5kp.js";import"./chunk-ztyy3ga3.js";import"./chunk-mmjgf680.js";import"./chunk-nj1ntakd.js";import"./chunk-cmb62jkt.js";import"./chunk-tkrwcjkr.js";import{bs as f}from"./chunk-w2cb8cry.js";import{As as u,Bs as l,Ds as p,zs as c}from"./chunk-kj8cmn7z.js";import{Hs as A}from"./chunk-r5zy4za0.js";import{Qs as x}from"./chunk-tr6rdr6h.js";import{ct as E,et as q}from"./chunk-at22twxx.js";import"./chunk-kgptyf7n.js";import"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-55fcmswd.js";import{eH as P}from"./chunk-qnvsqnz5.js";import"./chunk-pxm4qvqk.js";import"./chunk-j8fcfhr2.js";import{wO as v}from"./chunk-r9w0thdk.js";import h from"path";import{fileURLToPath as KB}from"url";import{writeHeapSnapshot as MB}from"v8";import GB,{EOL as M}from"os";var WB={free:"free",default:"default",fast:"fast",economy:"economical",power:"power",orchestrated:"orchestrated"},m=ZB;function R(B){if(B.agent)return B.agent;return m}function QB(B,V){if(h.isAbsolute(B)||B.includes("/")||B.includes("\\")||B.startsWith(".")||B.startsWith("~"))return{error:"Directory not found: "+V};return{error:`Unknown command "${B}"`,hint:"Run `qitqode --help` to see the available commands, or pass an existing directory to start the TUI there."}}function bB(B){for(let[V,X]of Object.entries(WB))if(B[V]){let Z=f[X];if(Z)return`${Z.providerID}/${Z.modelID}`}return}function jB(B){return async(X,Z)=>{let Y=new Request(X,Z),$=Y.body?await Y.text():void 0,z=await B.call("fetch",{url:Y.url,method:Y.method,headers:Object.fromEntries(Y.headers.entries()),body:$});return new Response(z.body,{status:z.status,headers:z.headers})}}function CB(B){return{subscribe:async(V)=>{return B.on("global.event",(X)=>{V(X)})}}}async function FB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await E(KB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function _B(B){let V=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return V;if(!V)return B;return V+`
3
- `+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let $=await V.event.subscribe(),z=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),D=$.stream[Symbol.asyncIterator](),C=z.completion.then(()=>"DONE");(async()=>{try{while(!0){let W=await Promise.race([D.next(),C]);if(W==="DONE")break;let N=W;if(N.done)break;let G=N.value;z.onEvent(G);let K=G.properties;if(G.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let F=String(J.text??"").trim();if(F)process.stdout.write(F+M)}}if(G.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(G.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,F=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(F)}}}finally{z.stop(),await D.return?.(void 0).catch(()=>{})}})().catch((W)=>{console.error(W),process.exit(1)});let y=B.model?e.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:y,parts:[{type:"text",text:B.prompt}]}),z.markStarted(),await z.completion}var aB=BB({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>g(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(WB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=VB();try{JB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=bB(B)??B.model,Y=q(process.env.PWD??process.cwd()),$=B.project?q(h.isAbsolute(B.project)?B.project:h.join(Y,B.project)):q(process.cwd());if(B.project&&!await E($)){let J=QB(B.project,$);if(H.error(J.error),J.hint)H.println(J.hint);process.exitCode=1;return}let z=T($);if(z){if(B.project){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}let J=q(GB.homedir());if(T(J)){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:$,home:J}),$=J}let D=await FB();try{process.chdir($)}catch{H.error("Failed to change directory to "+$);return}let C=q(process.cwd()),I=p({[u]:"worker",[c]:l()}),y=new Worker(D,{env:I});y.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let W=n(y),N=()=>{W.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:A(J)})})};process.on("SIGUSR2",N);let G=!1,K=async()=>{if(G)return;G=!0,process.off("SIGUSR2",N),await o(W.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:A(J)})}),y.terminate()};try{let J=import("./chunk-mtpzcc14.js"),F=import("./chunk-hgmqz75r.js").then(({TuiConfig:_})=>_.get()),L=await _B(B.prompt),HB=await F;if(B.headless&&w(O(B))){H.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let k=O(B),j=w(k)?{url:(await W.call("server",k)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:jB(W),events:CB(W)};if(setTimeout(()=>{W.call("checkUpgrade",{directory:C}).catch(()=>{})},1000).unref?.(),B.headless){if(!L){H.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let Q=await r({tryOpen:!1,onCode:(b)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+b.verificationUri+M),process.stdout.write(" and enter code: "+b.userCode+M),b.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+b.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await S.runPromise(P.gen(function*(){yield*(yield*U.Service).set("forgewise",t(Q,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(Q.name||Q.email)+M)}catch(Q){H.error("SSO sign-in failed: "+A(Q)),process.exitCode=1;return}await d({url:j.url,fetch:j.fetch,prompt:L,model:Z,agent:R(B)??m,directory:C});return}let _=$B(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(_)await S.runPromise(zB(_));else if(!await S.runPromise(P.gen(function*(){if(yield*P.promise(()=>s()))return!0;return!!(yield*(yield*U.Service).get("forgewise"))}))){H.error(`Not signed in. Use one of:
2
+ import{a as $B,b as zB}from"./chunk-8jvfqh3b.js";import"./chunk-5nhwqg7c.js";import"./chunk-j6xmgn63.js";import{B as XB}from"./chunk-gsez13bg.js";import{C as JB,E as VB}from"./chunk-c8k32724.js";import"./chunk-76h0f86f.js";import{Y as YB,Z as ZB}from"./chunk-nr2j8ytn.js";import"./chunk-hhk2sp5n.js";import"./chunk-4zhrg3rv.js";import{be as BB}from"./chunk-f4mnp6xd.js";import{$f as O,Zf as g,_f as w,ag as i}from"./chunk-r4kg0z96.js";import{eg as H}from"./chunk-s06t769q.js";import{Gg as r}from"./chunk-dd4qnh8s.js";import{Ch as S}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Rj as o,Uk as e,yj as U}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import{Nl as T}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import{Ap as a,Gp as s,Vp as t}from"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import{et as n}from"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import{Bt as f}from"./chunk-gdew7bwm.js";import{$t as l,Zt as c,_t as u,bu as p}from"./chunk-v3nmnm57.js";import{fu as A}from"./chunk-hwsqqkrv.js";import{ou as x}from"./chunk-mbbxedsq.js";import{Cu as E,Eu as q}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import{EI as P}from"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import{WP as v}from"./chunk-f2pv705d.js";import h from"path";import{fileURLToPath as KB}from"url";import{writeHeapSnapshot as MB}from"v8";import GB,{EOL as M}from"os";var WB={free:"free",adaptive:"adaptive",fast:"fast",economical:"economical",maxInt:"max-int",orchestrated:"orchestrated"},m=ZB;function R(B){if(B.agent)return B.agent;return m}function QB(B,V){if(h.isAbsolute(B)||B.includes("/")||B.includes("\\")||B.startsWith(".")||B.startsWith("~"))return{error:"Directory not found: "+V};return{error:`Unknown command "${B}"`,hint:"Run `qitqode --help` to see the available commands, or pass an existing directory to start the TUI there."}}function bB(B){for(let[V,X]of Object.entries(WB))if(B[V]){let Z=f[X];if(Z)return`${Z.providerID}/${Z.modelID}`}return}function jB(B){return async(X,Z)=>{let Y=new Request(X,Z),$=Y.body?await Y.text():void 0,z=await B.call("fetch",{url:Y.url,method:Y.method,headers:Object.fromEntries(Y.headers.entries()),body:$});return new Response(z.body,{status:z.status,headers:z.headers})}}function CB(B){return{subscribe:async(V)=>{return B.on("global.event",(X)=>{V(X)})}}}async function FB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await E(KB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function _B(B){let V=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return V;if(!V)return B;return V+`
3
+ `+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let $=await V.event.subscribe(),z=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),D=$.stream[Symbol.asyncIterator](),C=z.completion.then(()=>"DONE");(async()=>{try{while(!0){let W=await Promise.race([D.next(),C]);if(W==="DONE")break;let N=W;if(N.done)break;let G=N.value;z.onEvent(G);let K=G.properties;if(G.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let F=String(J.text??"").trim();if(F)process.stdout.write(F+M)}}if(G.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(G.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,F=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(F)}}}finally{z.stop(),await D.return?.(void 0).catch(()=>{})}})().catch((W)=>{console.error(W),process.exit(1)});let y=B.model?e.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:y,parts:[{type:"text",text:B.prompt}]}),z.markStarted(),await z.completion}var aB=BB({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>g(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(WB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=VB();try{JB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=bB(B)??B.model,Y=q(process.env.PWD??process.cwd()),$=B.project?q(h.isAbsolute(B.project)?B.project:h.join(Y,B.project)):q(process.cwd());if(B.project&&!await E($)){let J=QB(B.project,$);if(H.error(J.error),J.hint)H.println(J.hint);process.exitCode=1;return}let z=T($);if(z){if(B.project){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}let J=q(GB.homedir());if(T(J)){H.error("Cannot start in "+$+": "+z),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:$,home:J}),$=J}let D=await FB();try{process.chdir($)}catch{H.error("Failed to change directory to "+$);return}let C=q(process.cwd()),I=p({[u]:"worker",[c]:l()}),y=new Worker(D,{env:I});y.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let W=n(y),N=()=>{W.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:A(J)})})};process.on("SIGUSR2",N);let G=!1,K=async()=>{if(G)return;G=!0,process.off("SIGUSR2",N),await o(W.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:A(J)})}),y.terminate()};try{let J=import("./chunk-8rqbx4jw.js"),F=import("./chunk-zg7kesbp.js").then(({TuiConfig:_})=>_.get()),L=await _B(B.prompt),HB=await F;if(B.headless&&w(O(B))){H.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let k=O(B),j=w(k)?{url:(await W.call("server",k)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:jB(W),events:CB(W)};if(setTimeout(()=>{W.call("checkUpgrade",{directory:C}).catch(()=>{})},1000).unref?.(),B.headless){if(!L){H.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let Q=await r({tryOpen:!1,onCode:(b)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+b.verificationUri+M),process.stdout.write(" and enter code: "+b.userCode+M),b.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+b.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await S.runPromise(P.gen(function*(){yield*(yield*U.Service).set("forgewise",t(Q,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(Q.name||Q.email)+M)}catch(Q){H.error("SSO sign-in failed: "+A(Q)),process.exitCode=1;return}await d({url:j.url,fetch:j.fetch,prompt:L,model:Z,agent:R(B)??m,directory:C});return}let _=$B(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(_)await S.runPromise(zB(_));else if(!await S.runPromise(P.gen(function*(){if(yield*P.promise(()=>s()))return!0;return!!(yield*(yield*U.Service).get("forgewise"))}))){H.error(`Not signed in. Use one of:
4
4
  qitqode auth login (browser / device-code flow)
5
5
  qitqode auth login --api-key (paste a Qortex API key)
6
6
  --api-key <key> (inline for this run)
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Lr as x}from"./chunk-ztyy3ga3.js";import{As as H,ds as K,es as j,ss as V,zs as q}from"./chunk-kj8cmn7z.js";import{ft as M,kt as I}from"./chunk-at22twxx.js";import{ZD as v,eH as _}from"./chunk-qnvsqnz5.js";import{uO as a}from"./chunk-r9w0thdk.js";var U={};a(U,{validateArchiveMetadata:()=>P,validateArchiveEntries:()=>g,replaceDirectoryAtomically:()=>C,extractZip:()=>p,assertArchiveDestinationSafe:()=>T});import m from"path";import c from"fs/promises";function g(o,r){let n=m.resolve(r);for(let e of o){let t=e.trim().replaceAll("\\","/");if(!t)continue;if(t.includes("\x00")||m.posix.isAbsolute(t)||/^[a-z]:\//i.test(t))throw Error(`Unsafe archive entry: ${e}`);if(t.split("/").includes(".."))throw Error(`Unsafe archive entry: ${e}`);let s=m.resolve(n,...t.split("/"));if(s!==n&&!s.startsWith(`${n}${m.sep}`))throw Error(`Unsafe archive entry: ${e}`)}}function P(o){for(let r of o.split(/\r?\n/))if(/^[bclps]/.test(r))throw Error("Archive contains an unsafe special entry")}async function u(o){let r=await c.readdir(o,{withFileTypes:!0});await Promise.all(r.map(async(n)=>{let e=m.join(o,n.name);if(n.isSymbolicLink())throw Error(`Archive contains a symbolic link: ${n.name}`);if(n.isDirectory())await u(e)}))}async function b(o){return c.lstat(o).catch((r)=>{if(r.code==="ENOENT")return;throw r})}async function T(o){let r=m.resolve(o),n=m.parse(r),e=n.root;for(let t of r.slice(n.root.length).split(m.sep).filter(Boolean)){e=m.join(e,t);let s=await b(e);if(!s)return;if(s.isSymbolicLink())throw Error(`Archive destination contains a symbolic link: ${e}`)}}async function C(o,r){let n=m.resolve(r);await T(n);let e=await b(n);if(e&&!e.isDirectory())throw Error("Archive destination must be a directory");let t=m.join(m.dirname(n),`.qitqode-backup-${crypto.randomUUID()}`);if(e)await c.rename(n,t);try{await c.rename(o,n)}catch(s){if(e)await c.rename(t,n);throw s}if(e)await c.rm(t,{recursive:!0,force:!0})}async function p(o,r){let n=m.resolve(o),e=m.resolve(r),t=await x(process.platform==="win32"?["tar","-tf",n]:["unzip","-Z1",n]);g(t.stdout.toString().split(/\r?\n/),e);let s=await x(process.platform==="win32"?["tar","-tvf",n]:["unzip","-Z","-l",n]);P(s.stdout.toString()),await T(m.dirname(e)),await c.mkdir(m.dirname(e),{recursive:!0}),await T(m.dirname(e));let f=await c.mkdtemp(m.join(m.dirname(e),".qitqode-extract-"));try{if(process.platform==="win32"){let w=n.replace(/'/g,"''"),R=f.replace(/'/g,"''"),S=`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${w}' -DestinationPath '${R}' -Force`;await x(["powershell","-NoProfile","-NonInteractive","-Command",S])}else await x(["unzip","-o","-q",n,"-d",f]);await u(f),await C(f,e)}finally{await c.rm(f,{recursive:!0,force:!0})}}var $={};a($,{isValidHex:()=>J,hexToRgb:()=>F,hexToAnsiBold:()=>y});function J(o){if(!o)return!1;return/^#[0-9a-fA-F]{6}$/.test(o)}function F(o){let r=parseInt(o.slice(1,3),16),n=parseInt(o.slice(3,5),16),e=parseInt(o.slice(5,7),16);return{r,g:n,b:e}}function y(o){if(!J(o))return;let{r,g:n,b:e}=F(o);return`\x1B[38;2;${r};${n};${e}m\x1B[1m`}var Q={};a(Q,{awaitDeferred:()=>k});function k(o,r){return _.ensuring(v.await(o),_.sync(r))}import d from"os";import oo from"path";var i;async function A(){if(i)return i;let o=oo.join(I.Path.data,"installation_id"),r=await M.readText(o).catch(()=>{return});if(r&&r.trim())return i=r.trim(),i;return i=crypto.randomUUID(),await M.write(o,i),i}function ro(){if(process.env.USER)return process.env.USER;if(process.env.USERNAME)return process.env.USERNAME;return d.userInfo().username}function no(){return Intl.DateTimeFormat().resolvedOptions().locale}function eo(){return Intl.DateTimeFormat().resolvedOptions().timeZone}async function to(){let o=d.cpus();return{os:{platform:d.platform(),arch:d.arch(),release:d.release(),hostname:d.hostname()},cpu:{model:o[0]?.model??"unknown",count:o.length},memory:{total_bytes:d.totalmem()},user:{username:ro(),homedir:d.homedir()},runtime:{bun_version:Bun.version,node_version:process.versions.node,pid:process.pid,timezone:eo(),locale:no()},paths:{cwd:process.cwd(),data:I.Path.data,config:I.Path.config},qitqode:{version:K,channel:j,installation_id:await A(),run_id:q,process_role:H}}}var W={};a(W,{toString:()=>mo,parse:()=>co,match:()=>so,fromParsedKey:()=>fo});function so(o,r){if(!o)return!1;let n={...o,super:o.super??!1},e={...r,super:r.super??!1};return V(n,e)}function fo(o,r=!1){return{name:o.name===" "?"space":o.name,ctrl:o.ctrl,meta:o.meta,shift:o.shift,super:o.super??!1,leader:r}}function mo(o){if(!o)return"";let r=[];if(o.ctrl)r.push("ctrl");if(o.meta)r.push("alt");if(o.super)r.push("super");if(o.shift)r.push("shift");if(o.name)if(o.name==="delete")r.push("del");else r.push(o.name);let n=r.join("+");if(o.leader)n=n?`<leader> ${n}`:"<leader>";return n}function co(o){if(o==="none")return[];return o.split(",").map((r)=>{let e=r.replace(/<leader>/g,"leader+").toLowerCase().split("+"),t={ctrl:!1,meta:!1,shift:!1,leader:!1,name:""};for(let s of e)switch(s){case"ctrl":t.ctrl=!0;break;case"alt":case"meta":case"option":t.meta=!0;break;case"super":t.super=!0;break;case"shift":t.shift=!0;break;case"leader":t.leader=!0;break;case"esc":t.name="escape";break;default:t.name=s;break}return t})}var B={};a(B,{create:()=>io,NotFound:()=>O});import{AsyncLocalStorage as ao}from"async_hooks";class O extends Error{name;constructor(o){super(`No context found for ${o}`);this.name=o}}function io(o){let r=new ao;return{use(){let n=r.getStore();if(!n)throw new O(o);return n},provide(n,e){return r.run(n,e)}}}var X={};a(X,{truncateMiddle:()=>To,truncate:()=>Ro,todayTimeOrDateTime:()=>xo,titlecase:()=>wo,time:()=>N,pluralize:()=>Mo,number:()=>Io,duration:()=>Eo,datetime:()=>G});function wo(o){return o.replace(/\b\w/g,(r)=>r.toUpperCase())}function N(o){return new Date(o).toLocaleTimeString(void 0,{timeStyle:"short"})}function G(o){let r=new Date(o),n=N(o),e=r.toLocaleDateString();return`${n} \xB7 ${e}`}function xo(o){let r=new Date(o),n=new Date;if(r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate())return N(o);else return G(o)}function Io(o){if(o>=1e6)return(o/1e6).toFixed(1)+"M";else if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()}function Eo(o){if(o<1000)return`${o}ms`;if(o<60000)return`${(o/1000).toFixed(1)}s`;if(o<3600000){let e=Math.floor(o/60000),t=Math.floor(o%60000/1000);return`${e}m ${t}s`}if(o<86400000){let e=Math.floor(o/3600000),t=Math.floor(o%3600000/60000);return`${e}h ${t}m`}let r=Math.floor(o%86400000/3600000);return`${Math.floor(o/86400000)}d ${r}h`}function Ro(o,r){if(r<=0)return"";if(o.length<=r)return o;return o.slice(0,r-1)+"\u2026"}function To(o,r=35){if(r<=0)return"";if(o.length<=r)return o;let n="\u2026",e=Math.ceil((r-n.length)/2),t=Math.floor((r-n.length)/2);return o.slice(0,e)+n+(t>0?o.slice(-t):"")}function Mo(o,r,n){return(o===1?r:n).replace("{}",o.toString())}var h={};a(h,{write:()=>Oo,read:()=>_o});var E=new Map;function Y(o){if(!E.has(o))E.set(o,{readers:0,writer:!1,waitingReaders:[],waitingWriters:[]});return E.get(o)}function So(o){let r=E.get(o);if(!r||r.writer||r.readers>0)return;if(r.waitingWriters.length>0){r.waitingWriters.shift()();return}while(r.waitingReaders.length>0)r.waitingReaders.shift()();if(r.readers===0&&!r.writer&&r.waitingReaders.length===0&&r.waitingWriters.length===0)E.delete(o)}function L(o){return new Promise((r)=>{let n=()=>{o.acquire();let e=!1;r({[Symbol.dispose]:()=>{if(e)return;e=!0,o.release(),So(o.key)}})};if(o.available())n();else o.waiting.push(n)})}async function _o(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.waitingWriters.length===0,acquire:()=>r.readers++,release:()=>r.readers--,waiting:r.waitingReaders})}async function Oo(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.readers===0,acquire:()=>{r.writer=!0},release:()=>{r.writer=!1},waiting:r.waitingWriters})}var z={};a(z,{listen:()=>No,emit:()=>go,client:()=>Po});function No(o){onmessage=async(r)=>{let n=JSON.parse(r.data);if(n.type==="rpc.request")try{let e=await o[n.method](n.input);postMessage(JSON.stringify({type:"rpc.result",result:e,id:n.id}))}catch(e){postMessage(JSON.stringify({type:"rpc.result",error:e instanceof Error?e.message:String(e),id:n.id}))}}}function go(o,r){postMessage(JSON.stringify({type:"rpc.event",event:o,data:r}))}function Po(o){let r=new Map,n=new Map,e=0;return o.onmessage=async(t)=>{let s=JSON.parse(t.data);if(s.type==="rpc.result"){let f=r.get(s.id);if(f)if(r.delete(s.id),"error"in s)f.reject(Error(typeof s.error==="string"?s.error:"RPC call failed"));else f.resolve(s.result)}if(s.type==="rpc.event"){let f=n.get(s.event);if(f)for(let w of f)w(s.data)}},{call(t,s){let f=e++;return new Promise((w,R)=>{r.set(f,{resolve:w,reject:R});try{o.postMessage(JSON.stringify({type:"rpc.request",method:t,input:s,id:f}))}catch(S){r.delete(f),R(S)}})},on(t,s){let f=n.get(t);if(!f)f=new Set,n.set(t,f);return f.add(s),()=>{f.delete(s)}}}}var D={};a(D,{estimate:()=>Z});function Z(o){return Math.max(0,Math.round((o||"").length/4))}export{U as xr,$ as yr,Q as zr,A as Ar,to as Br,W as Cr,B as Dr,X as Er,h as Fr,Po as Gr,z as Hr,D as Ir};
2
+ import{jt as x}from"./chunk-01e3v1xz.js";import{Dt as K,Et as j,St as V,Zt as q,_t as H}from"./chunk-v3nmnm57.js";import{Fu as M,Ku as I}from"./chunk-aa2n02qk.js";import{EI as _,xF as v}from"./chunk-tezrgfc6.js";import{UP as a}from"./chunk-f2pv705d.js";var U={};a(U,{validateArchiveMetadata:()=>P,validateArchiveEntries:()=>g,replaceDirectoryAtomically:()=>C,extractZip:()=>p,assertArchiveDestinationSafe:()=>T});import m from"path";import c from"fs/promises";function g(o,r){let n=m.resolve(r);for(let e of o){let t=e.trim().replaceAll("\\","/");if(!t)continue;if(t.includes("\x00")||m.posix.isAbsolute(t)||/^[a-z]:\//i.test(t))throw Error(`Unsafe archive entry: ${e}`);if(t.split("/").includes(".."))throw Error(`Unsafe archive entry: ${e}`);let s=m.resolve(n,...t.split("/"));if(s!==n&&!s.startsWith(`${n}${m.sep}`))throw Error(`Unsafe archive entry: ${e}`)}}function P(o){for(let r of o.split(/\r?\n/))if(/^[bclps]/.test(r))throw Error("Archive contains an unsafe special entry")}async function u(o){let r=await c.readdir(o,{withFileTypes:!0});await Promise.all(r.map(async(n)=>{let e=m.join(o,n.name);if(n.isSymbolicLink())throw Error(`Archive contains a symbolic link: ${n.name}`);if(n.isDirectory())await u(e)}))}async function b(o){return c.lstat(o).catch((r)=>{if(r.code==="ENOENT")return;throw r})}async function T(o){let r=m.resolve(o),n=m.parse(r),e=n.root;for(let t of r.slice(n.root.length).split(m.sep).filter(Boolean)){e=m.join(e,t);let s=await b(e);if(!s)return;if(s.isSymbolicLink())throw Error(`Archive destination contains a symbolic link: ${e}`)}}async function C(o,r){let n=m.resolve(r);await T(n);let e=await b(n);if(e&&!e.isDirectory())throw Error("Archive destination must be a directory");let t=m.join(m.dirname(n),`.qitqode-backup-${crypto.randomUUID()}`);if(e)await c.rename(n,t);try{await c.rename(o,n)}catch(s){if(e)await c.rename(t,n);throw s}if(e)await c.rm(t,{recursive:!0,force:!0})}async function p(o,r){let n=m.resolve(o),e=m.resolve(r),t=await x(process.platform==="win32"?["tar","-tf",n]:["unzip","-Z1",n]);g(t.stdout.toString().split(/\r?\n/),e);let s=await x(process.platform==="win32"?["tar","-tvf",n]:["unzip","-Z","-l",n]);P(s.stdout.toString()),await T(m.dirname(e)),await c.mkdir(m.dirname(e),{recursive:!0}),await T(m.dirname(e));let f=await c.mkdtemp(m.join(m.dirname(e),".qitqode-extract-"));try{if(process.platform==="win32"){let w=n.replace(/'/g,"''"),R=f.replace(/'/g,"''"),S=`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${w}' -DestinationPath '${R}' -Force`;await x(["powershell","-NoProfile","-NonInteractive","-Command",S])}else await x(["unzip","-o","-q",n,"-d",f]);await u(f),await C(f,e)}finally{await c.rm(f,{recursive:!0,force:!0})}}var $={};a($,{isValidHex:()=>J,hexToRgb:()=>F,hexToAnsiBold:()=>y});function J(o){if(!o)return!1;return/^#[0-9a-fA-F]{6}$/.test(o)}function F(o){let r=parseInt(o.slice(1,3),16),n=parseInt(o.slice(3,5),16),e=parseInt(o.slice(5,7),16);return{r,g:n,b:e}}function y(o){if(!J(o))return;let{r,g:n,b:e}=F(o);return`\x1B[38;2;${r};${n};${e}m\x1B[1m`}var Q={};a(Q,{awaitDeferred:()=>k});function k(o,r){return _.ensuring(v.await(o),_.sync(r))}import d from"os";import oo from"path";var i;async function A(){if(i)return i;let o=oo.join(I.Path.data,"installation_id"),r=await M.readText(o).catch(()=>{return});if(r&&r.trim())return i=r.trim(),i;return i=crypto.randomUUID(),await M.write(o,i),i}function ro(){if(process.env.USER)return process.env.USER;if(process.env.USERNAME)return process.env.USERNAME;return d.userInfo().username}function no(){return Intl.DateTimeFormat().resolvedOptions().locale}function eo(){return Intl.DateTimeFormat().resolvedOptions().timeZone}async function to(){let o=d.cpus();return{os:{platform:d.platform(),arch:d.arch(),release:d.release(),hostname:d.hostname()},cpu:{model:o[0]?.model??"unknown",count:o.length},memory:{total_bytes:d.totalmem()},user:{username:ro(),homedir:d.homedir()},runtime:{bun_version:Bun.version,node_version:process.versions.node,pid:process.pid,timezone:eo(),locale:no()},paths:{cwd:process.cwd(),data:I.Path.data,config:I.Path.config},qitqode:{version:K,channel:j,installation_id:await A(),run_id:q,process_role:H}}}var W={};a(W,{toString:()=>mo,parse:()=>co,match:()=>so,fromParsedKey:()=>fo});function so(o,r){if(!o)return!1;let n={...o,super:o.super??!1},e={...r,super:r.super??!1};return V(n,e)}function fo(o,r=!1){return{name:o.name===" "?"space":o.name,ctrl:o.ctrl,meta:o.meta,shift:o.shift,super:o.super??!1,leader:r}}function mo(o){if(!o)return"";let r=[];if(o.ctrl)r.push("ctrl");if(o.meta)r.push("alt");if(o.super)r.push("super");if(o.shift)r.push("shift");if(o.name)if(o.name==="delete")r.push("del");else r.push(o.name);let n=r.join("+");if(o.leader)n=n?`<leader> ${n}`:"<leader>";return n}function co(o){if(o==="none")return[];return o.split(",").map((r)=>{let e=r.replace(/<leader>/g,"leader+").toLowerCase().split("+"),t={ctrl:!1,meta:!1,shift:!1,leader:!1,name:""};for(let s of e)switch(s){case"ctrl":t.ctrl=!0;break;case"alt":case"meta":case"option":t.meta=!0;break;case"super":t.super=!0;break;case"shift":t.shift=!0;break;case"leader":t.leader=!0;break;case"esc":t.name="escape";break;default:t.name=s;break}return t})}var B={};a(B,{create:()=>io,NotFound:()=>O});import{AsyncLocalStorage as ao}from"async_hooks";class O extends Error{name;constructor(o){super(`No context found for ${o}`);this.name=o}}function io(o){let r=new ao;return{use(){let n=r.getStore();if(!n)throw new O(o);return n},provide(n,e){return r.run(n,e)}}}var X={};a(X,{truncateMiddle:()=>To,truncate:()=>Ro,todayTimeOrDateTime:()=>xo,titlecase:()=>wo,time:()=>N,pluralize:()=>Mo,number:()=>Io,duration:()=>Eo,datetime:()=>G});function wo(o){return o.replace(/\b\w/g,(r)=>r.toUpperCase())}function N(o){return new Date(o).toLocaleTimeString(void 0,{timeStyle:"short"})}function G(o){let r=new Date(o),n=N(o),e=r.toLocaleDateString();return`${n} \xB7 ${e}`}function xo(o){let r=new Date(o),n=new Date;if(r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate())return N(o);else return G(o)}function Io(o){if(o>=1e6)return(o/1e6).toFixed(1)+"M";else if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()}function Eo(o){if(o<1000)return`${o}ms`;if(o<60000)return`${(o/1000).toFixed(1)}s`;if(o<3600000){let e=Math.floor(o/60000),t=Math.floor(o%60000/1000);return`${e}m ${t}s`}if(o<86400000){let e=Math.floor(o/3600000),t=Math.floor(o%3600000/60000);return`${e}h ${t}m`}let r=Math.floor(o%86400000/3600000);return`${Math.floor(o/86400000)}d ${r}h`}function Ro(o,r){if(r<=0)return"";if(o.length<=r)return o;return o.slice(0,r-1)+"\u2026"}function To(o,r=35){if(r<=0)return"";if(o.length<=r)return o;let n="\u2026",e=Math.ceil((r-n.length)/2),t=Math.floor((r-n.length)/2);return o.slice(0,e)+n+(t>0?o.slice(-t):"")}function Mo(o,r,n){return(o===1?r:n).replace("{}",o.toString())}var h={};a(h,{write:()=>Oo,read:()=>_o});var E=new Map;function Y(o){if(!E.has(o))E.set(o,{readers:0,writer:!1,waitingReaders:[],waitingWriters:[]});return E.get(o)}function So(o){let r=E.get(o);if(!r||r.writer||r.readers>0)return;if(r.waitingWriters.length>0){r.waitingWriters.shift()();return}while(r.waitingReaders.length>0)r.waitingReaders.shift()();if(r.readers===0&&!r.writer&&r.waitingReaders.length===0&&r.waitingWriters.length===0)E.delete(o)}function L(o){return new Promise((r)=>{let n=()=>{o.acquire();let e=!1;r({[Symbol.dispose]:()=>{if(e)return;e=!0,o.release(),So(o.key)}})};if(o.available())n();else o.waiting.push(n)})}async function _o(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.waitingWriters.length===0,acquire:()=>r.readers++,release:()=>r.readers--,waiting:r.waitingReaders})}async function Oo(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.readers===0,acquire:()=>{r.writer=!0},release:()=>{r.writer=!1},waiting:r.waitingWriters})}var z={};a(z,{listen:()=>No,emit:()=>go,client:()=>Po});function No(o){onmessage=async(r)=>{let n=JSON.parse(r.data);if(n.type==="rpc.request")try{let e=await o[n.method](n.input);postMessage(JSON.stringify({type:"rpc.result",result:e,id:n.id}))}catch(e){postMessage(JSON.stringify({type:"rpc.result",error:e instanceof Error?e.message:String(e),id:n.id}))}}}function go(o,r){postMessage(JSON.stringify({type:"rpc.event",event:o,data:r}))}function Po(o){let r=new Map,n=new Map,e=0;return o.onmessage=async(t)=>{let s=JSON.parse(t.data);if(s.type==="rpc.result"){let f=r.get(s.id);if(f)if(r.delete(s.id),"error"in s)f.reject(Error(typeof s.error==="string"?s.error:"RPC call failed"));else f.resolve(s.result)}if(s.type==="rpc.event"){let f=n.get(s.event);if(f)for(let w of f)w(s.data)}},{call(t,s){let f=e++;return new Promise((w,R)=>{r.set(f,{resolve:w,reject:R});try{o.postMessage(JSON.stringify({type:"rpc.request",method:t,input:s,id:f}))}catch(S){r.delete(f),R(S)}})},on(t,s){let f=n.get(t);if(!f)f=new Set,n.set(t,f);return f.add(s),()=>{f.delete(s)}}}}var D={};a(D,{estimate:()=>Z});function Z(o){return Math.max(0,Math.round((o||"").length/4))}export{U as Xs,$ as Ys,Q as Zs,A as _s,to as $s,W as at,B as bt,X as ct,h as dt,Po as et,z as ft,D as gt};