mailcast 0.0.0-stage → 0.1.0

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 (1342) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +63 -0
  3. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +500 -0
  4. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
  5. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +189 -0
  6. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
  7. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
  8. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
  9. package/.next/build/chunks/[turbopack]_runtime.js +1054 -0
  10. package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
  11. package/.next/build/chunks/node_modules__pnpm_1e0eoiefxqbi6._.js +7265 -0
  12. package/.next/build/chunks/node_modules__pnpm_1e0eoiefxqbi6._.js.map +47 -0
  13. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
  14. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
  15. package/.next/build/package.json +1 -0
  16. package/.next/build-manifest.json +223 -0
  17. package/.next/diagnostics/build-diagnostics.json +6 -0
  18. package/.next/diagnostics/framework.json +1 -0
  19. package/.next/diagnostics/route-bundle-stats.json +305 -0
  20. package/.next/export-marker.json +6 -0
  21. package/.next/fallback-build-manifest.json +15 -0
  22. package/.next/images-manifest.json +68 -0
  23. package/.next/next-minimal-server.js.nft.json +1 -0
  24. package/.next/next-server.js.nft.json +1 -0
  25. package/.next/package.json +1 -0
  26. package/.next/prerender-manifest.json +209 -0
  27. package/.next/required-server-files.js +370 -0
  28. package/.next/required-server-files.json +370 -0
  29. package/.next/routes-manifest.json +456 -0
  30. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  31. package/.next/server/app/_global-error/page/build-manifest.json +22 -0
  32. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  33. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  34. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  35. package/.next/server/app/_global-error/page.js +11 -0
  36. package/.next/server/app/_global-error/page.js.map +5 -0
  37. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  38. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  39. package/.next/server/app/_global-error.html +1 -0
  40. package/.next/server/app/_global-error.meta +30 -0
  41. package/.next/server/app/_global-error.rsc +18 -0
  42. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  43. package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  44. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  45. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  46. package/.next/server/app/_not-found/page/build-manifest.json +22 -0
  47. package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  48. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  49. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  50. package/.next/server/app/_not-found/page.js +13 -0
  51. package/.next/server/app/_not-found/page.js.map +5 -0
  52. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  53. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  54. package/.next/server/app/_not-found.html +1 -0
  55. package/.next/server/app/_not-found.meta +35 -0
  56. package/.next/server/app/_not-found.rsc +25 -0
  57. package/.next/server/app/_not-found.segments/_full.segment.rsc +25 -0
  58. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +31 -0
  59. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  60. package/.next/server/app/api/auth/login/route/app-paths-manifest.json +3 -0
  61. package/.next/server/app/api/auth/login/route/build-manifest.json +12 -0
  62. package/.next/server/app/api/auth/login/route/server-reference-manifest.json +4 -0
  63. package/.next/server/app/api/auth/login/route.js +10 -0
  64. package/.next/server/app/api/auth/login/route.js.map +5 -0
  65. package/.next/server/app/api/auth/login/route.js.nft.json +1 -0
  66. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +3 -0
  67. package/.next/server/app/api/auth/logout/route/app-paths-manifest.json +3 -0
  68. package/.next/server/app/api/auth/logout/route/build-manifest.json +12 -0
  69. package/.next/server/app/api/auth/logout/route/server-reference-manifest.json +4 -0
  70. package/.next/server/app/api/auth/logout/route.js +10 -0
  71. package/.next/server/app/api/auth/logout/route.js.map +5 -0
  72. package/.next/server/app/api/auth/logout/route.js.nft.json +1 -0
  73. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +3 -0
  74. package/.next/server/app/api/auth/session/route/app-paths-manifest.json +3 -0
  75. package/.next/server/app/api/auth/session/route/build-manifest.json +12 -0
  76. package/.next/server/app/api/auth/session/route/server-reference-manifest.json +4 -0
  77. package/.next/server/app/api/auth/session/route.js +10 -0
  78. package/.next/server/app/api/auth/session/route.js.map +5 -0
  79. package/.next/server/app/api/auth/session/route.js.nft.json +1 -0
  80. package/.next/server/app/api/auth/session/route_client-reference-manifest.js +3 -0
  81. package/.next/server/app/api/auth/setup/route/app-paths-manifest.json +3 -0
  82. package/.next/server/app/api/auth/setup/route/build-manifest.json +12 -0
  83. package/.next/server/app/api/auth/setup/route/server-reference-manifest.json +4 -0
  84. package/.next/server/app/api/auth/setup/route.js +10 -0
  85. package/.next/server/app/api/auth/setup/route.js.map +5 -0
  86. package/.next/server/app/api/auth/setup/route.js.nft.json +1 -0
  87. package/.next/server/app/api/auth/setup/route_client-reference-manifest.js +3 -0
  88. package/.next/server/app/api/campaigns/[id]/publish/route/app-paths-manifest.json +3 -0
  89. package/.next/server/app/api/campaigns/[id]/publish/route/build-manifest.json +12 -0
  90. package/.next/server/app/api/campaigns/[id]/publish/route/server-reference-manifest.json +4 -0
  91. package/.next/server/app/api/campaigns/[id]/publish/route.js +9 -0
  92. package/.next/server/app/api/campaigns/[id]/publish/route.js.map +5 -0
  93. package/.next/server/app/api/campaigns/[id]/publish/route.js.nft.json +1 -0
  94. package/.next/server/app/api/campaigns/[id]/publish/route_client-reference-manifest.js +3 -0
  95. package/.next/server/app/api/campaigns/[id]/route/app-paths-manifest.json +3 -0
  96. package/.next/server/app/api/campaigns/[id]/route/build-manifest.json +12 -0
  97. package/.next/server/app/api/campaigns/[id]/route/server-reference-manifest.json +4 -0
  98. package/.next/server/app/api/campaigns/[id]/route.js +8 -0
  99. package/.next/server/app/api/campaigns/[id]/route.js.map +5 -0
  100. package/.next/server/app/api/campaigns/[id]/route.js.nft.json +1 -0
  101. package/.next/server/app/api/campaigns/[id]/route_client-reference-manifest.js +3 -0
  102. package/.next/server/app/api/campaigns/[id]/send/route/app-paths-manifest.json +3 -0
  103. package/.next/server/app/api/campaigns/[id]/send/route/build-manifest.json +12 -0
  104. package/.next/server/app/api/campaigns/[id]/send/route/server-reference-manifest.json +4 -0
  105. package/.next/server/app/api/campaigns/[id]/send/route.js +13 -0
  106. package/.next/server/app/api/campaigns/[id]/send/route.js.map +5 -0
  107. package/.next/server/app/api/campaigns/[id]/send/route.js.nft.json +1 -0
  108. package/.next/server/app/api/campaigns/[id]/send/route_client-reference-manifest.js +3 -0
  109. package/.next/server/app/api/campaigns/[id]/stats/route/app-paths-manifest.json +3 -0
  110. package/.next/server/app/api/campaigns/[id]/stats/route/build-manifest.json +12 -0
  111. package/.next/server/app/api/campaigns/[id]/stats/route/server-reference-manifest.json +4 -0
  112. package/.next/server/app/api/campaigns/[id]/stats/route.js +8 -0
  113. package/.next/server/app/api/campaigns/[id]/stats/route.js.map +5 -0
  114. package/.next/server/app/api/campaigns/[id]/stats/route.js.nft.json +1 -0
  115. package/.next/server/app/api/campaigns/[id]/stats/route_client-reference-manifest.js +3 -0
  116. package/.next/server/app/api/campaigns/all/route/app-paths-manifest.json +3 -0
  117. package/.next/server/app/api/campaigns/all/route/build-manifest.json +12 -0
  118. package/.next/server/app/api/campaigns/all/route/server-reference-manifest.json +4 -0
  119. package/.next/server/app/api/campaigns/all/route.js +8 -0
  120. package/.next/server/app/api/campaigns/all/route.js.map +5 -0
  121. package/.next/server/app/api/campaigns/all/route.js.nft.json +1 -0
  122. package/.next/server/app/api/campaigns/all/route_client-reference-manifest.js +3 -0
  123. package/.next/server/app/api/campaigns/route/app-paths-manifest.json +3 -0
  124. package/.next/server/app/api/campaigns/route/build-manifest.json +12 -0
  125. package/.next/server/app/api/campaigns/route/server-reference-manifest.json +4 -0
  126. package/.next/server/app/api/campaigns/route.js +9 -0
  127. package/.next/server/app/api/campaigns/route.js.map +5 -0
  128. package/.next/server/app/api/campaigns/route.js.nft.json +1 -0
  129. package/.next/server/app/api/campaigns/route_client-reference-manifest.js +3 -0
  130. package/.next/server/app/api/contacts/[id]/route/app-paths-manifest.json +3 -0
  131. package/.next/server/app/api/contacts/[id]/route/build-manifest.json +12 -0
  132. package/.next/server/app/api/contacts/[id]/route/server-reference-manifest.json +4 -0
  133. package/.next/server/app/api/contacts/[id]/route.js +8 -0
  134. package/.next/server/app/api/contacts/[id]/route.js.map +5 -0
  135. package/.next/server/app/api/contacts/[id]/route.js.nft.json +1 -0
  136. package/.next/server/app/api/contacts/[id]/route_client-reference-manifest.js +3 -0
  137. package/.next/server/app/api/contacts/all/route/app-paths-manifest.json +3 -0
  138. package/.next/server/app/api/contacts/all/route/build-manifest.json +12 -0
  139. package/.next/server/app/api/contacts/all/route/server-reference-manifest.json +4 -0
  140. package/.next/server/app/api/contacts/all/route.js +8 -0
  141. package/.next/server/app/api/contacts/all/route.js.map +5 -0
  142. package/.next/server/app/api/contacts/all/route.js.nft.json +1 -0
  143. package/.next/server/app/api/contacts/all/route_client-reference-manifest.js +3 -0
  144. package/.next/server/app/api/contacts/import/route/app-paths-manifest.json +3 -0
  145. package/.next/server/app/api/contacts/import/route/build-manifest.json +12 -0
  146. package/.next/server/app/api/contacts/import/route/server-reference-manifest.json +4 -0
  147. package/.next/server/app/api/contacts/import/route.js +8 -0
  148. package/.next/server/app/api/contacts/import/route.js.map +5 -0
  149. package/.next/server/app/api/contacts/import/route.js.nft.json +1 -0
  150. package/.next/server/app/api/contacts/import/route_client-reference-manifest.js +3 -0
  151. package/.next/server/app/api/contacts/route/app-paths-manifest.json +3 -0
  152. package/.next/server/app/api/contacts/route/build-manifest.json +12 -0
  153. package/.next/server/app/api/contacts/route/server-reference-manifest.json +4 -0
  154. package/.next/server/app/api/contacts/route.js +8 -0
  155. package/.next/server/app/api/contacts/route.js.map +5 -0
  156. package/.next/server/app/api/contacts/route.js.nft.json +1 -0
  157. package/.next/server/app/api/contacts/route_client-reference-manifest.js +3 -0
  158. package/.next/server/app/api/cron/route/app-paths-manifest.json +3 -0
  159. package/.next/server/app/api/cron/route/build-manifest.json +12 -0
  160. package/.next/server/app/api/cron/route/server-reference-manifest.json +4 -0
  161. package/.next/server/app/api/cron/route.js +15 -0
  162. package/.next/server/app/api/cron/route.js.map +5 -0
  163. package/.next/server/app/api/cron/route.js.nft.json +1 -0
  164. package/.next/server/app/api/cron/route_client-reference-manifest.js +3 -0
  165. package/.next/server/app/api/forms/[id]/route/app-paths-manifest.json +3 -0
  166. package/.next/server/app/api/forms/[id]/route/build-manifest.json +12 -0
  167. package/.next/server/app/api/forms/[id]/route/server-reference-manifest.json +4 -0
  168. package/.next/server/app/api/forms/[id]/route.js +9 -0
  169. package/.next/server/app/api/forms/[id]/route.js.map +5 -0
  170. package/.next/server/app/api/forms/[id]/route.js.nft.json +1 -0
  171. package/.next/server/app/api/forms/[id]/route_client-reference-manifest.js +3 -0
  172. package/.next/server/app/api/forms/[id]/submissions/route/app-paths-manifest.json +3 -0
  173. package/.next/server/app/api/forms/[id]/submissions/route/build-manifest.json +12 -0
  174. package/.next/server/app/api/forms/[id]/submissions/route/server-reference-manifest.json +4 -0
  175. package/.next/server/app/api/forms/[id]/submissions/route.js +8 -0
  176. package/.next/server/app/api/forms/[id]/submissions/route.js.map +5 -0
  177. package/.next/server/app/api/forms/[id]/submissions/route.js.nft.json +1 -0
  178. package/.next/server/app/api/forms/[id]/submissions/route_client-reference-manifest.js +3 -0
  179. package/.next/server/app/api/forms/[id]/submit/route/app-paths-manifest.json +3 -0
  180. package/.next/server/app/api/forms/[id]/submit/route/build-manifest.json +12 -0
  181. package/.next/server/app/api/forms/[id]/submit/route/server-reference-manifest.json +4 -0
  182. package/.next/server/app/api/forms/[id]/submit/route.js +17 -0
  183. package/.next/server/app/api/forms/[id]/submit/route.js.map +5 -0
  184. package/.next/server/app/api/forms/[id]/submit/route.js.nft.json +1 -0
  185. package/.next/server/app/api/forms/[id]/submit/route_client-reference-manifest.js +3 -0
  186. package/.next/server/app/api/forms/route/app-paths-manifest.json +3 -0
  187. package/.next/server/app/api/forms/route/build-manifest.json +12 -0
  188. package/.next/server/app/api/forms/route/server-reference-manifest.json +4 -0
  189. package/.next/server/app/api/forms/route.js +9 -0
  190. package/.next/server/app/api/forms/route.js.map +5 -0
  191. package/.next/server/app/api/forms/route.js.nft.json +1 -0
  192. package/.next/server/app/api/forms/route_client-reference-manifest.js +3 -0
  193. package/.next/server/app/api/forms/templates/[id]/route/app-paths-manifest.json +3 -0
  194. package/.next/server/app/api/forms/templates/[id]/route/build-manifest.json +12 -0
  195. package/.next/server/app/api/forms/templates/[id]/route/server-reference-manifest.json +4 -0
  196. package/.next/server/app/api/forms/templates/[id]/route.js +8 -0
  197. package/.next/server/app/api/forms/templates/[id]/route.js.map +5 -0
  198. package/.next/server/app/api/forms/templates/[id]/route.js.nft.json +1 -0
  199. package/.next/server/app/api/forms/templates/[id]/route_client-reference-manifest.js +3 -0
  200. package/.next/server/app/api/forms/templates/route/app-paths-manifest.json +3 -0
  201. package/.next/server/app/api/forms/templates/route/build-manifest.json +12 -0
  202. package/.next/server/app/api/forms/templates/route/server-reference-manifest.json +4 -0
  203. package/.next/server/app/api/forms/templates/route.js +9 -0
  204. package/.next/server/app/api/forms/templates/route.js.map +5 -0
  205. package/.next/server/app/api/forms/templates/route.js.nft.json +1 -0
  206. package/.next/server/app/api/forms/templates/route_client-reference-manifest.js +3 -0
  207. package/.next/server/app/api/groups/[id]/contacts/route/app-paths-manifest.json +3 -0
  208. package/.next/server/app/api/groups/[id]/contacts/route/build-manifest.json +12 -0
  209. package/.next/server/app/api/groups/[id]/contacts/route/server-reference-manifest.json +4 -0
  210. package/.next/server/app/api/groups/[id]/contacts/route.js +8 -0
  211. package/.next/server/app/api/groups/[id]/contacts/route.js.map +5 -0
  212. package/.next/server/app/api/groups/[id]/contacts/route.js.nft.json +1 -0
  213. package/.next/server/app/api/groups/[id]/contacts/route_client-reference-manifest.js +3 -0
  214. package/.next/server/app/api/groups/[id]/route/app-paths-manifest.json +3 -0
  215. package/.next/server/app/api/groups/[id]/route/build-manifest.json +12 -0
  216. package/.next/server/app/api/groups/[id]/route/server-reference-manifest.json +4 -0
  217. package/.next/server/app/api/groups/[id]/route.js +8 -0
  218. package/.next/server/app/api/groups/[id]/route.js.map +5 -0
  219. package/.next/server/app/api/groups/[id]/route.js.nft.json +1 -0
  220. package/.next/server/app/api/groups/[id]/route_client-reference-manifest.js +3 -0
  221. package/.next/server/app/api/groups/route/app-paths-manifest.json +3 -0
  222. package/.next/server/app/api/groups/route/build-manifest.json +12 -0
  223. package/.next/server/app/api/groups/route/server-reference-manifest.json +4 -0
  224. package/.next/server/app/api/groups/route.js +8 -0
  225. package/.next/server/app/api/groups/route.js.map +5 -0
  226. package/.next/server/app/api/groups/route.js.nft.json +1 -0
  227. package/.next/server/app/api/groups/route_client-reference-manifest.js +3 -0
  228. package/.next/server/app/api/media/[name]/route/app-paths-manifest.json +3 -0
  229. package/.next/server/app/api/media/[name]/route/build-manifest.json +12 -0
  230. package/.next/server/app/api/media/[name]/route/server-reference-manifest.json +4 -0
  231. package/.next/server/app/api/media/[name]/route.js +8 -0
  232. package/.next/server/app/api/media/[name]/route.js.map +5 -0
  233. package/.next/server/app/api/media/[name]/route.js.nft.json +1 -0
  234. package/.next/server/app/api/media/[name]/route_client-reference-manifest.js +3 -0
  235. package/.next/server/app/api/media/route/app-paths-manifest.json +3 -0
  236. package/.next/server/app/api/media/route/build-manifest.json +12 -0
  237. package/.next/server/app/api/media/route/server-reference-manifest.json +4 -0
  238. package/.next/server/app/api/media/route.js +8 -0
  239. package/.next/server/app/api/media/route.js.map +5 -0
  240. package/.next/server/app/api/media/route.js.nft.json +1 -0
  241. package/.next/server/app/api/media/route_client-reference-manifest.js +3 -0
  242. package/.next/server/app/api/public/forms/[id]/route/app-paths-manifest.json +3 -0
  243. package/.next/server/app/api/public/forms/[id]/route/build-manifest.json +12 -0
  244. package/.next/server/app/api/public/forms/[id]/route/server-reference-manifest.json +4 -0
  245. package/.next/server/app/api/public/forms/[id]/route.js +17 -0
  246. package/.next/server/app/api/public/forms/[id]/route.js.map +5 -0
  247. package/.next/server/app/api/public/forms/[id]/route.js.nft.json +1 -0
  248. package/.next/server/app/api/public/forms/[id]/route_client-reference-manifest.js +3 -0
  249. package/.next/server/app/api/public/posts/[slug]/route/app-paths-manifest.json +3 -0
  250. package/.next/server/app/api/public/posts/[slug]/route/build-manifest.json +12 -0
  251. package/.next/server/app/api/public/posts/[slug]/route/server-reference-manifest.json +4 -0
  252. package/.next/server/app/api/public/posts/[slug]/route.js +9 -0
  253. package/.next/server/app/api/public/posts/[slug]/route.js.map +5 -0
  254. package/.next/server/app/api/public/posts/[slug]/route.js.nft.json +1 -0
  255. package/.next/server/app/api/public/posts/[slug]/route_client-reference-manifest.js +3 -0
  256. package/.next/server/app/api/public/posts/route/app-paths-manifest.json +3 -0
  257. package/.next/server/app/api/public/posts/route/build-manifest.json +12 -0
  258. package/.next/server/app/api/public/posts/route/server-reference-manifest.json +4 -0
  259. package/.next/server/app/api/public/posts/route.js +8 -0
  260. package/.next/server/app/api/public/posts/route.js.map +5 -0
  261. package/.next/server/app/api/public/posts/route.js.nft.json +1 -0
  262. package/.next/server/app/api/public/posts/route_client-reference-manifest.js +3 -0
  263. package/.next/server/app/api/public/unsubscribe/route/app-paths-manifest.json +3 -0
  264. package/.next/server/app/api/public/unsubscribe/route/build-manifest.json +12 -0
  265. package/.next/server/app/api/public/unsubscribe/route/server-reference-manifest.json +4 -0
  266. package/.next/server/app/api/public/unsubscribe/route.js +9 -0
  267. package/.next/server/app/api/public/unsubscribe/route.js.map +5 -0
  268. package/.next/server/app/api/public/unsubscribe/route.js.nft.json +1 -0
  269. package/.next/server/app/api/public/unsubscribe/route_client-reference-manifest.js +3 -0
  270. package/.next/server/app/api/route/app-paths-manifest.json +3 -0
  271. package/.next/server/app/api/route/build-manifest.json +12 -0
  272. package/.next/server/app/api/route/server-reference-manifest.json +4 -0
  273. package/.next/server/app/api/route.js +7 -0
  274. package/.next/server/app/api/route.js.map +5 -0
  275. package/.next/server/app/api/route.js.nft.json +1 -0
  276. package/.next/server/app/api/route_client-reference-manifest.js +3 -0
  277. package/.next/server/app/api/senders/[id]/route/app-paths-manifest.json +3 -0
  278. package/.next/server/app/api/senders/[id]/route/build-manifest.json +12 -0
  279. package/.next/server/app/api/senders/[id]/route/server-reference-manifest.json +4 -0
  280. package/.next/server/app/api/senders/[id]/route.js +8 -0
  281. package/.next/server/app/api/senders/[id]/route.js.map +5 -0
  282. package/.next/server/app/api/senders/[id]/route.js.nft.json +1 -0
  283. package/.next/server/app/api/senders/[id]/route_client-reference-manifest.js +3 -0
  284. package/.next/server/app/api/senders/route/app-paths-manifest.json +3 -0
  285. package/.next/server/app/api/senders/route/build-manifest.json +12 -0
  286. package/.next/server/app/api/senders/route/server-reference-manifest.json +4 -0
  287. package/.next/server/app/api/senders/route.js +11 -0
  288. package/.next/server/app/api/senders/route.js.map +5 -0
  289. package/.next/server/app/api/senders/route.js.nft.json +1 -0
  290. package/.next/server/app/api/senders/route_client-reference-manifest.js +3 -0
  291. package/.next/server/app/api/settings/telegram/route/app-paths-manifest.json +3 -0
  292. package/.next/server/app/api/settings/telegram/route/build-manifest.json +12 -0
  293. package/.next/server/app/api/settings/telegram/route/server-reference-manifest.json +4 -0
  294. package/.next/server/app/api/settings/telegram/route.js +9 -0
  295. package/.next/server/app/api/settings/telegram/route.js.map +5 -0
  296. package/.next/server/app/api/settings/telegram/route.js.nft.json +1 -0
  297. package/.next/server/app/api/settings/telegram/route_client-reference-manifest.js +3 -0
  298. package/.next/server/app/api/settings/telegram/stats/route/app-paths-manifest.json +3 -0
  299. package/.next/server/app/api/settings/telegram/stats/route/build-manifest.json +12 -0
  300. package/.next/server/app/api/settings/telegram/stats/route/server-reference-manifest.json +4 -0
  301. package/.next/server/app/api/settings/telegram/stats/route.js +8 -0
  302. package/.next/server/app/api/settings/telegram/stats/route.js.map +5 -0
  303. package/.next/server/app/api/settings/telegram/stats/route.js.nft.json +1 -0
  304. package/.next/server/app/api/settings/telegram/stats/route_client-reference-manifest.js +3 -0
  305. package/.next/server/app/api/stats/route/app-paths-manifest.json +3 -0
  306. package/.next/server/app/api/stats/route/build-manifest.json +12 -0
  307. package/.next/server/app/api/stats/route/server-reference-manifest.json +4 -0
  308. package/.next/server/app/api/stats/route.js +8 -0
  309. package/.next/server/app/api/stats/route.js.map +5 -0
  310. package/.next/server/app/api/stats/route.js.nft.json +1 -0
  311. package/.next/server/app/api/stats/route_client-reference-manifest.js +3 -0
  312. package/.next/server/app/api/t/[token]/route/app-paths-manifest.json +3 -0
  313. package/.next/server/app/api/t/[token]/route/build-manifest.json +12 -0
  314. package/.next/server/app/api/t/[token]/route/server-reference-manifest.json +4 -0
  315. package/.next/server/app/api/t/[token]/route.js +8 -0
  316. package/.next/server/app/api/t/[token]/route.js.map +5 -0
  317. package/.next/server/app/api/t/[token]/route.js.nft.json +1 -0
  318. package/.next/server/app/api/t/[token]/route_client-reference-manifest.js +3 -0
  319. package/.next/server/app/api/templates/[id]/route/app-paths-manifest.json +3 -0
  320. package/.next/server/app/api/templates/[id]/route/build-manifest.json +12 -0
  321. package/.next/server/app/api/templates/[id]/route/server-reference-manifest.json +4 -0
  322. package/.next/server/app/api/templates/[id]/route.js +8 -0
  323. package/.next/server/app/api/templates/[id]/route.js.map +5 -0
  324. package/.next/server/app/api/templates/[id]/route.js.nft.json +1 -0
  325. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +3 -0
  326. package/.next/server/app/api/templates/route/app-paths-manifest.json +3 -0
  327. package/.next/server/app/api/templates/route/build-manifest.json +12 -0
  328. package/.next/server/app/api/templates/route/server-reference-manifest.json +4 -0
  329. package/.next/server/app/api/templates/route.js +8 -0
  330. package/.next/server/app/api/templates/route.js.map +5 -0
  331. package/.next/server/app/api/templates/route.js.nft.json +1 -0
  332. package/.next/server/app/api/templates/route_client-reference-manifest.js +3 -0
  333. package/.next/server/app/api/workflows/[id]/enroll/route/app-paths-manifest.json +3 -0
  334. package/.next/server/app/api/workflows/[id]/enroll/route/build-manifest.json +12 -0
  335. package/.next/server/app/api/workflows/[id]/enroll/route/server-reference-manifest.json +4 -0
  336. package/.next/server/app/api/workflows/[id]/enroll/route.js +15 -0
  337. package/.next/server/app/api/workflows/[id]/enroll/route.js.map +5 -0
  338. package/.next/server/app/api/workflows/[id]/enroll/route.js.nft.json +1 -0
  339. package/.next/server/app/api/workflows/[id]/enroll/route_client-reference-manifest.js +3 -0
  340. package/.next/server/app/api/workflows/[id]/route/app-paths-manifest.json +3 -0
  341. package/.next/server/app/api/workflows/[id]/route/build-manifest.json +12 -0
  342. package/.next/server/app/api/workflows/[id]/route/server-reference-manifest.json +4 -0
  343. package/.next/server/app/api/workflows/[id]/route.js +8 -0
  344. package/.next/server/app/api/workflows/[id]/route.js.map +5 -0
  345. package/.next/server/app/api/workflows/[id]/route.js.nft.json +1 -0
  346. package/.next/server/app/api/workflows/[id]/route_client-reference-manifest.js +3 -0
  347. package/.next/server/app/api/workflows/[id]/run/route/app-paths-manifest.json +3 -0
  348. package/.next/server/app/api/workflows/[id]/run/route/build-manifest.json +12 -0
  349. package/.next/server/app/api/workflows/[id]/run/route/server-reference-manifest.json +4 -0
  350. package/.next/server/app/api/workflows/[id]/run/route.js +15 -0
  351. package/.next/server/app/api/workflows/[id]/run/route.js.map +5 -0
  352. package/.next/server/app/api/workflows/[id]/run/route.js.nft.json +1 -0
  353. package/.next/server/app/api/workflows/[id]/run/route_client-reference-manifest.js +3 -0
  354. package/.next/server/app/api/workflows/route/app-paths-manifest.json +3 -0
  355. package/.next/server/app/api/workflows/route/build-manifest.json +12 -0
  356. package/.next/server/app/api/workflows/route/server-reference-manifest.json +4 -0
  357. package/.next/server/app/api/workflows/route.js +8 -0
  358. package/.next/server/app/api/workflows/route.js.map +5 -0
  359. package/.next/server/app/api/workflows/route.js.nft.json +1 -0
  360. package/.next/server/app/api/workflows/route_client-reference-manifest.js +3 -0
  361. package/.next/server/app/blog/[slug]/page/app-paths-manifest.json +3 -0
  362. package/.next/server/app/blog/[slug]/page/build-manifest.json +22 -0
  363. package/.next/server/app/blog/[slug]/page/next-font-manifest.json +6 -0
  364. package/.next/server/app/blog/[slug]/page/react-loadable-manifest.json +1 -0
  365. package/.next/server/app/blog/[slug]/page/server-reference-manifest.json +4 -0
  366. package/.next/server/app/blog/[slug]/page.js +19 -0
  367. package/.next/server/app/blog/[slug]/page.js.map +5 -0
  368. package/.next/server/app/blog/[slug]/page.js.nft.json +1 -0
  369. package/.next/server/app/blog/[slug]/page_client-reference-manifest.js +3 -0
  370. package/.next/server/app/blog/page/app-paths-manifest.json +3 -0
  371. package/.next/server/app/blog/page/build-manifest.json +22 -0
  372. package/.next/server/app/blog/page/next-font-manifest.json +6 -0
  373. package/.next/server/app/blog/page/react-loadable-manifest.json +1 -0
  374. package/.next/server/app/blog/page/server-reference-manifest.json +4 -0
  375. package/.next/server/app/blog/page.js +16 -0
  376. package/.next/server/app/blog/page.js.map +5 -0
  377. package/.next/server/app/blog/page.js.nft.json +1 -0
  378. package/.next/server/app/blog/page_client-reference-manifest.js +3 -0
  379. package/.next/server/app/dashboard/automations/page/app-paths-manifest.json +3 -0
  380. package/.next/server/app/dashboard/automations/page/build-manifest.json +22 -0
  381. package/.next/server/app/dashboard/automations/page/next-font-manifest.json +6 -0
  382. package/.next/server/app/dashboard/automations/page/react-loadable-manifest.json +1 -0
  383. package/.next/server/app/dashboard/automations/page/server-reference-manifest.json +4 -0
  384. package/.next/server/app/dashboard/automations/page.js +18 -0
  385. package/.next/server/app/dashboard/automations/page.js.map +5 -0
  386. package/.next/server/app/dashboard/automations/page.js.nft.json +1 -0
  387. package/.next/server/app/dashboard/automations/page_client-reference-manifest.js +3 -0
  388. package/.next/server/app/dashboard/campaigns/[id]/page/app-paths-manifest.json +3 -0
  389. package/.next/server/app/dashboard/campaigns/[id]/page/build-manifest.json +22 -0
  390. package/.next/server/app/dashboard/campaigns/[id]/page/next-font-manifest.json +6 -0
  391. package/.next/server/app/dashboard/campaigns/[id]/page/react-loadable-manifest.json +10 -0
  392. package/.next/server/app/dashboard/campaigns/[id]/page/server-reference-manifest.json +4 -0
  393. package/.next/server/app/dashboard/campaigns/[id]/page.js +18 -0
  394. package/.next/server/app/dashboard/campaigns/[id]/page.js.map +5 -0
  395. package/.next/server/app/dashboard/campaigns/[id]/page.js.nft.json +1 -0
  396. package/.next/server/app/dashboard/campaigns/[id]/page_client-reference-manifest.js +3 -0
  397. package/.next/server/app/dashboard/campaigns/page/app-paths-manifest.json +3 -0
  398. package/.next/server/app/dashboard/campaigns/page/build-manifest.json +22 -0
  399. package/.next/server/app/dashboard/campaigns/page/next-font-manifest.json +6 -0
  400. package/.next/server/app/dashboard/campaigns/page/react-loadable-manifest.json +1 -0
  401. package/.next/server/app/dashboard/campaigns/page/server-reference-manifest.json +4 -0
  402. package/.next/server/app/dashboard/campaigns/page.js +18 -0
  403. package/.next/server/app/dashboard/campaigns/page.js.map +5 -0
  404. package/.next/server/app/dashboard/campaigns/page.js.nft.json +1 -0
  405. package/.next/server/app/dashboard/campaigns/page_client-reference-manifest.js +3 -0
  406. package/.next/server/app/dashboard/contacts/page/app-paths-manifest.json +3 -0
  407. package/.next/server/app/dashboard/contacts/page/build-manifest.json +22 -0
  408. package/.next/server/app/dashboard/contacts/page/next-font-manifest.json +6 -0
  409. package/.next/server/app/dashboard/contacts/page/react-loadable-manifest.json +1 -0
  410. package/.next/server/app/dashboard/contacts/page/server-reference-manifest.json +4 -0
  411. package/.next/server/app/dashboard/contacts/page.js +18 -0
  412. package/.next/server/app/dashboard/contacts/page.js.map +5 -0
  413. package/.next/server/app/dashboard/contacts/page.js.nft.json +1 -0
  414. package/.next/server/app/dashboard/contacts/page_client-reference-manifest.js +3 -0
  415. package/.next/server/app/dashboard/forms/page/app-paths-manifest.json +3 -0
  416. package/.next/server/app/dashboard/forms/page/build-manifest.json +22 -0
  417. package/.next/server/app/dashboard/forms/page/next-font-manifest.json +6 -0
  418. package/.next/server/app/dashboard/forms/page/react-loadable-manifest.json +1 -0
  419. package/.next/server/app/dashboard/forms/page/server-reference-manifest.json +4 -0
  420. package/.next/server/app/dashboard/forms/page.js +18 -0
  421. package/.next/server/app/dashboard/forms/page.js.map +5 -0
  422. package/.next/server/app/dashboard/forms/page.js.nft.json +1 -0
  423. package/.next/server/app/dashboard/forms/page_client-reference-manifest.js +3 -0
  424. package/.next/server/app/dashboard/media/page/app-paths-manifest.json +3 -0
  425. package/.next/server/app/dashboard/media/page/build-manifest.json +22 -0
  426. package/.next/server/app/dashboard/media/page/next-font-manifest.json +6 -0
  427. package/.next/server/app/dashboard/media/page/react-loadable-manifest.json +1 -0
  428. package/.next/server/app/dashboard/media/page/server-reference-manifest.json +4 -0
  429. package/.next/server/app/dashboard/media/page.js +18 -0
  430. package/.next/server/app/dashboard/media/page.js.map +5 -0
  431. package/.next/server/app/dashboard/media/page.js.nft.json +1 -0
  432. package/.next/server/app/dashboard/media/page_client-reference-manifest.js +3 -0
  433. package/.next/server/app/dashboard/page/app-paths-manifest.json +3 -0
  434. package/.next/server/app/dashboard/page/build-manifest.json +22 -0
  435. package/.next/server/app/dashboard/page/next-font-manifest.json +6 -0
  436. package/.next/server/app/dashboard/page/react-loadable-manifest.json +1 -0
  437. package/.next/server/app/dashboard/page/server-reference-manifest.json +4 -0
  438. package/.next/server/app/dashboard/page.js +18 -0
  439. package/.next/server/app/dashboard/page.js.map +5 -0
  440. package/.next/server/app/dashboard/page.js.nft.json +1 -0
  441. package/.next/server/app/dashboard/page_client-reference-manifest.js +3 -0
  442. package/.next/server/app/dashboard/senders/page/app-paths-manifest.json +3 -0
  443. package/.next/server/app/dashboard/senders/page/build-manifest.json +22 -0
  444. package/.next/server/app/dashboard/senders/page/next-font-manifest.json +6 -0
  445. package/.next/server/app/dashboard/senders/page/react-loadable-manifest.json +1 -0
  446. package/.next/server/app/dashboard/senders/page/server-reference-manifest.json +4 -0
  447. package/.next/server/app/dashboard/senders/page.js +18 -0
  448. package/.next/server/app/dashboard/senders/page.js.map +5 -0
  449. package/.next/server/app/dashboard/senders/page.js.nft.json +1 -0
  450. package/.next/server/app/dashboard/senders/page_client-reference-manifest.js +3 -0
  451. package/.next/server/app/dashboard/settings/page/app-paths-manifest.json +3 -0
  452. package/.next/server/app/dashboard/settings/page/build-manifest.json +22 -0
  453. package/.next/server/app/dashboard/settings/page/next-font-manifest.json +6 -0
  454. package/.next/server/app/dashboard/settings/page/react-loadable-manifest.json +1 -0
  455. package/.next/server/app/dashboard/settings/page/server-reference-manifest.json +4 -0
  456. package/.next/server/app/dashboard/settings/page.js +18 -0
  457. package/.next/server/app/dashboard/settings/page.js.map +5 -0
  458. package/.next/server/app/dashboard/settings/page.js.nft.json +1 -0
  459. package/.next/server/app/dashboard/settings/page_client-reference-manifest.js +3 -0
  460. package/.next/server/app/doc/page/app-paths-manifest.json +3 -0
  461. package/.next/server/app/doc/page/build-manifest.json +22 -0
  462. package/.next/server/app/doc/page/next-font-manifest.json +6 -0
  463. package/.next/server/app/doc/page/react-loadable-manifest.json +1 -0
  464. package/.next/server/app/doc/page/server-reference-manifest.json +4 -0
  465. package/.next/server/app/doc/page.js +16 -0
  466. package/.next/server/app/doc/page.js.map +5 -0
  467. package/.next/server/app/doc/page.js.nft.json +1 -0
  468. package/.next/server/app/doc/page_client-reference-manifest.js +3 -0
  469. package/.next/server/app/doc.html +1 -0
  470. package/.next/server/app/doc.meta +36 -0
  471. package/.next/server/app/doc.rsc +26 -0
  472. package/.next/server/app/doc.segments/_full.segment.rsc +26 -0
  473. package/.next/server/app/doc.segments/_tree.segment.rsc +4 -0
  474. package/.next/server/app/doc.segments/doc/__PAGE__.segment.rsc +32 -0
  475. package/.next/server/app/documentation/page/app-paths-manifest.json +3 -0
  476. package/.next/server/app/documentation/page/build-manifest.json +22 -0
  477. package/.next/server/app/documentation/page/next-font-manifest.json +6 -0
  478. package/.next/server/app/documentation/page/react-loadable-manifest.json +1 -0
  479. package/.next/server/app/documentation/page/server-reference-manifest.json +4 -0
  480. package/.next/server/app/documentation/page.js +16 -0
  481. package/.next/server/app/documentation/page.js.map +5 -0
  482. package/.next/server/app/documentation/page.js.nft.json +1 -0
  483. package/.next/server/app/documentation/page_client-reference-manifest.js +3 -0
  484. package/.next/server/app/documentation.html +1 -0
  485. package/.next/server/app/documentation.meta +36 -0
  486. package/.next/server/app/documentation.rsc +26 -0
  487. package/.next/server/app/documentation.segments/_full.segment.rsc +26 -0
  488. package/.next/server/app/documentation.segments/_tree.segment.rsc +4 -0
  489. package/.next/server/app/documentation.segments/documentation/__PAGE__.segment.rsc +32 -0
  490. package/.next/server/app/index.html +1 -0
  491. package/.next/server/app/index.meta +29 -0
  492. package/.next/server/app/index.rsc +26 -0
  493. package/.next/server/app/index.segments/__PAGE__.segment.rsc +31 -0
  494. package/.next/server/app/index.segments/_full.segment.rsc +26 -0
  495. package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
  496. package/.next/server/app/login/page/app-paths-manifest.json +3 -0
  497. package/.next/server/app/login/page/build-manifest.json +22 -0
  498. package/.next/server/app/login/page/next-font-manifest.json +6 -0
  499. package/.next/server/app/login/page/react-loadable-manifest.json +1 -0
  500. package/.next/server/app/login/page/server-reference-manifest.json +4 -0
  501. package/.next/server/app/login/page.js +14 -0
  502. package/.next/server/app/login/page.js.map +5 -0
  503. package/.next/server/app/login/page.js.nft.json +1 -0
  504. package/.next/server/app/login/page_client-reference-manifest.js +3 -0
  505. package/.next/server/app/login.html +1 -0
  506. package/.next/server/app/login.meta +34 -0
  507. package/.next/server/app/login.rsc +27 -0
  508. package/.next/server/app/login.segments/_full.segment.rsc +27 -0
  509. package/.next/server/app/login.segments/_tree.segment.rsc +4 -0
  510. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +33 -0
  511. package/.next/server/app/page/app-paths-manifest.json +3 -0
  512. package/.next/server/app/page/build-manifest.json +22 -0
  513. package/.next/server/app/page/next-font-manifest.json +6 -0
  514. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  515. package/.next/server/app/page/server-reference-manifest.json +4 -0
  516. package/.next/server/app/page.js +14 -0
  517. package/.next/server/app/page.js.map +5 -0
  518. package/.next/server/app/page.js.nft.json +1 -0
  519. package/.next/server/app/page_client-reference-manifest.js +3 -0
  520. package/.next/server/app/unsubscribe/page/app-paths-manifest.json +3 -0
  521. package/.next/server/app/unsubscribe/page/build-manifest.json +22 -0
  522. package/.next/server/app/unsubscribe/page/next-font-manifest.json +6 -0
  523. package/.next/server/app/unsubscribe/page/react-loadable-manifest.json +1 -0
  524. package/.next/server/app/unsubscribe/page/server-reference-manifest.json +4 -0
  525. package/.next/server/app/unsubscribe/page.js +14 -0
  526. package/.next/server/app/unsubscribe/page.js.map +5 -0
  527. package/.next/server/app/unsubscribe/page.js.nft.json +1 -0
  528. package/.next/server/app/unsubscribe/page_client-reference-manifest.js +3 -0
  529. package/.next/server/app/unsubscribe.html +1 -0
  530. package/.next/server/app/unsubscribe.meta +34 -0
  531. package/.next/server/app/unsubscribe.rsc +31 -0
  532. package/.next/server/app/unsubscribe.segments/_full.segment.rsc +31 -0
  533. package/.next/server/app/unsubscribe.segments/_tree.segment.rsc +4 -0
  534. package/.next/server/app/unsubscribe.segments/unsubscribe/__PAGE__.segment.rsc +37 -0
  535. package/.next/server/app-paths-manifest.json +63 -0
  536. package/.next/server/chunks/06xu_next_dist_esm_build_templates_app-route_0rhnea3oufq9j.js +3 -0
  537. package/.next/server/chunks/06xu_next_dist_esm_build_templates_app-route_0rhnea3oufq9j.js.map +1 -0
  538. package/.next/server/chunks/14u8_jose_dist_webapi_jwt_sign_0e9dnv3w_dkc3.js +3 -0
  539. package/.next/server/chunks/14u8_jose_dist_webapi_jwt_sign_0e9dnv3w_dkc3.js.map +1 -0
  540. package/.next/server/chunks/1oeh_server_app_api_settings_telegram_stats_route_actions_0y5ocpob4bzxr.js +3 -0
  541. package/.next/server/chunks/1oeh_server_app_api_settings_telegram_stats_route_actions_0y5ocpob4bzxr.js.map +1 -0
  542. package/.next/server/chunks/[externals]__15ba62yk88w55._.js +3 -0
  543. package/.next/server/chunks/[externals]__15ba62yk88w55._.js.map +1 -0
  544. package/.next/server/chunks/[externals]__1da-de2642zdu._.js +3 -0
  545. package/.next/server/chunks/[externals]__1da-de2642zdu._.js.map +1 -0
  546. package/.next/server/chunks/[root-of-the-server]__00t3s_fd941rt._.js +3 -0
  547. package/.next/server/chunks/[root-of-the-server]__00t3s_fd941rt._.js.map +1 -0
  548. package/.next/server/chunks/[root-of-the-server]__07pbetxujjj00._.js +3 -0
  549. package/.next/server/chunks/[root-of-the-server]__07pbetxujjj00._.js.map +1 -0
  550. package/.next/server/chunks/[root-of-the-server]__0a6x-tjsjctmn._.js +3 -0
  551. package/.next/server/chunks/[root-of-the-server]__0a6x-tjsjctmn._.js.map +1 -0
  552. package/.next/server/chunks/[root-of-the-server]__0bg8pg0fpimav._.js +3 -0
  553. package/.next/server/chunks/[root-of-the-server]__0bg8pg0fpimav._.js.map +1 -0
  554. package/.next/server/chunks/[root-of-the-server]__0e93ko_-d32s0._.js +3 -0
  555. package/.next/server/chunks/[root-of-the-server]__0e93ko_-d32s0._.js.map +1 -0
  556. package/.next/server/chunks/[root-of-the-server]__0m07o9851_xfr._.js +3 -0
  557. package/.next/server/chunks/[root-of-the-server]__0m07o9851_xfr._.js.map +1 -0
  558. package/.next/server/chunks/[root-of-the-server]__0mswm6179vwl1._.js +3 -0
  559. package/.next/server/chunks/[root-of-the-server]__0mswm6179vwl1._.js.map +1 -0
  560. package/.next/server/chunks/[root-of-the-server]__0mz1nms56oghw._.js +3 -0
  561. package/.next/server/chunks/[root-of-the-server]__0mz1nms56oghw._.js.map +1 -0
  562. package/.next/server/chunks/[root-of-the-server]__0rtfqbe0ob35m._.js +3 -0
  563. package/.next/server/chunks/[root-of-the-server]__0rtfqbe0ob35m._.js.map +1 -0
  564. package/.next/server/chunks/[root-of-the-server]__153ayjbkba0bf._.js +3 -0
  565. package/.next/server/chunks/[root-of-the-server]__153ayjbkba0bf._.js.map +1 -0
  566. package/.next/server/chunks/[root-of-the-server]__1ap2hmo6cbsb3._.js +3 -0
  567. package/.next/server/chunks/[root-of-the-server]__1ap2hmo6cbsb3._.js.map +1 -0
  568. package/.next/server/chunks/[root-of-the-server]__1em5dex851pk2._.js +63 -0
  569. package/.next/server/chunks/[root-of-the-server]__1em5dex851pk2._.js.map +1 -0
  570. package/.next/server/chunks/[root-of-the-server]__1llxcp69_fvli._.js +3 -0
  571. package/.next/server/chunks/[root-of-the-server]__1llxcp69_fvli._.js.map +1 -0
  572. package/.next/server/chunks/[root-of-the-server]__1oipwj090n6_7._.js +3 -0
  573. package/.next/server/chunks/[root-of-the-server]__1oipwj090n6_7._.js.map +1 -0
  574. package/.next/server/chunks/[root-of-the-server]__1zybyzpuf50yc._.js +3 -0
  575. package/.next/server/chunks/[root-of-the-server]__1zybyzpuf50yc._.js.map +1 -0
  576. package/.next/server/chunks/[root-of-the-server]__20eb2dgpl3qoj._.js +3 -0
  577. package/.next/server/chunks/[root-of-the-server]__20eb2dgpl3qoj._.js.map +1 -0
  578. package/.next/server/chunks/[turbopack]_runtime.js +935 -0
  579. package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
  580. package/.next/server/chunks/_016pksr_tokt8._.js +3 -0
  581. package/.next/server/chunks/_016pksr_tokt8._.js.map +1 -0
  582. package/.next/server/chunks/_01htjrztdn3g5._.js +3 -0
  583. package/.next/server/chunks/_01htjrztdn3g5._.js.map +1 -0
  584. package/.next/server/chunks/_01n_eoupdy17l._.js +3 -0
  585. package/.next/server/chunks/_01n_eoupdy17l._.js.map +1 -0
  586. package/.next/server/chunks/_03yxncv3hk3vr._.js +3 -0
  587. package/.next/server/chunks/_03yxncv3hk3vr._.js.map +1 -0
  588. package/.next/server/chunks/_040a09tcfi6x9._.js +3 -0
  589. package/.next/server/chunks/_040a09tcfi6x9._.js.map +1 -0
  590. package/.next/server/chunks/_04_9nfa-lxjd9._.js +3 -0
  591. package/.next/server/chunks/_04_9nfa-lxjd9._.js.map +1 -0
  592. package/.next/server/chunks/_04bjifcoxwu5o._.js +3 -0
  593. package/.next/server/chunks/_04bjifcoxwu5o._.js.map +1 -0
  594. package/.next/server/chunks/_07u19kpttm6vp._.js +3 -0
  595. package/.next/server/chunks/_07u19kpttm6vp._.js.map +1 -0
  596. package/.next/server/chunks/_09-td-68cdtha._.js +3 -0
  597. package/.next/server/chunks/_09-td-68cdtha._.js.map +1 -0
  598. package/.next/server/chunks/_09r_gh4zqv3wl._.js +3 -0
  599. package/.next/server/chunks/_09r_gh4zqv3wl._.js.map +1 -0
  600. package/.next/server/chunks/_0_-vw5kg2iooe._.js +3 -0
  601. package/.next/server/chunks/_0_-vw5kg2iooe._.js.map +1 -0
  602. package/.next/server/chunks/_0fyvad-iex4-9._.js +3 -0
  603. package/.next/server/chunks/_0fyvad-iex4-9._.js.map +1 -0
  604. package/.next/server/chunks/_0h--d0xv_53cr._.js +3 -0
  605. package/.next/server/chunks/_0h--d0xv_53cr._.js.map +1 -0
  606. package/.next/server/chunks/_0ih52_m6zdv66._.js +3 -0
  607. package/.next/server/chunks/_0ih52_m6zdv66._.js.map +1 -0
  608. package/.next/server/chunks/_0ioztrwebatxi._.js +3 -0
  609. package/.next/server/chunks/_0ioztrwebatxi._.js.map +1 -0
  610. package/.next/server/chunks/_0mf3thpvi2w9-._.js +3 -0
  611. package/.next/server/chunks/_0mf3thpvi2w9-._.js.map +1 -0
  612. package/.next/server/chunks/_0mxirr5hu7uvj._.js +3 -0
  613. package/.next/server/chunks/_0mxirr5hu7uvj._.js.map +1 -0
  614. package/.next/server/chunks/_0p2s1sp75f_j9._.js +3 -0
  615. package/.next/server/chunks/_0p2s1sp75f_j9._.js.map +1 -0
  616. package/.next/server/chunks/_0q47xwx7d_6ra._.js +3 -0
  617. package/.next/server/chunks/_0q47xwx7d_6ra._.js.map +1 -0
  618. package/.next/server/chunks/_0r4rhsoq7d2hp._.js +3 -0
  619. package/.next/server/chunks/_0r4rhsoq7d2hp._.js.map +1 -0
  620. package/.next/server/chunks/_0t_kwe5a4tov4._.js +3 -0
  621. package/.next/server/chunks/_0t_kwe5a4tov4._.js.map +1 -0
  622. package/.next/server/chunks/_0tx_colipxkxn._.js +3 -0
  623. package/.next/server/chunks/_0tx_colipxkxn._.js.map +1 -0
  624. package/.next/server/chunks/_0vpnhlc3j1p06._.js +3 -0
  625. package/.next/server/chunks/_0vpnhlc3j1p06._.js.map +1 -0
  626. package/.next/server/chunks/_1-ti64gr5yz18._.js +3 -0
  627. package/.next/server/chunks/_1-ti64gr5yz18._.js.map +1 -0
  628. package/.next/server/chunks/_1-xxzx1khwzji._.js +3 -0
  629. package/.next/server/chunks/_1-xxzx1khwzji._.js.map +1 -0
  630. package/.next/server/chunks/_18qgmv1t3_d91._.js +3 -0
  631. package/.next/server/chunks/_18qgmv1t3_d91._.js.map +1 -0
  632. package/.next/server/chunks/_18rxxnsk2a6wq._.js +3 -0
  633. package/.next/server/chunks/_18rxxnsk2a6wq._.js.map +1 -0
  634. package/.next/server/chunks/_1cwegmbbn2hju._.js +3 -0
  635. package/.next/server/chunks/_1cwegmbbn2hju._.js.map +1 -0
  636. package/.next/server/chunks/_1f94wdko3-7rw._.js +3 -0
  637. package/.next/server/chunks/_1f94wdko3-7rw._.js.map +1 -0
  638. package/.next/server/chunks/_1gp6hcs1274ln._.js +3 -0
  639. package/.next/server/chunks/_1gp6hcs1274ln._.js.map +1 -0
  640. package/.next/server/chunks/_1h445ssbyo_y5._.js +3 -0
  641. package/.next/server/chunks/_1h445ssbyo_y5._.js.map +1 -0
  642. package/.next/server/chunks/_1h6whc3etiive._.js +3 -0
  643. package/.next/server/chunks/_1h6whc3etiive._.js.map +1 -0
  644. package/.next/server/chunks/_1iji2r4-sk-we._.js +3 -0
  645. package/.next/server/chunks/_1iji2r4-sk-we._.js.map +1 -0
  646. package/.next/server/chunks/_1k4vlrzpby6a_._.js +3 -0
  647. package/.next/server/chunks/_1k4vlrzpby6a_._.js.map +1 -0
  648. package/.next/server/chunks/_1lv9rcsvu5f_o._.js +3 -0
  649. package/.next/server/chunks/_1lv9rcsvu5f_o._.js.map +1 -0
  650. package/.next/server/chunks/_1mz0a5he7e22i._.js +3 -0
  651. package/.next/server/chunks/_1mz0a5he7e22i._.js.map +1 -0
  652. package/.next/server/chunks/_1o0ng4bsm4gyq._.js +3 -0
  653. package/.next/server/chunks/_1o0ng4bsm4gyq._.js.map +1 -0
  654. package/.next/server/chunks/_1o2yk6-lm2_f5._.js +3 -0
  655. package/.next/server/chunks/_1o2yk6-lm2_f5._.js.map +1 -0
  656. package/.next/server/chunks/_1qu9xleffmuhh._.js +3 -0
  657. package/.next/server/chunks/_1qu9xleffmuhh._.js.map +1 -0
  658. package/.next/server/chunks/_1sma8mtgsvlrb._.js +3 -0
  659. package/.next/server/chunks/_1sma8mtgsvlrb._.js.map +1 -0
  660. package/.next/server/chunks/_1uilkda5rycrk._.js +3 -0
  661. package/.next/server/chunks/_1uilkda5rycrk._.js.map +1 -0
  662. package/.next/server/chunks/_1vclmxko_5xe0._.js +3 -0
  663. package/.next/server/chunks/_1vclmxko_5xe0._.js.map +1 -0
  664. package/.next/server/chunks/_1y1s5uiktpy3o._.js +3 -0
  665. package/.next/server/chunks/_1y1s5uiktpy3o._.js.map +1 -0
  666. package/.next/server/chunks/_next-internal_server_app_api_auth_login_route_actions_1ox7zi0683rx3.js +3 -0
  667. package/.next/server/chunks/_next-internal_server_app_api_auth_login_route_actions_1ox7zi0683rx3.js.map +1 -0
  668. package/.next/server/chunks/_next-internal_server_app_api_auth_logout_route_actions_0regwyrnie28t.js +3 -0
  669. package/.next/server/chunks/_next-internal_server_app_api_auth_logout_route_actions_0regwyrnie28t.js.map +1 -0
  670. package/.next/server/chunks/_next-internal_server_app_api_auth_session_route_actions_0-ylu5i7oqlzd.js +3 -0
  671. package/.next/server/chunks/_next-internal_server_app_api_auth_session_route_actions_0-ylu5i7oqlzd.js.map +1 -0
  672. package/.next/server/chunks/_next-internal_server_app_api_auth_setup_route_actions_14j5aonxk6m_0.js +3 -0
  673. package/.next/server/chunks/_next-internal_server_app_api_auth_setup_route_actions_14j5aonxk6m_0.js.map +1 -0
  674. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_publish_route_actions_09311-fzm8pgf.js +3 -0
  675. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_publish_route_actions_09311-fzm8pgf.js.map +1 -0
  676. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_route_actions_1a0zhdfdyla42.js +3 -0
  677. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_route_actions_1a0zhdfdyla42.js.map +1 -0
  678. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_send_route_actions_1av8d5nb-ear4.js +3 -0
  679. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_send_route_actions_1av8d5nb-ear4.js.map +1 -0
  680. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_stats_route_actions_06bh5t647rne9.js +3 -0
  681. package/.next/server/chunks/_next-internal_server_app_api_campaigns_[id]_stats_route_actions_06bh5t647rne9.js.map +1 -0
  682. package/.next/server/chunks/_next-internal_server_app_api_campaigns_all_route_actions_0vv-2ofeydk_2.js +3 -0
  683. package/.next/server/chunks/_next-internal_server_app_api_campaigns_all_route_actions_0vv-2ofeydk_2.js.map +1 -0
  684. package/.next/server/chunks/_next-internal_server_app_api_campaigns_route_actions_1z1l7o3vmwi8j.js +3 -0
  685. package/.next/server/chunks/_next-internal_server_app_api_campaigns_route_actions_1z1l7o3vmwi8j.js.map +1 -0
  686. package/.next/server/chunks/_next-internal_server_app_api_contacts_[id]_route_actions_0edp9gto9mrwd.js +3 -0
  687. package/.next/server/chunks/_next-internal_server_app_api_contacts_[id]_route_actions_0edp9gto9mrwd.js.map +1 -0
  688. package/.next/server/chunks/_next-internal_server_app_api_contacts_all_route_actions_1kp0fjcv5w1lz.js +3 -0
  689. package/.next/server/chunks/_next-internal_server_app_api_contacts_all_route_actions_1kp0fjcv5w1lz.js.map +1 -0
  690. package/.next/server/chunks/_next-internal_server_app_api_contacts_import_route_actions_1u0x5u848vtkc.js +3 -0
  691. package/.next/server/chunks/_next-internal_server_app_api_contacts_import_route_actions_1u0x5u848vtkc.js.map +1 -0
  692. package/.next/server/chunks/_next-internal_server_app_api_contacts_route_actions_1bx4umbpbb4es.js +3 -0
  693. package/.next/server/chunks/_next-internal_server_app_api_contacts_route_actions_1bx4umbpbb4es.js.map +1 -0
  694. package/.next/server/chunks/_next-internal_server_app_api_cron_route_actions_0hfzp9ksvuhv8.js +3 -0
  695. package/.next/server/chunks/_next-internal_server_app_api_cron_route_actions_0hfzp9ksvuhv8.js.map +1 -0
  696. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_route_actions_1zn9c6hm712n_.js +3 -0
  697. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_route_actions_1zn9c6hm712n_.js.map +1 -0
  698. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_submissions_route_actions_0npj-livx0neo.js +3 -0
  699. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_submissions_route_actions_0npj-livx0neo.js.map +1 -0
  700. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_submit_route_actions_1p_av2ya-hn__.js +3 -0
  701. package/.next/server/chunks/_next-internal_server_app_api_forms_[id]_submit_route_actions_1p_av2ya-hn__.js.map +1 -0
  702. package/.next/server/chunks/_next-internal_server_app_api_forms_route_actions_0wx1h14s4xiqj.js +3 -0
  703. package/.next/server/chunks/_next-internal_server_app_api_forms_route_actions_0wx1h14s4xiqj.js.map +1 -0
  704. package/.next/server/chunks/_next-internal_server_app_api_forms_templates_[id]_route_actions_1tjt-yf1ufx4t.js +3 -0
  705. package/.next/server/chunks/_next-internal_server_app_api_forms_templates_[id]_route_actions_1tjt-yf1ufx4t.js.map +1 -0
  706. package/.next/server/chunks/_next-internal_server_app_api_forms_templates_route_actions_0jx0yyx-a9e8a.js +3 -0
  707. package/.next/server/chunks/_next-internal_server_app_api_forms_templates_route_actions_0jx0yyx-a9e8a.js.map +1 -0
  708. package/.next/server/chunks/_next-internal_server_app_api_groups_[id]_contacts_route_actions_16zvoezq09gzs.js +3 -0
  709. package/.next/server/chunks/_next-internal_server_app_api_groups_[id]_contacts_route_actions_16zvoezq09gzs.js.map +1 -0
  710. package/.next/server/chunks/_next-internal_server_app_api_groups_[id]_route_actions_1a972-ku-88li.js +3 -0
  711. package/.next/server/chunks/_next-internal_server_app_api_groups_[id]_route_actions_1a972-ku-88li.js.map +1 -0
  712. package/.next/server/chunks/_next-internal_server_app_api_groups_route_actions_1g3bvao_xtom7.js +3 -0
  713. package/.next/server/chunks/_next-internal_server_app_api_groups_route_actions_1g3bvao_xtom7.js.map +1 -0
  714. package/.next/server/chunks/_next-internal_server_app_api_media_[name]_route_actions_1x1oymi5s9e43.js +3 -0
  715. package/.next/server/chunks/_next-internal_server_app_api_media_[name]_route_actions_1x1oymi5s9e43.js.map +1 -0
  716. package/.next/server/chunks/_next-internal_server_app_api_media_route_actions_08_28_1c7w9t_.js +3 -0
  717. package/.next/server/chunks/_next-internal_server_app_api_media_route_actions_08_28_1c7w9t_.js.map +1 -0
  718. package/.next/server/chunks/_next-internal_server_app_api_public_forms_[id]_route_actions_0qjba17y_8y2z.js +3 -0
  719. package/.next/server/chunks/_next-internal_server_app_api_public_forms_[id]_route_actions_0qjba17y_8y2z.js.map +1 -0
  720. package/.next/server/chunks/_next-internal_server_app_api_public_posts_[slug]_route_actions_0s-2m-qbt3a4g.js +3 -0
  721. package/.next/server/chunks/_next-internal_server_app_api_public_posts_[slug]_route_actions_0s-2m-qbt3a4g.js.map +1 -0
  722. package/.next/server/chunks/_next-internal_server_app_api_public_posts_route_actions_1coxdlltzg2ec.js +3 -0
  723. package/.next/server/chunks/_next-internal_server_app_api_public_posts_route_actions_1coxdlltzg2ec.js.map +1 -0
  724. package/.next/server/chunks/_next-internal_server_app_api_public_unsubscribe_route_actions_04pb699mm7zhs.js +3 -0
  725. package/.next/server/chunks/_next-internal_server_app_api_public_unsubscribe_route_actions_04pb699mm7zhs.js.map +1 -0
  726. package/.next/server/chunks/_next-internal_server_app_api_route_actions_1spy6egqqw5nf.js +3 -0
  727. package/.next/server/chunks/_next-internal_server_app_api_route_actions_1spy6egqqw5nf.js.map +1 -0
  728. package/.next/server/chunks/_next-internal_server_app_api_senders_[id]_route_actions_1acuhlzaull6v.js +3 -0
  729. package/.next/server/chunks/_next-internal_server_app_api_senders_[id]_route_actions_1acuhlzaull6v.js.map +1 -0
  730. package/.next/server/chunks/_next-internal_server_app_api_senders_route_actions_0hbw-3u122an8.js +3 -0
  731. package/.next/server/chunks/_next-internal_server_app_api_senders_route_actions_0hbw-3u122an8.js.map +1 -0
  732. package/.next/server/chunks/_next-internal_server_app_api_settings_telegram_route_actions_1ecznfq0kf4oi.js +3 -0
  733. package/.next/server/chunks/_next-internal_server_app_api_settings_telegram_route_actions_1ecznfq0kf4oi.js.map +1 -0
  734. package/.next/server/chunks/_next-internal_server_app_api_stats_route_actions_0o9u2yifvs5i8.js +3 -0
  735. package/.next/server/chunks/_next-internal_server_app_api_stats_route_actions_0o9u2yifvs5i8.js.map +1 -0
  736. package/.next/server/chunks/_next-internal_server_app_api_t_[token]_route_actions_1h2u1jcimhu0m.js +3 -0
  737. package/.next/server/chunks/_next-internal_server_app_api_t_[token]_route_actions_1h2u1jcimhu0m.js.map +1 -0
  738. package/.next/server/chunks/_next-internal_server_app_api_templates_[id]_route_actions_0w75q6vjtgysm.js +3 -0
  739. package/.next/server/chunks/_next-internal_server_app_api_templates_[id]_route_actions_0w75q6vjtgysm.js.map +1 -0
  740. package/.next/server/chunks/_next-internal_server_app_api_templates_route_actions_1c0yqgfnurom3.js +3 -0
  741. package/.next/server/chunks/_next-internal_server_app_api_templates_route_actions_1c0yqgfnurom3.js.map +1 -0
  742. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_enroll_route_actions_1t3actfkyjz50.js +3 -0
  743. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_enroll_route_actions_1t3actfkyjz50.js.map +1 -0
  744. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_route_actions_0hdifc39l0kzl.js +3 -0
  745. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_route_actions_0hdifc39l0kzl.js.map +1 -0
  746. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_run_route_actions_0a0iqptu82a4a.js +3 -0
  747. package/.next/server/chunks/_next-internal_server_app_api_workflows_[id]_run_route_actions_0a0iqptu82a4a.js.map +1 -0
  748. package/.next/server/chunks/_next-internal_server_app_api_workflows_route_actions_1-qmgyxvh5cwy.js +3 -0
  749. package/.next/server/chunks/_next-internal_server_app_api_workflows_route_actions_1-qmgyxvh5cwy.js.map +1 -0
  750. package/.next/server/chunks/src_0x0k1ybx0poim._.js +3 -0
  751. package/.next/server/chunks/src_0x0k1ybx0poim._.js.map +1 -0
  752. package/.next/server/chunks/src_app_api_forms_[id]_submit_route_ts_1nivtdhvc93f6._.js +23 -0
  753. package/.next/server/chunks/src_app_api_forms_[id]_submit_route_ts_1nivtdhvc93f6._.js.map +1 -0
  754. package/.next/server/chunks/src_lib_automation_ts_0gl7ssziqm14z._.js +149 -0
  755. package/.next/server/chunks/src_lib_automation_ts_0gl7ssziqm14z._.js.map +1 -0
  756. package/.next/server/chunks/src_lib_automation_ts_1a34dych48thk._.js +3 -0
  757. package/.next/server/chunks/src_lib_automation_ts_1a34dych48thk._.js.map +1 -0
  758. package/.next/server/chunks/src_lib_automation_ts_207uuptnebs4l._.js +3 -0
  759. package/.next/server/chunks/src_lib_automation_ts_207uuptnebs4l._.js.map +1 -0
  760. package/.next/server/chunks/src_lib_db_ts_12rrbm4_je1ts._.js +3 -0
  761. package/.next/server/chunks/src_lib_db_ts_12rrbm4_je1ts._.js.map +1 -0
  762. package/.next/server/chunks/src_lib_email-template_ts_10pfim6kqnxua._.js +126 -0
  763. package/.next/server/chunks/src_lib_email-template_ts_10pfim6kqnxua._.js.map +1 -0
  764. package/.next/server/chunks/src_lib_form-builder_ts_1cp0xz7mqn56d._.js +3 -0
  765. package/.next/server/chunks/src_lib_form-builder_ts_1cp0xz7mqn56d._.js.map +1 -0
  766. package/.next/server/chunks/src_lib_gmail_ts_1s2ltf6xpps8u._.js +3 -0
  767. package/.next/server/chunks/src_lib_gmail_ts_1s2ltf6xpps8u._.js.map +1 -0
  768. package/.next/server/chunks/src_lib_supabase-storage_ts_1dfw8x9k0tgmv._.js +26 -0
  769. package/.next/server/chunks/src_lib_supabase-storage_ts_1dfw8x9k0tgmv._.js.map +1 -0
  770. package/.next/server/chunks/src_lib_telegram_ts_0ysg2aj42jeux._.js +3 -0
  771. package/.next/server/chunks/src_lib_telegram_ts_0ysg2aj42jeux._.js.map +1 -0
  772. package/.next/server/chunks/ssr/02c-_@radix-ui_react-dialog_dist_index_mjs_00ymwmtf3k3mw._.js +3 -0
  773. package/.next/server/chunks/ssr/02c-_@radix-ui_react-dialog_dist_index_mjs_00ymwmtf3k3mw._.js.map +1 -0
  774. package/.next/server/chunks/ssr/06xu_next_0r9zyafjirm2h._.js +32 -0
  775. package/.next/server/chunks/ssr/06xu_next_0r9zyafjirm2h._.js.map +1 -0
  776. package/.next/server/chunks/ssr/06xu_next_dist_0-pwksyiyjqj6._.js +6 -0
  777. package/.next/server/chunks/ssr/06xu_next_dist_0-pwksyiyjqj6._.js.map +1 -0
  778. package/.next/server/chunks/ssr/06xu_next_dist_0_wf08lquq9u4._.js +3 -0
  779. package/.next/server/chunks/ssr/06xu_next_dist_0_wf08lquq9u4._.js.map +1 -0
  780. package/.next/server/chunks/ssr/06xu_next_dist_0lnz__th3f5zr._.js +3 -0
  781. package/.next/server/chunks/ssr/06xu_next_dist_0lnz__th3f5zr._.js.map +1 -0
  782. package/.next/server/chunks/ssr/06xu_next_dist_0q5i7q4kqow99._.js +23 -0
  783. package/.next/server/chunks/ssr/06xu_next_dist_0q5i7q4kqow99._.js.map +1 -0
  784. package/.next/server/chunks/ssr/06xu_next_dist_0yftpqcu15_jh._.js +32 -0
  785. package/.next/server/chunks/ssr/06xu_next_dist_0yftpqcu15_jh._.js.map +1 -0
  786. package/.next/server/chunks/ssr/06xu_next_dist_1ysb4fqlnpjfg._.js +32 -0
  787. package/.next/server/chunks/ssr/06xu_next_dist_1ysb4fqlnpjfg._.js.map +1 -0
  788. package/.next/server/chunks/ssr/06xu_next_dist_client_components_0qj_uk660e2yb._.js +3 -0
  789. package/.next/server/chunks/ssr/06xu_next_dist_client_components_0qj_uk660e2yb._.js.map +1 -0
  790. package/.next/server/chunks/ssr/06xu_next_dist_client_components_15i6o-11_85p_._.js +33 -0
  791. package/.next/server/chunks/ssr/06xu_next_dist_client_components_15i6o-11_85p_._.js.map +1 -0
  792. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_forbidden_1vceoosdyq6ip.js +3 -0
  793. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_forbidden_1vceoosdyq6ip.js.map +1 -0
  794. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_global-error_1p7ftpe87ygv1.js +3 -0
  795. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_global-error_1p7ftpe87ygv1.js.map +1 -0
  796. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_unauthorized_002xbraemrk92.js +3 -0
  797. package/.next/server/chunks/ssr/06xu_next_dist_client_components_builtin_unauthorized_002xbraemrk92.js.map +1 -0
  798. package/.next/server/chunks/ssr/06xu_next_dist_compiled_@edge-runtime_cookies_index_0ieglv5lnsyri.js +3 -0
  799. package/.next/server/chunks/ssr/06xu_next_dist_compiled_@edge-runtime_cookies_index_0ieglv5lnsyri.js.map +1 -0
  800. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0-vqyq0vovi_i.js +3 -0
  801. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0-vqyq0vovi_i.js.map +1 -0
  802. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_02v5nrvtk32c6.js +3 -0
  803. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_02v5nrvtk32c6.js.map +1 -0
  804. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_03qrcs7au7ivq.js +3 -0
  805. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_03qrcs7au7ivq.js.map +1 -0
  806. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_045x_qclmi4m8.js +3 -0
  807. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_045x_qclmi4m8.js.map +1 -0
  808. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0_t0dbl5dozbx.js +3 -0
  809. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0_t0dbl5dozbx.js.map +1 -0
  810. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0c_t0os-4cbs3.js +3 -0
  811. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0c_t0os-4cbs3.js.map +1 -0
  812. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0h0emnvw_w9hz.js +3 -0
  813. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0h0emnvw_w9hz.js.map +1 -0
  814. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0hf32whzcuz52.js +3 -0
  815. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0hf32whzcuz52.js.map +1 -0
  816. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0jnsbu-6ck6mc.js +3 -0
  817. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0jnsbu-6ck6mc.js.map +1 -0
  818. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0o-vhcup-3b3z.js +3 -0
  819. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_0o-vhcup-3b3z.js.map +1 -0
  820. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_11l8elffx5v39.js +3 -0
  821. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_11l8elffx5v39.js.map +1 -0
  822. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_13788nvenj_0p.js +3 -0
  823. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_13788nvenj_0p.js.map +1 -0
  824. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_16f4zm9x692nw.js +3 -0
  825. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_16f4zm9x692nw.js.map +1 -0
  826. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1bootgt-epvt6.js +3 -0
  827. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1bootgt-epvt6.js.map +1 -0
  828. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1l1dlajssgq1c.js +3 -0
  829. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1l1dlajssgq1c.js.map +1 -0
  830. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1rlfqzolbd21n.js +3 -0
  831. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1rlfqzolbd21n.js.map +1 -0
  832. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1vxqj6-npabju.js +3 -0
  833. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_1vxqj6-npabju.js.map +1 -0
  834. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_20n28cdchbrpp.js +3 -0
  835. package/.next/server/chunks/ssr/06xu_next_dist_esm_build_templates_app-page_20n28cdchbrpp.js.map +1 -0
  836. package/.next/server/chunks/ssr/1l0a_@radix-ui_react-collection_dist_index_mjs_0rxx5d5lmo6u4._.js +3 -0
  837. package/.next/server/chunks/ssr/1l0a_@radix-ui_react-collection_dist_index_mjs_0rxx5d5lmo6u4._.js.map +1 -0
  838. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_flask-conical_1vs3jvn162eqg.js +3 -0
  839. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_flask-conical_1vs3jvn162eqg.js.map +1 -0
  840. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_globe_0jwul3h6rwm1l.js +3 -0
  841. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_globe_0jwul3h6rwm1l.js.map +1 -0
  842. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_menu_1jtgq-_6gw2ad.js +3 -0
  843. package/.next/server/chunks/ssr/1saf_lucide-react_dist_esm_icons_menu_1jtgq-_6gw2ad.js.map +1 -0
  844. package/.next/server/chunks/ssr/21ai_sonner_dist_index_mjs_0lemus0y9eb08._.js +3 -0
  845. package/.next/server/chunks/ssr/21ai_sonner_dist_index_mjs_0lemus0y9eb08._.js.map +1 -0
  846. package/.next/server/chunks/ssr/[root-of-the-server]__01mn3kop4h9ln._.js +3 -0
  847. package/.next/server/chunks/ssr/[root-of-the-server]__01mn3kop4h9ln._.js.map +1 -0
  848. package/.next/server/chunks/ssr/[root-of-the-server]__02jgmnf51m_bw._.js +3 -0
  849. package/.next/server/chunks/ssr/[root-of-the-server]__02jgmnf51m_bw._.js.map +1 -0
  850. package/.next/server/chunks/ssr/[root-of-the-server]__04f9g0ord6h_z._.js +3 -0
  851. package/.next/server/chunks/ssr/[root-of-the-server]__04f9g0ord6h_z._.js.map +1 -0
  852. package/.next/server/chunks/ssr/[root-of-the-server]__06666h874g5hp._.js +3 -0
  853. package/.next/server/chunks/ssr/[root-of-the-server]__06666h874g5hp._.js.map +1 -0
  854. package/.next/server/chunks/ssr/[root-of-the-server]__07me011e7ku2k._.js +3 -0
  855. package/.next/server/chunks/ssr/[root-of-the-server]__07me011e7ku2k._.js.map +1 -0
  856. package/.next/server/chunks/ssr/[root-of-the-server]__07pj5lrkqzifr._.js +3 -0
  857. package/.next/server/chunks/ssr/[root-of-the-server]__07pj5lrkqzifr._.js.map +1 -0
  858. package/.next/server/chunks/ssr/[root-of-the-server]__0dri3jnl96cro._.js +3 -0
  859. package/.next/server/chunks/ssr/[root-of-the-server]__0dri3jnl96cro._.js.map +1 -0
  860. package/.next/server/chunks/ssr/[root-of-the-server]__0e6ie8f1lflit._.js +3 -0
  861. package/.next/server/chunks/ssr/[root-of-the-server]__0e6ie8f1lflit._.js.map +1 -0
  862. package/.next/server/chunks/ssr/[root-of-the-server]__0ebwcvxo9acvx._.js +3 -0
  863. package/.next/server/chunks/ssr/[root-of-the-server]__0ebwcvxo9acvx._.js.map +1 -0
  864. package/.next/server/chunks/ssr/[root-of-the-server]__0idhg2fbiknzj._.js +3 -0
  865. package/.next/server/chunks/ssr/[root-of-the-server]__0idhg2fbiknzj._.js.map +1 -0
  866. package/.next/server/chunks/ssr/[root-of-the-server]__0k-w18w428_5_._.js +3 -0
  867. package/.next/server/chunks/ssr/[root-of-the-server]__0k-w18w428_5_._.js.map +1 -0
  868. package/.next/server/chunks/ssr/[root-of-the-server]__0qcpq09hg4us0._.js +3 -0
  869. package/.next/server/chunks/ssr/[root-of-the-server]__0qcpq09hg4us0._.js.map +1 -0
  870. package/.next/server/chunks/ssr/[root-of-the-server]__0ue6kxnxcsdwm._.js +3 -0
  871. package/.next/server/chunks/ssr/[root-of-the-server]__0ue6kxnxcsdwm._.js.map +1 -0
  872. package/.next/server/chunks/ssr/[root-of-the-server]__0ws8ymfetd__e._.js +3 -0
  873. package/.next/server/chunks/ssr/[root-of-the-server]__0ws8ymfetd__e._.js.map +1 -0
  874. package/.next/server/chunks/ssr/[root-of-the-server]__0x434x8kjfomg._.js +3 -0
  875. package/.next/server/chunks/ssr/[root-of-the-server]__0x434x8kjfomg._.js.map +1 -0
  876. package/.next/server/chunks/ssr/[root-of-the-server]__12ucz-z8gi2wm._.js +3 -0
  877. package/.next/server/chunks/ssr/[root-of-the-server]__12ucz-z8gi2wm._.js.map +1 -0
  878. package/.next/server/chunks/ssr/[root-of-the-server]__12v4b4ag6pnuz._.js +3 -0
  879. package/.next/server/chunks/ssr/[root-of-the-server]__12v4b4ag6pnuz._.js.map +1 -0
  880. package/.next/server/chunks/ssr/[root-of-the-server]__14-2op73282-w._.js +14 -0
  881. package/.next/server/chunks/ssr/[root-of-the-server]__14-2op73282-w._.js.map +1 -0
  882. package/.next/server/chunks/ssr/[root-of-the-server]__17gzuebq4v3qk._.js +3 -0
  883. package/.next/server/chunks/ssr/[root-of-the-server]__17gzuebq4v3qk._.js.map +1 -0
  884. package/.next/server/chunks/ssr/[root-of-the-server]__1csnvoh619028._.js +3 -0
  885. package/.next/server/chunks/ssr/[root-of-the-server]__1csnvoh619028._.js.map +1 -0
  886. package/.next/server/chunks/ssr/[root-of-the-server]__1m7dl-6i9qiqn._.js +3 -0
  887. package/.next/server/chunks/ssr/[root-of-the-server]__1m7dl-6i9qiqn._.js.map +1 -0
  888. package/.next/server/chunks/ssr/[root-of-the-server]__1rn9z04uwbxhb._.js +3 -0
  889. package/.next/server/chunks/ssr/[root-of-the-server]__1rn9z04uwbxhb._.js.map +1 -0
  890. package/.next/server/chunks/ssr/[root-of-the-server]__1wlwflqfou0bh._.js +3 -0
  891. package/.next/server/chunks/ssr/[root-of-the-server]__1wlwflqfou0bh._.js.map +1 -0
  892. package/.next/server/chunks/ssr/[root-of-the-server]__20ne3r6pcgicp._.js +3 -0
  893. package/.next/server/chunks/ssr/[root-of-the-server]__20ne3r6pcgicp._.js.map +1 -0
  894. package/.next/server/chunks/ssr/[turbopack]_runtime.js +935 -0
  895. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
  896. package/.next/server/chunks/ssr/_0-pg9xcfzsxes._.js +3 -0
  897. package/.next/server/chunks/ssr/_0-pg9xcfzsxes._.js.map +1 -0
  898. package/.next/server/chunks/ssr/_00xm33jaybves._.js +3 -0
  899. package/.next/server/chunks/ssr/_00xm33jaybves._.js.map +1 -0
  900. package/.next/server/chunks/ssr/_026bi60jl1puk._.js +3 -0
  901. package/.next/server/chunks/ssr/_026bi60jl1puk._.js.map +1 -0
  902. package/.next/server/chunks/ssr/_055fzzctizrl9._.js +3 -0
  903. package/.next/server/chunks/ssr/_055fzzctizrl9._.js.map +1 -0
  904. package/.next/server/chunks/ssr/_05yfy_2w07awo._.js +3 -0
  905. package/.next/server/chunks/ssr/_05yfy_2w07awo._.js.map +1 -0
  906. package/.next/server/chunks/ssr/_07h0nhyqn2dzr._.js +3 -0
  907. package/.next/server/chunks/ssr/_07h0nhyqn2dzr._.js.map +1 -0
  908. package/.next/server/chunks/ssr/_07h_4c6z4aup2._.js +3 -0
  909. package/.next/server/chunks/ssr/_07h_4c6z4aup2._.js.map +1 -0
  910. package/.next/server/chunks/ssr/_07ns5-wirt2rm._.js +3 -0
  911. package/.next/server/chunks/ssr/_07ns5-wirt2rm._.js.map +1 -0
  912. package/.next/server/chunks/ssr/_07qibgb3c5l89._.js +3 -0
  913. package/.next/server/chunks/ssr/_07qibgb3c5l89._.js.map +1 -0
  914. package/.next/server/chunks/ssr/_0axhkh5eel9yw._.js +3 -0
  915. package/.next/server/chunks/ssr/_0axhkh5eel9yw._.js.map +1 -0
  916. package/.next/server/chunks/ssr/_0cw6p0eedzd28._.js +3 -0
  917. package/.next/server/chunks/ssr/_0cw6p0eedzd28._.js.map +1 -0
  918. package/.next/server/chunks/ssr/_0f8-6t0_oqza5._.js +9 -0
  919. package/.next/server/chunks/ssr/_0f8-6t0_oqza5._.js.map +1 -0
  920. package/.next/server/chunks/ssr/_0ijop4gxx3i74._.js +25 -0
  921. package/.next/server/chunks/ssr/_0ijop4gxx3i74._.js.map +1 -0
  922. package/.next/server/chunks/ssr/_0j7t-g9s-xw2k._.js +3 -0
  923. package/.next/server/chunks/ssr/_0j7t-g9s-xw2k._.js.map +1 -0
  924. package/.next/server/chunks/ssr/_0omyccx6813z2._.js +3 -0
  925. package/.next/server/chunks/ssr/_0omyccx6813z2._.js.map +1 -0
  926. package/.next/server/chunks/ssr/_0rs3zupho3jtn._.js +3 -0
  927. package/.next/server/chunks/ssr/_0rs3zupho3jtn._.js.map +1 -0
  928. package/.next/server/chunks/ssr/_0tpg1kyh-jvo_._.js +3 -0
  929. package/.next/server/chunks/ssr/_0tpg1kyh-jvo_._.js.map +1 -0
  930. package/.next/server/chunks/ssr/_0umx11tm2hknm._.js +3 -0
  931. package/.next/server/chunks/ssr/_0umx11tm2hknm._.js.map +1 -0
  932. package/.next/server/chunks/ssr/_100pig1hqblaj._.js +3 -0
  933. package/.next/server/chunks/ssr/_100pig1hqblaj._.js.map +1 -0
  934. package/.next/server/chunks/ssr/_10fls_hq4fpul._.js +3 -0
  935. package/.next/server/chunks/ssr/_10fls_hq4fpul._.js.map +1 -0
  936. package/.next/server/chunks/ssr/_135h5be3e-da_._.js +3 -0
  937. package/.next/server/chunks/ssr/_135h5be3e-da_._.js.map +1 -0
  938. package/.next/server/chunks/ssr/_15_m3et_qvi8o._.js +136 -0
  939. package/.next/server/chunks/ssr/_15_m3et_qvi8o._.js.map +1 -0
  940. package/.next/server/chunks/ssr/_17qjjfpo8bdyr._.js +3 -0
  941. package/.next/server/chunks/ssr/_17qjjfpo8bdyr._.js.map +1 -0
  942. package/.next/server/chunks/ssr/_1_zhi9sw7y-9k._.js +3 -0
  943. package/.next/server/chunks/ssr/_1_zhi9sw7y-9k._.js.map +1 -0
  944. package/.next/server/chunks/ssr/_1j3n0s5oa8ydl._.js +3 -0
  945. package/.next/server/chunks/ssr/_1j3n0s5oa8ydl._.js.map +1 -0
  946. package/.next/server/chunks/ssr/_1l_ctr5xszb5f._.js +3 -0
  947. package/.next/server/chunks/ssr/_1l_ctr5xszb5f._.js.map +1 -0
  948. package/.next/server/chunks/ssr/_1le90grlliyg5._.js +3 -0
  949. package/.next/server/chunks/ssr/_1le90grlliyg5._.js.map +1 -0
  950. package/.next/server/chunks/ssr/_1n1x5lti-0y_f._.js +3 -0
  951. package/.next/server/chunks/ssr/_1n1x5lti-0y_f._.js.map +1 -0
  952. package/.next/server/chunks/ssr/_1oaxfn6inhrly._.js +3 -0
  953. package/.next/server/chunks/ssr/_1oaxfn6inhrly._.js.map +1 -0
  954. package/.next/server/chunks/ssr/_1tk04py_mc595._.js +3 -0
  955. package/.next/server/chunks/ssr/_1tk04py_mc595._.js.map +1 -0
  956. package/.next/server/chunks/ssr/_1x4-igv-plryx._.js +3 -0
  957. package/.next/server/chunks/ssr/_1x4-igv-plryx._.js.map +1 -0
  958. package/.next/server/chunks/ssr/_1ydm1bpbu80ve._.js +3 -0
  959. package/.next/server/chunks/ssr/_1ydm1bpbu80ve._.js.map +1 -0
  960. package/.next/server/chunks/ssr/_1zpk-aphfnyrn._.js +3 -0
  961. package/.next/server/chunks/ssr/_1zpk-aphfnyrn._.js.map +1 -0
  962. package/.next/server/chunks/ssr/_208buljkex-zn._.js +3 -0
  963. package/.next/server/chunks/ssr/_208buljkex-zn._.js.map +1 -0
  964. package/.next/server/chunks/ssr/_21awjpye_8ftw._.js +3 -0
  965. package/.next/server/chunks/ssr/_21awjpye_8ftw._.js.map +1 -0
  966. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
  967. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
  968. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
  969. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
  970. package/.next/server/chunks/ssr/_next-internal_server_app_blog_[slug]_page_actions_1xd8lf61mupwf.js +3 -0
  971. package/.next/server/chunks/ssr/_next-internal_server_app_blog_[slug]_page_actions_1xd8lf61mupwf.js.map +1 -0
  972. package/.next/server/chunks/ssr/_next-internal_server_app_blog_page_actions_1nf9zawbhjeiv.js +3 -0
  973. package/.next/server/chunks/ssr/_next-internal_server_app_blog_page_actions_1nf9zawbhjeiv.js.map +1 -0
  974. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_automations_page_actions_0goq3aojk1w34.js +3 -0
  975. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_automations_page_actions_0goq3aojk1w34.js.map +1 -0
  976. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_campaigns_[id]_page_actions_0yprr1p1obhkv.js +3 -0
  977. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_campaigns_[id]_page_actions_0yprr1p1obhkv.js.map +1 -0
  978. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_campaigns_page_actions_0wxku62xg7-8d.js +3 -0
  979. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_campaigns_page_actions_0wxku62xg7-8d.js.map +1 -0
  980. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_contacts_page_actions_03nfyumhdne4o.js +3 -0
  981. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_contacts_page_actions_03nfyumhdne4o.js.map +1 -0
  982. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_forms_page_actions_0y0vhf1s8gskw.js +3 -0
  983. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_forms_page_actions_0y0vhf1s8gskw.js.map +1 -0
  984. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_media_page_actions_15b2td6gfl39a.js +3 -0
  985. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_media_page_actions_15b2td6gfl39a.js.map +1 -0
  986. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_page_actions_10dr1c56aj99-.js +3 -0
  987. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_page_actions_10dr1c56aj99-.js.map +1 -0
  988. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_senders_page_actions_1wuvc1b945nkt.js +3 -0
  989. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_senders_page_actions_1wuvc1b945nkt.js.map +1 -0
  990. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_settings_page_actions_0zse4882vcfr3.js +3 -0
  991. package/.next/server/chunks/ssr/_next-internal_server_app_dashboard_settings_page_actions_0zse4882vcfr3.js.map +1 -0
  992. package/.next/server/chunks/ssr/_next-internal_server_app_doc_page_actions_0rt535c9bfkq2.js +3 -0
  993. package/.next/server/chunks/ssr/_next-internal_server_app_doc_page_actions_0rt535c9bfkq2.js.map +1 -0
  994. package/.next/server/chunks/ssr/_next-internal_server_app_documentation_page_actions_1iy5tav034rd5.js +3 -0
  995. package/.next/server/chunks/ssr/_next-internal_server_app_documentation_page_actions_1iy5tav034rd5.js.map +1 -0
  996. package/.next/server/chunks/ssr/_next-internal_server_app_login_page_actions_04fnjo0ny9dmg.js +3 -0
  997. package/.next/server/chunks/ssr/_next-internal_server_app_login_page_actions_04fnjo0ny9dmg.js.map +1 -0
  998. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
  999. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
  1000. package/.next/server/chunks/ssr/_next-internal_server_app_unsubscribe_page_actions_0tw5uaxujcbgr.js +3 -0
  1001. package/.next/server/chunks/ssr/_next-internal_server_app_unsubscribe_page_actions_0tw5uaxujcbgr.js.map +1 -0
  1002. package/.next/server/chunks/ssr/node_modules__pnpm_09-vsdyv4rf07._.js +33 -0
  1003. package/.next/server/chunks/ssr/node_modules__pnpm_09-vsdyv4rf07._.js.map +1 -0
  1004. package/.next/server/chunks/ssr/node_modules__pnpm_0g_pkwhpxnn41._.js +3 -0
  1005. package/.next/server/chunks/ssr/node_modules__pnpm_0g_pkwhpxnn41._.js.map +1 -0
  1006. package/.next/server/chunks/ssr/node_modules__pnpm_0ish0pdmujvdk._.js +3 -0
  1007. package/.next/server/chunks/ssr/node_modules__pnpm_0ish0pdmujvdk._.js.map +1 -0
  1008. package/.next/server/chunks/ssr/node_modules__pnpm_0ki86aixwegwo._.js +3 -0
  1009. package/.next/server/chunks/ssr/node_modules__pnpm_0ki86aixwegwo._.js.map +1 -0
  1010. package/.next/server/chunks/ssr/node_modules__pnpm_19v8qxrrt436n._.js +3 -0
  1011. package/.next/server/chunks/ssr/node_modules__pnpm_19v8qxrrt436n._.js.map +1 -0
  1012. package/.next/server/chunks/ssr/node_modules__pnpm_1g-xnwqgszuwu._.js +3 -0
  1013. package/.next/server/chunks/ssr/node_modules__pnpm_1g-xnwqgszuwu._.js.map +1 -0
  1014. package/.next/server/chunks/ssr/src_app_blog_[slug]_page_tsx_1ug1kslm_svqp._.js +77 -0
  1015. package/.next/server/chunks/ssr/src_app_blog_[slug]_page_tsx_1ug1kslm_svqp._.js.map +1 -0
  1016. package/.next/server/chunks/ssr/src_app_dashboard_senders_page_tsx_1b3t4vyr5fnbx._.js +3 -0
  1017. package/.next/server/chunks/ssr/src_app_dashboard_senders_page_tsx_1b3t4vyr5fnbx._.js.map +1 -0
  1018. package/.next/server/chunks/ssr/src_app_unsubscribe_page_tsx_0o16gze50x9sf._.js +3 -0
  1019. package/.next/server/chunks/ssr/src_app_unsubscribe_page_tsx_0o16gze50x9sf._.js.map +1 -0
  1020. package/.next/server/chunks/ssr/src_components_12ptlsadu9zd7._.js +3 -0
  1021. package/.next/server/chunks/ssr/src_components_12ptlsadu9zd7._.js.map +1 -0
  1022. package/.next/server/chunks/ssr/src_components_app_0pk35_glzt8wq._.js +3 -0
  1023. package/.next/server/chunks/ssr/src_components_app_0pk35_glzt8wq._.js.map +1 -0
  1024. package/.next/server/chunks/ssr/src_components_app_auth_login-form_tsx_1r6tbf3s9mxu7._.js +3 -0
  1025. package/.next/server/chunks/ssr/src_components_app_auth_login-form_tsx_1r6tbf3s9mxu7._.js.map +1 -0
  1026. package/.next/server/chunks/ssr/src_components_app_campaigns_campaign-list_tsx_1-1uum6gsaisy._.js +3 -0
  1027. package/.next/server/chunks/ssr/src_components_app_campaigns_campaign-list_tsx_1-1uum6gsaisy._.js.map +1 -0
  1028. package/.next/server/chunks/ssr/src_components_app_contacts_contact-list_tsx_1f91x0dykt7wo._.js +3 -0
  1029. package/.next/server/chunks/ssr/src_components_app_contacts_contact-list_tsx_1f91x0dykt7wo._.js.map +1 -0
  1030. package/.next/server/chunks/ssr/src_components_app_forms_forms-section_tsx_15gbq9k8__4dn._.js +3 -0
  1031. package/.next/server/chunks/ssr/src_components_app_forms_forms-section_tsx_15gbq9k8__4dn._.js.map +1 -0
  1032. package/.next/server/chunks/ssr/src_components_app_media_media-manager_tsx_08p0-g5iq1xdy._.js +3 -0
  1033. package/.next/server/chunks/ssr/src_components_app_media_media-manager_tsx_08p0-g5iq1xdy._.js.map +1 -0
  1034. package/.next/server/chunks/ssr/src_components_app_overview_tsx_0106-5tj3j3_u._.js +3 -0
  1035. package/.next/server/chunks/ssr/src_components_app_overview_tsx_0106-5tj3j3_u._.js.map +1 -0
  1036. package/.next/server/chunks/ssr/src_components_app_settings_tsx_151892lqtlh2m._.js +3 -0
  1037. package/.next/server/chunks/ssr/src_components_app_settings_tsx_151892lqtlh2m._.js.map +1 -0
  1038. package/.next/server/chunks/ssr/src_components_landing_footer_tsx_17g4as_911h_z._.js +3 -0
  1039. package/.next/server/chunks/ssr/src_components_landing_footer_tsx_17g4as_911h_z._.js.map +1 -0
  1040. package/.next/server/chunks/ssr/src_components_landing_landing-page_tsx_0jt_enjh4367d._.js +3 -0
  1041. package/.next/server/chunks/ssr/src_components_landing_landing-page_tsx_0jt_enjh4367d._.js.map +1 -0
  1042. package/.next/server/chunks/ssr/src_components_landing_navbar_tsx_0ixz81r-fflfv._.js +3 -0
  1043. package/.next/server/chunks/ssr/src_components_landing_navbar_tsx_0ixz81r-fflfv._.js.map +1 -0
  1044. package/.next/server/chunks/ssr/src_components_ui_14xpyv0xpr1d4._.js +3 -0
  1045. package/.next/server/chunks/ssr/src_components_ui_14xpyv0xpr1d4._.js.map +1 -0
  1046. package/.next/server/chunks/ssr/src_components_ui_alert-dialog_tsx_0pzef58n2zd63._.js +3 -0
  1047. package/.next/server/chunks/ssr/src_components_ui_alert-dialog_tsx_0pzef58n2zd63._.js.map +1 -0
  1048. package/.next/server/chunks/ssr/src_components_ui_dialog_tsx_1tn-i_6d3rhzt._.js +3 -0
  1049. package/.next/server/chunks/ssr/src_components_ui_dialog_tsx_1tn-i_6d3rhzt._.js.map +1 -0
  1050. package/.next/server/chunks/ssr/src_lib_db_ts_16pqnef5-fsqp._.js +3 -0
  1051. package/.next/server/chunks/ssr/src_lib_db_ts_16pqnef5-fsqp._.js.map +1 -0
  1052. package/.next/server/edge/chunks/06xu_next_dist_esm_build_templates_edge-wrapper_0_zgqn351fy42.js.map +1 -0
  1053. package/.next/server/edge/chunks/06xu_next_dist_esm_build_templates_edge-wrapper_13xzu7i5n4bm6.js.map +1 -0
  1054. package/.next/server/edge/chunks/06xu_next_dist_esm_build_templates_edge-wrapper_1bso2q3tp24ts.js +3 -0
  1055. package/.next/server/edge/chunks/06xu_next_dist_esm_build_templates_edge-wrapper_1bso2q3tp24ts.js.map +1 -0
  1056. package/.next/server/edge/chunks/1v4i_next_dist_esm_build_templates_edge-wrapper_0_zgqn351fy42.js +3 -0
  1057. package/.next/server/edge/chunks/1v4i_next_dist_esm_build_templates_edge-wrapper_13xzu7i5n4bm6.js +3 -0
  1058. package/.next/server/edge/chunks/[root-of-the-server]__1hmjpfrn42nte._.js +11 -0
  1059. package/.next/server/edge/chunks/[root-of-the-server]__1hmjpfrn42nte._.js.map +1 -0
  1060. package/.next/server/edge/chunks/_0h6n282dfcei-._.js +3 -0
  1061. package/.next/server/edge/chunks/_0h6n282dfcei-._.js.map +1 -0
  1062. package/.next/server/functions-config-manifest.json +11 -0
  1063. package/.next/server/instrumentation/middleware-manifest.json +12 -0
  1064. package/.next/server/instrumentation.js +4 -0
  1065. package/.next/server/instrumentation.js.map +5 -0
  1066. package/.next/server/instrumentation.js.nft.json +1 -0
  1067. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  1068. package/.next/server/middleware/middleware-manifest.json +36 -0
  1069. package/.next/server/middleware-build-manifest.js +223 -0
  1070. package/.next/server/middleware-manifest.json +40 -0
  1071. package/.next/server/next-font-manifest.js +1 -0
  1072. package/.next/server/next-font-manifest.json +6 -0
  1073. package/.next/server/pages/404.html +1 -0
  1074. package/.next/server/pages/500.html +1 -0
  1075. package/.next/server/pages-manifest.json +4 -0
  1076. package/.next/server/prefetch-hints.json +90 -0
  1077. package/.next/server/preview-props.json +5 -0
  1078. package/.next/server/server-reference-manifest.js +1 -0
  1079. package/.next/server/server-reference-manifest.json +5 -0
  1080. package/.next/static/chunks/05aoy23ycul7p.js +1 -0
  1081. package/.next/static/chunks/05sohy0cbb3y1.js +1 -0
  1082. package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  1083. package/.next/static/chunks/0i_sn52ynzipf.js +1 -0
  1084. package/.next/static/chunks/0p7bxql_g7q64.js +1 -0
  1085. package/.next/static/chunks/0slfvme32bzta.js +1 -0
  1086. package/.next/static/chunks/0uofq2n85u5yc.js +1 -0
  1087. package/.next/static/chunks/0w4j5ek-0m_l6.js +1 -0
  1088. package/.next/static/chunks/0y6_igpmb5q25.js +1 -0
  1089. package/.next/static/chunks/10g8gc1_4dmb6.js +7 -0
  1090. package/.next/static/chunks/10r5b4lw40ag0.js +1 -0
  1091. package/.next/static/chunks/14e2j0tc9nsmf.js +1 -0
  1092. package/.next/static/chunks/1561y2t336828.js +132 -0
  1093. package/.next/static/chunks/19th1mnoh3o6j.js +1 -0
  1094. package/.next/static/chunks/1_-m6h07aqh30.js +134 -0
  1095. package/.next/static/chunks/1_x2f-g925jb6.js +1 -0
  1096. package/.next/static/chunks/1bitvurkxx2nz.js +1 -0
  1097. package/.next/static/chunks/1ecuhonper9l0.js +1 -0
  1098. package/.next/static/chunks/1h2_45-gp-481.js +1 -0
  1099. package/.next/static/chunks/1j3ehn_xw8a55.js +1 -0
  1100. package/.next/static/chunks/1l65wr07pb00x.js +1 -0
  1101. package/.next/static/chunks/1vu83p4si8fws.js +1 -0
  1102. package/.next/static/chunks/21bye8lfwlt44.js +1 -0
  1103. package/.next/static/chunks/2e9dsi1shhtgh.js +22 -0
  1104. package/.next/static/chunks/2k_rdgx_r4jwv.js +1 -0
  1105. package/.next/static/chunks/2lagivmzn853-.js +276 -0
  1106. package/.next/static/chunks/2pwymhlh1h5hq.js +1 -0
  1107. package/.next/static/chunks/2qh8jmvqq3j7u.js +1 -0
  1108. package/.next/static/chunks/30ut98lh7sgz_.js +1 -0
  1109. package/.next/static/chunks/31iu25a06-uq5.js +31 -0
  1110. package/.next/static/chunks/357eter5z_lqp.js +1 -0
  1111. package/.next/static/chunks/36ycf2tz4-z71.js +1 -0
  1112. package/.next/static/chunks/3ecdy1hiasj67.css +1 -0
  1113. package/.next/static/chunks/3h6bvrhsfedzo.js +1 -0
  1114. package/.next/static/chunks/3nv776qckior_.js +1 -0
  1115. package/.next/static/chunks/3w8vde_er6gsg.js +1 -0
  1116. package/.next/static/chunks/44l1w8l12d4mt.css +1 -0
  1117. package/.next/static/chunks/turbopack-2u1d16houkiyo.js +1 -0
  1118. package/.next/static/vK0UjQCR1UeWb0AjLM6gH/_buildManifest.js +11 -0
  1119. package/.next/static/vK0UjQCR1UeWb0AjLM6gH/_clientMiddlewareManifest.js +10 -0
  1120. package/.next/static/vK0UjQCR1UeWb0AjLM6gH/_ssgManifest.js +1 -0
  1121. package/.next/trace +2 -0
  1122. package/.next/trace-build +1 -0
  1123. package/.next/turbopack +0 -0
  1124. package/.next/types/cache-life.d.ts +114 -0
  1125. package/.next/types/root-params.d.ts +3 -0
  1126. package/.next/types/routes.d.ts +131 -0
  1127. package/.next/types/validator.ts +793 -0
  1128. package/README.md +36 -2
  1129. package/bin/lib/config.mjs +236 -0
  1130. package/bin/mailcast.mjs +567 -0
  1131. package/components.json +21 -0
  1132. package/next.config.mjs +13 -0
  1133. package/package.json +142 -4
  1134. package/postcss.config.mjs +5 -0
  1135. package/prisma/migrations/20261122000000_init/migration.sql +295 -0
  1136. package/prisma/migrations/migration_lock.toml +3 -0
  1137. package/prisma/schema.prisma +332 -0
  1138. package/public/logo.svg +29 -0
  1139. package/public/robots.txt +14 -0
  1140. package/scripts/load-env.mjs +12 -0
  1141. package/scripts/seed-admin.mjs +74 -0
  1142. package/src/app/api/auth/login/route.ts +69 -0
  1143. package/src/app/api/auth/logout/route.ts +35 -0
  1144. package/src/app/api/auth/session/route.ts +55 -0
  1145. package/src/app/api/auth/setup/route.ts +88 -0
  1146. package/src/app/api/campaigns/[id]/publish/route.ts +62 -0
  1147. package/src/app/api/campaigns/[id]/route.ts +180 -0
  1148. package/src/app/api/campaigns/[id]/send/route.ts +285 -0
  1149. package/src/app/api/campaigns/[id]/stats/route.ts +98 -0
  1150. package/src/app/api/campaigns/all/route.ts +15 -0
  1151. package/src/app/api/campaigns/route.ts +167 -0
  1152. package/src/app/api/contacts/[id]/route.ts +21 -0
  1153. package/src/app/api/contacts/all/route.ts +14 -0
  1154. package/src/app/api/contacts/import/route.ts +230 -0
  1155. package/src/app/api/contacts/route.ts +189 -0
  1156. package/src/app/api/cron/route.ts +36 -0
  1157. package/src/app/api/forms/[id]/route.ts +330 -0
  1158. package/src/app/api/forms/[id]/submissions/route.ts +72 -0
  1159. package/src/app/api/forms/[id]/submit/route.ts +448 -0
  1160. package/src/app/api/forms/route.ts +283 -0
  1161. package/src/app/api/forms/templates/[id]/route.ts +18 -0
  1162. package/src/app/api/forms/templates/route.ts +94 -0
  1163. package/src/app/api/groups/[id]/contacts/route.ts +201 -0
  1164. package/src/app/api/groups/[id]/route.ts +154 -0
  1165. package/src/app/api/groups/route.ts +105 -0
  1166. package/src/app/api/media/[name]/route.ts +19 -0
  1167. package/src/app/api/media/route.ts +52 -0
  1168. package/src/app/api/public/forms/[id]/route.ts +3 -0
  1169. package/src/app/api/public/posts/[slug]/route.ts +37 -0
  1170. package/src/app/api/public/posts/route.ts +27 -0
  1171. package/src/app/api/public/unsubscribe/route.ts +202 -0
  1172. package/src/app/api/route.ts +5 -0
  1173. package/src/app/api/senders/[id]/route.ts +28 -0
  1174. package/src/app/api/senders/route.ts +100 -0
  1175. package/src/app/api/settings/telegram/route.ts +110 -0
  1176. package/src/app/api/settings/telegram/stats/route.ts +45 -0
  1177. package/src/app/api/stats/route.ts +87 -0
  1178. package/src/app/api/t/[token]/route.ts +99 -0
  1179. package/src/app/api/templates/[id]/route.ts +97 -0
  1180. package/src/app/api/templates/route.ts +71 -0
  1181. package/src/app/api/workflows/[id]/enroll/route.ts +131 -0
  1182. package/src/app/api/workflows/[id]/route.ts +326 -0
  1183. package/src/app/api/workflows/[id]/run/route.ts +36 -0
  1184. package/src/app/api/workflows/route.ts +212 -0
  1185. package/src/app/blog/[slug]/page.tsx +66 -0
  1186. package/src/app/blog/page.tsx +69 -0
  1187. package/src/app/dashboard/automations/page.tsx +10 -0
  1188. package/src/app/dashboard/campaigns/[id]/page.tsx +10 -0
  1189. package/src/app/dashboard/campaigns/page.tsx +5 -0
  1190. package/src/app/dashboard/contacts/page.tsx +5 -0
  1191. package/src/app/dashboard/forms/page.tsx +5 -0
  1192. package/src/app/dashboard/layout.tsx +18 -0
  1193. package/src/app/dashboard/media/page.tsx +5 -0
  1194. package/src/app/dashboard/page.tsx +5 -0
  1195. package/src/app/dashboard/senders/page.tsx +20 -0
  1196. package/src/app/dashboard/settings/page.tsx +5 -0
  1197. package/src/app/doc/page.tsx +5 -0
  1198. package/src/app/documentation/page.tsx +5 -0
  1199. package/src/app/globals.css +146 -0
  1200. package/src/app/layout.tsx +48 -0
  1201. package/src/app/login/page.tsx +10 -0
  1202. package/src/app/page.tsx +5 -0
  1203. package/src/app/unsubscribe/page.tsx +333 -0
  1204. package/src/components/app/auth/login-form.tsx +237 -0
  1205. package/src/components/app/automations/automations-section.tsx +462 -0
  1206. package/src/components/app/automations/enroll-dialog.tsx +23 -0
  1207. package/src/components/app/automations/flow-nodes.tsx +203 -0
  1208. package/src/components/app/automations/node-library.tsx +192 -0
  1209. package/src/components/app/automations/node-types.ts +520 -0
  1210. package/src/components/app/automations/property-panel.tsx +1657 -0
  1211. package/src/components/app/automations/workflow-builder.tsx +751 -0
  1212. package/src/components/app/campaigns/campaign-editor.tsx +1603 -0
  1213. package/src/components/app/campaigns/campaign-list.tsx +227 -0
  1214. package/src/components/app/campaigns/rich-text-editor.tsx +296 -0
  1215. package/src/components/app/client-auth-gate.tsx +54 -0
  1216. package/src/components/app/contacts/contact-list.tsx +1174 -0
  1217. package/src/components/app/contacts/import-dialog.tsx +296 -0
  1218. package/src/components/app/dashboard-shell.tsx +43 -0
  1219. package/src/components/app/dashboard.tsx +93 -0
  1220. package/src/components/app/empty-state.tsx +43 -0
  1221. package/src/components/app/forms/embed-dialog.tsx +243 -0
  1222. package/src/components/app/forms/form-builder.tsx +1433 -0
  1223. package/src/components/app/forms/form-inspector.tsx +1560 -0
  1224. package/src/components/app/forms/form-preview.tsx +993 -0
  1225. package/src/components/app/forms/forms-section.tsx +315 -0
  1226. package/src/components/app/forms/submissions-dialog.tsx +245 -0
  1227. package/src/components/app/forms/types.ts +103 -0
  1228. package/src/components/app/media/media-manager.tsx +212 -0
  1229. package/src/components/app/overview.tsx +209 -0
  1230. package/src/components/app/quick-create.tsx +708 -0
  1231. package/src/components/app/section-heading.tsx +34 -0
  1232. package/src/components/app/senders/add-sender-dialog.tsx +179 -0
  1233. package/src/components/app/senders/sender-list.tsx +296 -0
  1234. package/src/components/app/settings.tsx +611 -0
  1235. package/src/components/app/sidebar.tsx +207 -0
  1236. package/src/components/app/stat-card.tsx +56 -0
  1237. package/src/components/app/status-badge.tsx +49 -0
  1238. package/src/components/app/templates/block-inspector.tsx +1594 -0
  1239. package/src/components/app/templates/canvas-block.tsx +541 -0
  1240. package/src/components/app/templates/email-builder-client.tsx +986 -0
  1241. package/src/components/app/templates/email-builder.tsx +23 -0
  1242. package/src/components/app/topbar.tsx +72 -0
  1243. package/src/components/app/use-api.ts +202 -0
  1244. package/src/components/landing/faq.tsx +84 -0
  1245. package/src/components/landing/features.tsx +147 -0
  1246. package/src/components/landing/final-cta.tsx +52 -0
  1247. package/src/components/landing/footer.tsx +89 -0
  1248. package/src/components/landing/hero.tsx +391 -0
  1249. package/src/components/landing/how-it-works.tsx +87 -0
  1250. package/src/components/landing/landing-page.tsx +45 -0
  1251. package/src/components/landing/logo.tsx +19 -0
  1252. package/src/components/landing/navbar.tsx +113 -0
  1253. package/src/components/landing/pricing.tsx +135 -0
  1254. package/src/components/landing/reveal.tsx +36 -0
  1255. package/src/components/landing/stats-bar.tsx +61 -0
  1256. package/src/components/ui/accordion.tsx +66 -0
  1257. package/src/components/ui/alert-dialog.tsx +157 -0
  1258. package/src/components/ui/alert.tsx +66 -0
  1259. package/src/components/ui/aspect-ratio.tsx +11 -0
  1260. package/src/components/ui/avatar.tsx +53 -0
  1261. package/src/components/ui/badge.tsx +46 -0
  1262. package/src/components/ui/breadcrumb.tsx +109 -0
  1263. package/src/components/ui/button.tsx +59 -0
  1264. package/src/components/ui/calendar.tsx +213 -0
  1265. package/src/components/ui/card.tsx +92 -0
  1266. package/src/components/ui/carousel.tsx +246 -0
  1267. package/src/components/ui/chart.tsx +353 -0
  1268. package/src/components/ui/checkbox.tsx +32 -0
  1269. package/src/components/ui/collapsible.tsx +33 -0
  1270. package/src/components/ui/command.tsx +184 -0
  1271. package/src/components/ui/context-menu.tsx +252 -0
  1272. package/src/components/ui/dialog.tsx +143 -0
  1273. package/src/components/ui/drawer.tsx +135 -0
  1274. package/src/components/ui/dropdown-menu.tsx +257 -0
  1275. package/src/components/ui/form.tsx +167 -0
  1276. package/src/components/ui/hover-card.tsx +44 -0
  1277. package/src/components/ui/input-otp.tsx +77 -0
  1278. package/src/components/ui/input.tsx +21 -0
  1279. package/src/components/ui/label.tsx +24 -0
  1280. package/src/components/ui/menubar.tsx +276 -0
  1281. package/src/components/ui/navigation-menu.tsx +168 -0
  1282. package/src/components/ui/pagination.tsx +127 -0
  1283. package/src/components/ui/popover.tsx +48 -0
  1284. package/src/components/ui/progress.tsx +31 -0
  1285. package/src/components/ui/radio-group.tsx +45 -0
  1286. package/src/components/ui/resizable.tsx +56 -0
  1287. package/src/components/ui/scroll-area.tsx +58 -0
  1288. package/src/components/ui/select.tsx +185 -0
  1289. package/src/components/ui/separator.tsx +28 -0
  1290. package/src/components/ui/sheet.tsx +139 -0
  1291. package/src/components/ui/sidebar.tsx +726 -0
  1292. package/src/components/ui/skeleton.tsx +13 -0
  1293. package/src/components/ui/slider.tsx +63 -0
  1294. package/src/components/ui/sonner.tsx +25 -0
  1295. package/src/components/ui/switch.tsx +31 -0
  1296. package/src/components/ui/table.tsx +116 -0
  1297. package/src/components/ui/tabs.tsx +66 -0
  1298. package/src/components/ui/textarea.tsx +18 -0
  1299. package/src/components/ui/toast.tsx +129 -0
  1300. package/src/components/ui/toaster.tsx +35 -0
  1301. package/src/components/ui/toggle-group.tsx +73 -0
  1302. package/src/components/ui/toggle.tsx +47 -0
  1303. package/src/components/ui/tooltip.tsx +61 -0
  1304. package/src/hooks/use-app-store.ts +57 -0
  1305. package/src/hooks/use-mobile.ts +21 -0
  1306. package/src/hooks/use-toast.ts +194 -0
  1307. package/src/instrumentation.ts +9 -0
  1308. package/src/lib/auth.ts +95 -0
  1309. package/src/lib/automation-engine.ts +1094 -0
  1310. package/src/lib/automation.ts +43 -0
  1311. package/src/lib/blog-render.ts +34 -0
  1312. package/src/lib/campaign-persist.ts +10 -0
  1313. package/src/lib/contact-import.ts +137 -0
  1314. package/src/lib/cron-runner.ts +61 -0
  1315. package/src/lib/cron.ts +203 -0
  1316. package/src/lib/crypto.ts +52 -0
  1317. package/src/lib/database-url.ts +30 -0
  1318. package/src/lib/db.ts +560 -0
  1319. package/src/lib/email-builder.ts +1558 -0
  1320. package/src/lib/email-cid.ts +53 -0
  1321. package/src/lib/email-font.ts +39 -0
  1322. package/src/lib/email-template.ts +182 -0
  1323. package/src/lib/file-types.ts +18 -0
  1324. package/src/lib/form-builder.ts +1489 -0
  1325. package/src/lib/form-response.ts +101 -0
  1326. package/src/lib/form-submission.ts +98 -0
  1327. package/src/lib/gmail.ts +185 -0
  1328. package/src/lib/grapes-config.ts +38 -0
  1329. package/src/lib/group-memberships.ts +13 -0
  1330. package/src/lib/markdown.ts +25 -0
  1331. package/src/lib/public-url.ts +14 -0
  1332. package/src/lib/send-result.ts +65 -0
  1333. package/src/lib/session-token.ts +42 -0
  1334. package/src/lib/supabase-storage.ts +219 -0
  1335. package/src/lib/telegram.ts +197 -0
  1336. package/src/lib/template-validation.ts +34 -0
  1337. package/src/lib/tracking-html.ts +29 -0
  1338. package/src/lib/tracking-store.ts +65 -0
  1339. package/src/lib/tracking.ts +46 -0
  1340. package/src/lib/unsubscribe-token.ts +79 -0
  1341. package/src/lib/utils.ts +6 -0
  1342. package/src/middleware.ts +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mailer/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/shared/url.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/punycode/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/shared/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/fetch/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/fetch/cookies.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/package-info.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/errors.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/shared/objects.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-funcs/mime-types.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-node/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/base64/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/qp/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-funcs/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/addressparser/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-node/last-newline.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-node/le-windows.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mime-node/le-unix.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mail-composer/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/dkim/message-parser.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/dkim/relaxed-body.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/dkim/sign.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/dkim/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-connection/http-proxy-client.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/mailer/mail-message.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-connection/data-stream.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-connection/server-message-id.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-connection/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/xoauth2/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-pool/pool-resource.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/well-known/services.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/well-known/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-pool/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/smtp-transport/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/sendmail-transport/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/stream-transport/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/json-transport/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/ses-transport/index.js","../../../node_modules/.pnpm/nodemailer%4010.6.1/node_modules/nodemailer/dist/esm/nodemailer.js","../../../src/lib/gmail.ts","../../../src/lib/send-result.ts","../../../src/lib/email-cid.ts","../../../src/lib/tracking-store.ts","../../../src/lib/tracking-html.ts","../../../src/lib/tracking.ts"],"sourcesContent":["import { EventEmitter } from 'node:events';\nimport * as shared from '../shared/index.js';\nimport * as mimeTypes from '../mime-funcs/mime-types.js';\nimport MailComposer from '../mail-composer/index.js';\nimport DKIM from '../dkim/index.js';\nimport httpProxyClient from '../smtp-connection/http-proxy-client.js';\nimport * as errors from '../errors.js';\nimport util from 'node:util';\nimport * as urllib from '../shared/url.js';\nimport * as packageData from '../package-info.js';\nimport MailMessage from './mail-message.js';\nimport net from 'node:net';\nimport dns from 'node:dns';\nimport crypto from 'node:crypto';\n/**\n * Recipients allowed on one message unless the caller sets its own maxRecipients. A backstop\n * against a runaway or hostile recipient list rather than a delivery policy: RFC 5321 only\n * asks a server to accept 100, so a real send is bounded far below this.\n */\nconst DEFAULT_MAX_RECIPIENTS = 100000;\n/**\n * Duck-typed so that signals from another realm or a polyfill are accepted as well\n */\nfunction isAbortSignal(value) {\n return (typeof value === 'object' &&\n value !== null &&\n 'aborted' in value &&\n typeof value.addEventListener === 'function' &&\n typeof value.removeEventListener === 'function');\n}\n/**\n * Creates an object for exposing the Mail API\n *\n * @constructor\n * @param transporter Transport object instance to pass the mails to\n */\nclass Mail extends EventEmitter {\n constructor(transporter, options, defaults) {\n super();\n this.options = options || {};\n this._defaults = defaults || {};\n this._defaultPlugins = {\n compile: [(...args) => this._convertDataImages(...args)],\n stream: []\n };\n this._userPlugins = {\n compile: [],\n stream: []\n };\n this.meta = new Map();\n this.dkim = this.options.dkim ? new DKIM(this.options.dkim) : false;\n this.transporter = transporter;\n this.transporter.mailer = this;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'mail'\n });\n this.logger.debug({\n tnx: 'create'\n }, 'Creating transport: %s', this.getVersionString());\n // setup emit handlers for the transporter\n if (typeof this.transporter.on === 'function') {\n // deprecated log interface\n this.transporter.on('log', log => {\n this.logger.debug({\n tnx: 'transport'\n }, '%s: %s', log.type, log.message);\n });\n // transporter errors\n this.transporter.on('error', err => {\n this.logger.error({\n err,\n tnx: 'transport'\n }, 'Transport Error: %s', err.message);\n this.emit('error', err);\n });\n // indicates if the sender has became idle\n this.transporter.on('idle', (...args) => {\n this.emit('idle', ...args);\n });\n // indicates if the sender has became idle and all connections are terminated\n this.transporter.on('clear', (...args) => {\n this.emit('clear', ...args);\n });\n }\n /**\n * Optional methods passed to the underlying transport object\n */\n ['close', 'isIdle', 'verify'].forEach(method => {\n this[method] = (...args) => {\n if (typeof this.transporter[method] === 'function') {\n if (method === 'verify' && typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n return this.transporter[method](...args);\n }\n this.logger.warn({\n tnx: 'transport',\n methodName: method\n }, 'Non existing method %s called for transport', method);\n return false;\n };\n });\n // setup proxy handling\n if (this.options.proxy && typeof this.options.proxy === 'string') {\n this.setupProxy(this.options.proxy);\n }\n }\n use(step, plugin) {\n step = (step || '').toString();\n if (!this._userPlugins.hasOwnProperty(step)) {\n this._userPlugins[step] = [plugin];\n }\n else {\n this._userPlugins[step].push(plugin);\n }\n return this;\n }\n sendMail(data, callback = null) {\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const done = callback;\n if (typeof this.getSocket === 'function') {\n this.transporter.getSocket = this.getSocket;\n this.getSocket = false;\n }\n const mail = new MailMessage(this, data);\n const signalOption = mail.data.signal;\n const signal = isAbortSignal(signalOption) ? signalOption : undefined;\n let settled = false;\n const removeAbortListener = () => signal?.removeEventListener('abort', onAbort);\n const finish = (err, info) => {\n if (settled) {\n return;\n }\n settled = true;\n removeAbortListener();\n if (err) {\n mail.releaseStreams();\n }\n done(err, info);\n };\n // a failed message is not going to be read anymore, release its content streams\n const fail = (err) => {\n finish(err);\n };\n function onAbort() {\n fail(errors.createAbortError(signal));\n }\n if (signalOption !== undefined && signalOption !== null && !signal) {\n const err = new Error('The signal option must be an AbortSignal');\n err.code = errors.ECONFIG;\n setImmediate(() => fail(err));\n return promise;\n }\n // Mail handles a pre-aborted signal and cancellation during plugin processing for every\n // transport; a transport without supportsAbortSignal ignores the signal once it is called\n if (signal) {\n signal.addEventListener('abort', onAbort, { once: true });\n if (signal.aborted) {\n setImmediate(onAbort);\n return promise;\n }\n }\n this.logger.debug({\n tnx: 'transport',\n name: this.transporter.name,\n version: this.transporter.version,\n action: 'send'\n }, 'Sending mail using %s/%s', this.transporter.name, this.transporter.version);\n this._processPlugins('compile', mail, err => {\n if (settled) {\n return;\n }\n if (err) {\n this.logger.error({\n err,\n tnx: 'plugin',\n action: 'compile'\n }, 'PluginCompile Error: %s', err.message);\n return fail(err);\n }\n let recipientCount;\n try {\n mail.message = new MailComposer(mail.data).compile();\n mail.setMailerHeader();\n mail.setPriorityHeaders();\n mail.setListHeaders();\n recipientCount = mail.message.getEnvelope().to.length;\n }\n catch (err) {\n // message data can throw while it is compiled, the error belongs to the callback\n this.logger.error({\n err,\n tnx: 'transport',\n action: 'send'\n }, 'Compile Error: %s', err.message);\n return fail(err);\n }\n const maxRecipients = mail.data.maxRecipients === undefined ? DEFAULT_MAX_RECIPIENTS : mail.data.maxRecipients;\n if (maxRecipients && recipientCount > maxRecipients) {\n const err = new Error(`Message has ${recipientCount} recipients, which is over the ${maxRecipients} allowed by maxRecipients`);\n err.code = errors.EMAXRECIPIENTS;\n this.logger.error({\n err,\n tnx: 'transport',\n action: 'send'\n }, 'Send Error: %s', err.message);\n return fail(err);\n }\n this._processPlugins('stream', mail, err => {\n if (settled) {\n return;\n }\n if (err) {\n this.logger.error({\n err,\n tnx: 'plugin',\n action: 'stream'\n }, 'PluginStream Error: %s', err.message);\n return fail(err);\n }\n if (mail.data.dkim || this.dkim) {\n mail.message.processFunc(input => {\n const dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;\n this.logger.debug({\n tnx: 'DKIM',\n messageId: mail.message.messageId(),\n dkimDomains: dkim.keys.map(key => key.keySelector + '.' + key.domainName).join(', ')\n }, 'Signing outgoing message with %s keys', dkim.keys.length);\n return dkim.sign(input, mail.data._dkim);\n });\n }\n // The transport takes ownership of cancellation from here, including queued work.\n removeAbortListener();\n this.transporter.send(mail, (...args) => {\n if (args[0]) {\n this.logger.error({\n err: args[0],\n tnx: 'transport',\n action: 'send'\n }, 'Send Error: %s', args[0].message);\n }\n finish(...args);\n });\n });\n });\n return promise;\n }\n getVersionString() {\n return util.format('%s (%s; +%s; %s/%s)', packageData.name, packageData.version, packageData.homepage, this.transporter.name, this.transporter.version);\n }\n /** @internal */\n _processPlugins(step, mail, callback) {\n step = (step || '').toString();\n if (!this._userPlugins.hasOwnProperty(step)) {\n return callback();\n }\n const userPlugins = this._userPlugins[step] || [];\n const defaultPlugins = this._defaultPlugins[step] || [];\n if (userPlugins.length) {\n this.logger.debug({\n tnx: 'transaction',\n pluginCount: userPlugins.length,\n step\n }, 'Using %s plugins for %s', userPlugins.length, step);\n }\n if (userPlugins.length + defaultPlugins.length === 0) {\n return callback();\n }\n let pos = 0;\n let block = 'default';\n const processPlugins = () => {\n if (mail.data.signal?.aborted) {\n return callback(errors.createAbortError(mail.data.signal));\n }\n let curplugins = block === 'default' ? defaultPlugins : userPlugins;\n if (pos >= curplugins.length) {\n if (block === 'default' && userPlugins.length) {\n block = 'user';\n pos = 0;\n curplugins = userPlugins;\n }\n else {\n return callback();\n }\n }\n const plugin = curplugins[pos++];\n plugin(mail, err => {\n if (err) {\n return callback(err);\n }\n processPlugins();\n });\n };\n processPlugins();\n }\n /**\n * Sets up proxy handler for a Nodemailer object\n *\n * @param proxyUrl Proxy configuration url\n */\n setupProxy(proxyUrl) {\n const proxy = urllib.parse(proxyUrl);\n // setup socket handler for the mailer object\n this.getSocket = (options, callback) => {\n const protocol = proxy.protocol.replace(/:$/, '').toLowerCase();\n // The proxy handshake is a part of connecting and draws from the same deadline as the\n // SMTP connection that follows it: whatever the proxy takes, the connection does not get\n const configuredTimeout = Number(this.options.connectionTimeout) || 0;\n const connectStartedAt = Number(options.connectStartedAt) || Date.now();\n const connectionTimeout = configuredTimeout ? Math.max(connectStartedAt + configuredTimeout - Date.now(), 1) : undefined;\n if (this.meta.has('proxy_handler_' + protocol)) {\n return this.meta.get('proxy_handler_' + protocol)(proxy, options, callback);\n }\n switch (protocol) {\n // Connect using a HTTP CONNECT method\n case 'http':\n case 'https':\n httpProxyClient(proxy.href, options.port, options.host, connectionTimeout ? Object.assign({}, this.options.tls, { timeout: connectionTimeout }) : this.options.tls || {}, (err, socket) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: socket\n });\n });\n return;\n case 'socks':\n case 'socks5':\n case 'socks4':\n case 'socks4a': {\n if (!this.meta.has('proxy_socks_module')) {\n let err = new Error('Socks module not loaded');\n err.code = errors.EPROXY;\n return callback(err);\n }\n const connect = (ipaddress) => {\n const proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;\n const socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');\n const proxyType = Number(proxy.protocol.replace(/\\D/g, '')) || 5;\n const connectionOpts = {\n proxy: {\n ipaddress,\n port: Number(proxy.port),\n type: proxyType\n },\n [proxyV2 ? 'destination' : 'target']: {\n host: options.host,\n port: options.port\n },\n command: 'connect'\n };\n if (connectionTimeout) {\n connectionOpts.timeout = connectionTimeout;\n }\n if (proxy.username || proxy.password) {\n const username = proxy.username || '';\n const password = proxy.password || '';\n if (proxyV2) {\n connectionOpts.proxy.userId = username;\n connectionOpts.proxy.password = password;\n }\n else if (proxyType === 4) {\n connectionOpts.userid = username;\n }\n else {\n connectionOpts.authentication = {\n username,\n password\n };\n }\n }\n socksClient.createConnection(connectionOpts, (err, info) => {\n if (err) {\n return callback(err);\n }\n return callback(null, {\n connection: info.socket || info\n });\n });\n };\n if (net.isIP(proxy.hostname)) {\n return connect(proxy.hostname);\n }\n // lookup goes through the hosts file and returns an IPv6 address as well,\n // the same way a connection to the proxy host would be resolved otherwise\n return dns.lookup(proxy.hostname, (err, address) => {\n if (err) {\n return callback(err);\n }\n connect(address);\n });\n }\n }\n let err = new Error('Unknown proxy configuration');\n err.code = errors.EPROXY;\n callback(err);\n };\n }\n /** @internal */\n _convertDataImages(mail, callback) {\n if ((!this.options.attachDataUrls && !mail.data.attachDataUrls) || !mail.data.html) {\n return callback();\n }\n mail.resolveContent(mail.data, 'html', { disableFileAccess: mail.data.disableFileAccess, disableUrlAccess: mail.data.disableUrlAccess }, (err, html) => {\n if (err) {\n return callback(err);\n }\n let cidCounter = 0;\n // the media type is a bounded token: a quote, whitespace, '>' or '<' ends the\n // attribute value and with it the type, so one img tag never scans ahead to a\n // ';' that belongs to a later tag, which was quadratic\n html = (html || '')\n .toString()\n .replace(/(<img\\b[^<>]{0,1024} src\\s{0,20}=[\\s\"']{0,20})(data:([^;\"'<>\\s]{1,255});[^\"'>\\s]+)/gi, (match, prefix, dataUri, mimeType) => {\n const cid = crypto.randomBytes(10).toString('hex') + '@localhost';\n if (!mail.data.attachments) {\n mail.data.attachments = [];\n }\n if (!Array.isArray(mail.data.attachments)) {\n mail.data.attachments = [].concat(mail.data.attachments || []);\n }\n mail.data.attachments.push({\n path: dataUri,\n cid,\n filename: 'image-' + ++cidCounter + '.' + mimeTypes.detectExtension(mimeType)\n });\n return prefix + 'cid:' + cid;\n });\n mail.data.html = html;\n callback();\n });\n }\n set(key, value) {\n return this.meta.set(key, value);\n }\n get(key) {\n return this.meta.get(key);\n }\n}\nexport default Mail;\n","// URL parsing wrapper around the WHATWG `URL` class. It only falls back to the\n// legacy, deprecation-warning-emitting `url.parse()` / `url.resolve()` for input\n// the WHATWG parser rejects.\n//\n// The WHATWG `URL` exposes a different shape than the legacy parser, so results\n// are normalized back into the legacy field names the rest of the codebase reads\n// (`protocol`, `hostname`, `port`, `pathname`, `path`, `search`, `auth`, `query`,\n// `href`). This keeps every existing call site unchanged.\n//\n// Known, accepted divergences from the legacy parser:\n// - non-special schemes (smtp:/smtps:/direct:) are not host-lowercased by\n// WHATWG; cosmetic only, SMTP/DNS hosts are case-insensitive. (IDNA mapping\n// and IPv6 brackets are normalized back by normalizeHostname below.)\n// - a literal unescaped ':' inside a password is percent-encoded by WHATWG;\n// such passwords should be percent-encoded by the caller anyway.\nimport net from 'node:net';\nimport urllib from 'node:url';\nimport * as punycode from '../punycode/index.js';\n// Matches a \"scheme:\" not followed by \"//\" (and with something after it), used\n// to re-insert the authority separator the legacy parser did not require.\nconst SLASHLESS_AUTHORITY = /^([a-zA-Z][a-zA-Z0-9+.-]*:)(?!\\/\\/)([\\s\\S]+)$/;\n/**\n * Drops the leading and trailing C0 controls and spaces, which the WHATWG parser strips\n * before it looks at the input. Stripped up front so that the slash-less form is recognized\n * in a value read from a file with a trailing newline as well. An index scan, the regex\n * /^[\\x00-\\x20]+|[\\x00-\\x20]+$/g retried a run of spaces inside the value from every\n * position in it\n *\n * @param input URL string\n * @returns The string without the surrounding controls and spaces\n */\nfunction stripSurroundingWhitespace(input) {\n let start = 0;\n let end = input.length;\n while (start < end && input.charCodeAt(start) <= 0x20) {\n start++;\n }\n while (end > start && input.charCodeAt(end - 1) <= 0x20) {\n end--;\n }\n return input.slice(start, end);\n}\n// Leading characters legacy url.parse() skips before it reads the scheme\nconst LEGACY_TRIM = /^[\\x00-\\x20\\u00a0\\ufeff]+/;\n// The authority of a \"scheme://authority/...\" or a scheme-relative \"//authority/...\"\n// string: the scheme, if any (anything the legacy parser takes for one, it is less strict\n// than WHATWG about the first character), and what the legacy parser has to report as the\n// host once the userinfo is removed, see legacyParse. The legacy parser treats a backslash\n// as a slash.\nconst AUTHORITY = /^([a-zA-Z0-9+.-]+:)?[\\\\/]{2}([^\\\\/?#]*)/;\n// The WHATWG forbidden domain code points, except '%' which an opaque host may carry: the\n// C0 control characters, space, DEL and the URL delimiters. CONTROL_CHARS is the C0 and DEL\n// subset, checked on its own in legacyParse where the host string still carries the port\n// and IPv6 brackets.\nconst FORBIDDEN_HOST_CHARS = /[\\x00-\\x20#/:<>?@[\\\\\\]^|\\x7f]/;\nconst CONTROL_CHARS = /[\\x00-\\x1f\\x7f]/;\n// The error the WHATWG parser throws, for a host that only fails the checks in this module\nfunction invalidUrl(input) {\n const err = new TypeError('Invalid URL');\n err.code = 'ERR_INVALID_URL';\n err.input = input;\n return err;\n}\n// Legacy url.parse() for input the WHATWG parser refused. The legacy parser does not\n// reject a host it can not represent: a NUL byte, a percent-encoded byte, a space or a\n// '<' inside the host ends the host early and the rest becomes the path, so\n// 'localhost%00.example.com' silently turns into a request to 'localhost'. When the\n// input has an authority that the legacy parser reads as the host (always for\n// \"scheme://\", for \"//host\" only when slashesDenoteHost is set, as url.resolve() does\n// for its target), the legacy result is accepted only if that host is the whole written\n// authority, lowercased and IDNA mapped the way the legacy parser does it, and carries\n// no control character. A legacy result with a host (an empty one included, 'http:///x'\n// is a request to localhost) that no such authority accounts for is refused as well.\n// Otherwise the WHATWG error is reported. Relative input has no authority to check and\n// keeps the legacy behavior.\nfunction legacyParse(input, parseQueryString, whatwgError, slashesDenoteHost) {\n const parsed = urllib.parse(input, parseQueryString, slashesDenoteHost);\n const authority = AUTHORITY.exec(input.replace(LEGACY_TRIM, ''));\n if (authority && (authority[1] || parsed.hostname !== null)) {\n const written = authority[2].slice(authority[2].lastIndexOf('@') + 1);\n if (!written || CONTROL_CHARS.test(written) || (parsed.host || '').toLowerCase() !== punycode.toASCII(written.toLowerCase())) {\n throw whatwgError;\n }\n // the legacy parser takes any bracketed value for an IPv6 literal\n if (written.charAt(0) === '[' && !net.isIPv6(written.slice(1, written.indexOf(']')))) {\n throw whatwgError;\n }\n }\n else if (parsed.hostname !== null) {\n throw whatwgError;\n }\n // the legacy parser only offers the joined form, split it on the first colon\n const legacyAuth = parsed.auth === null || parsed.auth === undefined ? null : parsed.auth.split(':');\n const result = parsed;\n result.username = legacyAuth ? legacyAuth.shift() : null;\n result.password = legacyAuth && legacyAuth.length ? legacyAuth.join(':') : null;\n return result;\n}\n// decodeURIComponent that never throws. Legacy url.parse() decodes the auth\n// component but tolerates malformed percent sequences, so mirror that.\nfunction safeDecode(str) {\n try {\n return decodeURIComponent(str);\n }\n catch (_err) {\n return str;\n }\n}\n// Derives the legacy-shaped bare hostname from a WHATWG URL. WHATWG keeps IPv6\n// literals bracketed ('[::1]') and, for non-special schemes (smtp:/smtps:/socks:),\n// percent-encodes a non-ASCII host instead of IDNA-mapping it. Both forms are\n// un-resolvable when handed to net/dns/http.request, which is what every call\n// site does, so map them back to what legacy url.parse() returned: the bare\n// address and the IDNA mapped (lowercased, punycode) form. Idempotent on plain\n// ASCII and already-punycode hosts, so special-scheme hosts (already IDNA-mapped\n// by WHATWG) pass through.\nfunction normalizeHostname(raw, href) {\n const hostname = raw || '';\n if (!hostname) {\n // Host-less URL (e.g. 'direct:'): legacy returned '' here, not null;\n // consumers do `hostname.length` / `'.' + hostname`, so keep it a string.\n return '';\n }\n if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') {\n return hostname.slice(1, -1);\n }\n const decoded = safeDecode(hostname);\n // domainToASCII applies the WHATWG host rules (IDNA mapping included) and returns an\n // empty string for a host it refuses, the forbidden characters among them\n const mapped = FORBIDDEN_HOST_CHARS.test(decoded) ? '' : urllib.domainToASCII(decoded);\n if (!mapped) {\n throw invalidUrl(href);\n }\n return mapped;\n}\nexport const parse = (input, parseQueryString) => {\n input = stripSurroundingWhitespace(input || '');\n // Legacy url.parse() parses a \"user:pass@host:port\" authority that follows\n // the scheme even without the \"//\" separator, for schemes outside its\n // built-in slashed-protocol list (smtp:/smtps:/socks:/...). The WHATWG\n // parser instead treats a scheme not followed by \"//\" as an opaque path.\n // Re-insert the \"//\" so slash-less connection/proxy URLs keep resolving to\n // an authority, as they did before. This assumes a slash-authority scheme,\n // which every consumer here uses (http/https/smtp/smtps/socks/direct); an\n // opaque scheme like mailto:/data:/tel: would be mis-split, but none reach\n // this module.\n const slashless = SLASHLESS_AUTHORITY.exec(input);\n const normalized = slashless ? slashless[1] + '//' + slashless[2] : input;\n let u;\n try {\n u = new URL(normalized);\n }\n catch (err) {\n // WHATWG rejects some input the legacy parser tolerated (empty/relative\n // strings, scheme-relative '//host/path', out-of-range ports, ...). Fall\n // back to the legacy parser so behavior, including the downstream errors\n // callers rely on, is preserved. This is the only path that can still\n // emit a deprecation warning; it fires for anything WHATWG cannot\n // represent, including legitimate relative URLs, not just malformed input.\n return legacyParse(normalized, parseQueryString, err);\n }\n const hostname = normalizeHostname(u.hostname, u.href);\n const port = u.port || null;\n const pathname = u.pathname || null;\n const search = u.search || null;\n // Legacy `.auth` is the decoded \"user[:pass]\" string; WHATWG keeps the\n // username/password percent-encoded, so decode to stay byte-compatible with\n // existing consumers (parseConnectionUrl, Basic/Proxy-Authorization headers).\n let auth = null;\n let username = null;\n let password = null;\n if (u.username || u.password) {\n // Gate on password too: legacy url.parse('smtps://:pass@host').auth was\n // ':pass'. Dropping it would silently connect unauthenticated.\n username = safeDecode(u.username);\n password = u.password ? safeDecode(u.password) : null;\n // the joined form is ambiguous once the user name contains a colon, so\n // consumers that need the parts read username and password instead\n auth = username + (password !== null ? ':' + password : '');\n }\n let query;\n if (parseQueryString) {\n // Mirror querystring.parse(): null-prototype object, repeated keys become an array.\n const parsed = Object.create(null);\n u.searchParams.forEach((value, key) => {\n if (Object.prototype.hasOwnProperty.call(parsed, key)) {\n const existing = parsed[key];\n if (Array.isArray(existing)) {\n existing.push(value);\n }\n else {\n parsed[key] = [existing, value];\n }\n }\n else {\n parsed[key] = value;\n }\n });\n query = parsed;\n }\n else {\n query = search ? search.slice(1) : null;\n }\n return {\n protocol: u.protocol || null,\n host: u.host || null,\n hostname,\n port,\n pathname,\n search,\n path: (pathname || '') + (search || '') || null,\n href: u.href,\n auth,\n username,\n password,\n query\n };\n};\nexport const resolve = (from, to) => {\n try {\n return new URL(to, from).href;\n }\n catch (err) {\n // Malformed target, fall back to the legacy resolver, but only when the legacy\n // parser reads the same host out of both inputs that was written. The target\n // decides the host when it is absolute or scheme-relative, the base otherwise\n legacyParse(from, false, err, true);\n legacyParse(to, false, err, true);\n return urllib.resolve(from, to);\n }\n};\n","/*\n\nCopied from https://github.com/mathiasbynens/punycode.js/blob/ef3505c8abb5143a00d53ce59077c9f7f4b2ac47/punycode.js\n\nCopyright Mathias Bynens <https://mathiasbynens.be/>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n/* eslint callback-return: 0, no-bitwise: 0, eqeqeq: 0, prefer-arrow-callback: 0 */\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n/** Error messages */\nconst errors = {\n overflow: 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n};\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n/*--------------------------------------------------------------------------*/\n/**\n * A generic error utility function.\n * @private\n * @param type The error type.\n * @returns Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n throw new RangeError(errors[type]);\n}\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param array The array to iterate over.\n * @param callback The function that gets called for every array\n * item.\n * @returns A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n const result = [];\n let length = array.length;\n while (length--) {\n result[length] = callback(array[length]);\n }\n return result;\n}\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param domain The domain name or email address.\n * @param callback The function that gets called for every\n * character.\n * @returns A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n const parts = domain.split('@');\n let result = '';\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n domain = parts[1];\n }\n // Avoid `split(regex)` for IE8 compatibility. See #17.\n domain = domain.replace(regexSeparators, '\\x2E');\n const labels = domain.split('.');\n const encoded = map(labels, callback).join('.');\n return result + encoded;\n}\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param string The Unicode input string (UCS-2).\n * @returns The new array of code points.\n */\nfunction ucs2decode(string) {\n const output = [];\n let counter = 0;\n const length = string.length;\n while (counter < length) {\n const value = string.charCodeAt(counter++);\n if (value >= 0xd800 && value <= 0xdbff && counter < length) {\n // It's a high surrogate, and there is a next character.\n const extra = string.charCodeAt(counter++);\n if ((extra & 0xfc00) == 0xdc00) {\n // Low surrogate.\n output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);\n }\n else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n }\n else {\n output.push(value);\n }\n }\n return output;\n}\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param codePoints The array of numeric code points.\n * @returns The new Unicode string (UCS-2).\n */\nconst ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param codePoint The basic numeric code point value.\n * @returns The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function (codePoint) {\n if (codePoint >= 0x30 && codePoint < 0x3a) {\n return 26 + (codePoint - 0x30);\n }\n if (codePoint >= 0x41 && codePoint < 0x5b) {\n return codePoint - 0x41;\n }\n if (codePoint >= 0x61 && codePoint < 0x7b) {\n return codePoint - 0x61;\n }\n return base;\n};\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param digit The numeric value of a basic code point.\n * @param flag Non-zero to use the uppercase form of the code point.\n * @returns The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function (digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * Number(digit < 26) - (Number(flag != 0) << 5);\n};\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function (delta, numPoints, firstTime) {\n let k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; /* no initialization */ delta > (baseMinusTMin * tMax) >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + ((baseMinusTMin + 1) * delta) / (delta + skew));\n};\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param input The Punycode string of ASCII-only symbols.\n * @returns The resulting string of Unicode symbols.\n */\nconst decode = function (input) {\n // Don't use UCS-2.\n const output = [];\n const inputLength = input.length;\n let i = 0;\n let n = initialN;\n let bias = initialBias;\n // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n let basic = input.lastIndexOf(delimiter);\n if (basic < 0) {\n basic = 0;\n }\n for (let j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n output.push(input.charCodeAt(j));\n }\n // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n for (let index = basic > 0 ? basic + 1 : 0; index < inputLength /* no final expression */;) {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n const oldi = i;\n for (let w = 1, k = base /* no condition */;; k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n const digit = basicToDigit(input.charCodeAt(index++));\n if (digit >= base) {\n error('invalid-input');\n }\n if (digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n i += digit * w;\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (digit < t) {\n break;\n }\n const baseMinusT = base - t;\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n w *= baseMinusT;\n }\n const out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0);\n // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n n += floor(i / out);\n i %= out;\n // Insert `n` at position `i` of the output.\n output.splice(i++, 0, n);\n }\n return String.fromCodePoint(...output);\n};\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param input The string of Unicode symbols.\n * @returns The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function (input) {\n const output = [];\n // Convert the input in UCS-2 to an array of Unicode code points.\n const codePoints = ucs2decode(input);\n // Cache the length.\n const inputLength = codePoints.length;\n // Initialize the state.\n let n = initialN;\n let delta = 0;\n let bias = initialBias;\n // Handle the basic code points.\n for (const currentValue of codePoints) {\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n const basicLength = output.length;\n let handledCPCount = basicLength;\n // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n let m = maxInt;\n for (const currentValue of codePoints) {\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n // but guard against overflow.\n const handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n for (const currentValue of codePoints) {\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n if (currentValue === n) {\n // Represent delta as a generalized variable-length integer.\n let q = delta;\n for (let k = base /* no condition */;; k += base) {\n const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n if (q < t) {\n break;\n }\n const qMinusT = q - t;\n const baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + (qMinusT % baseMinusT), 0)));\n q = floor(qMinusT / baseMinusT);\n }\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n ++delta;\n ++n;\n }\n return output.join('');\n};\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function (input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n};\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param input The domain name or email address to convert, as a\n * Unicode string.\n * @returns The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function (input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n};\n/*--------------------------------------------------------------------------*/\n/** Define the public API */\n/**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\nexport const version = '2.3.1';\n/**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode\n * @type Object\n */\nexport const ucs2 = {\n decode: ucs2decode,\n encode: ucs2encode\n};\nexport { decode, encode, toASCII, toUnicode };\n","/* eslint no-console: 0 */\nimport * as urllib from './url.js';\nimport util from 'node:util';\nimport fs from 'node:fs';\nimport nmfetch from '../fetch/index.js';\nimport * as errors from '../errors.js';\nimport { isProtoKey, copyOwnKeys } from './objects.js';\nimport dns from 'node:dns';\nimport net from 'node:net';\nimport os from 'node:os';\nimport urlModule from 'node:url';\nimport * as punycode from '../punycode/index.js';\nimport { finished } from 'node:stream';\n// re-exported for the callers that already depend on this module, see ./objects\nexport { isProtoKey, copyOwnKeys };\nconst DNS_TTL = 5 * 60 * 1000;\nconst CACHE_CLEANUP_INTERVAL = 30 * 1000; // Minimum 30 seconds between cleanups\nconst MAX_CACHE_SIZE = 1000; // Maximum number of entries in cache\nlet lastCacheCleanup = 0;\n/** @internal */\nexport const _lastCacheCleanup = () => lastCacheCleanup;\n/** @internal */\nexport const _resetCacheCleanup = () => {\n lastCacheCleanup = 0;\n};\nexport let networkInterfaces;\nlet networkInterfacesRead = false;\n// Read on first use rather than at load, so that importing the module does not ask for\n// the interface table (Deno prompts for --allow-sys on it)\n/** @internal */\nexport const _readNetworkInterfaces = () => {\n if (!networkInterfacesRead) {\n networkInterfacesRead = true;\n try {\n networkInterfaces = os.networkInterfaces();\n }\n catch (_err) {\n // fails on some systems\n }\n }\n return networkInterfaces;\n};\nconst isFamilySupported = (family, allowInternal) => {\n const addresses = Object.values(_readNetworkInterfaces() || {}).flat();\n if (!addresses.length) {\n // hope for the best. Runtimes without an interface table (Cloudflare\n // Workers) report an empty object rather than throwing\n return true;\n }\n return addresses.filter(i => !i.internal || allowInternal).some(i => i.family === 'IPv' + family || i.family === family);\n};\nconst resolve = (family, hostname, options, callback) => {\n options = options || {};\n if (!isFamilySupported(family, options.allowInternalNetworkInterfaces)) {\n callback(null, []);\n return null;\n }\n const dnsResolver = dns.Resolver ? new dns.Resolver(options) : dns;\n dnsResolver['resolve' + family](hostname, (err, addresses) => {\n if (err) {\n switch (err.code) {\n case dns.NODATA:\n case dns.NOTFOUND:\n case dns.NOTIMP:\n case dns.SERVFAIL:\n case dns.CONNREFUSED:\n case dns.REFUSED:\n case 'EAI_AGAIN':\n return callback(null, []);\n }\n return callback(err);\n }\n return callback(null, Array.isArray(addresses) ? addresses : [].concat(addresses || []));\n });\n return dns.Resolver ? dnsResolver : null;\n};\nexport const dnsCache = new Map();\nconst formatDNSValue = (value, extra) => {\n if (!value) {\n return Object.assign({}, extra || {});\n }\n const addresses = value.addresses || [];\n // Select a random address from available addresses, or null if none\n const host = addresses.length > 0 ? addresses[Math.floor(Math.random() * addresses.length)] : null;\n return Object.assign({\n host,\n // Include all addresses for connection fallback support\n _addresses: addresses\n }, extra || {});\n};\nexport const resolveHostname = (options, callback) => {\n options = options || {};\n if (!options.host && options.servername) {\n options.host = options.servername;\n }\n if (!options.host || net.isIP(options.host)) {\n // nothing to do here\n const value = {\n addresses: [options.host]\n };\n return callback(null, formatDNSValue(value, {\n servername: options.servername || false,\n cached: false\n }));\n }\n const host = options.host;\n // The TLS server name belongs to the connection asking, not to the host it resolves. The\n // cache is shared by every transport of the process and keyed by host alone, so a server\n // name stored in it would be the one of whichever transport resolved the host first, and a\n // later transport with its own tls.servername would present and verify that name instead\n const servername = options.servername || host;\n let cached;\n if (dnsCache.has(options.host)) {\n cached = dnsCache.get(options.host);\n // Lazy cleanup with time throttling\n const now = Date.now();\n if (now - lastCacheCleanup > CACHE_CLEANUP_INTERVAL) {\n lastCacheCleanup = now;\n // Clean up expired entries\n for (const [host, entry] of dnsCache.entries()) {\n if (entry.expires && entry.expires < now) {\n dnsCache.delete(host);\n }\n }\n // If cache is still too large, remove oldest entries\n if (dnsCache.size > MAX_CACHE_SIZE) {\n const toDelete = Math.floor(MAX_CACHE_SIZE * 0.1); // Remove 10% of entries\n const keys = Array.from(dnsCache.keys()).slice(0, toDelete);\n keys.forEach(key => dnsCache.delete(key));\n }\n }\n if (!cached.expires || cached.expires >= now) {\n return callback(null, formatDNSValue(cached.value, {\n servername,\n cached: true\n }));\n }\n }\n // The timeout limits the lookup as a whole. It is also handed to the resolver, but there\n // it applies to every query attempt on its own, and the resolver retries a few times\n let responded = false;\n let deadline;\n const respond = (err, result) => {\n if (responded) {\n return;\n }\n responded = true;\n clearTimeout(deadline);\n callback(err, result);\n };\n // a stale cached value is still better than no value at all\n const respondCached = (error) => {\n if (!cached) {\n return false;\n }\n dnsCache.set(host, {\n value: cached.value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n respond(null, formatDNSValue(cached.value, {\n servername,\n cached: true,\n error\n }));\n return true;\n };\n const resolvers = [];\n const timeout = Number(options.timeout) || 0;\n if (timeout > 0) {\n deadline = setTimeout(() => {\n for (const resolver of resolvers) {\n if (typeof resolver.cancel === 'function') {\n resolver.cancel();\n }\n }\n const err = new Error('DNS lookup for ' + host + ' timed out');\n err.code = dns.TIMEOUT;\n if (!respondCached(err)) {\n respond(err);\n }\n }, timeout);\n }\n // Resolve both IPv4 and IPv6 addresses for fallback support, at the same time\n let ipv4Addresses = [];\n let ipv6Addresses = [];\n let ipv4Error = null;\n let ipv6Error = null;\n let pending = 2;\n const onResolved = () => {\n if (--pending || responded) {\n return;\n }\n // Combine addresses: IPv4 first, then IPv6\n const allAddresses = ipv4Addresses.concat(ipv6Addresses);\n if (allAddresses.length) {\n const value = {\n addresses: allAddresses\n };\n dnsCache.set(host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n return respond(null, formatDNSValue(value, {\n servername,\n cached: false\n }));\n }\n // No addresses from resolve4/resolve6, try dns.lookup as fallback\n if (ipv4Error && ipv6Error && respondCached(ipv4Error)) {\n // Both resolvers had errors\n return;\n }\n try {\n dns.lookup(host, { all: true }, (err, addresses) => {\n if (err) {\n if (respondCached(err)) {\n return;\n }\n return respond(err);\n }\n // Get all supported addresses from dns.lookup\n const supportedAddresses = addresses ? addresses.filter(addr => isFamilySupported(addr.family)).map(addr => addr.address) : [];\n if (addresses && addresses.length && !supportedAddresses.length) {\n // there are addresses but none can be used\n console.warn(`Failed to resolve IPv${addresses[0].family} addresses with current network`);\n }\n if (!supportedAddresses.length && cached) {\n // nothing was found, fallback to cached value\n return respond(null, formatDNSValue(cached.value, {\n servername,\n cached: true\n }));\n }\n const value = {\n addresses: supportedAddresses.length ? supportedAddresses : [host]\n };\n dnsCache.set(host, {\n value,\n expires: Date.now() + (options.dnsTtl || DNS_TTL)\n });\n return respond(null, formatDNSValue(value, {\n servername,\n cached: false\n }));\n });\n }\n catch (lookupErr) {\n if (respondCached(lookupErr)) {\n return;\n }\n return respond(ipv4Error || ipv6Error || lookupErr);\n }\n };\n for (const family of [4, 6]) {\n const resolver = resolve(family, host, options, (err, addresses) => {\n if (family === 4) {\n ipv4Error = err;\n ipv4Addresses = addresses || [];\n }\n else {\n ipv6Error = err;\n ipv6Addresses = addresses || [];\n }\n onResolved();\n });\n if (resolver) {\n resolvers.push(resolver);\n }\n }\n};\n/**\n * Parses connection url to a structured configuration object\n *\n * @param str Connection url\n * @return Configuration object\n */\nexport const parseConnectionUrl = (str) => {\n str = str || '';\n const options = {};\n const url = urllib.parse(str, true);\n switch (url.protocol) {\n case 'smtp:':\n options.secure = false;\n break;\n case 'smtps:':\n options.secure = true;\n break;\n case 'direct:':\n options.direct = true;\n break;\n }\n if (!isNaN(url.port) && Number(url.port)) {\n options.port = Number(url.port);\n }\n if (url.hostname) {\n options.host = url.hostname;\n }\n if (url.username || url.password) {\n options.auth = {\n user: url.username || '',\n pass: url.password || ''\n };\n }\n Object.keys(url.query || {}).forEach(key => {\n let obj = options;\n let lKey = key;\n let value = url.query[key];\n if (!isNaN(value)) {\n value = Number(value);\n }\n switch (value) {\n case 'true':\n value = true;\n break;\n case 'false':\n value = false;\n break;\n }\n // tls is nested object\n if (key.indexOf('tls.') === 0) {\n lKey = key.substr(4);\n if (!options.tls) {\n options.tls = {};\n }\n obj = options.tls;\n }\n else if (key.indexOf('.') >= 0) {\n // ignore nested properties besides tls\n return;\n }\n // `in` already keeps \"__proto__\" out, but only as a side effect of it being an\n // Object.prototype member. Say it, so the protection survives a change to the check\n if (!isProtoKey(lKey) && !(lKey in obj)) {\n obj[lKey] = value;\n }\n });\n return options;\n};\n/** @internal */\nexport const _logFunc = (logger, level, defaults, data, message, ...args) => {\n const entry = Object.assign({}, defaults || {}, data || {});\n delete entry.level;\n let logLevel = level;\n if (typeof logger[logLevel] !== 'function') {\n // Provided logger does not implement this level. Fall back to a\n // lower-severity handler instead of throwing.\n logLevel = ['info', 'debug', 'log', 'trace', 'warn', 'error'].find(name => typeof logger[name] === 'function');\n }\n if (logLevel) {\n logger[logLevel](entry, message, ...args);\n }\n};\n/**\n * Returns a bunyan-compatible logger interface. Uses either provided logger or\n * creates a default console logger\n *\n * @param [options] Options object that might include 'logger' value\n * @param [defaults] Fields merged into every log entry, overridden by the fields of the entry itself\n * @return bunyan compatible logger\n */\nexport const getLogger = (options, defaults) => {\n options = options || {};\n const response = {};\n const levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];\n if (!options.logger) {\n // use vanity logger\n levels.forEach(level => {\n response[level] = () => false;\n });\n return response;\n }\n const logger = options.logger === true ? createDefaultLogger(levels) : options.logger;\n levels.forEach(level => {\n response[level] = (...args) => {\n // the bunyan forms: a data object first, or the message alone\n const data = typeof args[0] === 'string' ? undefined : args.shift();\n _logFunc(logger, level, defaults, data, ...args);\n };\n });\n return response;\n};\n/**\n * Wrapper for creating a callback that either resolves or rejects a promise\n * based on input\n *\n * @param resolve Function to run if callback is called\n * @param reject Function to run if callback ends with an error\n */\nexport const callbackPromise = (resolve, reject) => function (...args) {\n const err = args.shift();\n if (err) {\n reject(err);\n }\n else {\n resolve(...args);\n }\n};\nexport const parseDataURI = (uri) => {\n if (typeof uri !== 'string') {\n return null;\n }\n // Early return for non-data URIs to avoid unnecessary processing\n if (!uri.startsWith('data:')) {\n return null;\n }\n // Find the first comma safely - this prevents ReDoS\n const commaPos = uri.indexOf(',');\n if (commaPos === -1) {\n return null;\n }\n const data = uri.substring(commaPos + 1);\n const metaStr = uri.substring('data:'.length, commaPos);\n let encoding;\n const metaEntries = metaStr.split(';');\n if (metaEntries.length > 0) {\n const lastEntry = metaEntries[metaEntries.length - 1].toLowerCase().trim();\n // Only recognize valid encoding types to prevent manipulation\n if (['base64', 'utf8', 'utf-8'].includes(lastEntry) && lastEntry.indexOf('=') === -1) {\n encoding = lastEntry;\n metaEntries.pop();\n }\n }\n const contentType = metaEntries.length > 0 ? metaEntries.shift() : 'application/octet-stream';\n const params = {};\n for (let i = 0; i < metaEntries.length; i++) {\n const entry = metaEntries[i];\n const sepPos = entry.indexOf('=');\n if (sepPos > 0) {\n // Ensure there's a key before the '='\n const key = entry.substring(0, sepPos).trim();\n const value = entry.substring(sepPos + 1).trim();\n if (key && !isProtoKey(key)) {\n params[key] = value;\n }\n }\n }\n // Decode data based on encoding with proper error handling\n let bufferData;\n try {\n if (encoding === 'base64') {\n bufferData = Buffer.from(data, 'base64');\n }\n else {\n try {\n bufferData = Buffer.from(decodeURIComponent(data));\n }\n catch (_decodeError) {\n bufferData = Buffer.from(data);\n }\n }\n }\n catch (_bufferError) {\n bufferData = Buffer.alloc(0);\n }\n return {\n data: bufferData,\n encoding: encoding || null,\n contentType: contentType || 'application/octet-stream',\n params\n };\n};\nexport function resolveContent(data, key, options, callback) {\n // options is optional; support the legacy resolveContent(data, key, callback) signature\n if (!callback && typeof options === 'function') {\n callback = options;\n options = false;\n }\n options = options || {};\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = callbackPromise(resolve, reject);\n });\n }\n resolveContentValue(data, key, options, callback);\n return promise;\n}\nfunction resolveContentValue(data, key, options, callback) {\n let content = (data && data[key] && data[key].content) || data[key];\n const encoding = ((typeof data[key] === 'object' && data[key].encoding) || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n if (!content) {\n return callback(null, content);\n }\n if (typeof content === 'object') {\n if (typeof content.pipe === 'function') {\n return resolveStream(content, (err, value) => {\n if (err) {\n return callback(err);\n }\n // we can't stream twice the same content, so we need\n // to replace the stream object with the streaming result\n if (data[key].content) {\n data[key].content = value;\n }\n else {\n data[key] = value;\n }\n callback(null, value);\n });\n }\n else if (/^data:/i.test(content.path || content.href)) {\n const parsedDataUri = parseDataURI(content.path || content.href);\n return callback(null, parsedDataUri && parsedDataUri.data ? parsedDataUri.data : Buffer.alloc(0));\n }\n else if (content.href || /^https?:\\/\\//i.test(content.path)) {\n // An href is always a URL, and so is a path that looks like one. Let nmfetch\n // decide whether it is fetchable, it validates the parsed URL. Testing the raw\n // string here instead would let a file: href fall through to the \"return as is\"\n // default below and travel on inside the resolved message.\n const url = content.href || content.path;\n if (options.disableUrlAccess) {\n setImmediate(() => {\n const err = new Error('Url access rejected for ' + url);\n err.code = errors.EURLACCESS;\n callback(err);\n });\n return;\n }\n return resolveStream(nmfetch(url, { headers: content.httpHeaders, tls: content.tls }), callback);\n }\n else if (content.path) {\n if (options.disableFileAccess) {\n setImmediate(() => {\n const err = new Error('File access rejected for ' + content.path);\n err.code = errors.EFILEACCESS;\n callback(err);\n });\n return;\n }\n return resolveStream(fs.createReadStream(content.path), callback);\n }\n }\n if (typeof data[key].content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n content = Buffer.from(data[key].content, encoding);\n }\n // default action, return as is\n setImmediate(() => callback(null, content));\n}\n/**\n * Copies properties from source objects to target objects\n */\nexport const assign = function (...args) {\n const target = args.shift() || {};\n args.forEach(source => {\n Object.keys(source || {}).forEach(key => {\n if (isProtoKey(key)) {\n return;\n }\n if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {\n // tls and auth are special keys that need to be enumerated separately\n // other objects are passed as is. Enumerating is a copy of user supplied\n // keys just like the loop above, so it gets the same treatment\n target[key] = copyOwnKeys(target[key] || {}, source[key]);\n }\n else {\n target[key] = source[key];\n }\n });\n });\n return target;\n};\nexport const encodeXText = (str) => {\n // ! 0x21\n // + 0x2B\n // = 0x3D\n // ~ 0x7E\n if (!/[^\\x21-\\x2A\\x2C-\\x3C\\x3E-\\x7E]/.test(str)) {\n return str;\n }\n const buf = Buffer.from(str);\n let result = '';\n for (let i = 0, len = buf.length; i < len; i++) {\n const c = buf[i];\n if (c < 0x21 || c > 0x7e || c === 0x2b || c === 0x3d) {\n result += '+' + (c < 0x10 ? '0' : '') + c.toString(16).toUpperCase();\n }\n else {\n result += String.fromCharCode(c);\n }\n }\n return result;\n};\n// The first error a stream emitted, see recordStreamErrors\nconst streamErrors = new WeakMap();\n/**\n * Keeps the first error a content stream emits before it is read, so the error is reported\n * when the stream is read instead of being thrown as unhandled. The listener stays attached\n * for good, a stream that emits 'error' more than once never throws the later ones either\n *\n * @param stream Readable stream\n */\nexport function recordStreamErrors(stream) {\n stream.on('error', err => {\n if (!streamErrors.has(stream)) {\n streamErrors.set(stream, err);\n }\n });\n}\n/**\n * Destroys a value if it is a readable stream that was not destroyed yet\n *\n * @param value Any content value\n */\nexport function destroyStream(value) {\n const stream = value;\n if (stream && typeof stream.pipe === 'function' && typeof stream.destroy === 'function' && !stream.destroyed) {\n stream.destroy();\n }\n}\n/**\n * Tells why a stream can not be read from start to end anymore. A stream that ended or was\n * destroyed before anyone read it would never emit 'end' to a new reader, or, when piped, would\n * end the destination right away and turn into an empty value without any error\n *\n * @param stream Readable stream\n * @returns The error the stream failed with, an ESTREAM error, or null when it can be read\n */\nexport function unreadableStreamError(stream) {\n const err = streamErrors.get(stream) || stream.errored;\n if (err) {\n return err;\n }\n if (stream.readableEnded || stream.destroyed) {\n const unreadable = new Error('Content stream was already read or destroyed');\n unreadable.code = errors.ESTREAM;\n return unreadable;\n }\n return null;\n}\n/**\n * Streams a stream value into a Buffer\n *\n * @param stream Readable stream\n * @param callback Callback function with (err, value)\n */\nexport function resolveStream(stream, callback) {\n let responded = false;\n const respond = (err, value) => {\n if (responded) {\n return;\n }\n responded = true;\n callback(err, value);\n };\n const unreadable = unreadableStreamError(stream);\n if (unreadable) {\n // absorbs a later 'error' from the stream, there is nobody left to report it to\n stream.on('error', () => false);\n setImmediate(() => respond(unreadable));\n return;\n }\n const chunks = [];\n let chunklen = 0;\n stream.on('data', (chunk) => {\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk);\n }\n chunks.push(chunk);\n chunklen += chunk.length;\n });\n // finished() also reports a stream that is destroyed before 'end', which would otherwise\n // leave the callback waiting forever\n finished(stream, { writable: false }, err => {\n if (err) {\n return respond(err);\n }\n let value;\n try {\n value = Buffer.concat(chunks, chunklen);\n }\n catch (E) {\n return respond(E);\n }\n respond(null, value);\n });\n}\n/**\n * Generates a bunyan-like logger that prints to console\n *\n * @returns Bunyan logger instance\n */\nfunction createDefaultLogger(levels) {\n const levelMaxLen = levels.reduce((max, level) => Math.max(max, level.length), 0);\n const levelNames = new Map();\n levels.forEach(level => {\n let levelName = level.toUpperCase();\n if (levelName.length < levelMaxLen) {\n levelName += ' '.repeat(levelMaxLen - levelName.length);\n }\n levelNames.set(level, levelName);\n });\n const print = (level, entry, message, ...args) => {\n let prefix = '';\n if (entry) {\n if (entry.tnx === 'server') {\n prefix = 'S: ';\n }\n else if (entry.tnx === 'client') {\n prefix = 'C: ';\n }\n if (entry.sid) {\n prefix = '[' + entry.sid + '] ' + prefix;\n }\n if (entry.cid) {\n prefix = '[#' + entry.cid + '] ' + prefix;\n }\n }\n message = util.format(message, ...args);\n message.split(/\\r?\\n/).forEach((line) => {\n console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);\n });\n };\n const logger = {};\n levels.forEach(level => {\n logger[level] = print.bind(null, level);\n });\n return logger;\n}\n// domainToASCII and domainToUnicode are WHATWG host parsers rather than plain IDNA\n// mappers, so they do more than map: they cut the host at '/', '\\\\', '?' and '#', drop C0\n// controls, and percent-decode. Handing them 'evil.example/mail.corp.example' returns the\n// deliverable 'evil.example', which would turn a value the bundled codec leaves as\n// unroutable garbage into mail for a domain the sender never named. None of these\n// characters are legal in a domain, so keep them away from the mapper.\nconst URL_PARSER_UNSAFE = /[/\\\\?#%\\x00-\\x20\\x7F]/;\n// RFC 1035 bounds a label at 63 octets and a domain at 253. An A-label is never shorter than\n// the code points it encodes, so anything past these bounds could not have become a valid\n// domain whichever way it is encoded. The bundled codec is super-linear in the length of a\n// label, a 60 KB label of distinct code points took seconds to encode, several times per\n// address, so it is only handed what could be a domain\nconst MAX_DOMAIN_LENGTH = 253;\nconst MAX_LABEL_LENGTH = 63;\n/**\n * Checks a domain against the DNS length limits, counted in code points per label and in\n * total. The label separators are the ones the bundled codec splits on.\n *\n * @param domain Domain to check\n * @return true if a label or the domain as a whole is too long to be a valid domain\n */\nfunction exceedsDomainLimits(domain) {\n let total = 0;\n let label = 0;\n for (const char of domain) {\n total++;\n if (char === '.' || char === '。' || char === '.' || char === '。') {\n label = 0;\n }\n else if (++label > MAX_LABEL_LENGTH) {\n return true;\n }\n }\n return total > MAX_DOMAIN_LENGTH;\n}\n/**\n * Encodes a domain the way browsers, the WHATWG URL Standard and DNS facing resolvers do,\n * which is with UTS-46 mapping applied before the Punycode step.\n *\n * The bundled codec is plain RFC 3492 and maps nothing, so it disagrees with every\n * conformant parser on any domain holding a mapped or ignored code point. An invisible\n * U+00AD in 'compa\\u00ADny.com' encoded to 'xn--company-pka.com' where a validator reads\n * 'company.com', which let an allow-listed domain be checked and a different one mailed.\n *\n * Anything the URL parser does not accept as a hostname, an address literal such as\n * '[127.0.0.1]' included, comes back empty and falls through to the bundled codec, which\n * leaves those as they were supplied apart from lowercasing them.\n *\n * The mapper gets the domain as supplied, since UTS-46 does its own case mapping and\n * toLowerCase() differs from it: it turns U+1E9E into U+00DF where Node 20 and 22 map it\n * to 'ss', and a word-final U+03A3 into U+03C2 where UTS-46 gives U+03C3. Lowercasing\n * first sent 'user@stra\\u1E9Ee.de', which a validator reads as strasse.de, to xn--strae-oqa.de.\n *\n * @param domain Domain to encode\n * @param toUnicode Return the U-label form instead of the A-label form\n * @return Encoded domain\n */\nexport function normalizeDomain(domain, toUnicode) {\n // domainToASCII and domainToUnicode landed in Node 7, the bundled codec covers Node 6\n if (typeof urlModule.domainToASCII === 'function' && typeof urlModule.domainToUnicode === 'function' && !URL_PARSER_UNSAFE.test(domain)) {\n // The U-label form is decoded from the A-label form rather than from the input:\n // Deno's domainToASCII returns an empty string for a label it cannot decode, while\n // its domainToUnicode returns the label with U+FFFD in place of the bad part\n const ascii = urlModule.domainToASCII(domain);\n const mapped = ascii && toUnicode ? urlModule.domainToUnicode(ascii) : ascii;\n if (mapped) {\n return mapped;\n }\n }\n domain = domain.toLowerCase();\n if (exceedsDomainLimits(domain)) {\n // too long to be a domain whichever way it is encoded, keep it as supplied\n return domain;\n }\n return toUnicode ? punycode.toUnicode(domain) : punycode.toASCII(domain);\n}\n","import http from 'node:http';\nimport https from 'node:https';\nimport * as urllib from '../shared/url.js';\nimport zlib from 'node:zlib';\nimport { PassThrough } from 'node:stream';\nimport Cookies from './cookies.js';\nimport * as packageData from '../package-info.js';\nimport net from 'node:net';\nimport * as errors from '../errors.js';\nimport { isProtoKey } from '../shared/objects.js';\nconst MAX_REDIRECTS = 5;\n// a stalled server would otherwise hold the request, and whatever waits on it, open forever\nconst DEFAULT_TIMEOUT = 60 * 1000;\n// the inactivity timeout above is reset by every byte, so a server dripping one within each\n// window could still hold the request, and the message being built from it, open for as\n// long as it liked. The whole request, redirects included, has to be done within this\nconst DEFAULT_MAX_TIME = 2 * 60 * 1000;\n// the body is usually buffered in memory by the caller, so an unbounded download is refused\nconst DEFAULT_MAX_BYTES = 64 * 1024 * 1024;\n// Only genuine TLS settings are taken from options.tls. That object reaches us straight\n// from a user supplied attachment (content.tls), so keys like host, port, path, socketPath\n// or lookup would otherwise repoint the request at a destination that never went through\n// the URL checks below.\n//\n// The source of truth is the tls.connect() option list in the Node docs. A key missing\n// here is dropped silently, so extend this list rather than working around it.\nconst TLS_OPTION_KEYS = [\n 'ALPNProtocols',\n 'ca',\n 'cert',\n 'checkServerIdentity',\n 'ciphers',\n 'crl',\n 'dhparam',\n 'ecdhCurve',\n 'honorCipherOrder',\n 'key',\n 'maxVersion',\n 'minVersion',\n 'passphrase',\n 'pfx',\n 'rejectUnauthorized',\n 'secureContext',\n 'secureOptions',\n 'secureProtocol',\n 'servername',\n 'sessionIdContext',\n 'sigalgs'\n];\n/**\n * Marks an error of the request as a fetch error, unless it is a permission model\n * denial, which keeps its own code (see ERR_ACCESS_DENIED)\n *\n * @param err Error to mark\n */\nfunction setFetchCode(err) {\n if (err.code !== errors.ERR_ACCESS_DENIED) {\n err.code = errors.EFETCH;\n }\n}\n/**\n * Resolves a URL only if it is one this module is willing to request.\n *\n * urllib.parse throws for a host that contains forbidden bytes, and it is called for\n * every URL that reaches nmfetch, including ones that arrive from a message attachment\n * or from a redirect Location header. An uncaught throw here takes the process down,\n * so a URL that does not parse is reported the same way as one with a scheme we refuse.\n *\n * @param url URL to parse\n * @returns Parsed URL, or false if it is not a usable http(s) URL\n */\nfunction parseFetchUrl(url) {\n let parsed;\n try {\n parsed = urllib.parse(url);\n }\n catch (_err) {\n return false;\n }\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n return false;\n }\n return parsed;\n}\n// the port a request to the URL goes to, explicit or the default of its scheme\nfunction fetchPort(parsed) {\n return parsed.port ? Number(parsed.port) : parsed.protocol === 'https:' ? 443 : 80;\n}\nfunction nmfetch(url, options) {\n options = options || {};\n options.fetchRes = options.fetchRes || new PassThrough();\n options.cookies = options.cookies || new Cookies();\n options.redirects = options.redirects || 0;\n options.maxRedirects = isNaN(options.maxRedirects) ? MAX_REDIRECTS : options.maxRedirects;\n if (!options.deadline) {\n options.maxTime = typeof options.maxTime === 'number' && options.maxTime >= 0 ? options.maxTime : DEFAULT_MAX_TIME;\n // the one deadline is shared with the requests the redirects lead to, every hop\n // gets the time that is left rather than starting over\n options.deadline = options.maxTime ? Date.now() + options.maxTime : 0;\n }\n const fetchRes = options.fetchRes;\n const parsed = parseFetchUrl(url);\n if (!parsed) {\n // Only http(s) URLs can be fetched. Any other scheme (file:, gopher:, a\n // protocol-relative redirect target etc.) would otherwise be silently served over\n // plain HTTP, possibly against an unintended host. Bail out before the cookie jar\n // is touched so a refused URL can not seed it, and release a caller supplied body:\n // this is the one exit that runs before the error handler below is attached to it,\n // so an error on that stream would have nowhere to go and the fd or socket behind\n // it would never be released.\n if (options.body && typeof options.body.destroy === 'function') {\n options.body.on('error', () => false);\n options.body.destroy();\n }\n setImmediate(() => {\n const err = new Error('Unsupported protocol for URL ' + url);\n err.code = errors.EFETCH;\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n return fetchRes;\n }\n if (options.cookie) {\n [].concat(options.cookie || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n options.cookie = false;\n }\n let method = (options.method || '').toString().trim().toUpperCase() || 'GET';\n let finished = false;\n let cookies;\n let body;\n const handler = parsed.protocol === 'https:' ? https : http;\n const headers = {\n 'accept-encoding': 'gzip,deflate',\n 'user-agent': 'nodemailer/' + packageData.version\n };\n Object.keys(options.headers || {}).forEach(key => {\n // options.headers is the caller's httpHeaders, straight off an attachment\n if (isProtoKey(key.toLowerCase().trim())) {\n return;\n }\n headers[key.toLowerCase().trim()] = options.headers[key];\n });\n if (options.userAgent) {\n headers['user-agent'] = options.userAgent;\n }\n if (parsed.auth) {\n headers.Authorization = 'Basic ' + Buffer.from(parsed.auth).toString('base64');\n }\n if ((cookies = options.cookies.get(url))) {\n headers.cookie = cookies;\n }\n if (options.body) {\n if (options.contentType !== false) {\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n }\n if (typeof options.body.pipe === 'function') {\n // it's a stream\n headers['Transfer-Encoding'] = 'chunked';\n body = options.body;\n body.on('error', (err) => {\n if (finished) {\n return;\n }\n finished = true;\n setFetchCode(err);\n err.sourceUrl = url;\n fetchRes.emit('error', err);\n });\n }\n else {\n if (options.body instanceof Buffer) {\n body = options.body;\n }\n else if (typeof options.body === 'object') {\n try {\n // encodeURIComponent can fail on invalid input (partial emoji etc.)\n body = Buffer.from(Object.keys(options.body)\n .map(key => {\n const value = options.body[key].toString().trim();\n return encodeURIComponent(key) + '=' + encodeURIComponent(value);\n })\n .join('&'));\n }\n catch (E) {\n // the caller attaches its error listener once nmfetch has returned, so\n // the error is emitted on the next tick and the stream is handed back\n // the way every other failure is reported\n finished = true;\n E.code = errors.EFETCH;\n E.sourceUrl = url;\n setImmediate(() => fetchRes.emit('error', E));\n return fetchRes;\n }\n }\n else {\n body = Buffer.from(options.body.toString().trim());\n }\n headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded';\n headers['Content-Length'] = body.length;\n }\n // if method is not provided, use POST instead of GET\n method = (options.method || '').toString().trim().toUpperCase() || 'POST';\n }\n let req;\n const reqOptions = {\n method,\n host: parsed.hostname,\n path: parsed.path,\n port: fetchPort(parsed),\n headers,\n // Validate TLS certificates by default. Callers that genuinely need to\n // reach a self-signed/internal host opt out explicitly with\n // options.tls = { rejectUnauthorized: false }.\n rejectUnauthorized: true,\n agent: false\n };\n if (options.tls) {\n // see TLS_OPTION_KEYS\n Object.keys(options.tls).forEach(key => {\n if (TLS_OPTION_KEYS.includes(key)) {\n reqOptions[key] = options.tls[key];\n }\n });\n }\n if (parsed.protocol === 'https:' && parsed.hostname && parsed.hostname !== reqOptions.host && !net.isIP(parsed.hostname) && !reqOptions.servername) {\n reqOptions.servername = parsed.hostname;\n }\n try {\n req = handler.request(reqOptions);\n }\n catch (E) {\n finished = true;\n setImmediate(() => {\n setFetchCode(E);\n E.sourceUrl = url;\n fetchRes.emit('error', E);\n });\n return fetchRes;\n }\n // the whole request has to be done by options.deadline, see maxTime. The timer is\n // released on every way out of the request, so it never outlives it\n let deadlineTimer;\n const clearDeadline = () => {\n if (deadlineTimer) {\n clearTimeout(deadlineTimer);\n deadlineTimer = undefined;\n }\n };\n // reports the first failure of this request on fetchRes and releases the request\n const fail = (err, sourceUrl = url) => {\n if (finished) {\n return;\n }\n finished = true;\n clearDeadline();\n setFetchCode(err);\n err.sourceUrl = sourceUrl;\n fetchRes.emit('error', err);\n req.abort();\n };\n const timeout = typeof options.timeout === 'number' && options.timeout >= 0 ? options.timeout : DEFAULT_TIMEOUT;\n if (timeout) {\n req.setTimeout(timeout, () => fail(new Error('Request Timeout')));\n }\n if (options.deadline) {\n deadlineTimer = setTimeout(() => fail(new Error('Request exceeded the allowed ' + options.maxTime + ' ms')), Math.max(options.deadline - Date.now(), 1));\n // a pending deadline is no reason to keep the process alive\n deadlineTimer.unref();\n }\n req.on('error', (err) => fail(err));\n // a consumer that destroys the response stream before it ended does not want the rest of\n // the body, release the request now instead of when the timeout fires\n fetchRes.once('close', () => {\n clearDeadline();\n if (finished || fetchRes.readableEnded) {\n return;\n }\n finished = true;\n req.destroy();\n });\n req.on('response', res => {\n let inflate;\n if (finished) {\n return;\n }\n switch (res.headers['content-encoding']) {\n case 'gzip':\n case 'deflate':\n inflate = zlib.createUnzip();\n break;\n }\n if (res.headers['set-cookie']) {\n [].concat(res.headers['set-cookie'] || []).forEach(cookie => {\n options.cookies.set(cookie, url);\n });\n }\n if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location) {\n // redirect\n options.redirects++;\n if (options.redirects > options.maxRedirects) {\n return fail(new Error('Maximum redirect count exceeded'));\n }\n // redirect does not include POST body\n options.method = 'GET';\n options.body = false;\n let redirectUrl;\n try {\n redirectUrl = urllib.resolve(url, res.headers.location);\n }\n catch (_err) {\n // the legacy resolver throws on a Location the WHATWG parser also refused,\n // so fall through to the check below with what the server actually sent\n redirectUrl = res.headers.location;\n }\n const redirectParsed = parseFetchUrl(redirectUrl);\n if (!redirectParsed) {\n // Refuse the redirect target here rather than leaving it to the recursive\n // call: that call gets its own `finished` flag and no handle on this\n // request, so this one would stay open and could emit a second error on\n // the shared fetchRes once it times out. Callers listen with req.once().\n return fail(new Error('Unsupported protocol for URL ' + redirectUrl), redirectUrl);\n }\n // Do not forward credentials when the redirect leaves the origin: a different\n // scheme, host or port is a different security context (an https to http\n // downgrade would also put them on the wire in cleartext). Strip sensitive\n // request headers so an attacker who controls the redirect target cannot\n // harvest them.\n const crossOrigin = redirectParsed.protocol !== parsed.protocol || redirectParsed.hostname !== parsed.hostname || fetchPort(redirectParsed) !== fetchPort(parsed);\n if (options.headers && crossOrigin) {\n const sensitive = ['authorization', 'cookie', 'proxy-authorization'];\n Object.keys(options.headers).forEach(key => {\n // normalized the way the request headers are built above, a padded name is sent too\n if (sensitive.includes(key.toLowerCase().trim())) {\n delete options.headers[key];\n }\n });\n }\n // this request is done with, release it so its socket and timeout do not\n // outlive it and report a late error on the shared fetchRes\n finished = true;\n clearDeadline();\n res.resume();\n req.abort();\n return nmfetch(redirectUrl, options);\n }\n fetchRes.statusCode = res.statusCode;\n fetchRes.headers = res.headers;\n if (res.statusCode >= 300 && !options.allowErrorResponse) {\n return fail(new Error('Invalid status code ' + res.statusCode));\n }\n res.on('error', (err) => fail(err));\n // the response is in, whatever is left of it is in memory and no longer on the network\n res.once('end', () => clearDeadline());\n const maxBytes = typeof options.maxBytes === 'number' && options.maxBytes > 0 ? options.maxBytes : DEFAULT_MAX_BYTES;\n const source = inflate || res;\n let received = 0;\n source.on('data', (chunk) => {\n received += chunk.length;\n if (received <= maxBytes || finished) {\n return;\n }\n source.unpipe(fetchRes);\n fail(new Error('Response size exceeds the allowed ' + maxBytes + ' bytes'));\n });\n if (inflate) {\n res.pipe(inflate).pipe(fetchRes);\n inflate.on('error', (err) => fail(err));\n }\n else {\n res.pipe(fetchRes);\n }\n });\n setImmediate(() => {\n if (body) {\n try {\n if (typeof body.pipe === 'function') {\n return body.pipe(req);\n }\n req.write(body);\n }\n catch (err) {\n return fail(err);\n }\n }\n req.end();\n });\n return fetchRes;\n}\nnmfetch.Cookies = Cookies;\nnmfetch.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;\nnmfetch.DEFAULT_MAX_TIME = DEFAULT_MAX_TIME;\nexport default nmfetch;\n","// module to handle cookies\nimport net from 'node:net';\nimport * as urllib from '../shared/url.js';\nconst SESSION_TIMEOUT = 1800; // 30 min\n/**\n * Creates a biskviit cookie jar for managing cookie values in memory\n *\n * @constructor\n * @param [options] Optional options object\n */\nclass Cookies {\n constructor(options) {\n this.options = options || {};\n this.cookies = [];\n }\n /**\n * Stores a cookie string to the cookie storage\n *\n * @param cookieStr Value from the 'Set-Cookie:' header\n * @param url Current URL\n */\n set(cookieStr, url) {\n const urlparts = urllib.parse(url || '');\n const cookie = this.parse(cookieStr);\n let domain;\n if (cookie.domain) {\n domain = cookie.domain.replace(/^\\./, '');\n // do not allow cross origin cookies. There is no public suffix list here, so a\n // multi-label suffix like 'co.uk' can not be told apart from a registrable domain\n if (\n // can't be valid if the requested domain is shorter than current hostname\n urlparts.hostname.length < domain.length ||\n // a top level domain is not a valid scope, 'Domain=com' would otherwise be\n // sent to every .com host. A trailing dot does not make 'com.' any better\n domain.indexOf('.') < 0 ||\n domain.endsWith('.') ||\n // an IP address has no subdomains, so cookies set on it stay host-only\n net.isIP(urlparts.hostname) ||\n // prefix domains with dot to be sure that partial matches are not used\n !('.' + urlparts.hostname).endsWith('.' + domain)) {\n cookie.domain = urlparts.hostname;\n }\n }\n else {\n cookie.domain = urlparts.hostname;\n }\n if (!cookie.path) {\n cookie.path = this.getPath(urlparts.pathname);\n }\n // if no expire date, then use sessionTimeout value\n if (!cookie.expires) {\n cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);\n }\n // a non-secure url can not set a Secure cookie, nor overwrite or delete one (RFC 6265bis section 5.7)\n if (urlparts.protocol !== 'https:' && (cookie.secure || this.cookies.some(stored => stored.secure && this.compare(stored, cookie)))) {\n return false;\n }\n return this.add(cookie);\n }\n /**\n * Returns cookie string for the 'Cookie:' header.\n *\n * @param url URL to check for\n * @returns Cookie header or empty string if no matches were found\n */\n get(url) {\n return this.list(url)\n .map(cookie => cookie.name + '=' + cookie.value)\n .join('; ');\n }\n /**\n * Lists all valied cookie objects for the specified URL\n *\n * @param url URL to check for\n * @returns An array of cookie objects\n */\n list(url) {\n const result = [];\n for (let i = this.cookies.length - 1; i >= 0; i--) {\n const cookie = this.cookies[i];\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, 1);\n continue;\n }\n if (this.match(cookie, url)) {\n result.unshift(cookie);\n }\n }\n return result;\n }\n /**\n * Parses cookie string from the 'Set-Cookie:' header\n *\n * @param cookieStr String from the 'Set-Cookie:' header\n * @returns Cookie object\n */\n parse(cookieStr) {\n const cookie = {};\n let hasNameValue = false;\n let hasMaxAge = false;\n (cookieStr || '')\n .toString()\n .split(';')\n .forEach(cookiePart => {\n if (!cookiePart.trim()) {\n // skip empty parts\n return;\n }\n const valueParts = cookiePart.split('=');\n const name = valueParts.shift().trim();\n let value = valueParts.join('=').trim();\n let domain;\n // the first part is always the name-value pair, so a cookie named\n // like an attribute is not mistaken for one (RFC 6265 section 5.2)\n if (!hasNameValue) {\n hasNameValue = true;\n if (name) {\n // cookie names are case-sensitive, only attribute names are not\n cookie.name = name;\n cookie.value = value;\n }\n return;\n }\n switch (name.toLowerCase()) {\n case 'expires': {\n const expires = new Date(value);\n // ignore date if can not parse it\n if (expires.toString() !== 'Invalid Date' && !hasMaxAge) {\n // Max-Age has precedence when both attributes are present (RFC 6265 5.3)\n cookie.expires = expires;\n }\n break;\n }\n case 'path':\n cookie.path = value;\n break;\n case 'domain':\n domain = value.toLowerCase();\n if (domain.length && domain.charAt(0) !== '.') {\n domain = '.' + domain; // ensure preceeding dot for user set domains\n }\n cookie.domain = domain;\n break;\n case 'max-age':\n cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);\n hasMaxAge = true;\n break;\n case 'secure':\n cookie.secure = true;\n break;\n case 'httponly':\n cookie.httponly = true;\n break;\n }\n });\n return cookie;\n }\n /**\n * Checks if a cookie object is valid for a specified URL\n *\n * @param cookie Cookie object\n * @param url URL to check for\n * @returns true if cookie is valid for specifiec URL\n */\n match(cookie, url) {\n const urlparts = urllib.parse(url || '');\n // check if hostname matches\n // .foo.com also matches subdomains, foo.com does not\n if (urlparts.hostname !== cookie.domain &&\n (cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)) {\n return false;\n }\n // check if the request path path-matches the cookie path (RFC 6265 section 5.1.4):\n // identical paths match, otherwise the cookie path must be a directory prefix\n const pathname = urlparts.pathname || '/';\n const cookiePath = cookie.path;\n const pathMatches = pathname === cookiePath || (pathname.startsWith(cookiePath) && (cookiePath.endsWith('/') || pathname.charAt(cookiePath.length) === '/'));\n if (!pathMatches) {\n return false;\n }\n // check secure argument\n if (cookie.secure && urlparts.protocol !== 'https:') {\n return false;\n }\n return true;\n }\n /**\n * Adds (or updates/removes if needed) a cookie object to the cookie storage\n *\n * @param cookie Cookie value to be stored\n */\n add(cookie) {\n // nothing to do here\n if (!cookie || !cookie.name) {\n return false;\n }\n // overwrite if has same params\n for (let i = 0, len = this.cookies.length; i < len; i++) {\n if (this.compare(this.cookies[i], cookie)) {\n // check if the cookie needs to be removed instead\n if (this.isExpired(cookie)) {\n this.cookies.splice(i, 1); // remove expired/unset cookie\n return false;\n }\n this.cookies[i] = cookie;\n return true;\n }\n }\n // add as new if not already expired\n if (!this.isExpired(cookie)) {\n this.cookies.push(cookie);\n }\n return true;\n }\n /**\n * Checks if two cookie objects are the same cookie. A cookie is identified by its\n * name, domain and path (RFC 6265 section 5.3), the Secure and HttpOnly flags are\n * attributes of the stored cookie that an update replaces\n *\n * @param a Cookie to check against\n * @param b Cookie to check against\n * @returns True, if the cookies are the same\n */\n compare(a, b) {\n return a.name === b.name && a.path === b.path && a.domain === b.domain;\n }\n /**\n * Checks if a cookie is expired\n *\n * @param cookie Cookie object to check against\n * @returns True, if the cookie is expired\n */\n isExpired(cookie) {\n return (cookie.expires && cookie.expires < new Date()) || !cookie.value;\n }\n /**\n * Returns the default path for an URL path argument, the default-path of\n * RFC 6265 section 5.1.4. A cookie that carries no Path attribute is scoped\n * to the directory of the URL it was set from\n *\n * @param pathname\n * @returns Default path\n */\n getPath(pathname) {\n const pathParts = (pathname || '/').split('/');\n pathParts.pop(); // remove filename part\n const path = pathParts.join('/').trim();\n // a path that holds no more than one '/' is scoped to the root path, and so\n // is one that does not start with '/' at all\n if (path.charAt(0) !== '/') {\n return '/';\n }\n return path;\n }\n}\nexport default Cookies;\n","// Generated by scripts/build.js from package.json. Do not edit by hand.\nexport const name = 'nodemailer';\nexport const version = '10.6.1';\nexport const homepage = 'https://nodemailer.com/';\n","/**\n * Nodemailer Error Codes\n *\n * Centralized error code definitions for consistent error handling.\n *\n * Usage:\n * import * as errors from './errors.js';\n * const err: NodemailerError = new Error('Connection closed');\n * err.code = errors.ECONNECTION;\n */\n/**\n * Error code descriptions for documentation and debugging\n */\nexport const ERROR_CODES = {\n // Connection errors\n ECONNECTION: 'Connection closed unexpectedly',\n ETIMEDOUT: 'Connection or operation timed out',\n ESOCKET: 'Socket-level error',\n EDNS: 'DNS resolution failed',\n // TLS/Security errors\n ETLS: 'TLS handshake or STARTTLS failed',\n EREQUIRETLS: 'REQUIRETLS not supported by server (RFC 8689)',\n // Protocol errors\n EPROTOCOL: 'Invalid SMTP server response',\n EENVELOPE: 'Invalid mail envelope (sender or recipients)',\n EMESSAGE: 'Message delivery error',\n EOTP: 'Invalid one-time passcode data (otp option)',\n ESTREAM: 'Stream processing error',\n EABORT: 'Message sending aborted',\n // Authentication errors\n EAUTH: 'Authentication failed',\n ENOAUTH: 'Authentication credentials not provided',\n EOAUTH2: 'OAuth2 token generation or refresh error',\n // Resource errors\n EMAXLIMIT: 'Pool resource limit reached (max messages per connection)',\n EMAXRECIPIENTS: 'Recipient count exceeds maxRecipients',\n // Transport-specific errors\n ESENDMAIL: 'Sendmail command error',\n ESES: 'AWS SES transport error',\n // Configuration and access errors\n ECONFIG: 'Invalid configuration',\n EPROXY: 'Proxy connection error',\n EFILEACCESS: 'File access rejected (disableFileAccess is set)',\n EURLACCESS: 'URL access rejected (disableUrlAccess is set)',\n EFETCH: 'HTTP fetch error'\n};\n// Error codes as string constants\nexport const ECONNECTION = 'ECONNECTION';\nexport const ETIMEDOUT = 'ETIMEDOUT';\nexport const ESOCKET = 'ESOCKET';\nexport const EDNS = 'EDNS';\nexport const ETLS = 'ETLS';\nexport const EREQUIRETLS = 'EREQUIRETLS';\nexport const EPROTOCOL = 'EPROTOCOL';\nexport const EENVELOPE = 'EENVELOPE';\nexport const EMESSAGE = 'EMESSAGE';\nexport const EOTP = 'EOTP';\nexport const ESTREAM = 'ESTREAM';\nexport const EABORT = 'EABORT';\nexport const EAUTH = 'EAUTH';\nexport const ENOAUTH = 'ENOAUTH';\nexport const EOAUTH2 = 'EOAUTH2';\nexport const EMAXLIMIT = 'EMAXLIMIT';\nexport const EMAXRECIPIENTS = 'EMAXRECIPIENTS';\nexport const ESENDMAIL = 'ESENDMAIL';\nexport const ESES = 'ESES';\nexport const ECONFIG = 'ECONFIG';\nexport const EPROXY = 'EPROXY';\nexport const EFILEACCESS = 'EFILEACCESS';\nexport const EURLACCESS = 'EURLACCESS';\nexport const EFETCH = 'EFETCH';\n/** Creates the error reported when a caller cancels an individual send. @internal */\nexport const createAbortError = (signal) => {\n const err = new Error('Message sending aborted', { cause: signal.reason });\n err.name = 'AbortError';\n err.code = EABORT;\n return err;\n};\n/**\n * Tells whether the error ended the connection rather than rejected what was sent over it\n */\nexport const isTransientError = (err) => err.responseCode === 421 || err.code === ECONNECTION || err.code === ESOCKET || err.code === ETIMEDOUT;\n/**\n * Tells whether an SMTP reply code is a permanent rejection, one that retrying the same\n * message would get again. RFC 5321 makes every 5yz reply a permanent negative completion\n * and every 4yz reply a transient one. 503 (bad sequence of commands) is the exception: it\n * says the session was in the wrong state for the command rather than that the message was\n * refused, so the same message can go through on a new connection. 2yz and 3yz replies are\n * only an error when the client expected something else, and are not permanent either.\n *\n * @param responseCode SMTP reply code\n * @returns true for a permanent rejection\n */\nexport const isPermanentResponseCode = (responseCode) => responseCode >= 500 && responseCode < 600 && responseCode !== 503;\n/**\n * Code Node.js sets on an error when its permission model (`--permission`) denies an\n * operation. It is not replaced with the Nodemailer code of the failing step (`ESOCKET`,\n * `EDNS`, `EFETCH`, ...), so a missing grant such as `--allow-net` stays recognizable.\n */\nexport const ERR_ACCESS_DENIED = 'ERR_ACCESS_DENIED';\n","// Safe copying of objects whose keys come from the caller.\n//\n// This lives in its own leaf module, like ./url.ts, so that every layer can reach it.\n// src/shared/index.ts imports src/fetch, so src/fetch can not import src/shared back,\n// and src/mime-funcs is a leaf that would otherwise pull in dns/net/os/fs for a string\n// comparison. src/shared/index.ts re-exports both functions for the callers that already\n// depend on it.\n/**\n * Detects a key that can not be copied onto a plain object with `target[key] = value`.\n *\n * \"__proto__\" is the only one: assigning it runs the inherited setter and replaces the\n * prototype of the target instead of adding a property to it, so a caller can smuggle\n * values past validation that only inspects own keys. JSON.parse produces such a key\n * where an object literal can not. \"constructor\" and \"prototype\" have no such setter and\n * become ordinary own properties, so dropping them would only discard legitimate values.\n *\n * @param key Key to check\n * @returns true if the key must not be copied\n */\nexport const isProtoKey = (key) => key === '__proto__';\n/**\n * Copies own enumerable keys from a source object to a target object. Every copy that\n * walks the keys of user supplied data goes through here, see isProtoKey.\n *\n * @param target Object to copy the keys to\n * @param source Object to copy the keys from\n * @param [skip] Optional predicate, return true to leave a key out\n * @returns The target object\n */\nexport const copyOwnKeys = (target, source, skip) => {\n Object.keys(source || {}).forEach(key => {\n if (isProtoKey(key) || (skip && skip(key))) {\n return;\n }\n target[key] = source[key];\n });\n return target;\n};\n","/* eslint quote-props: 0 */\nimport path from 'node:path';\nconst defaultMimeType = 'application/octet-stream';\nconst defaultExtension = 'bin';\nconst mimeTypes = new Map([\n ['application/acad', 'dwg'],\n ['application/applixware', 'aw'],\n ['application/arj', 'arj'],\n ['application/atom+xml', 'xml'],\n ['application/atomcat+xml', 'atomcat'],\n ['application/atomsvc+xml', 'atomsvc'],\n ['application/base64', ['mm', 'mme']],\n ['application/binhex', 'hqx'],\n ['application/binhex4', 'hqx'],\n ['application/book', ['book', 'boo']],\n ['application/ccxml+xml,', 'ccxml'],\n ['application/cdf', 'cdf'],\n ['application/cdmi-capability', 'cdmia'],\n ['application/cdmi-container', 'cdmic'],\n ['application/cdmi-domain', 'cdmid'],\n ['application/cdmi-object', 'cdmio'],\n ['application/cdmi-queue', 'cdmiq'],\n ['application/clariscad', 'ccad'],\n ['application/commonground', 'dp'],\n ['application/cu-seeme', 'cu'],\n ['application/davmount+xml', 'davmount'],\n ['application/drafting', 'drw'],\n ['application/dsptype', 'tsp'],\n ['application/dssc+der', 'dssc'],\n ['application/dssc+xml', 'xdssc'],\n ['application/dxf', 'dxf'],\n ['application/ecmascript', ['js', 'es']],\n ['application/emma+xml', 'emma'],\n ['application/envoy', 'evy'],\n ['application/epub+zip', 'epub'],\n ['application/excel', ['xls', 'xl', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/exi', 'exi'],\n ['application/font-tdpfr', 'pfr'],\n ['application/fractals', 'fif'],\n ['application/freeloader', 'frl'],\n ['application/futuresplash', 'spl'],\n ['application/geo+json', 'geojson'],\n ['application/gnutar', 'tgz'],\n ['application/groupwise', 'vew'],\n ['application/hlp', 'hlp'],\n ['application/hta', 'hta'],\n ['application/hyperstudio', 'stk'],\n ['application/i-deas', 'unv'],\n ['application/iges', ['iges', 'igs']],\n ['application/inf', 'inf'],\n ['application/internet-property-stream', 'acx'],\n ['application/ipfix', 'ipfix'],\n ['application/java', 'class'],\n ['application/java-archive', 'jar'],\n ['application/java-byte-code', 'class'],\n ['application/java-serialized-object', 'ser'],\n ['application/java-vm', 'class'],\n ['application/javascript', 'js'],\n ['application/json', 'json'],\n ['application/lha', 'lha'],\n ['application/lzx', 'lzx'],\n ['application/mac-binary', 'bin'],\n ['application/mac-binhex', 'hqx'],\n ['application/mac-binhex40', 'hqx'],\n ['application/mac-compactpro', 'cpt'],\n ['application/macbinary', 'bin'],\n ['application/mads+xml', 'mads'],\n ['application/marc', 'mrc'],\n ['application/marcxml+xml', 'mrcx'],\n ['application/mathematica', 'ma'],\n ['application/mathml+xml', 'mathml'],\n ['application/mbedlet', 'mbd'],\n ['application/mbox', 'mbox'],\n ['application/mcad', 'mcd'],\n ['application/mediaservercontrol+xml', 'mscml'],\n ['application/metalink4+xml', 'meta4'],\n ['application/mets+xml', 'mets'],\n ['application/mime', 'aps'],\n ['application/mods+xml', 'mods'],\n ['application/mp21', 'm21'],\n ['application/mp4', 'mp4'],\n ['application/mspowerpoint', ['ppt', 'pot', 'pps', 'ppz']],\n ['application/msword', ['doc', 'dot', 'w6w', 'wiz', 'word']],\n ['application/mswrite', 'wri'],\n ['application/mxf', 'mxf'],\n ['application/netmc', 'mcp'],\n ['application/octet-stream', ['*']],\n ['application/oda', 'oda'],\n ['application/oebps-package+xml', 'opf'],\n ['application/ogg', 'ogx'],\n ['application/olescript', 'axs'],\n ['application/onenote', 'onetoc'],\n ['application/patch-ops-error+xml', 'xer'],\n ['application/pdf', 'pdf'],\n ['application/pgp-encrypted', 'asc'],\n ['application/pgp-signature', 'pgp'],\n ['application/pics-rules', 'prf'],\n ['application/pkcs-12', 'p12'],\n ['application/pkcs-crl', 'crl'],\n ['application/pkcs10', 'p10'],\n ['application/pkcs7-mime', ['p7c', 'p7m']],\n ['application/pkcs7-signature', 'p7s'],\n ['application/pkcs8', 'p8'],\n ['application/pkix-attr-cert', 'ac'],\n ['application/pkix-cert', ['cer', 'crt']],\n ['application/pkix-crl', 'crl'],\n ['application/pkix-pkipath', 'pkipath'],\n ['application/pkixcmp', 'pki'],\n ['application/plain', 'text'],\n ['application/pls+xml', 'pls'],\n ['application/postscript', ['ps', 'ai', 'eps']],\n ['application/powerpoint', 'ppt'],\n ['application/pro_eng', ['part', 'prt']],\n ['application/prs.cww', 'cww'],\n ['application/pskc+xml', 'pskcxml'],\n ['application/rdf+xml', 'rdf'],\n ['application/reginfo+xml', 'rif'],\n ['application/relax-ng-compact-syntax', 'rnc'],\n ['application/resource-lists+xml', 'rl'],\n ['application/resource-lists-diff+xml', 'rld'],\n ['application/ringing-tones', 'rng'],\n ['application/rls-services+xml', 'rs'],\n ['application/rsd+xml', 'rsd'],\n ['application/rss+xml', 'xml'],\n ['application/rtf', ['rtf', 'rtx']],\n ['application/sbml+xml', 'sbml'],\n ['application/scvp-cv-request', 'scq'],\n ['application/scvp-cv-response', 'scs'],\n ['application/scvp-vp-request', 'spq'],\n ['application/scvp-vp-response', 'spp'],\n ['application/sdp', 'sdp'],\n ['application/sea', 'sea'],\n ['application/set', 'set'],\n ['application/set-payment-initiation', 'setpay'],\n ['application/set-registration-initiation', 'setreg'],\n ['application/shf+xml', 'shf'],\n ['application/sla', 'stl'],\n ['application/smil', ['smi', 'smil']],\n ['application/smil+xml', 'smi'],\n ['application/solids', 'sol'],\n ['application/sounder', 'sdr'],\n ['application/sparql-query', 'rq'],\n ['application/sparql-results+xml', 'srx'],\n ['application/srgs', 'gram'],\n ['application/srgs+xml', 'grxml'],\n ['application/sru+xml', 'sru'],\n ['application/ssml+xml', 'ssml'],\n ['application/step', ['step', 'stp']],\n ['application/streamingmedia', 'ssm'],\n ['application/tei+xml', 'tei'],\n ['application/thraud+xml', 'tfi'],\n ['application/timestamped-data', 'tsd'],\n ['application/toolbook', 'tbk'],\n ['application/vda', 'vda'],\n ['application/vnd.3gpp.pic-bw-large', 'plb'],\n ['application/vnd.3gpp.pic-bw-small', 'psb'],\n ['application/vnd.3gpp.pic-bw-var', 'pvb'],\n ['application/vnd.3gpp2.tcap', 'tcap'],\n ['application/vnd.3m.post-it-notes', 'pwn'],\n ['application/vnd.accpac.simply.aso', 'aso'],\n ['application/vnd.accpac.simply.imp', 'imp'],\n ['application/vnd.acucobol', 'acu'],\n ['application/vnd.acucorp', 'atc'],\n ['application/vnd.adobe.air-application-installer-package+zip', 'air'],\n ['application/vnd.adobe.fxp', 'fxp'],\n ['application/vnd.adobe.xdp+xml', 'xdp'],\n ['application/vnd.adobe.xfdf', 'xfdf'],\n ['application/vnd.ahead.space', 'ahead'],\n ['application/vnd.airzip.filesecure.azf', 'azf'],\n ['application/vnd.airzip.filesecure.azs', 'azs'],\n ['application/vnd.amazon.ebook', 'azw'],\n ['application/vnd.americandynamics.acc', 'acc'],\n ['application/vnd.amiga.ami', 'ami'],\n ['application/vnd.android.package-archive', 'apk'],\n ['application/vnd.anser-web-certificate-issue-initiation', 'cii'],\n ['application/vnd.anser-web-funds-transfer-initiation', 'fti'],\n ['application/vnd.antix.game-component', 'atx'],\n ['application/vnd.apple.installer+xml', 'mpkg'],\n ['application/vnd.apple.mpegurl', 'm3u8'],\n ['application/vnd.aristanetworks.swi', 'swi'],\n ['application/vnd.audiograph', 'aep'],\n ['application/vnd.blueice.multipass', 'mpm'],\n ['application/vnd.bmi', 'bmi'],\n ['application/vnd.businessobjects', 'rep'],\n ['application/vnd.chemdraw+xml', 'cdxml'],\n ['application/vnd.chipnuts.karaoke-mmd', 'mmd'],\n ['application/vnd.cinderella', 'cdy'],\n ['application/vnd.claymore', 'cla'],\n ['application/vnd.cloanto.rp9', 'rp9'],\n ['application/vnd.clonk.c4group', 'c4g'],\n ['application/vnd.cluetrust.cartomobile-config', 'c11amc'],\n ['application/vnd.cluetrust.cartomobile-config-pkg', 'c11amz'],\n ['application/vnd.commonspace', 'csp'],\n ['application/vnd.contact.cmsg', 'cdbcmsg'],\n ['application/vnd.cosmocaller', 'cmc'],\n ['application/vnd.crick.clicker', 'clkx'],\n ['application/vnd.crick.clicker.keyboard', 'clkk'],\n ['application/vnd.crick.clicker.palette', 'clkp'],\n ['application/vnd.crick.clicker.template', 'clkt'],\n ['application/vnd.crick.clicker.wordbank', 'clkw'],\n ['application/vnd.criticaltools.wbs+xml', 'wbs'],\n ['application/vnd.ctc-posml', 'pml'],\n ['application/vnd.cups-ppd', 'ppd'],\n ['application/vnd.curl.car', 'car'],\n ['application/vnd.curl.pcurl', 'pcurl'],\n ['application/vnd.data-vision.rdz', 'rdz'],\n ['application/vnd.denovo.fcselayout-link', 'fe_launch'],\n ['application/vnd.dna', 'dna'],\n ['application/vnd.dolby.mlp', 'mlp'],\n ['application/vnd.dpgraph', 'dpg'],\n ['application/vnd.dreamfactory', 'dfac'],\n ['application/vnd.dvb.ait', 'ait'],\n ['application/vnd.dvb.service', 'svc'],\n ['application/vnd.dynageo', 'geo'],\n ['application/vnd.ecowin.chart', 'mag'],\n ['application/vnd.enliven', 'nml'],\n ['application/vnd.epson.esf', 'esf'],\n ['application/vnd.epson.msf', 'msf'],\n ['application/vnd.epson.quickanime', 'qam'],\n ['application/vnd.epson.salt', 'slt'],\n ['application/vnd.epson.ssf', 'ssf'],\n ['application/vnd.eszigno3+xml', 'es3'],\n ['application/vnd.ezpix-album', 'ez2'],\n ['application/vnd.ezpix-package', 'ez3'],\n ['application/vnd.fdf', 'fdf'],\n ['application/vnd.fdsn.seed', 'seed'],\n ['application/vnd.flographit', 'gph'],\n ['application/vnd.fluxtime.clip', 'ftc'],\n ['application/vnd.framemaker', 'fm'],\n ['application/vnd.frogans.fnc', 'fnc'],\n ['application/vnd.frogans.ltf', 'ltf'],\n ['application/vnd.fsc.weblaunch', 'fsc'],\n ['application/vnd.fujitsu.oasys', 'oas'],\n ['application/vnd.fujitsu.oasys2', 'oa2'],\n ['application/vnd.fujitsu.oasys3', 'oa3'],\n ['application/vnd.fujitsu.oasysgp', 'fg5'],\n ['application/vnd.fujitsu.oasysprs', 'bh2'],\n ['application/vnd.fujixerox.ddd', 'ddd'],\n ['application/vnd.fujixerox.docuworks', 'xdw'],\n ['application/vnd.fujixerox.docuworks.binder', 'xbd'],\n ['application/vnd.fuzzysheet', 'fzs'],\n ['application/vnd.genomatix.tuxedo', 'txd'],\n ['application/vnd.geogebra.file', 'ggb'],\n ['application/vnd.geogebra.tool', 'ggt'],\n ['application/vnd.geometry-explorer', 'gex'],\n ['application/vnd.geonext', 'gxt'],\n ['application/vnd.geoplan', 'g2w'],\n ['application/vnd.geospace', 'g3w'],\n ['application/vnd.gmx', 'gmx'],\n ['application/vnd.google-earth.kml+xml', 'kml'],\n ['application/vnd.google-earth.kmz', 'kmz'],\n ['application/vnd.grafeq', 'gqf'],\n ['application/vnd.groove-account', 'gac'],\n ['application/vnd.groove-help', 'ghf'],\n ['application/vnd.groove-identity-message', 'gim'],\n ['application/vnd.groove-injector', 'grv'],\n ['application/vnd.groove-tool-message', 'gtm'],\n ['application/vnd.groove-tool-template', 'tpl'],\n ['application/vnd.groove-vcard', 'vcg'],\n ['application/vnd.hal+xml', 'hal'],\n ['application/vnd.handheld-entertainment+xml', 'zmm'],\n ['application/vnd.hbci', 'hbci'],\n ['application/vnd.hhe.lesson-player', 'les'],\n ['application/vnd.hp-hpgl', ['hgl', 'hpg', 'hpgl']],\n ['application/vnd.hp-hpid', 'hpid'],\n ['application/vnd.hp-hps', 'hps'],\n ['application/vnd.hp-jlyt', 'jlt'],\n ['application/vnd.hp-pcl', 'pcl'],\n ['application/vnd.hp-pclxl', 'pclxl'],\n ['application/vnd.hydrostatix.sof-data', 'sfd-hdstx'],\n ['application/vnd.hzn-3d-crossword', 'x3d'],\n ['application/vnd.ibm.minipay', 'mpy'],\n ['application/vnd.ibm.modcap', 'afp'],\n ['application/vnd.ibm.rights-management', 'irm'],\n ['application/vnd.ibm.secure-container', 'sc'],\n ['application/vnd.iccprofile', 'icc'],\n ['application/vnd.igloader', 'igl'],\n ['application/vnd.immervision-ivp', 'ivp'],\n ['application/vnd.immervision-ivu', 'ivu'],\n ['application/vnd.insors.igm', 'igm'],\n ['application/vnd.intercon.formnet', 'xpw'],\n ['application/vnd.intergeo', 'i2g'],\n ['application/vnd.intu.qbo', 'qbo'],\n ['application/vnd.intu.qfx', 'qfx'],\n ['application/vnd.ipunplugged.rcprofile', 'rcprofile'],\n ['application/vnd.irepository.package+xml', 'irp'],\n ['application/vnd.is-xpr', 'xpr'],\n ['application/vnd.isac.fcs', 'fcs'],\n ['application/vnd.jam', 'jam'],\n ['application/vnd.jcp.javame.midlet-rms', 'rms'],\n ['application/vnd.jisp', 'jisp'],\n ['application/vnd.joost.joda-archive', 'joda'],\n ['application/vnd.kahootz', 'ktz'],\n ['application/vnd.kde.karbon', 'karbon'],\n ['application/vnd.kde.kchart', 'chrt'],\n ['application/vnd.kde.kformula', 'kfo'],\n ['application/vnd.kde.kivio', 'flw'],\n ['application/vnd.kde.kontour', 'kon'],\n ['application/vnd.kde.kpresenter', 'kpr'],\n ['application/vnd.kde.kspread', 'ksp'],\n ['application/vnd.kde.kword', 'kwd'],\n ['application/vnd.kenameaapp', 'htke'],\n ['application/vnd.kidspiration', 'kia'],\n ['application/vnd.kinar', 'kne'],\n ['application/vnd.koan', 'skp'],\n ['application/vnd.kodak-descriptor', 'sse'],\n ['application/vnd.las.las+xml', 'lasxml'],\n ['application/vnd.llamagraphics.life-balance.desktop', 'lbd'],\n ['application/vnd.llamagraphics.life-balance.exchange+xml', 'lbe'],\n ['application/vnd.lotus-1-2-3', '123'],\n ['application/vnd.lotus-approach', 'apr'],\n ['application/vnd.lotus-freelance', 'pre'],\n ['application/vnd.lotus-notes', 'nsf'],\n ['application/vnd.lotus-organizer', 'org'],\n ['application/vnd.lotus-screencam', 'scm'],\n ['application/vnd.lotus-wordpro', 'lwp'],\n ['application/vnd.macports.portpkg', 'portpkg'],\n ['application/vnd.mcd', 'mcd'],\n ['application/vnd.medcalcdata', 'mc1'],\n ['application/vnd.mediastation.cdkey', 'cdkey'],\n ['application/vnd.mfer', 'mwf'],\n ['application/vnd.mfmp', 'mfm'],\n ['application/vnd.micrografx.flo', 'flo'],\n ['application/vnd.micrografx.igx', 'igx'],\n ['application/vnd.mif', 'mif'],\n ['application/vnd.mobius.daf', 'daf'],\n ['application/vnd.mobius.dis', 'dis'],\n ['application/vnd.mobius.mbk', 'mbk'],\n ['application/vnd.mobius.mqy', 'mqy'],\n ['application/vnd.mobius.msl', 'msl'],\n ['application/vnd.mobius.plc', 'plc'],\n ['application/vnd.mobius.txf', 'txf'],\n ['application/vnd.mophun.application', 'mpn'],\n ['application/vnd.mophun.certificate', 'mpc'],\n ['application/vnd.mozilla.xul+xml', 'xul'],\n ['application/vnd.ms-artgalry', 'cil'],\n ['application/vnd.ms-cab-compressed', 'cab'],\n ['application/vnd.ms-excel', ['xls', 'xla', 'xlc', 'xlm', 'xlt', 'xlw', 'xlb', 'xll']],\n ['application/vnd.ms-excel.addin.macroenabled.12', 'xlam'],\n ['application/vnd.ms-excel.sheet.binary.macroenabled.12', 'xlsb'],\n ['application/vnd.ms-excel.sheet.macroenabled.12', 'xlsm'],\n ['application/vnd.ms-excel.template.macroenabled.12', 'xltm'],\n ['application/vnd.ms-fontobject', 'eot'],\n ['application/vnd.ms-htmlhelp', 'chm'],\n ['application/vnd.ms-ims', 'ims'],\n ['application/vnd.ms-lrm', 'lrm'],\n ['application/vnd.ms-officetheme', 'thmx'],\n ['application/vnd.ms-outlook', 'msg'],\n ['application/vnd.ms-pki.certstore', 'sst'],\n ['application/vnd.ms-pki.pko', 'pko'],\n ['application/vnd.ms-pki.seccat', 'cat'],\n ['application/vnd.ms-pki.stl', 'stl'],\n ['application/vnd.ms-pkicertstore', 'sst'],\n ['application/vnd.ms-pkiseccat', 'cat'],\n ['application/vnd.ms-pkistl', 'stl'],\n ['application/vnd.ms-powerpoint', ['ppt', 'pot', 'pps', 'ppa', 'pwz']],\n ['application/vnd.ms-powerpoint.addin.macroenabled.12', 'ppam'],\n ['application/vnd.ms-powerpoint.presentation.macroenabled.12', 'pptm'],\n ['application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldm'],\n ['application/vnd.ms-powerpoint.slideshow.macroenabled.12', 'ppsm'],\n ['application/vnd.ms-powerpoint.template.macroenabled.12', 'potm'],\n ['application/vnd.ms-project', 'mpp'],\n ['application/vnd.ms-word.document.macroenabled.12', 'docm'],\n ['application/vnd.ms-word.template.macroenabled.12', 'dotm'],\n ['application/vnd.ms-works', ['wks', 'wcm', 'wdb', 'wps']],\n ['application/vnd.ms-wpl', 'wpl'],\n ['application/vnd.ms-xpsdocument', 'xps'],\n ['application/vnd.mseq', 'mseq'],\n ['application/vnd.musician', 'mus'],\n ['application/vnd.muvee.style', 'msty'],\n ['application/vnd.neurolanguage.nlu', 'nlu'],\n ['application/vnd.noblenet-directory', 'nnd'],\n ['application/vnd.noblenet-sealer', 'nns'],\n ['application/vnd.noblenet-web', 'nnw'],\n ['application/vnd.nokia.configuration-message', 'ncm'],\n ['application/vnd.nokia.n-gage.data', 'ngdat'],\n ['application/vnd.nokia.n-gage.symbian.install', 'n-gage'],\n ['application/vnd.nokia.radio-preset', 'rpst'],\n ['application/vnd.nokia.radio-presets', 'rpss'],\n ['application/vnd.nokia.ringing-tone', 'rng'],\n ['application/vnd.novadigm.edm', 'edm'],\n ['application/vnd.novadigm.edx', 'edx'],\n ['application/vnd.novadigm.ext', 'ext'],\n ['application/vnd.oasis.opendocument.chart', 'odc'],\n ['application/vnd.oasis.opendocument.chart-template', 'otc'],\n ['application/vnd.oasis.opendocument.database', 'odb'],\n ['application/vnd.oasis.opendocument.formula', 'odf'],\n ['application/vnd.oasis.opendocument.formula-template', 'odft'],\n ['application/vnd.oasis.opendocument.graphics', 'odg'],\n ['application/vnd.oasis.opendocument.graphics-template', 'otg'],\n ['application/vnd.oasis.opendocument.image', 'odi'],\n ['application/vnd.oasis.opendocument.image-template', 'oti'],\n ['application/vnd.oasis.opendocument.presentation', 'odp'],\n ['application/vnd.oasis.opendocument.presentation-template', 'otp'],\n ['application/vnd.oasis.opendocument.spreadsheet', 'ods'],\n ['application/vnd.oasis.opendocument.spreadsheet-template', 'ots'],\n ['application/vnd.oasis.opendocument.text', 'odt'],\n ['application/vnd.oasis.opendocument.text-master', 'odm'],\n ['application/vnd.oasis.opendocument.text-template', 'ott'],\n ['application/vnd.oasis.opendocument.text-web', 'oth'],\n ['application/vnd.olpc-sugar', 'xo'],\n ['application/vnd.oma.dd2+xml', 'dd2'],\n ['application/vnd.openofficeorg.extension', 'oxt'],\n ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slide', 'sldx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'],\n ['application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'],\n ['application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'],\n ['application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'],\n ['application/vnd.osgeo.mapguide.package', 'mgp'],\n ['application/vnd.osgi.dp', 'dp'],\n ['application/vnd.palm', 'pdb'],\n ['application/vnd.pawaafile', 'paw'],\n ['application/vnd.pg.format', 'str'],\n ['application/vnd.pg.osasli', 'ei6'],\n ['application/vnd.picsel', 'efif'],\n ['application/vnd.pmi.widget', 'wg'],\n ['application/vnd.pocketlearn', 'plf'],\n ['application/vnd.powerbuilder6', 'pbd'],\n ['application/vnd.previewsystems.box', 'box'],\n ['application/vnd.proteus.magazine', 'mgz'],\n ['application/vnd.publishare-delta-tree', 'qps'],\n ['application/vnd.pvi.ptid1', 'ptid'],\n ['application/vnd.quark.quarkxpress', 'qxd'],\n ['application/vnd.realvnc.bed', 'bed'],\n ['application/vnd.recordare.musicxml', 'mxl'],\n ['application/vnd.recordare.musicxml+xml', 'musicxml'],\n ['application/vnd.rig.cryptonote', 'cryptonote'],\n ['application/vnd.rim.cod', 'cod'],\n ['application/vnd.rn-realmedia', 'rm'],\n ['application/vnd.rn-realplayer', 'rnx'],\n ['application/vnd.route66.link66+xml', 'link66'],\n ['application/vnd.sailingtracker.track', 'st'],\n ['application/vnd.seemail', 'see'],\n ['application/vnd.sema', 'sema'],\n ['application/vnd.semd', 'semd'],\n ['application/vnd.semf', 'semf'],\n ['application/vnd.shana.informed.formdata', 'ifm'],\n ['application/vnd.shana.informed.formtemplate', 'itp'],\n ['application/vnd.shana.informed.interchange', 'iif'],\n ['application/vnd.shana.informed.package', 'ipk'],\n ['application/vnd.simtech-mindmapper', 'twd'],\n ['application/vnd.smaf', 'mmf'],\n ['application/vnd.smart.teacher', 'teacher'],\n ['application/vnd.solent.sdkm+xml', 'sdkm'],\n ['application/vnd.spotfire.dxp', 'dxp'],\n ['application/vnd.spotfire.sfs', 'sfs'],\n ['application/vnd.stardivision.calc', 'sdc'],\n ['application/vnd.stardivision.draw', 'sda'],\n ['application/vnd.stardivision.impress', 'sdd'],\n ['application/vnd.stardivision.math', 'smf'],\n ['application/vnd.stardivision.writer', 'sdw'],\n ['application/vnd.stardivision.writer-global', 'sgl'],\n ['application/vnd.stepmania.stepchart', 'sm'],\n ['application/vnd.sun.xml.calc', 'sxc'],\n ['application/vnd.sun.xml.calc.template', 'stc'],\n ['application/vnd.sun.xml.draw', 'sxd'],\n ['application/vnd.sun.xml.draw.template', 'std'],\n ['application/vnd.sun.xml.impress', 'sxi'],\n ['application/vnd.sun.xml.impress.template', 'sti'],\n ['application/vnd.sun.xml.math', 'sxm'],\n ['application/vnd.sun.xml.writer', 'sxw'],\n ['application/vnd.sun.xml.writer.global', 'sxg'],\n ['application/vnd.sun.xml.writer.template', 'stw'],\n ['application/vnd.sus-calendar', 'sus'],\n ['application/vnd.svd', 'svd'],\n ['application/vnd.symbian.install', 'sis'],\n ['application/vnd.syncml+xml', 'xsm'],\n ['application/vnd.syncml.dm+wbxml', 'bdm'],\n ['application/vnd.syncml.dm+xml', 'xdm'],\n ['application/vnd.tao.intent-module-archive', 'tao'],\n ['application/vnd.tmobile-livetv', 'tmo'],\n ['application/vnd.trid.tpt', 'tpt'],\n ['application/vnd.triscape.mxs', 'mxs'],\n ['application/vnd.trueapp', 'tra'],\n ['application/vnd.ufdl', 'ufd'],\n ['application/vnd.uiq.theme', 'utz'],\n ['application/vnd.umajin', 'umj'],\n ['application/vnd.unity', 'unityweb'],\n ['application/vnd.uoml+xml', 'uoml'],\n ['application/vnd.vcx', 'vcx'],\n ['application/vnd.visio', 'vsd'],\n ['application/vnd.visionary', 'vis'],\n ['application/vnd.vsf', 'vsf'],\n ['application/vnd.wap.wbxml', 'wbxml'],\n ['application/vnd.wap.wmlc', 'wmlc'],\n ['application/vnd.wap.wmlscriptc', 'wmlsc'],\n ['application/vnd.webturbo', 'wtb'],\n ['application/vnd.wolfram.player', 'nbp'],\n ['application/vnd.wordperfect', 'wpd'],\n ['application/vnd.wqd', 'wqd'],\n ['application/vnd.wt.stf', 'stf'],\n ['application/vnd.xara', ['web', 'xar']],\n ['application/vnd.xfdl', 'xfdl'],\n ['application/vnd.yamaha.hv-dic', 'hvd'],\n ['application/vnd.yamaha.hv-script', 'hvs'],\n ['application/vnd.yamaha.hv-voice', 'hvp'],\n ['application/vnd.yamaha.openscoreformat', 'osf'],\n ['application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osfpvg'],\n ['application/vnd.yamaha.smaf-audio', 'saf'],\n ['application/vnd.yamaha.smaf-phrase', 'spf'],\n ['application/vnd.yellowriver-custom-menu', 'cmp'],\n ['application/vnd.zul', 'zir'],\n ['application/vnd.zzazz.deck+xml', 'zaz'],\n ['application/vocaltec-media-desc', 'vmd'],\n ['application/vocaltec-media-file', 'vmf'],\n ['application/voicexml+xml', 'vxml'],\n ['application/widget', 'wgt'],\n ['application/winhlp', 'hlp'],\n ['application/wordperfect', ['wp', 'wp5', 'wp6', 'wpd']],\n ['application/wordperfect6.0', ['w60', 'wp5']],\n ['application/wordperfect6.1', 'w61'],\n ['application/wsdl+xml', 'wsdl'],\n ['application/wspolicy+xml', 'wspolicy'],\n ['application/x-123', 'wk1'],\n ['application/x-7z-compressed', '7z'],\n ['application/x-abiword', 'abw'],\n ['application/x-ace-compressed', 'ace'],\n ['application/x-aim', 'aim'],\n ['application/x-authorware-bin', 'aab'],\n ['application/x-authorware-map', 'aam'],\n ['application/x-authorware-seg', 'aas'],\n ['application/x-bcpio', 'bcpio'],\n ['application/x-binary', 'bin'],\n ['application/x-binhex40', 'hqx'],\n ['application/x-bittorrent', 'torrent'],\n ['application/x-bsh', ['bsh', 'sh', 'shar']],\n ['application/x-bytecode.elisp', 'elc'],\n ['application/x-bytecode.python', 'pyc'],\n ['application/x-bzip', 'bz'],\n ['application/x-bzip2', ['boz', 'bz2']],\n ['application/x-cdf', 'cdf'],\n ['application/x-cdlink', 'vcd'],\n ['application/x-chat', ['cha', 'chat']],\n ['application/x-chess-pgn', 'pgn'],\n ['application/x-cmu-raster', 'ras'],\n ['application/x-cocoa', 'cco'],\n ['application/x-compactpro', 'cpt'],\n ['application/x-compress', 'z'],\n ['application/x-compressed', ['tgz', 'gz', 'z', 'zip']],\n ['application/x-conference', 'nsc'],\n ['application/x-cpio', 'cpio'],\n ['application/x-cpt', 'cpt'],\n ['application/x-csh', 'csh'],\n ['application/x-debian-package', 'deb'],\n ['application/x-deepv', 'deepv'],\n ['application/x-director', ['dir', 'dcr', 'dxr']],\n ['application/x-doom', 'wad'],\n ['application/x-dtbncx+xml', 'ncx'],\n ['application/x-dtbook+xml', 'dtb'],\n ['application/x-dtbresource+xml', 'res'],\n ['application/x-dvi', 'dvi'],\n ['application/x-elc', 'elc'],\n ['application/x-envoy', ['env', 'evy']],\n ['application/x-esrehber', 'es'],\n ['application/x-excel', ['xls', 'xla', 'xlb', 'xlc', 'xld', 'xlk', 'xll', 'xlm', 'xlt', 'xlv', 'xlw']],\n ['application/x-font-bdf', 'bdf'],\n ['application/x-font-ghostscript', 'gsf'],\n ['application/x-font-linux-psf', 'psf'],\n ['application/x-font-otf', 'otf'],\n ['application/x-font-pcf', 'pcf'],\n ['application/x-font-snf', 'snf'],\n ['application/x-font-ttf', 'ttf'],\n ['application/x-font-type1', 'pfa'],\n ['application/x-font-woff', 'woff'],\n ['application/x-frame', 'mif'],\n ['application/x-freelance', 'pre'],\n ['application/x-futuresplash', 'spl'],\n ['application/x-gnumeric', 'gnumeric'],\n ['application/x-gsp', 'gsp'],\n ['application/x-gss', 'gss'],\n ['application/x-gtar', 'gtar'],\n ['application/x-gzip', ['gz', 'gzip']],\n ['application/x-hdf', 'hdf'],\n ['application/x-helpfile', ['help', 'hlp']],\n ['application/x-httpd-imap', 'imap'],\n ['application/x-ima', 'ima'],\n ['application/x-internet-signup', ['ins', 'isp']],\n ['application/x-internett-signup', 'ins'],\n ['application/x-inventor', 'iv'],\n ['application/x-ip2', 'ip'],\n ['application/x-iphone', 'iii'],\n ['application/x-java-class', 'class'],\n ['application/x-java-commerce', 'jcm'],\n ['application/x-java-jnlp-file', 'jnlp'],\n ['application/x-javascript', 'js'],\n ['application/x-koan', ['skd', 'skm', 'skp', 'skt']],\n ['application/x-ksh', 'ksh'],\n ['application/x-latex', ['latex', 'ltx']],\n ['application/x-lha', 'lha'],\n ['application/x-lisp', 'lsp'],\n ['application/x-livescreen', 'ivy'],\n ['application/x-lotus', 'wq1'],\n ['application/x-lotusscreencam', 'scm'],\n ['application/x-lzh', 'lzh'],\n ['application/x-lzx', 'lzx'],\n ['application/x-mac-binhex40', 'hqx'],\n ['application/x-macbinary', 'bin'],\n ['application/x-magic-cap-package-1.0', 'mc$'],\n ['application/x-mathcad', 'mcd'],\n ['application/x-meme', 'mm'],\n ['application/x-midi', ['mid', 'midi']],\n ['application/x-mif', 'mif'],\n ['application/x-mix-transfer', 'nix'],\n ['application/x-mobipocket-ebook', 'prc'],\n ['application/x-mplayer2', 'asx'],\n ['application/x-ms-application', 'application'],\n ['application/x-ms-wmd', 'wmd'],\n ['application/x-ms-wmz', 'wmz'],\n ['application/x-ms-xbap', 'xbap'],\n ['application/x-msaccess', 'mdb'],\n ['application/x-msbinder', 'obd'],\n ['application/x-mscardfile', 'crd'],\n ['application/x-msclip', 'clp'],\n ['application/x-msdownload', ['exe', 'dll']],\n ['application/x-msexcel', ['xls', 'xla', 'xlw']],\n ['application/x-msmediaview', ['mvb', 'm13', 'm14']],\n ['application/x-msmetafile', 'wmf'],\n ['application/x-msmoney', 'mny'],\n ['application/x-mspowerpoint', 'ppt'],\n ['application/x-mspublisher', 'pub'],\n ['application/x-msschedule', 'scd'],\n ['application/x-msterminal', 'trm'],\n ['application/x-mswrite', 'wri'],\n ['application/x-navi-animation', 'ani'],\n ['application/x-navidoc', 'nvd'],\n ['application/x-navimap', 'map'],\n ['application/x-navistyle', 'stl'],\n ['application/x-netcdf', ['cdf', 'nc']],\n ['application/x-newton-compatible-pkg', 'pkg'],\n ['application/x-nokia-9000-communicator-add-on-software', 'aos'],\n ['application/x-omc', 'omc'],\n ['application/x-omcdatamaker', 'omcd'],\n ['application/x-omcregerator', 'omcr'],\n ['application/x-pagemaker', ['pm4', 'pm5']],\n ['application/x-pcl', 'pcl'],\n ['application/x-perfmon', ['pma', 'pmc', 'pml', 'pmr', 'pmw']],\n ['application/x-pixclscript', 'plx'],\n ['application/x-pkcs10', 'p10'],\n ['application/x-pkcs12', ['p12', 'pfx']],\n ['application/x-pkcs7-certificates', ['p7b', 'spc']],\n ['application/x-pkcs7-certreqresp', 'p7r'],\n ['application/x-pkcs7-mime', ['p7m', 'p7c']],\n ['application/x-pkcs7-signature', ['p7s', 'p7a']],\n ['application/x-pointplus', 'css'],\n ['application/x-portable-anymap', 'pnm'],\n ['application/x-project', ['mpc', 'mpt', 'mpv', 'mpx']],\n ['application/x-qpro', 'wb1'],\n ['application/x-rar-compressed', 'rar'],\n ['application/x-rtf', 'rtf'],\n ['application/x-sdp', 'sdp'],\n ['application/x-sea', 'sea'],\n ['application/x-seelogo', 'sl'],\n ['application/x-sh', 'sh'],\n ['application/x-shar', ['shar', 'sh']],\n ['application/x-shockwave-flash', 'swf'],\n ['application/x-silverlight-app', 'xap'],\n ['application/x-sit', 'sit'],\n ['application/x-sprite', ['spr', 'sprite']],\n ['application/x-stuffit', 'sit'],\n ['application/x-stuffitx', 'sitx'],\n ['application/x-sv4cpio', 'sv4cpio'],\n ['application/x-sv4crc', 'sv4crc'],\n ['application/x-tar', 'tar'],\n ['application/x-tbook', ['sbk', 'tbk']],\n ['application/x-tcl', 'tcl'],\n ['application/x-tex', 'tex'],\n ['application/x-tex-tfm', 'tfm'],\n ['application/x-texinfo', ['texi', 'texinfo']],\n ['application/x-troff', ['roff', 't', 'tr']],\n ['application/x-troff-man', 'man'],\n ['application/x-troff-me', 'me'],\n ['application/x-troff-ms', 'ms'],\n ['application/x-troff-msvideo', 'avi'],\n ['application/x-ustar', 'ustar'],\n ['application/x-visio', ['vsd', 'vst', 'vsw']],\n ['application/x-vnd.audioexplosion.mzz', 'mzz'],\n ['application/x-vnd.ls-xpix', 'xpix'],\n ['application/x-vrml', 'vrml'],\n ['application/x-wais-source', ['src', 'wsrc']],\n ['application/x-winhelp', 'hlp'],\n ['application/x-wintalk', 'wtk'],\n ['application/x-world', ['wrl', 'svr']],\n ['application/x-wpwin', 'wpd'],\n ['application/x-wri', 'wri'],\n ['application/x-x509-ca-cert', ['cer', 'crt', 'der']],\n ['application/x-x509-user-cert', 'crt'],\n ['application/x-xfig', 'fig'],\n ['application/x-xpinstall', 'xpi'],\n ['application/x-zip-compressed', 'zip'],\n ['application/xcap-diff+xml', 'xdf'],\n ['application/xenc+xml', 'xenc'],\n ['application/xhtml+xml', 'xhtml'],\n ['application/xml', 'xml'],\n ['application/xml-dtd', 'dtd'],\n ['application/xop+xml', 'xop'],\n ['application/xslt+xml', 'xslt'],\n ['application/xspf+xml', 'xspf'],\n ['application/xv+xml', 'mxml'],\n ['application/yang', 'yang'],\n ['application/yin+xml', 'yin'],\n ['application/ynd.ms-pkipko', 'pko'],\n ['application/zip', 'zip'],\n ['audio/adpcm', 'adp'],\n ['audio/aiff', ['aiff', 'aif', 'aifc']],\n ['audio/basic', ['snd', 'au']],\n ['audio/it', 'it'],\n ['audio/make', ['funk', 'my', 'pfunk']],\n ['audio/make.my.funk', 'pfunk'],\n ['audio/mid', ['mid', 'rmi']],\n ['audio/midi', ['midi', 'kar', 'mid']],\n ['audio/mod', 'mod'],\n ['audio/mp4', 'mp4a'],\n ['audio/mpeg', ['mpga', 'mp3', 'm2a', 'mp2', 'mpa', 'mpg']],\n ['audio/mpeg3', 'mp3'],\n ['audio/nspaudio', ['la', 'lma']],\n ['audio/ogg', 'oga'],\n ['audio/s3m', 's3m'],\n ['audio/tsp-audio', 'tsi'],\n ['audio/tsplayer', 'tsp'],\n ['audio/vnd.dece.audio', 'uva'],\n ['audio/vnd.digital-winds', 'eol'],\n ['audio/vnd.dra', 'dra'],\n ['audio/vnd.dts', 'dts'],\n ['audio/vnd.dts.hd', 'dtshd'],\n ['audio/vnd.lucent.voice', 'lvp'],\n ['audio/vnd.ms-playready.media.pya', 'pya'],\n ['audio/vnd.nuera.ecelp4800', 'ecelp4800'],\n ['audio/vnd.nuera.ecelp7470', 'ecelp7470'],\n ['audio/vnd.nuera.ecelp9600', 'ecelp9600'],\n ['audio/vnd.qcelp', 'qcp'],\n ['audio/vnd.rip', 'rip'],\n ['audio/voc', 'voc'],\n ['audio/voxware', 'vox'],\n ['audio/wav', 'wav'],\n ['audio/webm', 'weba'],\n ['audio/x-aac', 'aac'],\n ['audio/x-adpcm', 'snd'],\n ['audio/x-aiff', ['aiff', 'aif', 'aifc']],\n ['audio/x-au', 'au'],\n ['audio/x-gsm', ['gsd', 'gsm']],\n ['audio/x-jam', 'jam'],\n ['audio/x-liveaudio', 'lam'],\n ['audio/x-mid', ['mid', 'midi']],\n ['audio/x-midi', ['midi', 'mid']],\n ['audio/x-mod', 'mod'],\n ['audio/x-mpeg', 'mp2'],\n ['audio/x-mpeg-3', 'mp3'],\n ['audio/x-mpegurl', 'm3u'],\n ['audio/x-mpequrl', 'm3u'],\n ['audio/x-ms-wax', 'wax'],\n ['audio/x-ms-wma', 'wma'],\n ['audio/x-nspaudio', ['la', 'lma']],\n ['audio/x-pn-realaudio', ['ra', 'ram', 'rm', 'rmm', 'rmp']],\n ['audio/x-pn-realaudio-plugin', ['ra', 'rmp', 'rpm']],\n ['audio/x-psid', 'sid'],\n ['audio/x-realaudio', 'ra'],\n ['audio/x-twinvq', 'vqf'],\n ['audio/x-twinvq-plugin', ['vqe', 'vql']],\n ['audio/x-vnd.audioexplosion.mjuicemediafile', 'mjf'],\n ['audio/x-voc', 'voc'],\n ['audio/x-wav', 'wav'],\n ['audio/xm', 'xm'],\n ['chemical/x-cdx', 'cdx'],\n ['chemical/x-cif', 'cif'],\n ['chemical/x-cmdf', 'cmdf'],\n ['chemical/x-cml', 'cml'],\n ['chemical/x-csml', 'csml'],\n ['chemical/x-pdb', ['pdb', 'xyz']],\n ['chemical/x-xyz', 'xyz'],\n ['drawing/x-dwf', 'dwf'],\n ['i-world/i-vrml', 'ivr'],\n ['image/bmp', ['bmp', 'bm']],\n ['image/cgm', 'cgm'],\n ['image/cis-cod', 'cod'],\n ['image/cmu-raster', ['ras', 'rast']],\n ['image/fif', 'fif'],\n ['image/florian', ['flo', 'turbot']],\n ['image/g3fax', 'g3'],\n ['image/gif', 'gif'],\n ['image/ief', ['ief', 'iefs']],\n ['image/jpeg', ['jpeg', 'jpe', 'jpg', 'jfif', 'jfif-tbnl']],\n ['image/jutvision', 'jut'],\n ['image/ktx', 'ktx'],\n ['image/naplps', ['nap', 'naplps']],\n ['image/pict', ['pic', 'pict']],\n ['image/pipeg', 'jfif'],\n ['image/pjpeg', ['jfif', 'jpe', 'jpeg', 'jpg']],\n ['image/png', ['png', 'x-png']],\n ['image/prs.btif', 'btif'],\n ['image/svg+xml', 'svg'],\n ['image/tiff', ['tif', 'tiff']],\n ['image/vasa', 'mcf'],\n ['image/vnd.adobe.photoshop', 'psd'],\n ['image/vnd.dece.graphic', 'uvi'],\n ['image/vnd.djvu', 'djvu'],\n ['image/vnd.dvb.subtitle', 'sub'],\n ['image/vnd.dwg', ['dwg', 'dxf', 'svf']],\n ['image/vnd.dxf', 'dxf'],\n ['image/vnd.fastbidsheet', 'fbs'],\n ['image/vnd.fpx', 'fpx'],\n ['image/vnd.fst', 'fst'],\n ['image/vnd.fujixerox.edmics-mmr', 'mmr'],\n ['image/vnd.fujixerox.edmics-rlc', 'rlc'],\n ['image/vnd.ms-modi', 'mdi'],\n ['image/vnd.net-fpx', ['fpx', 'npx']],\n ['image/vnd.rn-realflash', 'rf'],\n ['image/vnd.rn-realpix', 'rp'],\n ['image/vnd.wap.wbmp', 'wbmp'],\n ['image/vnd.xiff', 'xif'],\n ['image/webp', 'webp'],\n ['image/x-cmu-raster', 'ras'],\n ['image/x-cmx', 'cmx'],\n ['image/x-dwg', ['dwg', 'dxf', 'svf']],\n ['image/x-freehand', 'fh'],\n ['image/x-icon', 'ico'],\n ['image/x-jg', 'art'],\n ['image/x-jps', 'jps'],\n ['image/x-niff', ['niff', 'nif']],\n ['image/x-pcx', 'pcx'],\n ['image/x-pict', ['pct', 'pic']],\n ['image/x-portable-anymap', 'pnm'],\n ['image/x-portable-bitmap', 'pbm'],\n ['image/x-portable-graymap', 'pgm'],\n ['image/x-portable-greymap', 'pgm'],\n ['image/x-portable-pixmap', 'ppm'],\n ['image/x-quicktime', ['qif', 'qti', 'qtif']],\n ['image/x-rgb', 'rgb'],\n ['image/x-tiff', ['tif', 'tiff']],\n ['image/x-windows-bmp', 'bmp'],\n ['image/x-xbitmap', 'xbm'],\n ['image/x-xbm', 'xbm'],\n ['image/x-xpixmap', ['xpm', 'pm']],\n ['image/x-xwd', 'xwd'],\n ['image/x-xwindowdump', 'xwd'],\n ['image/xbm', 'xbm'],\n ['image/xpm', 'xpm'],\n ['message/rfc822', ['eml', 'mht', 'mhtml', 'nws', 'mime']],\n ['model/iges', ['iges', 'igs']],\n ['model/mesh', 'msh'],\n ['model/vnd.collada+xml', 'dae'],\n ['model/vnd.dwf', 'dwf'],\n ['model/vnd.gdl', 'gdl'],\n ['model/vnd.gtw', 'gtw'],\n ['model/vnd.mts', 'mts'],\n ['model/vnd.vtu', 'vtu'],\n ['model/vrml', ['vrml', 'wrl', 'wrz']],\n ['model/x-pov', 'pov'],\n ['multipart/x-gzip', 'gzip'],\n ['multipart/x-ustar', 'ustar'],\n ['multipart/x-zip', 'zip'],\n ['music/crescendo', ['mid', 'midi']],\n ['music/x-karaoke', 'kar'],\n ['paleovu/x-pv', 'pvu'],\n ['text/asp', 'asp'],\n ['text/calendar', 'ics'],\n ['text/css', 'css'],\n ['text/csv', 'csv'],\n ['text/ecmascript', 'js'],\n ['text/h323', '323'],\n ['text/html', ['html', 'htm', 'stm', 'acgi', 'htmls', 'htx', 'shtml']],\n ['text/iuls', 'uls'],\n ['text/javascript', 'js'],\n ['text/mcf', 'mcf'],\n ['text/n3', 'n3'],\n ['text/pascal', 'pas'],\n [\n 'text/plain',\n [\n 'txt',\n 'bas',\n 'c',\n 'h',\n 'c++',\n 'cc',\n 'com',\n 'conf',\n 'cxx',\n 'def',\n 'f',\n 'f90',\n 'for',\n 'g',\n 'hh',\n 'idc',\n 'jav',\n 'java',\n 'list',\n 'log',\n 'lst',\n 'm',\n 'mar',\n 'pl',\n 'sdml',\n 'text'\n ]\n ],\n ['text/plain-bas', 'par'],\n ['text/prs.lines.tag', 'dsc'],\n ['text/richtext', ['rtx', 'rt', 'rtf']],\n ['text/scriplet', 'wsc'],\n ['text/scriptlet', 'sct'],\n ['text/sgml', ['sgm', 'sgml']],\n ['text/tab-separated-values', 'tsv'],\n ['text/troff', 't'],\n ['text/turtle', 'ttl'],\n ['text/uri-list', ['uni', 'unis', 'uri', 'uris']],\n ['text/vnd.abc', 'abc'],\n ['text/vnd.curl', 'curl'],\n ['text/vnd.curl.dcurl', 'dcurl'],\n ['text/vnd.curl.mcurl', 'mcurl'],\n ['text/vnd.curl.scurl', 'scurl'],\n ['text/vnd.fly', 'fly'],\n ['text/vnd.fmi.flexstor', 'flx'],\n ['text/vnd.graphviz', 'gv'],\n ['text/vnd.in3d.3dml', '3dml'],\n ['text/vnd.in3d.spot', 'spot'],\n ['text/vnd.rn-realtext', 'rt'],\n ['text/vnd.sun.j2me.app-descriptor', 'jad'],\n ['text/vnd.wap.wml', 'wml'],\n ['text/vnd.wap.wmlscript', 'wmls'],\n ['text/webviewhtml', 'htt'],\n ['text/x-asm', ['asm', 's']],\n ['text/x-audiosoft-intra', 'aip'],\n ['text/x-c', ['c', 'cc', 'cpp']],\n ['text/x-component', 'htc'],\n ['text/x-fortran', ['for', 'f', 'f77', 'f90']],\n ['text/x-h', ['h', 'hh']],\n ['text/x-java-source', ['java', 'jav']],\n ['text/x-java-source,java', 'java'],\n ['text/x-la-asf', 'lsx'],\n ['text/x-m', 'm'],\n ['text/x-pascal', 'p'],\n ['text/x-script', 'hlb'],\n ['text/x-script.csh', 'csh'],\n ['text/x-script.elisp', 'el'],\n ['text/x-script.guile', 'scm'],\n ['text/x-script.ksh', 'ksh'],\n ['text/x-script.lisp', 'lsp'],\n ['text/x-script.perl', 'pl'],\n ['text/x-script.perl-module', 'pm'],\n ['text/x-script.phyton', 'py'],\n ['text/x-script.rexx', 'rexx'],\n ['text/x-script.scheme', 'scm'],\n ['text/x-script.sh', 'sh'],\n ['text/x-script.tcl', 'tcl'],\n ['text/x-script.tcsh', 'tcsh'],\n ['text/x-script.zsh', 'zsh'],\n ['text/x-server-parsed-html', ['shtml', 'ssi']],\n ['text/x-setext', 'etx'],\n ['text/x-sgml', ['sgm', 'sgml']],\n ['text/x-speech', ['spc', 'talk']],\n ['text/x-uil', 'uil'],\n ['text/x-uuencode', ['uu', 'uue']],\n ['text/x-vcalendar', 'vcs'],\n ['text/x-vcard', 'vcf'],\n ['text/xml', 'xml'],\n ['video/3gpp', '3gp'],\n ['video/3gpp2', '3g2'],\n ['video/animaflex', 'afl'],\n ['video/avi', 'avi'],\n ['video/avs-video', 'avs'],\n ['video/dl', 'dl'],\n ['video/fli', 'fli'],\n ['video/gl', 'gl'],\n ['video/h261', 'h261'],\n ['video/h263', 'h263'],\n ['video/h264', 'h264'],\n ['video/jpeg', 'jpgv'],\n ['video/jpm', 'jpm'],\n ['video/mj2', 'mj2'],\n ['video/mp4', 'mp4'],\n ['video/mpeg', ['mpeg', 'mp2', 'mpa', 'mpe', 'mpg', 'mpv2', 'm1v', 'm2v', 'mp3']],\n ['video/msvideo', 'avi'],\n ['video/ogg', 'ogv'],\n ['video/quicktime', ['mov', 'qt', 'moov']],\n ['video/vdo', 'vdo'],\n ['video/vivo', ['viv', 'vivo']],\n ['video/vnd.dece.hd', 'uvh'],\n ['video/vnd.dece.mobile', 'uvm'],\n ['video/vnd.dece.pd', 'uvp'],\n ['video/vnd.dece.sd', 'uvs'],\n ['video/vnd.dece.video', 'uvv'],\n ['video/vnd.fvt', 'fvt'],\n ['video/vnd.mpegurl', 'mxu'],\n ['video/vnd.ms-playready.media.pyv', 'pyv'],\n ['video/vnd.rn-realvideo', 'rv'],\n ['video/vnd.uvvu.mp4', 'uvu'],\n ['video/vnd.vivo', ['viv', 'vivo']],\n ['video/vosaic', 'vos'],\n ['video/webm', 'webm'],\n ['video/x-amt-demorun', 'xdr'],\n ['video/x-amt-showrun', 'xsr'],\n ['video/x-atomic3d-feature', 'fmf'],\n ['video/x-dl', 'dl'],\n ['video/x-dv', ['dif', 'dv']],\n ['video/x-f4v', 'f4v'],\n ['video/x-fli', 'fli'],\n ['video/x-flv', 'flv'],\n ['video/x-gl', 'gl'],\n ['video/x-isvideo', 'isu'],\n ['video/x-la-asf', ['lsf', 'lsx']],\n ['video/x-m4v', 'm4v'],\n ['video/x-motion-jpeg', 'mjpg'],\n ['video/x-mpeg', ['mp3', 'mp2']],\n ['video/x-mpeq2a', 'mp2'],\n ['video/x-ms-asf', ['asf', 'asr', 'asx']],\n ['video/x-ms-asf-plugin', 'asx'],\n ['video/x-ms-wm', 'wm'],\n ['video/x-ms-wmv', 'wmv'],\n ['video/x-ms-wmx', 'wmx'],\n ['video/x-ms-wvx', 'wvx'],\n ['video/x-msvideo', 'avi'],\n ['video/x-qtc', 'qtc'],\n ['video/x-scm', 'scm'],\n ['video/x-sgi-movie', ['movie', 'mv']],\n ['windows/metafile', 'wmf'],\n ['www/mime', 'mime'],\n ['x-conference/x-cooltalk', 'ice'],\n ['x-music/x-midi', ['mid', 'midi']],\n ['x-world/x-3dmf', ['3dm', '3dmf', 'qd3', 'qd3d']],\n ['x-world/x-svr', 'svr'],\n ['x-world/x-vrml', ['flr', 'vrml', 'wrl', 'wrz', 'xaf', 'xof']],\n ['x-world/x-vrt', 'vrt'],\n ['xgl/drawing', 'xgz'],\n ['xgl/movie', 'xmz']\n]);\nconst extensions = new Map([\n ['123', 'application/vnd.lotus-1-2-3'],\n ['323', 'text/h323'],\n ['*', 'application/octet-stream'],\n ['3dm', 'x-world/x-3dmf'],\n ['3dmf', 'x-world/x-3dmf'],\n ['3dml', 'text/vnd.in3d.3dml'],\n ['3g2', 'video/3gpp2'],\n ['3gp', 'video/3gpp'],\n ['7z', 'application/x-7z-compressed'],\n ['a', 'application/octet-stream'],\n ['aab', 'application/x-authorware-bin'],\n ['aac', 'audio/x-aac'],\n ['aam', 'application/x-authorware-map'],\n ['aas', 'application/x-authorware-seg'],\n ['abc', 'text/vnd.abc'],\n ['abw', 'application/x-abiword'],\n ['ac', 'application/pkix-attr-cert'],\n ['acc', 'application/vnd.americandynamics.acc'],\n ['ace', 'application/x-ace-compressed'],\n ['acgi', 'text/html'],\n ['acu', 'application/vnd.acucobol'],\n ['acx', 'application/internet-property-stream'],\n ['adp', 'audio/adpcm'],\n ['aep', 'application/vnd.audiograph'],\n ['afl', 'video/animaflex'],\n ['afp', 'application/vnd.ibm.modcap'],\n ['ahead', 'application/vnd.ahead.space'],\n ['ai', 'application/postscript'],\n ['aif', ['audio/aiff', 'audio/x-aiff']],\n ['aifc', ['audio/aiff', 'audio/x-aiff']],\n ['aiff', ['audio/aiff', 'audio/x-aiff']],\n ['aim', 'application/x-aim'],\n ['aip', 'text/x-audiosoft-intra'],\n ['air', 'application/vnd.adobe.air-application-installer-package+zip'],\n ['ait', 'application/vnd.dvb.ait'],\n ['ami', 'application/vnd.amiga.ami'],\n ['ani', 'application/x-navi-animation'],\n ['aos', 'application/x-nokia-9000-communicator-add-on-software'],\n ['apk', 'application/vnd.android.package-archive'],\n ['application', 'application/x-ms-application'],\n ['apr', 'application/vnd.lotus-approach'],\n ['aps', 'application/mime'],\n ['arc', 'application/octet-stream'],\n ['arj', ['application/arj', 'application/octet-stream']],\n ['art', 'image/x-jg'],\n ['asf', 'video/x-ms-asf'],\n ['asm', 'text/x-asm'],\n ['aso', 'application/vnd.accpac.simply.aso'],\n ['asp', 'text/asp'],\n ['asr', 'video/x-ms-asf'],\n ['asx', ['video/x-ms-asf', 'application/x-mplayer2', 'video/x-ms-asf-plugin']],\n ['atc', 'application/vnd.acucorp'],\n ['atomcat', 'application/atomcat+xml'],\n ['atomsvc', 'application/atomsvc+xml'],\n ['atx', 'application/vnd.antix.game-component'],\n ['au', ['audio/basic', 'audio/x-au']],\n ['avi', ['video/avi', 'video/msvideo', 'application/x-troff-msvideo', 'video/x-msvideo']],\n ['avs', 'video/avs-video'],\n ['aw', 'application/applixware'],\n ['axs', 'application/olescript'],\n ['azf', 'application/vnd.airzip.filesecure.azf'],\n ['azs', 'application/vnd.airzip.filesecure.azs'],\n ['azw', 'application/vnd.amazon.ebook'],\n ['bas', 'text/plain'],\n ['bcpio', 'application/x-bcpio'],\n ['bdf', 'application/x-font-bdf'],\n ['bdm', 'application/vnd.syncml.dm+wbxml'],\n ['bed', 'application/vnd.realvnc.bed'],\n ['bh2', 'application/vnd.fujitsu.oasysprs'],\n ['bin', ['application/octet-stream', 'application/mac-binary', 'application/macbinary', 'application/x-macbinary', 'application/x-binary']],\n ['bm', 'image/bmp'],\n ['bmi', 'application/vnd.bmi'],\n ['bmp', ['image/bmp', 'image/x-windows-bmp']],\n ['boo', 'application/book'],\n ['book', 'application/book'],\n ['box', 'application/vnd.previewsystems.box'],\n ['boz', 'application/x-bzip2'],\n ['bsh', 'application/x-bsh'],\n ['btif', 'image/prs.btif'],\n ['bz', 'application/x-bzip'],\n ['bz2', 'application/x-bzip2'],\n ['c', ['text/plain', 'text/x-c']],\n ['c++', 'text/plain'],\n ['c11amc', 'application/vnd.cluetrust.cartomobile-config'],\n ['c11amz', 'application/vnd.cluetrust.cartomobile-config-pkg'],\n ['c4g', 'application/vnd.clonk.c4group'],\n ['cab', 'application/vnd.ms-cab-compressed'],\n ['car', 'application/vnd.curl.car'],\n ['cat', ['application/vnd.ms-pkiseccat', 'application/vnd.ms-pki.seccat']],\n ['cc', ['text/plain', 'text/x-c']],\n ['ccad', 'application/clariscad'],\n ['cco', 'application/x-cocoa'],\n ['ccxml', 'application/ccxml+xml,'],\n ['cdbcmsg', 'application/vnd.contact.cmsg'],\n ['cdf', ['application/cdf', 'application/x-cdf', 'application/x-netcdf']],\n ['cdkey', 'application/vnd.mediastation.cdkey'],\n ['cdmia', 'application/cdmi-capability'],\n ['cdmic', 'application/cdmi-container'],\n ['cdmid', 'application/cdmi-domain'],\n ['cdmio', 'application/cdmi-object'],\n ['cdmiq', 'application/cdmi-queue'],\n ['cdx', 'chemical/x-cdx'],\n ['cdxml', 'application/vnd.chemdraw+xml'],\n ['cdy', 'application/vnd.cinderella'],\n ['cer', ['application/pkix-cert', 'application/x-x509-ca-cert']],\n ['cgm', 'image/cgm'],\n ['cha', 'application/x-chat'],\n ['chat', 'application/x-chat'],\n ['chm', 'application/vnd.ms-htmlhelp'],\n ['chrt', 'application/vnd.kde.kchart'],\n ['cif', 'chemical/x-cif'],\n ['cii', 'application/vnd.anser-web-certificate-issue-initiation'],\n ['cil', 'application/vnd.ms-artgalry'],\n ['cla', 'application/vnd.claymore'],\n ['class', ['application/octet-stream', 'application/java', 'application/java-byte-code', 'application/java-vm', 'application/x-java-class']],\n ['clkk', 'application/vnd.crick.clicker.keyboard'],\n ['clkp', 'application/vnd.crick.clicker.palette'],\n ['clkt', 'application/vnd.crick.clicker.template'],\n ['clkw', 'application/vnd.crick.clicker.wordbank'],\n ['clkx', 'application/vnd.crick.clicker'],\n ['clp', 'application/x-msclip'],\n ['cmc', 'application/vnd.cosmocaller'],\n ['cmdf', 'chemical/x-cmdf'],\n ['cml', 'chemical/x-cml'],\n ['cmp', 'application/vnd.yellowriver-custom-menu'],\n ['cmx', 'image/x-cmx'],\n ['cod', ['image/cis-cod', 'application/vnd.rim.cod']],\n ['com', ['application/octet-stream', 'text/plain']],\n ['conf', 'text/plain'],\n ['cpio', 'application/x-cpio'],\n ['cpp', 'text/x-c'],\n ['cpt', ['application/mac-compactpro', 'application/x-compactpro', 'application/x-cpt']],\n ['crd', 'application/x-mscardfile'],\n ['crl', ['application/pkix-crl', 'application/pkcs-crl']],\n ['crt', ['application/pkix-cert', 'application/x-x509-user-cert', 'application/x-x509-ca-cert']],\n ['cryptonote', 'application/vnd.rig.cryptonote'],\n ['csh', ['text/x-script.csh', 'application/x-csh']],\n ['csml', 'chemical/x-csml'],\n ['csp', 'application/vnd.commonspace'],\n ['css', ['text/css', 'application/x-pointplus']],\n ['csv', 'text/csv'],\n ['cu', 'application/cu-seeme'],\n ['curl', 'text/vnd.curl'],\n ['cww', 'application/prs.cww'],\n ['cxx', 'text/plain'],\n ['dae', 'model/vnd.collada+xml'],\n ['daf', 'application/vnd.mobius.daf'],\n ['davmount', 'application/davmount+xml'],\n ['dcr', 'application/x-director'],\n ['dcurl', 'text/vnd.curl.dcurl'],\n ['dd2', 'application/vnd.oma.dd2+xml'],\n ['ddd', 'application/vnd.fujixerox.ddd'],\n ['deb', 'application/x-debian-package'],\n ['deepv', 'application/x-deepv'],\n ['def', 'text/plain'],\n ['der', 'application/x-x509-ca-cert'],\n ['dfac', 'application/vnd.dreamfactory'],\n ['dif', 'video/x-dv'],\n ['dir', 'application/x-director'],\n ['dis', 'application/vnd.mobius.dis'],\n ['djvu', 'image/vnd.djvu'],\n ['dl', ['video/dl', 'video/x-dl']],\n ['dll', 'application/x-msdownload'],\n ['dms', 'application/octet-stream'],\n ['dna', 'application/vnd.dna'],\n ['doc', 'application/msword'],\n ['docm', 'application/vnd.ms-word.document.macroenabled.12'],\n ['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'],\n ['dot', 'application/msword'],\n ['dotm', 'application/vnd.ms-word.template.macroenabled.12'],\n ['dotx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'],\n ['dp', ['application/commonground', 'application/vnd.osgi.dp']],\n ['dpg', 'application/vnd.dpgraph'],\n ['dra', 'audio/vnd.dra'],\n ['drw', 'application/drafting'],\n ['dsc', 'text/prs.lines.tag'],\n ['dssc', 'application/dssc+der'],\n ['dtb', 'application/x-dtbook+xml'],\n ['dtd', 'application/xml-dtd'],\n ['dts', 'audio/vnd.dts'],\n ['dtshd', 'audio/vnd.dts.hd'],\n ['dump', 'application/octet-stream'],\n ['dv', 'video/x-dv'],\n ['dvi', 'application/x-dvi'],\n ['dwf', ['model/vnd.dwf', 'drawing/x-dwf']],\n ['dwg', ['application/acad', 'image/vnd.dwg', 'image/x-dwg']],\n ['dxf', ['application/dxf', 'image/vnd.dwg', 'image/vnd.dxf', 'image/x-dwg']],\n ['dxp', 'application/vnd.spotfire.dxp'],\n ['dxr', 'application/x-director'],\n ['ecelp4800', 'audio/vnd.nuera.ecelp4800'],\n ['ecelp7470', 'audio/vnd.nuera.ecelp7470'],\n ['ecelp9600', 'audio/vnd.nuera.ecelp9600'],\n ['edm', 'application/vnd.novadigm.edm'],\n ['edx', 'application/vnd.novadigm.edx'],\n ['efif', 'application/vnd.picsel'],\n ['ei6', 'application/vnd.pg.osasli'],\n ['el', 'text/x-script.elisp'],\n ['elc', ['application/x-elc', 'application/x-bytecode.elisp']],\n ['eml', 'message/rfc822'],\n ['emma', 'application/emma+xml'],\n ['env', 'application/x-envoy'],\n ['eol', 'audio/vnd.digital-winds'],\n ['eot', 'application/vnd.ms-fontobject'],\n ['eps', 'application/postscript'],\n ['epub', 'application/epub+zip'],\n ['es', ['application/ecmascript', 'application/x-esrehber']],\n ['es3', 'application/vnd.eszigno3+xml'],\n ['esf', 'application/vnd.epson.esf'],\n ['etx', 'text/x-setext'],\n ['evy', ['application/envoy', 'application/x-envoy']],\n ['exe', ['application/octet-stream', 'application/x-msdownload']],\n ['exi', 'application/exi'],\n ['ext', 'application/vnd.novadigm.ext'],\n ['ez2', 'application/vnd.ezpix-album'],\n ['ez3', 'application/vnd.ezpix-package'],\n ['f', ['text/plain', 'text/x-fortran']],\n ['f4v', 'video/x-f4v'],\n ['f77', 'text/x-fortran'],\n ['f90', ['text/plain', 'text/x-fortran']],\n ['fbs', 'image/vnd.fastbidsheet'],\n ['fcs', 'application/vnd.isac.fcs'],\n ['fdf', 'application/vnd.fdf'],\n ['fe_launch', 'application/vnd.denovo.fcselayout-link'],\n ['fg5', 'application/vnd.fujitsu.oasysgp'],\n ['fh', 'image/x-freehand'],\n ['fif', ['application/fractals', 'image/fif']],\n ['fig', 'application/x-xfig'],\n ['fli', ['video/fli', 'video/x-fli']],\n ['flo', ['image/florian', 'application/vnd.micrografx.flo']],\n ['flr', 'x-world/x-vrml'],\n ['flv', 'video/x-flv'],\n ['flw', 'application/vnd.kde.kivio'],\n ['flx', 'text/vnd.fmi.flexstor'],\n ['fly', 'text/vnd.fly'],\n ['fm', 'application/vnd.framemaker'],\n ['fmf', 'video/x-atomic3d-feature'],\n ['fnc', 'application/vnd.frogans.fnc'],\n ['for', ['text/plain', 'text/x-fortran']],\n ['fpx', ['image/vnd.fpx', 'image/vnd.net-fpx']],\n ['frl', 'application/freeloader'],\n ['fsc', 'application/vnd.fsc.weblaunch'],\n ['fst', 'image/vnd.fst'],\n ['ftc', 'application/vnd.fluxtime.clip'],\n ['fti', 'application/vnd.anser-web-funds-transfer-initiation'],\n ['funk', 'audio/make'],\n ['fvt', 'video/vnd.fvt'],\n ['fxp', 'application/vnd.adobe.fxp'],\n ['fzs', 'application/vnd.fuzzysheet'],\n ['g', 'text/plain'],\n ['g2w', 'application/vnd.geoplan'],\n ['g3', 'image/g3fax'],\n ['g3w', 'application/vnd.geospace'],\n ['gac', 'application/vnd.groove-account'],\n ['gdl', 'model/vnd.gdl'],\n ['geo', 'application/vnd.dynageo'],\n ['geojson', 'application/geo+json'],\n ['gex', 'application/vnd.geometry-explorer'],\n ['ggb', 'application/vnd.geogebra.file'],\n ['ggt', 'application/vnd.geogebra.tool'],\n ['ghf', 'application/vnd.groove-help'],\n ['gif', 'image/gif'],\n ['gim', 'application/vnd.groove-identity-message'],\n ['gl', ['video/gl', 'video/x-gl']],\n ['gmx', 'application/vnd.gmx'],\n ['gnumeric', 'application/x-gnumeric'],\n ['gph', 'application/vnd.flographit'],\n ['gqf', 'application/vnd.grafeq'],\n ['gram', 'application/srgs'],\n ['grv', 'application/vnd.groove-injector'],\n ['grxml', 'application/srgs+xml'],\n ['gsd', 'audio/x-gsm'],\n ['gsf', 'application/x-font-ghostscript'],\n ['gsm', 'audio/x-gsm'],\n ['gsp', 'application/x-gsp'],\n ['gss', 'application/x-gss'],\n ['gtar', 'application/x-gtar'],\n ['gtm', 'application/vnd.groove-tool-message'],\n ['gtw', 'model/vnd.gtw'],\n ['gv', 'text/vnd.graphviz'],\n ['gxt', 'application/vnd.geonext'],\n ['gz', ['application/x-gzip', 'application/x-compressed']],\n ['gzip', ['multipart/x-gzip', 'application/x-gzip']],\n ['h', ['text/plain', 'text/x-h']],\n ['h261', 'video/h261'],\n ['h263', 'video/h263'],\n ['h264', 'video/h264'],\n ['hal', 'application/vnd.hal+xml'],\n ['hbci', 'application/vnd.hbci'],\n ['hdf', 'application/x-hdf'],\n ['help', 'application/x-helpfile'],\n ['hgl', 'application/vnd.hp-hpgl'],\n ['hh', ['text/plain', 'text/x-h']],\n ['hlb', 'text/x-script'],\n ['hlp', ['application/winhlp', 'application/hlp', 'application/x-helpfile', 'application/x-winhelp']],\n ['hpg', 'application/vnd.hp-hpgl'],\n ['hpgl', 'application/vnd.hp-hpgl'],\n ['hpid', 'application/vnd.hp-hpid'],\n ['hps', 'application/vnd.hp-hps'],\n [\n 'hqx',\n [\n 'application/mac-binhex40',\n 'application/binhex',\n 'application/binhex4',\n 'application/mac-binhex',\n 'application/x-binhex40',\n 'application/x-mac-binhex40'\n ]\n ],\n ['hta', 'application/hta'],\n ['htc', 'text/x-component'],\n ['htke', 'application/vnd.kenameaapp'],\n ['htm', 'text/html'],\n ['html', 'text/html'],\n ['htmls', 'text/html'],\n ['htt', 'text/webviewhtml'],\n ['htx', 'text/html'],\n ['hvd', 'application/vnd.yamaha.hv-dic'],\n ['hvp', 'application/vnd.yamaha.hv-voice'],\n ['hvs', 'application/vnd.yamaha.hv-script'],\n ['i2g', 'application/vnd.intergeo'],\n ['icc', 'application/vnd.iccprofile'],\n ['ice', 'x-conference/x-cooltalk'],\n ['ico', 'image/x-icon'],\n ['ics', 'text/calendar'],\n ['idc', 'text/plain'],\n ['ief', 'image/ief'],\n ['iefs', 'image/ief'],\n ['ifm', 'application/vnd.shana.informed.formdata'],\n ['iges', ['application/iges', 'model/iges']],\n ['igl', 'application/vnd.igloader'],\n ['igm', 'application/vnd.insors.igm'],\n ['igs', ['application/iges', 'model/iges']],\n ['igx', 'application/vnd.micrografx.igx'],\n ['iif', 'application/vnd.shana.informed.interchange'],\n ['iii', 'application/x-iphone'],\n ['ima', 'application/x-ima'],\n ['imap', 'application/x-httpd-imap'],\n ['imp', 'application/vnd.accpac.simply.imp'],\n ['ims', 'application/vnd.ms-ims'],\n ['inf', 'application/inf'],\n ['ins', ['application/x-internet-signup', 'application/x-internett-signup']],\n ['ip', 'application/x-ip2'],\n ['ipfix', 'application/ipfix'],\n ['ipk', 'application/vnd.shana.informed.package'],\n ['irm', 'application/vnd.ibm.rights-management'],\n ['irp', 'application/vnd.irepository.package+xml'],\n ['isp', 'application/x-internet-signup'],\n ['isu', 'video/x-isvideo'],\n ['it', 'audio/it'],\n ['itp', 'application/vnd.shana.informed.formtemplate'],\n ['iv', 'application/x-inventor'],\n ['ivp', 'application/vnd.immervision-ivp'],\n ['ivr', 'i-world/i-vrml'],\n ['ivu', 'application/vnd.immervision-ivu'],\n ['ivy', 'application/x-livescreen'],\n ['jad', 'text/vnd.sun.j2me.app-descriptor'],\n ['jam', ['application/vnd.jam', 'audio/x-jam']],\n ['jar', 'application/java-archive'],\n ['jav', ['text/plain', 'text/x-java-source']],\n ['java', ['text/plain', 'text/x-java-source,java', 'text/x-java-source']],\n ['jcm', 'application/x-java-commerce'],\n ['jfif', ['image/pipeg', 'image/jpeg', 'image/pjpeg']],\n ['jfif-tbnl', 'image/jpeg'],\n ['jisp', 'application/vnd.jisp'],\n ['jlt', 'application/vnd.hp-jlyt'],\n ['jnlp', 'application/x-java-jnlp-file'],\n ['joda', 'application/vnd.joost.joda-archive'],\n ['jpe', ['image/jpeg', 'image/pjpeg']],\n ['jpeg', ['image/jpeg', 'image/pjpeg']],\n ['jpg', ['image/jpeg', 'image/pjpeg']],\n ['jpgv', 'video/jpeg'],\n ['jpm', 'video/jpm'],\n ['jps', 'image/x-jps'],\n ['js', ['application/javascript', 'application/ecmascript', 'text/javascript', 'text/ecmascript', 'application/x-javascript']],\n ['json', 'application/json'],\n ['jut', 'image/jutvision'],\n ['kar', ['audio/midi', 'music/x-karaoke']],\n ['karbon', 'application/vnd.kde.karbon'],\n ['kfo', 'application/vnd.kde.kformula'],\n ['kia', 'application/vnd.kidspiration'],\n ['kml', 'application/vnd.google-earth.kml+xml'],\n ['kmz', 'application/vnd.google-earth.kmz'],\n ['kne', 'application/vnd.kinar'],\n ['kon', 'application/vnd.kde.kontour'],\n ['kpr', 'application/vnd.kde.kpresenter'],\n ['ksh', ['application/x-ksh', 'text/x-script.ksh']],\n ['ksp', 'application/vnd.kde.kspread'],\n ['ktx', 'image/ktx'],\n ['ktz', 'application/vnd.kahootz'],\n ['kwd', 'application/vnd.kde.kword'],\n ['la', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['lam', 'audio/x-liveaudio'],\n ['lasxml', 'application/vnd.las.las+xml'],\n ['latex', 'application/x-latex'],\n ['lbd', 'application/vnd.llamagraphics.life-balance.desktop'],\n ['lbe', 'application/vnd.llamagraphics.life-balance.exchange+xml'],\n ['les', 'application/vnd.hhe.lesson-player'],\n ['lha', ['application/octet-stream', 'application/lha', 'application/x-lha']],\n ['lhx', 'application/octet-stream'],\n ['link66', 'application/vnd.route66.link66+xml'],\n ['list', 'text/plain'],\n ['lma', ['audio/nspaudio', 'audio/x-nspaudio']],\n ['log', 'text/plain'],\n ['lrm', 'application/vnd.ms-lrm'],\n ['lsf', 'video/x-la-asf'],\n ['lsp', ['application/x-lisp', 'text/x-script.lisp']],\n ['lst', 'text/plain'],\n ['lsx', ['video/x-la-asf', 'text/x-la-asf']],\n ['ltf', 'application/vnd.frogans.ltf'],\n ['ltx', 'application/x-latex'],\n ['lvp', 'audio/vnd.lucent.voice'],\n ['lwp', 'application/vnd.lotus-wordpro'],\n ['lzh', ['application/octet-stream', 'application/x-lzh']],\n ['lzx', ['application/lzx', 'application/octet-stream', 'application/x-lzx']],\n ['m', ['text/plain', 'text/x-m']],\n ['m13', 'application/x-msmediaview'],\n ['m14', 'application/x-msmediaview'],\n ['m1v', 'video/mpeg'],\n ['m21', 'application/mp21'],\n ['m2a', 'audio/mpeg'],\n ['m2v', 'video/mpeg'],\n ['m3u', ['audio/x-mpegurl', 'audio/x-mpequrl']],\n ['m3u8', 'application/vnd.apple.mpegurl'],\n ['m4v', 'video/x-m4v'],\n ['ma', 'application/mathematica'],\n ['mads', 'application/mads+xml'],\n ['mag', 'application/vnd.ecowin.chart'],\n ['man', 'application/x-troff-man'],\n ['map', 'application/x-navimap'],\n ['mar', 'text/plain'],\n ['mathml', 'application/mathml+xml'],\n ['mbd', 'application/mbedlet'],\n ['mbk', 'application/vnd.mobius.mbk'],\n ['mbox', 'application/mbox'],\n ['mc$', 'application/x-magic-cap-package-1.0'],\n ['mc1', 'application/vnd.medcalcdata'],\n ['mcd', ['application/mcad', 'application/vnd.mcd', 'application/x-mathcad']],\n ['mcf', ['image/vasa', 'text/mcf']],\n ['mcp', 'application/netmc'],\n ['mcurl', 'text/vnd.curl.mcurl'],\n ['mdb', 'application/x-msaccess'],\n ['mdi', 'image/vnd.ms-modi'],\n ['me', 'application/x-troff-me'],\n ['meta4', 'application/metalink4+xml'],\n ['mets', 'application/mets+xml'],\n ['mfm', 'application/vnd.mfmp'],\n ['mgp', 'application/vnd.osgeo.mapguide.package'],\n ['mgz', 'application/vnd.proteus.magazine'],\n ['mht', 'message/rfc822'],\n ['mhtml', 'message/rfc822'],\n ['mid', ['audio/mid', 'audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['midi', ['audio/midi', 'music/crescendo', 'x-music/x-midi', 'audio/x-midi', 'application/x-midi', 'audio/x-mid']],\n ['mif', ['application/vnd.mif', 'application/x-mif', 'application/x-frame']],\n ['mime', ['message/rfc822', 'www/mime']],\n ['mj2', 'video/mj2'],\n ['mjf', 'audio/x-vnd.audioexplosion.mjuicemediafile'],\n ['mjpg', 'video/x-motion-jpeg'],\n ['mlp', 'application/vnd.dolby.mlp'],\n ['mm', ['application/base64', 'application/x-meme']],\n ['mmd', 'application/vnd.chipnuts.karaoke-mmd'],\n ['mme', 'application/base64'],\n ['mmf', 'application/vnd.smaf'],\n ['mmr', 'image/vnd.fujixerox.edmics-mmr'],\n ['mny', 'application/x-msmoney'],\n ['mod', ['audio/mod', 'audio/x-mod']],\n ['mods', 'application/mods+xml'],\n ['moov', 'video/quicktime'],\n ['mov', 'video/quicktime'],\n ['movie', 'video/x-sgi-movie'],\n ['mp2', ['video/mpeg', 'audio/mpeg', 'video/x-mpeg', 'audio/x-mpeg', 'video/x-mpeq2a']],\n ['mp3', ['audio/mpeg', 'audio/mpeg3', 'video/mpeg', 'audio/x-mpeg-3', 'video/x-mpeg']],\n ['mp4', ['video/mp4', 'application/mp4']],\n ['mp4a', 'audio/mp4'],\n ['mpa', ['video/mpeg', 'audio/mpeg']],\n ['mpc', ['application/vnd.mophun.certificate', 'application/x-project']],\n ['mpe', 'video/mpeg'],\n ['mpeg', 'video/mpeg'],\n ['mpg', ['video/mpeg', 'audio/mpeg']],\n ['mpga', 'audio/mpeg'],\n ['mpkg', 'application/vnd.apple.installer+xml'],\n ['mpm', 'application/vnd.blueice.multipass'],\n ['mpn', 'application/vnd.mophun.application'],\n ['mpp', 'application/vnd.ms-project'],\n ['mpt', 'application/x-project'],\n ['mpv', 'application/x-project'],\n ['mpv2', 'video/mpeg'],\n ['mpx', 'application/x-project'],\n ['mpy', 'application/vnd.ibm.minipay'],\n ['mqy', 'application/vnd.mobius.mqy'],\n ['mrc', 'application/marc'],\n ['mrcx', 'application/marcxml+xml'],\n ['ms', 'application/x-troff-ms'],\n ['mscml', 'application/mediaservercontrol+xml'],\n ['mseq', 'application/vnd.mseq'],\n ['msf', 'application/vnd.epson.msf'],\n ['msg', 'application/vnd.ms-outlook'],\n ['msh', 'model/mesh'],\n ['msl', 'application/vnd.mobius.msl'],\n ['msty', 'application/vnd.muvee.style'],\n ['mts', 'model/vnd.mts'],\n ['mus', 'application/vnd.musician'],\n ['musicxml', 'application/vnd.recordare.musicxml+xml'],\n ['mv', 'video/x-sgi-movie'],\n ['mvb', 'application/x-msmediaview'],\n ['mwf', 'application/vnd.mfer'],\n ['mxf', 'application/mxf'],\n ['mxl', 'application/vnd.recordare.musicxml'],\n ['mxml', 'application/xv+xml'],\n ['mxs', 'application/vnd.triscape.mxs'],\n ['mxu', 'video/vnd.mpegurl'],\n ['my', 'audio/make'],\n ['mzz', 'application/x-vnd.audioexplosion.mzz'],\n ['n-gage', 'application/vnd.nokia.n-gage.symbian.install'],\n ['n3', 'text/n3'],\n ['nap', 'image/naplps'],\n ['naplps', 'image/naplps'],\n ['nbp', 'application/vnd.wolfram.player'],\n ['nc', 'application/x-netcdf'],\n ['ncm', 'application/vnd.nokia.configuration-message'],\n ['ncx', 'application/x-dtbncx+xml'],\n ['ngdat', 'application/vnd.nokia.n-gage.data'],\n ['nif', 'image/x-niff'],\n ['niff', 'image/x-niff'],\n ['nix', 'application/x-mix-transfer'],\n ['nlu', 'application/vnd.neurolanguage.nlu'],\n ['nml', 'application/vnd.enliven'],\n ['nnd', 'application/vnd.noblenet-directory'],\n ['nns', 'application/vnd.noblenet-sealer'],\n ['nnw', 'application/vnd.noblenet-web'],\n ['npx', 'image/vnd.net-fpx'],\n ['nsc', 'application/x-conference'],\n ['nsf', 'application/vnd.lotus-notes'],\n ['nvd', 'application/x-navidoc'],\n ['nws', 'message/rfc822'],\n ['o', 'application/octet-stream'],\n ['oa2', 'application/vnd.fujitsu.oasys2'],\n ['oa3', 'application/vnd.fujitsu.oasys3'],\n ['oas', 'application/vnd.fujitsu.oasys'],\n ['obd', 'application/x-msbinder'],\n ['oda', 'application/oda'],\n ['odb', 'application/vnd.oasis.opendocument.database'],\n ['odc', 'application/vnd.oasis.opendocument.chart'],\n ['odf', 'application/vnd.oasis.opendocument.formula'],\n ['odft', 'application/vnd.oasis.opendocument.formula-template'],\n ['odg', 'application/vnd.oasis.opendocument.graphics'],\n ['odi', 'application/vnd.oasis.opendocument.image'],\n ['odm', 'application/vnd.oasis.opendocument.text-master'],\n ['odp', 'application/vnd.oasis.opendocument.presentation'],\n ['ods', 'application/vnd.oasis.opendocument.spreadsheet'],\n ['odt', 'application/vnd.oasis.opendocument.text'],\n ['oga', 'audio/ogg'],\n ['ogv', 'video/ogg'],\n ['ogx', 'application/ogg'],\n ['omc', 'application/x-omc'],\n ['omcd', 'application/x-omcdatamaker'],\n ['omcr', 'application/x-omcregerator'],\n ['onetoc', 'application/onenote'],\n ['opf', 'application/oebps-package+xml'],\n ['org', 'application/vnd.lotus-organizer'],\n ['osf', 'application/vnd.yamaha.openscoreformat'],\n ['osfpvg', 'application/vnd.yamaha.openscoreformat.osfpvg+xml'],\n ['otc', 'application/vnd.oasis.opendocument.chart-template'],\n ['otf', 'application/x-font-otf'],\n ['otg', 'application/vnd.oasis.opendocument.graphics-template'],\n ['oth', 'application/vnd.oasis.opendocument.text-web'],\n ['oti', 'application/vnd.oasis.opendocument.image-template'],\n ['otp', 'application/vnd.oasis.opendocument.presentation-template'],\n ['ots', 'application/vnd.oasis.opendocument.spreadsheet-template'],\n ['ott', 'application/vnd.oasis.opendocument.text-template'],\n ['oxt', 'application/vnd.openofficeorg.extension'],\n ['p', 'text/x-pascal'],\n ['p10', ['application/pkcs10', 'application/x-pkcs10']],\n ['p12', ['application/pkcs-12', 'application/x-pkcs12']],\n ['p7a', 'application/x-pkcs7-signature'],\n ['p7b', 'application/x-pkcs7-certificates'],\n ['p7c', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7m', ['application/pkcs7-mime', 'application/x-pkcs7-mime']],\n ['p7r', 'application/x-pkcs7-certreqresp'],\n ['p7s', ['application/pkcs7-signature', 'application/x-pkcs7-signature']],\n ['p8', 'application/pkcs8'],\n ['par', 'text/plain-bas'],\n ['part', 'application/pro_eng'],\n ['pas', 'text/pascal'],\n ['paw', 'application/vnd.pawaafile'],\n ['pbd', 'application/vnd.powerbuilder6'],\n ['pbm', 'image/x-portable-bitmap'],\n ['pcf', 'application/x-font-pcf'],\n ['pcl', ['application/vnd.hp-pcl', 'application/x-pcl']],\n ['pclxl', 'application/vnd.hp-pclxl'],\n ['pct', 'image/x-pict'],\n ['pcurl', 'application/vnd.curl.pcurl'],\n ['pcx', 'image/x-pcx'],\n ['pdb', ['application/vnd.palm', 'chemical/x-pdb']],\n ['pdf', 'application/pdf'],\n ['pfa', 'application/x-font-type1'],\n ['pfr', 'application/font-tdpfr'],\n ['pfunk', ['audio/make', 'audio/make.my.funk']],\n ['pfx', 'application/x-pkcs12'],\n ['pgm', ['image/x-portable-graymap', 'image/x-portable-greymap']],\n ['pgn', 'application/x-chess-pgn'],\n ['pgp', 'application/pgp-signature'],\n ['pic', ['image/pict', 'image/x-pict']],\n ['pict', 'image/pict'],\n ['pkg', 'application/x-newton-compatible-pkg'],\n ['pki', 'application/pkixcmp'],\n ['pkipath', 'application/pkix-pkipath'],\n ['pko', ['application/ynd.ms-pkipko', 'application/vnd.ms-pki.pko']],\n ['pl', ['text/plain', 'text/x-script.perl']],\n ['plb', 'application/vnd.3gpp.pic-bw-large'],\n ['plc', 'application/vnd.mobius.plc'],\n ['plf', 'application/vnd.pocketlearn'],\n ['pls', 'application/pls+xml'],\n ['plx', 'application/x-pixclscript'],\n ['pm', ['text/x-script.perl-module', 'image/x-xpixmap']],\n ['pm4', 'application/x-pagemaker'],\n ['pm5', 'application/x-pagemaker'],\n ['pma', 'application/x-perfmon'],\n ['pmc', 'application/x-perfmon'],\n ['pml', ['application/vnd.ctc-posml', 'application/x-perfmon']],\n ['pmr', 'application/x-perfmon'],\n ['pmw', 'application/x-perfmon'],\n ['png', 'image/png'],\n ['pnm', ['application/x-portable-anymap', 'image/x-portable-anymap']],\n ['portpkg', 'application/vnd.macports.portpkg'],\n ['pot', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['potm', 'application/vnd.ms-powerpoint.template.macroenabled.12'],\n ['potx', 'application/vnd.openxmlformats-officedocument.presentationml.template'],\n ['pov', 'model/x-pov'],\n ['ppa', 'application/vnd.ms-powerpoint'],\n ['ppam', 'application/vnd.ms-powerpoint.addin.macroenabled.12'],\n ['ppd', 'application/vnd.cups-ppd'],\n ['ppm', 'image/x-portable-pixmap'],\n ['pps', ['application/vnd.ms-powerpoint', 'application/mspowerpoint']],\n ['ppsm', 'application/vnd.ms-powerpoint.slideshow.macroenabled.12'],\n ['ppsx', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow'],\n ['ppt', ['application/vnd.ms-powerpoint', 'application/mspowerpoint', 'application/powerpoint', 'application/x-mspowerpoint']],\n ['pptm', 'application/vnd.ms-powerpoint.presentation.macroenabled.12'],\n ['pptx', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'],\n ['ppz', 'application/mspowerpoint'],\n ['prc', 'application/x-mobipocket-ebook'],\n ['pre', ['application/vnd.lotus-freelance', 'application/x-freelance']],\n ['prf', 'application/pics-rules'],\n ['prt', 'application/pro_eng'],\n ['ps', 'application/postscript'],\n ['psb', 'application/vnd.3gpp.pic-bw-small'],\n ['psd', ['application/octet-stream', 'image/vnd.adobe.photoshop']],\n ['psf', 'application/x-font-linux-psf'],\n ['pskcxml', 'application/pskc+xml'],\n ['ptid', 'application/vnd.pvi.ptid1'],\n ['pub', 'application/x-mspublisher'],\n ['pvb', 'application/vnd.3gpp.pic-bw-var'],\n ['pvu', 'paleovu/x-pv'],\n ['pwn', 'application/vnd.3m.post-it-notes'],\n ['pwz', 'application/vnd.ms-powerpoint'],\n ['py', 'text/x-script.phyton'],\n ['pya', 'audio/vnd.ms-playready.media.pya'],\n ['pyc', 'application/x-bytecode.python'],\n ['pyv', 'video/vnd.ms-playready.media.pyv'],\n ['qam', 'application/vnd.epson.quickanime'],\n ['qbo', 'application/vnd.intu.qbo'],\n ['qcp', 'audio/vnd.qcelp'],\n ['qd3', 'x-world/x-3dmf'],\n ['qd3d', 'x-world/x-3dmf'],\n ['qfx', 'application/vnd.intu.qfx'],\n ['qif', 'image/x-quicktime'],\n ['qps', 'application/vnd.publishare-delta-tree'],\n ['qt', 'video/quicktime'],\n ['qtc', 'video/x-qtc'],\n ['qti', 'image/x-quicktime'],\n ['qtif', 'image/x-quicktime'],\n ['qxd', 'application/vnd.quark.quarkxpress'],\n ['ra', ['audio/x-realaudio', 'audio/x-pn-realaudio', 'audio/x-pn-realaudio-plugin']],\n ['ram', 'audio/x-pn-realaudio'],\n ['rar', 'application/x-rar-compressed'],\n ['ras', ['image/cmu-raster', 'application/x-cmu-raster', 'image/x-cmu-raster']],\n ['rast', 'image/cmu-raster'],\n ['rcprofile', 'application/vnd.ipunplugged.rcprofile'],\n ['rdf', 'application/rdf+xml'],\n ['rdz', 'application/vnd.data-vision.rdz'],\n ['rep', 'application/vnd.businessobjects'],\n ['res', 'application/x-dtbresource+xml'],\n ['rexx', 'text/x-script.rexx'],\n ['rf', 'image/vnd.rn-realflash'],\n ['rgb', 'image/x-rgb'],\n ['rif', 'application/reginfo+xml'],\n ['rip', 'audio/vnd.rip'],\n ['rl', 'application/resource-lists+xml'],\n ['rlc', 'image/vnd.fujixerox.edmics-rlc'],\n ['rld', 'application/resource-lists-diff+xml'],\n ['rm', ['application/vnd.rn-realmedia', 'audio/x-pn-realaudio']],\n ['rmi', 'audio/mid'],\n ['rmm', 'audio/x-pn-realaudio'],\n ['rmp', ['audio/x-pn-realaudio-plugin', 'audio/x-pn-realaudio']],\n ['rms', 'application/vnd.jcp.javame.midlet-rms'],\n ['rnc', 'application/relax-ng-compact-syntax'],\n ['rng', ['application/ringing-tones', 'application/vnd.nokia.ringing-tone']],\n ['rnx', 'application/vnd.rn-realplayer'],\n ['roff', 'application/x-troff'],\n ['rp', 'image/vnd.rn-realpix'],\n ['rp9', 'application/vnd.cloanto.rp9'],\n ['rpm', 'audio/x-pn-realaudio-plugin'],\n ['rpss', 'application/vnd.nokia.radio-presets'],\n ['rpst', 'application/vnd.nokia.radio-preset'],\n ['rq', 'application/sparql-query'],\n ['rs', 'application/rls-services+xml'],\n ['rsd', 'application/rsd+xml'],\n ['rt', ['text/richtext', 'text/vnd.rn-realtext']],\n ['rtf', ['application/rtf', 'text/richtext', 'application/x-rtf']],\n ['rtx', ['text/richtext', 'application/rtf']],\n ['rv', 'video/vnd.rn-realvideo'],\n ['s', 'text/x-asm'],\n ['s3m', 'audio/s3m'],\n ['saf', 'application/vnd.yamaha.smaf-audio'],\n ['saveme', 'application/octet-stream'],\n ['sbk', 'application/x-tbook'],\n ['sbml', 'application/sbml+xml'],\n ['sc', 'application/vnd.ibm.secure-container'],\n ['scd', 'application/x-msschedule'],\n ['scm', ['application/vnd.lotus-screencam', 'video/x-scm', 'text/x-script.guile', 'application/x-lotusscreencam', 'text/x-script.scheme']],\n ['scq', 'application/scvp-cv-request'],\n ['scs', 'application/scvp-cv-response'],\n ['sct', 'text/scriptlet'],\n ['scurl', 'text/vnd.curl.scurl'],\n ['sda', 'application/vnd.stardivision.draw'],\n ['sdc', 'application/vnd.stardivision.calc'],\n ['sdd', 'application/vnd.stardivision.impress'],\n ['sdkm', 'application/vnd.solent.sdkm+xml'],\n ['sdml', 'text/plain'],\n ['sdp', ['application/sdp', 'application/x-sdp']],\n ['sdr', 'application/sounder'],\n ['sdw', 'application/vnd.stardivision.writer'],\n ['sea', ['application/sea', 'application/x-sea']],\n ['see', 'application/vnd.seemail'],\n ['seed', 'application/vnd.fdsn.seed'],\n ['sema', 'application/vnd.sema'],\n ['semd', 'application/vnd.semd'],\n ['semf', 'application/vnd.semf'],\n ['ser', 'application/java-serialized-object'],\n ['set', 'application/set'],\n ['setpay', 'application/set-payment-initiation'],\n ['setreg', 'application/set-registration-initiation'],\n ['sfd-hdstx', 'application/vnd.hydrostatix.sof-data'],\n ['sfs', 'application/vnd.spotfire.sfs'],\n ['sgl', 'application/vnd.stardivision.writer-global'],\n ['sgm', ['text/sgml', 'text/x-sgml']],\n ['sgml', ['text/sgml', 'text/x-sgml']],\n ['sh', ['application/x-shar', 'application/x-bsh', 'application/x-sh', 'text/x-script.sh']],\n ['shar', ['application/x-bsh', 'application/x-shar']],\n ['shf', 'application/shf+xml'],\n ['shtml', ['text/html', 'text/x-server-parsed-html']],\n ['sid', 'audio/x-psid'],\n ['sis', 'application/vnd.symbian.install'],\n ['sit', ['application/x-stuffit', 'application/x-sit']],\n ['sitx', 'application/x-stuffitx'],\n ['skd', 'application/x-koan'],\n ['skm', 'application/x-koan'],\n ['skp', ['application/vnd.koan', 'application/x-koan']],\n ['skt', 'application/x-koan'],\n ['sl', 'application/x-seelogo'],\n ['sldm', 'application/vnd.ms-powerpoint.slide.macroenabled.12'],\n ['sldx', 'application/vnd.openxmlformats-officedocument.presentationml.slide'],\n ['slt', 'application/vnd.epson.salt'],\n ['sm', 'application/vnd.stepmania.stepchart'],\n ['smf', 'application/vnd.stardivision.math'],\n ['smi', ['application/smil', 'application/smil+xml']],\n ['smil', 'application/smil'],\n ['snd', ['audio/basic', 'audio/x-adpcm']],\n ['snf', 'application/x-font-snf'],\n ['sol', 'application/solids'],\n ['spc', ['text/x-speech', 'application/x-pkcs7-certificates']],\n ['spf', 'application/vnd.yamaha.smaf-phrase'],\n ['spl', ['application/futuresplash', 'application/x-futuresplash']],\n ['spot', 'text/vnd.in3d.spot'],\n ['spp', 'application/scvp-vp-response'],\n ['spq', 'application/scvp-vp-request'],\n ['spr', 'application/x-sprite'],\n ['sprite', 'application/x-sprite'],\n ['src', 'application/x-wais-source'],\n ['sru', 'application/sru+xml'],\n ['srx', 'application/sparql-results+xml'],\n ['sse', 'application/vnd.kodak-descriptor'],\n ['ssf', 'application/vnd.epson.ssf'],\n ['ssi', 'text/x-server-parsed-html'],\n ['ssm', 'application/streamingmedia'],\n ['ssml', 'application/ssml+xml'],\n ['sst', ['application/vnd.ms-pkicertstore', 'application/vnd.ms-pki.certstore']],\n ['st', 'application/vnd.sailingtracker.track'],\n ['stc', 'application/vnd.sun.xml.calc.template'],\n ['std', 'application/vnd.sun.xml.draw.template'],\n ['step', 'application/step'],\n ['stf', 'application/vnd.wt.stf'],\n ['sti', 'application/vnd.sun.xml.impress.template'],\n ['stk', 'application/hyperstudio'],\n ['stl', ['application/vnd.ms-pkistl', 'application/sla', 'application/vnd.ms-pki.stl', 'application/x-navistyle']],\n ['stm', 'text/html'],\n ['stp', 'application/step'],\n ['str', 'application/vnd.pg.format'],\n ['stw', 'application/vnd.sun.xml.writer.template'],\n ['sub', 'image/vnd.dvb.subtitle'],\n ['sus', 'application/vnd.sus-calendar'],\n ['sv4cpio', 'application/x-sv4cpio'],\n ['sv4crc', 'application/x-sv4crc'],\n ['svc', 'application/vnd.dvb.service'],\n ['svd', 'application/vnd.svd'],\n ['svf', ['image/vnd.dwg', 'image/x-dwg']],\n ['svg', 'image/svg+xml'],\n ['svr', ['x-world/x-svr', 'application/x-world']],\n ['swf', 'application/x-shockwave-flash'],\n ['swi', 'application/vnd.aristanetworks.swi'],\n ['sxc', 'application/vnd.sun.xml.calc'],\n ['sxd', 'application/vnd.sun.xml.draw'],\n ['sxg', 'application/vnd.sun.xml.writer.global'],\n ['sxi', 'application/vnd.sun.xml.impress'],\n ['sxm', 'application/vnd.sun.xml.math'],\n ['sxw', 'application/vnd.sun.xml.writer'],\n ['t', ['text/troff', 'application/x-troff']],\n ['talk', 'text/x-speech'],\n ['tao', 'application/vnd.tao.intent-module-archive'],\n ['tar', 'application/x-tar'],\n ['tbk', ['application/toolbook', 'application/x-tbook']],\n ['tcap', 'application/vnd.3gpp2.tcap'],\n ['tcl', ['text/x-script.tcl', 'application/x-tcl']],\n ['tcsh', 'text/x-script.tcsh'],\n ['teacher', 'application/vnd.smart.teacher'],\n ['tei', 'application/tei+xml'],\n ['tex', 'application/x-tex'],\n ['texi', 'application/x-texinfo'],\n ['texinfo', 'application/x-texinfo'],\n ['text', ['application/plain', 'text/plain']],\n ['tfi', 'application/thraud+xml'],\n ['tfm', 'application/x-tex-tfm'],\n ['tgz', ['application/gnutar', 'application/x-compressed']],\n ['thmx', 'application/vnd.ms-officetheme'],\n ['tif', ['image/tiff', 'image/x-tiff']],\n ['tiff', ['image/tiff', 'image/x-tiff']],\n ['tmo', 'application/vnd.tmobile-livetv'],\n ['torrent', 'application/x-bittorrent'],\n ['tpl', 'application/vnd.groove-tool-template'],\n ['tpt', 'application/vnd.trid.tpt'],\n ['tr', 'application/x-troff'],\n ['tra', 'application/vnd.trueapp'],\n ['trm', 'application/x-msterminal'],\n ['tsd', 'application/timestamped-data'],\n ['tsi', 'audio/tsp-audio'],\n ['tsp', ['application/dsptype', 'audio/tsplayer']],\n ['tsv', 'text/tab-separated-values'],\n ['ttf', 'application/x-font-ttf'],\n ['ttl', 'text/turtle'],\n ['turbot', 'image/florian'],\n ['twd', 'application/vnd.simtech-mindmapper'],\n ['txd', 'application/vnd.genomatix.tuxedo'],\n ['txf', 'application/vnd.mobius.txf'],\n ['txt', 'text/plain'],\n ['ufd', 'application/vnd.ufdl'],\n ['uil', 'text/x-uil'],\n ['uls', 'text/iuls'],\n ['umj', 'application/vnd.umajin'],\n ['uni', 'text/uri-list'],\n ['unis', 'text/uri-list'],\n ['unityweb', 'application/vnd.unity'],\n ['unv', 'application/i-deas'],\n ['uoml', 'application/vnd.uoml+xml'],\n ['uri', 'text/uri-list'],\n ['uris', 'text/uri-list'],\n ['ustar', ['application/x-ustar', 'multipart/x-ustar']],\n ['utz', 'application/vnd.uiq.theme'],\n ['uu', ['application/octet-stream', 'text/x-uuencode']],\n ['uue', 'text/x-uuencode'],\n ['uva', 'audio/vnd.dece.audio'],\n ['uvh', 'video/vnd.dece.hd'],\n ['uvi', 'image/vnd.dece.graphic'],\n ['uvm', 'video/vnd.dece.mobile'],\n ['uvp', 'video/vnd.dece.pd'],\n ['uvs', 'video/vnd.dece.sd'],\n ['uvu', 'video/vnd.uvvu.mp4'],\n ['uvv', 'video/vnd.dece.video'],\n ['vcd', 'application/x-cdlink'],\n ['vcf', 'text/x-vcard'],\n ['vcg', 'application/vnd.groove-vcard'],\n ['vcs', 'text/x-vcalendar'],\n ['vcx', 'application/vnd.vcx'],\n ['vda', 'application/vda'],\n ['vdo', 'video/vdo'],\n ['vew', 'application/groupwise'],\n ['vis', 'application/vnd.visionary'],\n ['viv', ['video/vivo', 'video/vnd.vivo']],\n ['vivo', ['video/vivo', 'video/vnd.vivo']],\n ['vmd', 'application/vocaltec-media-desc'],\n ['vmf', 'application/vocaltec-media-file'],\n ['voc', ['audio/voc', 'audio/x-voc']],\n ['vos', 'video/vosaic'],\n ['vox', 'audio/voxware'],\n ['vqe', 'audio/x-twinvq-plugin'],\n ['vqf', 'audio/x-twinvq'],\n ['vql', 'audio/x-twinvq-plugin'],\n ['vrml', ['model/vrml', 'x-world/x-vrml', 'application/x-vrml']],\n ['vrt', 'x-world/x-vrt'],\n ['vsd', ['application/vnd.visio', 'application/x-visio']],\n ['vsf', 'application/vnd.vsf'],\n ['vst', 'application/x-visio'],\n ['vsw', 'application/x-visio'],\n ['vtu', 'model/vnd.vtu'],\n ['vxml', 'application/voicexml+xml'],\n ['w60', 'application/wordperfect6.0'],\n ['w61', 'application/wordperfect6.1'],\n ['w6w', 'application/msword'],\n ['wad', 'application/x-doom'],\n ['wav', ['audio/wav', 'audio/x-wav']],\n ['wax', 'audio/x-ms-wax'],\n ['wb1', 'application/x-qpro'],\n ['wbmp', 'image/vnd.wap.wbmp'],\n ['wbs', 'application/vnd.criticaltools.wbs+xml'],\n ['wbxml', 'application/vnd.wap.wbxml'],\n ['wcm', 'application/vnd.ms-works'],\n ['wdb', 'application/vnd.ms-works'],\n ['web', 'application/vnd.xara'],\n ['weba', 'audio/webm'],\n ['webm', 'video/webm'],\n ['webp', 'image/webp'],\n ['wg', 'application/vnd.pmi.widget'],\n ['wgt', 'application/widget'],\n ['wiz', 'application/msword'],\n ['wk1', 'application/x-123'],\n ['wks', 'application/vnd.ms-works'],\n ['wm', 'video/x-ms-wm'],\n ['wma', 'audio/x-ms-wma'],\n ['wmd', 'application/x-ms-wmd'],\n ['wmf', ['windows/metafile', 'application/x-msmetafile']],\n ['wml', 'text/vnd.wap.wml'],\n ['wmlc', 'application/vnd.wap.wmlc'],\n ['wmls', 'text/vnd.wap.wmlscript'],\n ['wmlsc', 'application/vnd.wap.wmlscriptc'],\n ['wmv', 'video/x-ms-wmv'],\n ['wmx', 'video/x-ms-wmx'],\n ['wmz', 'application/x-ms-wmz'],\n ['woff', 'application/x-font-woff'],\n ['word', 'application/msword'],\n ['wp', 'application/wordperfect'],\n ['wp5', ['application/wordperfect', 'application/wordperfect6.0']],\n ['wp6', 'application/wordperfect'],\n ['wpd', ['application/wordperfect', 'application/vnd.wordperfect', 'application/x-wpwin']],\n ['wpl', 'application/vnd.ms-wpl'],\n ['wps', 'application/vnd.ms-works'],\n ['wq1', 'application/x-lotus'],\n ['wqd', 'application/vnd.wqd'],\n ['wri', ['application/mswrite', 'application/x-wri', 'application/x-mswrite']],\n ['wrl', ['model/vrml', 'x-world/x-vrml', 'application/x-world']],\n ['wrz', ['model/vrml', 'x-world/x-vrml']],\n ['wsc', 'text/scriplet'],\n ['wsdl', 'application/wsdl+xml'],\n ['wspolicy', 'application/wspolicy+xml'],\n ['wsrc', 'application/x-wais-source'],\n ['wtb', 'application/vnd.webturbo'],\n ['wtk', 'application/x-wintalk'],\n ['wvx', 'video/x-ms-wvx'],\n ['x-png', 'image/png'],\n ['x3d', 'application/vnd.hzn-3d-crossword'],\n ['xaf', 'x-world/x-vrml'],\n ['xap', 'application/x-silverlight-app'],\n ['xar', 'application/vnd.xara'],\n ['xbap', 'application/x-ms-xbap'],\n ['xbd', 'application/vnd.fujixerox.docuworks.binder'],\n ['xbm', ['image/xbm', 'image/x-xbm', 'image/x-xbitmap']],\n ['xdf', 'application/xcap-diff+xml'],\n ['xdm', 'application/vnd.syncml.dm+xml'],\n ['xdp', 'application/vnd.adobe.xdp+xml'],\n ['xdr', 'video/x-amt-demorun'],\n ['xdssc', 'application/dssc+xml'],\n ['xdw', 'application/vnd.fujixerox.docuworks'],\n ['xenc', 'application/xenc+xml'],\n ['xer', 'application/patch-ops-error+xml'],\n ['xfdf', 'application/vnd.adobe.xfdf'],\n ['xfdl', 'application/vnd.xfdl'],\n ['xgz', 'xgl/drawing'],\n ['xhtml', 'application/xhtml+xml'],\n ['xif', 'image/vnd.xiff'],\n ['xl', 'application/excel'],\n ['xla', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlam', 'application/vnd.ms-excel.addin.macroenabled.12'],\n ['xlb', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlc', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xld', ['application/excel', 'application/x-excel']],\n ['xlk', ['application/excel', 'application/x-excel']],\n ['xll', ['application/excel', 'application/vnd.ms-excel', 'application/x-excel']],\n ['xlm', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xls', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xlsb', 'application/vnd.ms-excel.sheet.binary.macroenabled.12'],\n ['xlsm', 'application/vnd.ms-excel.sheet.macroenabled.12'],\n ['xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'],\n ['xlt', ['application/vnd.ms-excel', 'application/excel', 'application/x-excel']],\n ['xltm', 'application/vnd.ms-excel.template.macroenabled.12'],\n ['xltx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'],\n ['xlv', ['application/excel', 'application/x-excel']],\n ['xlw', ['application/vnd.ms-excel', 'application/excel', 'application/x-msexcel', 'application/x-excel']],\n ['xm', 'audio/xm'],\n ['xml', ['application/xml', 'text/xml', 'application/atom+xml', 'application/rss+xml']],\n ['xmz', 'xgl/movie'],\n ['xo', 'application/vnd.olpc-sugar'],\n ['xof', 'x-world/x-vrml'],\n ['xop', 'application/xop+xml'],\n ['xpi', 'application/x-xpinstall'],\n ['xpix', 'application/x-vnd.ls-xpix'],\n ['xpm', ['image/xpm', 'image/x-xpixmap']],\n ['xpr', 'application/vnd.is-xpr'],\n ['xps', 'application/vnd.ms-xpsdocument'],\n ['xpw', 'application/vnd.intercon.formnet'],\n ['xslt', 'application/xslt+xml'],\n ['xsm', 'application/vnd.syncml+xml'],\n ['xspf', 'application/xspf+xml'],\n ['xsr', 'video/x-amt-showrun'],\n ['xul', 'application/vnd.mozilla.xul+xml'],\n ['xwd', ['image/x-xwd', 'image/x-xwindowdump']],\n ['xyz', ['chemical/x-xyz', 'chemical/x-pdb']],\n ['yang', 'application/yang'],\n ['yin', 'application/yin+xml'],\n ['z', ['application/x-compressed', 'application/x-compress']],\n ['zaz', 'application/vnd.zzazz.deck+xml'],\n ['zip', ['application/zip', 'multipart/x-zip', 'application/x-zip-compressed', 'application/x-compressed']],\n ['zir', 'application/vnd.zul'],\n ['zmm', 'application/vnd.handheld-entertainment+xml'],\n ['zoo', 'application/octet-stream'],\n ['zsh', 'text/x-script.zsh']\n]);\nexport function detectMimeType(filename) {\n if (!filename) {\n return defaultMimeType;\n }\n const parsed = path.parse(filename);\n const extension = (parsed.ext.substr(1) || parsed.name || '').split('?').shift().trim().toLowerCase();\n const value = extensions.has(extension) ? extensions.get(extension) : defaultMimeType;\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n}\nexport function detectExtension(mimeType) {\n if (!mimeType) {\n return defaultExtension;\n }\n const parts = mimeType.toLowerCase().trim().split('/');\n const rootType = parts.shift().trim();\n const subType = parts.join('/').trim();\n if (mimeTypes.has(rootType + '/' + subType)) {\n const value = mimeTypes.get(rootType + '/' + subType);\n if (Array.isArray(value)) {\n return value[0];\n }\n return value;\n }\n switch (rootType) {\n case 'text':\n return 'txt';\n default:\n return 'bin';\n }\n}\n","/* eslint no-undefined: 0, prefer-spread: 0, no-control-regex: 0 */\nimport crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport { PassThrough, finished, pipeline } from 'node:stream';\nimport * as shared from '../shared/index.js';\nimport * as mimeFuncs from '../mime-funcs/index.js';\nimport * as qp from '../qp/index.js';\nimport * as base64 from '../base64/index.js';\nimport addressparser from '../addressparser/index.js';\nimport nmfetch from '../fetch/index.js';\nimport * as errors from '../errors.js';\nimport LastNewline from './last-newline.js';\nimport LeWindows from './le-windows.js';\nimport LeUnix from './le-unix.js';\nconst FORMATTED_HEADERS = ['From', 'Sender', 'To', 'Cc', 'Bcc', 'Reply-To', 'Date', 'References'];\n// RFC 5321 atext, plus the non-ascii bytes that SMTPUTF8 (RFC 6531) adds to it. A local part\n// built from these, with '.' as a separator, is a dot-atom and can be emitted bare\nconst ATEXT = \"[A-Za-z0-9!#$%&'*+\\\\-/=?^_`{|}~\\\\x80-\\\\uFFFF]\";\nconst DOT_ATOM = new RegExp('^' + ATEXT + '+(?:\\\\.' + ATEXT + '+)*$');\n// A complete quoted-string: everything between the outer quotes is either a plain char or\n// a quoted-pair. Anchored, so a value that only starts and ends with a quote does not pass\nconst QUOTED_STRING = /^\"(?:[^\"\\\\]|\\\\[\\s\\S])*\"$/;\n// An address that carries no special anywhere can be emitted bare in a header, everything\n// else goes into angle brackets so that the header can not be read as more addresses than\n// the envelope carries\nconst PLAIN_ADDRESS = /^[^\\s\"(),:;<>@[\\\\\\]]+@[^\\s\"(),:;<>@[\\\\\\]]+$/;\n/**\n * A domain literal that ends an address, see _normalizeAddress\n */\nconst DOMAIN_LITERAL_TAIL = /@(\\[[^[\\]\\\\]*\\])$/;\n/**\n * Removes the whitespace inside every <...> of a References value. A \"<\" with no \">\" after\n * it is left as it is. An index scan, the regex /<[^>]*>/g rescans the rest of the value\n * from every such \"<\"\n *\n * @param value References header value\n * @returns The value with the msg-ids closed up\n */\nfunction stripWhitespaceInAngleBrackets(value) {\n let result = '';\n let pos = 0;\n for (;;) {\n const open = value.indexOf('<', pos);\n if (open < 0) {\n break;\n }\n const close = value.indexOf('>', open + 1);\n if (close < 0) {\n break;\n }\n result += value.slice(pos, open) + value.slice(open, close + 1).replace(/\\s/g, '');\n pos = close + 1;\n }\n return result + value.slice(pos);\n}\n// pipeline() needs a callback to not throw, the errors it sees reach the last stream anyway\nconst PIPELINE_NOOP = () => false;\n// The error a node streaming into an output that was destroyed stops with\nfunction abortedError() {\n const err = new Error('Message stream was closed before the message was generated');\n err.code = errors.ESTREAM;\n return err;\n}\n/**\n * Removes the characters that must never reach a multipart delimiter line.\n *\n * A line break splits the delimiter, so the boundary declared in the header can never\n * match it again and the parts go out as body lines instead. The other C0 controls and\n * DEL do not split anything but must not be written either: RFC 5321 does not allow a\n * NUL in DATA at all, and an MTA or a scanner that stops at one reads a different\n * message than a client that does not, which is the same parser disagreement a split\n * delimiter creates. Both sides are cleaned together, since the declared value and the\n * delimiters come from this one result.\n *\n * @param value Value to clean\n * @return Value with every control character removed\n */\nfunction _stripBoundaryControls(value) {\n return value.replace(/[\\x00-\\x1f\\x7f]+/g, '');\n}\n/**\n * Creates a new mime tree node. Assumes 'multipart/*' as the content type\n * if it is a branch, anything else counts as leaf. If rootNode is missing from\n * the options, assumes this is the root.\n *\n * @param contentType Define the content type for the node. Can be left blank for attachments (derived from filename)\n * @param [options] optional options\n * @param [options.rootNode] root node for this tree\n * @param [options.parentNode] immediate parent for this node\n * @param [options.filename] filename for an attachment node\n * @param [options.baseBoundary] shared part of the unique multipart boundary\n * @param [options.keepBcc] If true, do not exclude Bcc from the generated headers\n * @param [options.normalizeHeaderKey] method to normalize header keys for custom caseing\n * @param [options.textEncoding] either 'Q' (the default) or 'B'\n */\nclass MimeNode {\n constructor(contentType, options) {\n this.nodeCounter = 0;\n options = options || {};\n /**\n * shared part of the unique multipart boundary. Control characters are dropped\n * here rather than at the delimiter, see _stripBoundaryControls\n */\n this.baseBoundary = _stripBoundaryControls(options.baseBoundary || crypto.randomBytes(8).toString('hex'));\n this.boundaryPrefix = _stripBoundaryControls(options.boundaryPrefix || '--_NmP');\n this.disableFileAccess = !!options.disableFileAccess;\n this.disableUrlAccess = !!options.disableUrlAccess;\n this.normalizeHeaderKey = options.normalizeHeaderKey;\n /**\n * If date headers is missing and current node is the root, this value is used instead\n */\n this.date = options.parentNode ? null : new Date();\n /**\n * Root node for current mime tree\n */\n this.rootNode = options.rootNode || this;\n /**\n * If true include Bcc in generated headers (if available)\n */\n this.keepBcc = !!options.keepBcc;\n /**\n * If filename is specified but contentType is not (probably an attachment)\n * detect the content type from filename extension\n */\n if (options.filename) {\n /**\n * Filename for this node. Useful with attachments\n */\n this.filename = options.filename;\n if (!contentType) {\n contentType = mimeFuncs.detectMimeType(this.filename.split('.').pop());\n }\n }\n /**\n * Indicates which encoding should be used for header strings: \"Q\" or \"B\"\n */\n this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase();\n /**\n * Immediate parent for this node (or undefined if not set)\n */\n this.parentNode = options.parentNode;\n /**\n * Hostname for default message-id values\n */\n this.hostname = options.hostname;\n /**\n * If set to 'win' then uses \\r\\n, if 'linux' then \\n. If not set (or `raw` is used) then newlines are kept as is.\n */\n this.newline = options.newline;\n /**\n * An array for possible child nodes\n */\n this.childNodes = [];\n /**\n * Used for generating unique boundaries (prepended to the shared base)\n */\n this._nodeId = ++this.rootNode.nodeCounter;\n /**\n * A list of header values for this node in the form of [{key:'', value:''}]\n */\n this._headers = [];\n /**\n * True if the content only uses ASCII printable characters\n * @type {Boolean}\n */\n this._isPlainText = false;\n /**\n * True if the content is plain text but has longer lines than allowed\n * @type {Boolean}\n */\n this._hasLongLines = false;\n /**\n * If set, use instead this value for envelopes instead of generating one\n * @type {Boolean}\n */\n this._envelope = false;\n /**\n * If set then use this value as the stream content instead of building it\n * @type {String|Buffer|Stream}\n */\n this._raw = false;\n /**\n * Additional transform streams that the message will be piped before\n * exposing by createReadStream\n * @type {Array}\n */\n this._transforms = [];\n /**\n * Additional process functions that the message will be piped through before\n * exposing by createReadStream. These functions are run after transforms\n * @type {Array}\n */\n this._processFuncs = [];\n /**\n * If content type is set (or derived from the filename) add it to headers\n */\n if (contentType) {\n this.setHeader('Content-Type', contentType);\n }\n }\n /////// PUBLIC METHODS\n /**\n * Creates and appends a child node.Arguments provided are passed to MimeNode constructor\n *\n * @param [contentType] Optional content type\n * @param [options] Optional options object\n * @return Created node object\n */\n createChild(contentType, options) {\n if (!options && typeof contentType === 'object') {\n options = contentType;\n contentType = undefined;\n }\n const node = new MimeNode(contentType, options);\n this.appendChild(node);\n return node;\n }\n /**\n * Appends an existing node to the mime tree. Removes the node from an existing\n * tree if needed\n *\n * @param childNode node to be appended\n * @return Appended node object\n */\n appendChild(childNode) {\n // Take the node out of the tree it is in first. Leaving it there keeps it in that\n // parent's childNodes, so it still streams as part of the old tree while parentNode\n // already points at the new one, and anything read off the parent chain answers for\n // the wrong tree.\n if (childNode.parentNode && childNode.parentNode !== this) {\n childNode.remove();\n }\n if (childNode.rootNode !== this.rootNode) {\n childNode.rootNode = this.rootNode;\n childNode._nodeId = ++this.rootNode.nodeCounter;\n }\n childNode.parentNode = this;\n this.childNodes.push(childNode);\n return childNode;\n }\n /**\n * Replaces current node with another node\n *\n * @param node Replacement node\n * @return Replacement node\n */\n replace(node) {\n if (node === this) {\n return this;\n }\n this.parentNode.childNodes.forEach((childNode, i) => {\n if (childNode === this) {\n node.rootNode = this.rootNode;\n node.parentNode = this.parentNode;\n node._nodeId = this._nodeId;\n this.rootNode = this;\n this.parentNode = undefined;\n node.parentNode.childNodes[i] = node;\n }\n });\n return node;\n }\n /**\n * Removes current node from the mime tree\n *\n * @return removed node\n */\n remove() {\n if (!this.parentNode) {\n return this;\n }\n for (let i = this.parentNode.childNodes.length - 1; i >= 0; i--) {\n if (this.parentNode.childNodes[i] === this) {\n this.parentNode.childNodes.splice(i, 1);\n this.parentNode = undefined;\n this.rootNode = this;\n return this;\n }\n }\n }\n /**\n * Sets a header value. If the value for selected key exists, it is overwritten.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param key Header key or a list of key value pairs\n * @param value Header value\n * @return current node\n */\n setHeader(key, value) {\n let added = false;\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && 'value' in key) {\n this.setHeader(key.key, key.value);\n }\n else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.setHeader(i.key, i.value);\n });\n }\n else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.setHeader(i, key[i]);\n });\n }\n return this;\n }\n key = this._normalizeHeaderKey(key);\n const headerValue = {\n key,\n value\n };\n // Check if the value exists and overwrite\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n if (!added) {\n // replace the first match\n this._headers[i] = headerValue;\n added = true;\n }\n else {\n // remove following matches\n this._headers.splice(i, 1);\n i--;\n len--;\n }\n }\n }\n // match not found, append the value\n if (!added) {\n this._headers.push(headerValue);\n }\n return this;\n }\n /**\n * Adds a header value. If the value for selected key exists, the value is appended\n * as a new field and old one is not touched.\n * You can set multiple values as well by using [{key:'', value:''}] or\n * {key: 'value'} as the first argument.\n *\n * @param key Header key or a list of key value pairs\n * @param value Header value\n * @return current node\n */\n addHeader(key, value) {\n // Allow setting multiple headers at once\n if (!value && key && typeof key === 'object') {\n // allow {key:'content-type', value: 'text/plain'}\n if (key.key && key.value) {\n this.addHeader(key.key, key.value);\n }\n else if (Array.isArray(key)) {\n // allow [{key:'content-type', value: 'text/plain'}]\n key.forEach(i => {\n this.addHeader(i.key, i.value);\n });\n }\n else {\n // allow {'content-type': 'text/plain'}\n Object.keys(key).forEach(i => {\n this.addHeader(i, key[i]);\n });\n }\n return this;\n }\n else if (Array.isArray(value)) {\n value.forEach(val => {\n this.addHeader(key, val);\n });\n return this;\n }\n this._headers.push({\n key: this._normalizeHeaderKey(key),\n value\n });\n return this;\n }\n /**\n * Retrieves the first mathcing value of a selected key\n *\n * @param key Key to search for\n * @retun Value for the key\n */\n getHeader(key) {\n key = this._normalizeHeaderKey(key);\n for (let i = 0, len = this._headers.length; i < len; i++) {\n if (this._headers[i].key === key) {\n return this._headers[i].value;\n }\n }\n }\n /**\n * Sets body content for current node. If the value is a string, charset is added automatically\n * to Content-Type (if it is text/*). If the value is a Buffer, you need to specify\n * the charset yourself\n *\n * @param content Body content\n * @return current node\n */\n setContent(content) {\n this.content = content;\n if (typeof this.content.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n shared.recordStreamErrors(this.content);\n }\n else if (typeof this.content === 'string') {\n this._isPlainText = mimeFuncs.isPlainText(this.content);\n if (this._isPlainText && mimeFuncs.hasLongerLines(this.content, 76)) {\n // If there are lines longer than 76 symbols/bytes do not use 7bit\n this._hasLongLines = true;\n }\n }\n return this;\n }\n build(callback) {\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const done = callback;\n const stream = this.createReadStream();\n const buf = [];\n let buflen = 0;\n let returned = false;\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n });\n stream.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n return done(err);\n });\n stream.once('end', (chunk) => {\n if (returned) {\n return;\n }\n returned = true;\n if (chunk && chunk.length) {\n buf.push(chunk);\n buflen += chunk.length;\n }\n return done(null, Buffer.concat(buf, buflen));\n });\n return promise;\n }\n getTransferEncoding() {\n let transferEncoding = false;\n const contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim();\n if (this.content) {\n transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim();\n if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) {\n if (/^text\\//i.test(contentType)) {\n // If there are no special symbols, no need to modify the text\n if (this._isPlainText && !this._hasLongLines) {\n transferEncoding = '7bit';\n }\n else if (typeof this.content === 'string' || this.content instanceof Buffer) {\n // detect preferred encoding for string value\n transferEncoding = this._getTextEncoding(this.content) === 'Q' ? 'quoted-printable' : 'base64';\n }\n else {\n // we can not check content for a stream, so either use preferred encoding or fallback to QP\n transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';\n }\n }\n else if (!/^(multipart|message)\\//i.test(contentType)) {\n transferEncoding = transferEncoding || 'base64';\n }\n }\n }\n return transferEncoding;\n }\n /**\n * Builds the header block for the mime node. Append \\r\\n\\r\\n before writing the content\n *\n * @returns Headers\n */\n buildHeaders() {\n const transferEncoding = this.getTransferEncoding();\n const headers = [];\n if (transferEncoding) {\n this.setHeader('Content-Transfer-Encoding', transferEncoding);\n }\n if (this.filename && !this.getHeader('Content-Disposition')) {\n this.setHeader('Content-Disposition', 'attachment');\n }\n // Ensure mandatory header fields\n if (this.rootNode === this) {\n if (!this.getHeader('Date')) {\n this.setHeader('Date', this.date.toUTCString().replace(/GMT/, '+0000'));\n }\n // ensure that Message-Id is present\n this.messageId();\n if (!this.getHeader('MIME-Version')) {\n this.setHeader('MIME-Version', '1.0');\n }\n // Ensure that Content-Type is the last header for the root node\n for (let i = this._headers.length - 2; i >= 0; i--) {\n const header = this._headers[i];\n if (header.key === 'Content-Type') {\n this._headers.splice(i, 1);\n this._headers.push(header);\n }\n }\n }\n this._headers.forEach(header => {\n let key = header.key;\n let value = header.value;\n let structured;\n let param;\n const options = {};\n const formattedHeaders = FORMATTED_HEADERS;\n if (value && typeof value === 'object' && !formattedHeaders.includes(key)) {\n // the keys come from a caller supplied header object and `options.prepared`\n // below decides whether the value is emitted raw, so an own \"__proto__\" key\n // here would turn an unfolded value into header injection\n shared.copyOwnKeys(options, value, optionKey => optionKey === 'value');\n value = (value.value || '').toString();\n if (!value.trim()) {\n return;\n }\n }\n if (options.prepared) {\n // header value is\n if (options.foldLines) {\n headers.push(mimeFuncs.foldLines(key + ': ' + value));\n }\n else {\n headers.push(key + ': ' + value);\n }\n return;\n }\n switch (header.key) {\n // The comments of a MIME header are not part of its value and are dropped, so a\n // caller supplied 'boundary=b (comment)' is the boundary b it names, and the\n // header goes out without the comment\n case 'Content-Disposition':\n structured = mimeFuncs.parseHeaderValue(value, { stripComments: true });\n if (this.filename) {\n structured.params.filename = this.filename;\n }\n value = mimeFuncs.buildHeaderValue(structured);\n break;\n case 'Content-Type':\n structured = mimeFuncs.parseHeaderValue(value, { stripComments: true });\n // the type token decides multipart and charset below, so clean it before\n // those run and not just on the way out, otherwise a control char makes\n // the checks miss and the header ends up claiming a type it is not set up for\n structured.value = (structured.value || '').toString().replace(/[\\x00-\\x1f\\x7f]/g, '');\n this._handleContentType(structured);\n if (structured.value.match(/^text\\/plain\\b/) && typeof this.content === 'string' && /[\\u0080-\\uFFFF]/.test(this.content)) {\n structured.params.charset = 'utf-8';\n }\n if (this.filename) {\n // the name parameter is derived from the filename below, so a name that\n // arrived inside the content type is dropped first (a plain parameter or\n // rfc2231 continuation sections), otherwise the header carries two and a\n // receiver that reads the first sees a name the filename does not match\n for (const paramKey of Object.keys(structured.params)) {\n if (/^name(\\*|$)/i.test(paramKey)) {\n delete structured.params[paramKey];\n }\n }\n }\n value = mimeFuncs.buildHeaderValue(structured);\n if (this.filename) {\n // add support for non-compliant clients like QQ webmail\n // we can't build the value with buildHeaderValue as the value is non standard and\n // would be converted to parameter continuation encoding that we do not want\n // control chars can not be quoted here: HT is a fold point that unfolding would\n // turn into a space, CR/LF can not appear in a header at all and DEL is not\n // qtext, so force the mime encoded word that a non-ascii filename would get anyway\n param = /[\\x00-\\x1f\\x7f]/.test(this.filename)\n ? mimeFuncs.encodeWord(this.filename, this._getTextEncoding(this.filename), 52)\n : this._encodeWords(this.filename);\n if (param !== this.filename || /[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(param)) {\n // include value in quotes if needed, escaping backslashes and quotes as\n // quoted-pairs exactly like buildHeaderValue does for filename=, otherwise\n // a trailing backslash would escape the closing quote\n param = JSON.stringify(param);\n }\n value += '; name=' + param;\n }\n break;\n case 'Bcc':\n if (!this.keepBcc) {\n // skip BCC values\n return;\n }\n break;\n }\n value = this.encodeHeaderValue(key, value);\n // skip empty lines\n if (!(value || '').toString().trim()) {\n return;\n }\n if (typeof this.normalizeHeaderKey === 'function') {\n const normalized = this.normalizeHeaderKey(key, value);\n // the result replaces the key on the way into the header, so it gets the same\n // treatment the key it replaces already had. a line break here would end the\n // header and start one of the caller's own\n const cleaned = typeof normalized === 'string' ? normalized.replace(/[\\x00-\\x1f\\x7f]/g, '') : '';\n if (cleaned) {\n key = cleaned;\n }\n }\n headers.push(mimeFuncs.foldLines(key + ': ' + value, 76));\n });\n return headers.join('\\r\\n');\n }\n /**\n * Streams the rfc2822 message from the current node. If this is a root node,\n * mandatory header fields are set if missing (Date, Message-Id, MIME-Version)\n *\n * @return Compiled message\n */\n createReadStream(options) {\n options = options || {};\n const stream = new PassThrough(options);\n this.stream(stream, options, err => {\n if (err) {\n stream.destroy(err);\n return;\n }\n stream.end();\n });\n // the content streams of the nodes the message did not get to are not going to be read\n stream.once('close', () => {\n if (!stream.writableFinished) {\n this._destroyContentStreams();\n }\n });\n // The stages are joined with pipeline, which destroys all of them when any one fails\n // or is destroyed. An error anywhere reaches the returned stream exactly once, and a\n // consumer that destroys the returned stream stops the tree from reading its sources\n const stages = [stream];\n for (const transform of this._transforms) {\n stages.push(typeof transform === 'function' ? transform() : transform);\n }\n // ensure terminating newline after possible user transforms\n stages.push(new LastNewline());\n let outputStream = pipeline(stages, PIPELINE_NOOP);\n // dkim and stuff. A process function reads its input itself and reports the errors of\n // that input on its output, so only a consumer abort has to be carried back upstream\n for (const processFunc of this._processFuncs) {\n const input = outputStream;\n outputStream = processFunc(input);\n if (outputStream !== input) {\n finished(outputStream, err => {\n if (err) {\n input.destroy();\n }\n });\n }\n }\n if (this.newline) {\n const winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes(this.newline.toString().toLowerCase());\n outputStream = pipeline(outputStream, winbreak ? new LeWindows() : new LeUnix(), PIPELINE_NOOP);\n }\n return outputStream;\n }\n /**\n * Appends a transform stream object to the transforms list. Final output\n * is passed through this stream before exposing\n *\n * @param transform Read-Write stream\n */\n transform(transform) {\n this._transforms.push(transform);\n }\n /**\n * Appends a post process function. The functon is run after transforms and\n * uses the following syntax\n *\n * processFunc(input) -> outputStream\n *\n * @param processFunc Read-Write stream\n */\n processFunc(processFunc) {\n this._processFuncs.push(processFunc);\n }\n stream(outputStream, options, done) {\n const transferEncoding = this.getTransferEncoding();\n // the streams this node is reading from. A consumer that goes away mid-message destroys\n // the output, and these are released with it instead of staying paused with a file or a\n // socket open behind them\n let activeStreams = [];\n // protect actual callback against multiple triggering\n let returned = false;\n const callback = (err) => {\n if (returned) {\n return;\n }\n returned = true;\n outputStream.removeListener('close', onOutputClose);\n done(err);\n };\n function onOutputClose() {\n for (const stream of activeStreams) {\n stream.destroy();\n }\n return callback(abortedError());\n }\n // reads the streams into the output. The listener is only attached while the node reads\n // something, a deeply nested tree would otherwise stack one per level on the output\n const readInto = (...streams) => {\n if (!activeStreams.length) {\n outputStream.once('close', onOutputClose);\n }\n activeStreams = streams;\n };\n // stops here if the output was destroyed in the meantime\n const aborted = () => {\n if (outputStream.destroyed) {\n callback(abortedError());\n return true;\n }\n return false;\n };\n // for multipart nodes, push child nodes\n // for content nodes end the stream\n const finalize = () => {\n let childId = 0;\n const processChildNode = () => {\n if (aborted()) {\n return;\n }\n if (childId >= this.childNodes.length) {\n outputStream.write('\\r\\n--' + this.boundary + '--\\r\\n');\n return callback();\n }\n const child = this.childNodes[childId++];\n outputStream.write((childId > 1 ? '\\r\\n' : '') + '--' + this.boundary + '\\r\\n');\n child.stream(outputStream, options, err => {\n if (err) {\n return callback(err);\n }\n setImmediate(processChildNode);\n });\n };\n if (this.multipart) {\n setImmediate(processChildNode);\n }\n else {\n return callback();\n }\n };\n // pushes node content\n const sendContent = () => {\n if (aborted()) {\n return;\n }\n if (!this.content) {\n return setImmediate(finalize);\n }\n const createStream = () => {\n if (aborted()) {\n return;\n }\n const contentError = this._takeStreamContent(this.content);\n if (contentError) {\n return callback(contentError);\n }\n const localStream = this._getStream(this.content);\n if (['quoted-printable', 'base64'].includes(transferEncoding)) {\n const contentStream = transferEncoding === 'base64'\n ? new base64.Encoder(options)\n : // outside of text a lone CR or LF is data, encoding it keeps it from being\n // turned into a line break by a newline transform or the receiving side\n new qp.Encoder(Object.assign({}, options, { binary: !/^text\\//i.test(this.contentType || '') }));\n readInto(localStream, contentStream);\n contentStream.pipe(outputStream, {\n end: false\n });\n // pipeline reports errors and tears both streams down. It calls back once the\n // encoder took all of its input, the encoded output may still be waiting to\n // be read, so the node is only done once the encoder's readable side ended\n pipeline(localStream, contentStream, err => err && callback(err));\n finished(contentStream, { writable: false }, err => (err ? callback(err) : finalize()));\n }\n else {\n // anything that is not QP or Base54 passes as-is\n readInto(localStream);\n localStream.pipe(outputStream, {\n end: false\n });\n finished(localStream, { writable: false }, err => (err ? callback(err) : finalize()));\n }\n };\n if (this.content._resolve) {\n const sourceStream = this._getStream(this.content);\n readInto(sourceStream);\n shared.resolveStream(sourceStream, (err, value) => {\n if (err) {\n return callback(err);\n }\n if (returned) {\n return;\n }\n this.content._resolve = false;\n this.content._resolvedValue = value;\n setImmediate(createStream);\n });\n }\n else {\n setImmediate(createStream);\n }\n };\n if (this._raw) {\n setImmediate(() => {\n if (aborted()) {\n return;\n }\n const rawError = this._takeStreamContent(this._raw);\n if (rawError) {\n return callback(rawError);\n }\n const raw = this._getStream(this._raw);\n readInto(raw);\n raw.pipe(outputStream, {\n end: false\n });\n finished(raw, { writable: false }, err => (err ? callback(err) : finalize()));\n });\n }\n else {\n outputStream.write(this.buildHeaders() + '\\r\\n\\r\\n');\n setImmediate(sendContent);\n }\n }\n /**\n * Sets envelope to be used instead of the generated one\n *\n * @return SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n setEnvelope(envelope) {\n let list;\n this._envelope = {\n from: false,\n to: []\n };\n if (envelope.from) {\n list = [];\n this._convertAddresses(this._parseEnvelopeAddresses(envelope.from), list);\n list = list.filter(address => address && address.address);\n if (list.length && list[0]) {\n this._envelope.from = list[0].address;\n }\n }\n const seenRecipients = new Set();\n const recipients = [];\n ['to', 'cc', 'bcc'].forEach(key => {\n if (envelope[key]) {\n this._convertAddresses(this._parseEnvelopeAddresses(envelope[key]), recipients, seenRecipients);\n }\n });\n this._envelope.to = recipients.map(to => to.address).filter(address => address);\n const standardFields = ['to', 'cc', 'bcc', 'from'];\n shared.copyOwnKeys(this._envelope, envelope, key => standardFields.includes(key));\n return this;\n }\n /**\n * Generates and returns an object with parsed address fields\n *\n * @return Address object\n */\n getAddresses() {\n const addresses = {};\n const seenByKey = new Map();\n this._headers.forEach(header => {\n const key = header.key.toLowerCase();\n if (['from', 'sender', 'reply-to', 'to', 'cc', 'bcc'].includes(key)) {\n if (!Array.isArray(addresses[key])) {\n addresses[key] = [];\n seenByKey.set(key, new Set());\n }\n this._convertAddresses(this._parseAddresses(header.value), addresses[key], seenByKey.get(key));\n }\n });\n return addresses;\n }\n /**\n * Generates and returns SMTP envelope with the sender address and a list of recipients addresses\n *\n * @return SMTP envelope in the form of {from: 'from@example.com', to: ['to@example.com']}\n */\n getEnvelope() {\n if (this._envelope) {\n return this._envelope;\n }\n const envelope = {\n from: false,\n to: []\n };\n // Built once and carried across the headers. Letting _convertAddresses seed it per\n // call would cost O(headers x recipients), and a message can carry many address\n // headers: `headers: { to: [...] }` emits one To per entry.\n const seenRecipients = new Set();\n const recipients = [];\n this._headers.forEach(header => {\n const list = [];\n if (header.key === 'From' || (!envelope.from && ['Reply-To', 'Sender'].includes(header.key))) {\n this._convertAddresses(this._parseAddresses(header.value), list);\n if (list.length && list[0]) {\n envelope.from = list[0].address;\n }\n }\n else if (['To', 'Cc', 'Bcc'].includes(header.key)) {\n this._convertAddresses(this._parseAddresses(header.value), recipients, seenRecipients);\n }\n });\n envelope.to = recipients.map(to => to.address);\n return envelope;\n }\n /**\n * Returns Message-Id value. If it does not exist, then creates one\n *\n * @return Message-Id value\n */\n messageId() {\n let messageId = this.getHeader('Message-ID');\n // You really should define your own Message-Id field!\n if (!messageId) {\n messageId = this._generateMessageId();\n this.setHeader('Message-ID', messageId);\n }\n return messageId;\n }\n /**\n * Sets pregenerated content that will be used as the output of this node\n *\n * @param raw Raw MIME contents\n */\n setRaw(raw) {\n this._raw = raw;\n if (this._raw && typeof this._raw.pipe === 'function') {\n // pre-stream handler. might be triggered if a stream is set as content\n // and 'error' fires before anything is done with this stream\n shared.recordStreamErrors(this._raw);\n }\n return this;\n }\n /////// PRIVATE METHODS\n /**\n * Checks an access policy flag for this node and every node above it. The flags are set\n * from the options the node was built with, and createChild only ever sees the options\n * the caller passed, so a child of a closed tree starts out open. Reading the answer off\n * the parent chain keeps it right whatever order the tree was assembled in.\n *\n * @param flag Either 'disableFileAccess' or 'disableUrlAccess'\n * @return true if this node or an ancestor closed that access\n * @internal\n */\n _accessDisabled(flag) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let node = this;\n while (node) {\n if (node[flag]) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n }\n /**\n * Destroys the content streams of this node and of every node below it\n *\n * @internal\n */\n _destroyContentStreams() {\n shared.destroyStream(this.content);\n shared.destroyStream(this._raw);\n for (const child of this.childNodes) {\n child._destroyContentStreams();\n }\n }\n /**\n * Checks that a content value can still be read before the node streams it. A stream is\n * refused once it errored, ended or was destroyed: piping it would either never finish or\n * produce an empty body without any error\n *\n * @param content Node content or raw value\n * @returns The error to stop with, or null when the content can be read\n * @internal\n */\n _takeStreamContent(content) {\n if (Object.prototype.toString.call(content) === '[object Error]') {\n return content;\n }\n if (!content || typeof content.pipe !== 'function' || content._resolvedValue) {\n // the value of a resolved stream is read from the buffered copy\n return null;\n }\n return shared.unreadableStreamError(content);\n }\n /**\n * Detects and returns handle to a stream related with the content.\n *\n * @param content Node content\n * @returns Stream object\n * @internal\n */\n _getStream(content) {\n let contentStream;\n if (content._resolvedValue) {\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n setImmediate(() => {\n try {\n contentStream.end(content._resolvedValue);\n }\n catch (_err) {\n contentStream.emit('error', _err);\n }\n });\n return contentStream;\n }\n if (typeof content.pipe === 'function') {\n // assume as stream\n return content;\n }\n if (content && typeof content.path === 'string' && !content.href) {\n if (this._accessDisabled('disableFileAccess')) {\n contentStream = new PassThrough();\n setImmediate(() => {\n const err = new Error('File access rejected for ' + content.path);\n err.code = errors.EFILEACCESS;\n contentStream.emit('error', err);\n });\n return contentStream;\n }\n // read file\n return fs.createReadStream(content.path);\n }\n if (content && typeof content.href === 'string') {\n if (this._accessDisabled('disableUrlAccess')) {\n contentStream = new PassThrough();\n setImmediate(() => {\n const err = new Error('Url access rejected for ' + content.href);\n err.code = errors.EURLACCESS;\n contentStream.emit('error', err);\n });\n return contentStream;\n }\n // fetch URL. nmfetch refuses any scheme that is not http(s), and it decides\n // that on the parsed URL. Testing the raw string here instead would reject\n // forms the parser accepts, such as a leading space or a slash-less authority\n return nmfetch(content.href, { headers: content.httpHeaders, tls: content.tls });\n }\n // pass string or buffer content as a stream\n contentStream = new PassThrough();\n setImmediate(() => {\n try {\n contentStream.end(content || '');\n }\n catch (_err) {\n contentStream.emit('error', _err);\n }\n });\n return contentStream;\n }\n /**\n * Parses addresses. Takes in a single address or an array or an\n * array of address arrays (eg. To: [[first group], [second group],...])\n *\n * @param addresses Addresses to be parsed\n * @return An array of address objects\n * @internal\n */\n _parseAddresses(addresses) {\n const flattened = [];\n // Nested arrays are flattened iteratively. concat.apply throws once a recipient list\n // is long enough to pass the argument limit, and an array handed to addressparser is\n // stringified, which recurses once per nesting level and exhausts the call stack on\n // a deep enough value. Every array is walked once, which also ends a self-referential\n // input\n const seen = new WeakSet();\n const stack = [];\n const enter = (list) => {\n if (!seen.has(list)) {\n seen.add(list);\n stack.push({ list, pos: 0 });\n }\n };\n enter(Array.isArray(addresses) ? addresses : [addresses]);\n while (stack.length) {\n const frame = stack[stack.length - 1];\n if (frame.pos >= frame.list.length) {\n stack.pop();\n continue;\n }\n const address = frame.list[frame.pos++];\n if (Array.isArray(address)) {\n enter(address);\n continue;\n }\n if (address && address.address) {\n const normalized = this._normalizeAddress(address.address);\n if (normalized === address.address && typeof address.name === 'string') {\n // there is nothing to rewrite, so there is nothing to keep off the original\n flattened.push(address);\n continue;\n }\n // rewriting would land on the object the caller passed in and might\n // still hold a reference to, so rewrite a copy of it instead. An own\n // \"__proto__\" key would make the copy inherit from caller data, and\n // _convertAddresses reads `group` off it straight into the envelope\n const copy = shared.copyOwnKeys({}, address);\n copy.address = normalized;\n copy.name = address.name || '';\n flattened.push(copy);\n continue;\n }\n const parsed = this._normalizeParsedAddresses(addressparser(address));\n for (let i = 0; i < parsed.length; i++) {\n flattened.push(parsed[i]);\n }\n }\n return flattened;\n }\n /**\n * Normalizes the addresses of a freshly parsed address list, groups included.\n *\n * Everything this method returns carries a normalized address, whether it arrived as an\n * object or was parsed out of a header value. Without this the two shapes disagree, and\n * a consumer reading the parsed form back is handed the ambiguous\n * 'user@evil.com@good.com' that the header and the envelope no longer carry.\n *\n * @param parsed An array of address objects, as returned by addressparser\n * @return The same array, with every address normalized\n * @internal\n */\n _normalizeParsedAddresses(parsed) {\n // addressparser builds these objects, so no caller holds a reference to rewrite around\n parsed.forEach(entry => {\n if (entry.address) {\n entry.address = this._normalizeAddress(entry.address);\n }\n else if (entry.group) {\n this._normalizeParsedAddresses(entry.group);\n }\n });\n return parsed;\n }\n /**\n * Parses the addresses of an explicitly set envelope.\n *\n * An envelope value is an addr-spec and never a display name, so a bare local username\n * such as 'root' is the address here. Header parsing has to read the same value as a\n * display name, as a value with no '@' in it can not be an addr-spec in a header.\n *\n * @param addresses Addresses to be parsed\n * @return An array of address objects\n * @internal\n */\n _parseEnvelopeAddresses(addresses) {\n return this._parseAddresses(addresses).map(entry => {\n if (entry.address || entry.group || !entry.name || /[\\s@]/.test(entry.name)) {\n return entry;\n }\n return { address: this._normalizeAddress(entry.name), name: '' };\n });\n }\n /**\n * Normalizes a header key, uses Camel-Case form, except for uppercase MIME-\n *\n * @param key Key to be normalized\n * @return key in Camel-Case form\n * @internal\n */\n _normalizeHeaderKey(key) {\n key = (key || '')\n .toString()\n // a field name is printable ascii without the colon, so a control char, DEL,\n // whitespace or a colon can only be dropped, there is no quoting construct\n // around a field name. A colon or a space left in place ends the name early on\n // the wire: the key 'From: ceo@example.com (' with the value ')' was emitted as a\n // second From header that neither setHeader() nor the Bcc filter could match\n .replace(/[\\s\\x00-\\x20\\x7f:]/g, '')\n .toLowerCase()\n // use uppercase words, except MIME\n .replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\\b|^OTP(?=-Token$)|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())\n // special case\n .replace(/^Content-Features$/i, 'Content-features');\n return key;\n }\n /**\n * Checks if the content type is multipart and defines boundary if needed.\n * Doesn't return anything, modifies object argument instead.\n *\n * @param structured Parsed header value for 'Content-Type' key\n * @internal\n */\n _handleContentType(structured) {\n this.contentType = structured.value.trim().toLowerCase();\n this.multipart = /^multipart\\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false;\n if (this.multipart) {\n // The declared value and the delimiters are assigned from the same expression\n // here, so whatever the header emitter then does with it, the two sides cannot\n // disagree about which characters the boundary is made of.\n //\n // Stripping runs before the fallback rather than over the whole chain: a\n // boundary made only of control characters would otherwise strip to '' and\n // leave the node declaring no boundary and streaming bare '--' delimiters.\n // _generateBoundary cleans what it builds, but this is the one place the boundary\n // is written, so it cleans the value it is about to write rather than trusting\n // where it came from. MimeNode is exported and subclassable, so the generator is\n // not necessarily the one below. Stripping twice costs nothing, it is idempotent.\n const declared = _stripBoundaryControls(structured.params.boundary || this.boundary || '');\n this.boundary = structured.params.boundary = declared || _stripBoundaryControls(this._generateBoundary());\n }\n else {\n this.boundary = false;\n }\n }\n /**\n * Generates a multipart boundary value\n *\n * @return boundary value\n * @internal\n */\n _generateBoundary() {\n // baseBoundary and boundaryPrefix are public, so they may hold something the\n // constructor never cleaned, and the -Part_ suffix keeps the result non empty\n return _stripBoundaryControls(this.rootNode.boundaryPrefix + '-' + this.rootNode.baseBoundary) + '-Part_' + this._nodeId;\n }\n /**\n * Encodes a header value the way this node encodes it in the generated message:\n * address headers are punycoded and mime encoded, message id headers get their\n * angle brackets, a Date object is formatted and any other value is mime encoded\n * when it holds non-ascii or control characters (using the node's `textEncoding`).\n *\n * The result is a single unfolded line without the key. Fold it before writing it\n * into a message, `key + ': ' + value` folded at 76 characters is what the node does.\n *\n * @param key Header key, case insensitive\n * @param value Header value\n * @returns Encoded header value\n */\n encodeHeaderValue(key, value) {\n key = this._normalizeHeaderKey(key);\n switch (key) {\n // Structured headers\n case 'From':\n case 'Sender':\n case 'To':\n case 'Cc':\n case 'Bcc':\n case 'Reply-To':\n return this._convertAddresses(this._parseAddresses(value));\n // values enclosed in <>\n case 'Message-ID':\n case 'In-Reply-To':\n case 'Content-ID':\n // a msg-id is structured, so an encoded word inside the angle brackets would\n // be read as literal text. drop the characters that can not appear in a header\n // at all, but leave HT alone, it separates the ids of a multi id value\n value = (value || '')\n .toString()\n .replace(/\\r?\\n|\\r/g, ' ')\n .replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g, '');\n if (value.charAt(0) !== '<') {\n value = '<' + value;\n }\n if (value.charAt(value.length - 1) !== '>') {\n value = value + '>';\n }\n return value;\n // a structured field (RFC 9651) that can not be mime encoded, an encoded word would\n // turn its quoted strings into text that no structured field parser reads. Only\n // the characters that can not appear in a header at all are removed\n case 'OTP-Token':\n return (value || '')\n .toString()\n .replace(/\\r?\\n|\\r/g, ' ')\n .replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g, '');\n // space separated list of values enclosed in <>\n case 'References': {\n const ids = [];\n for (const entry of [].concat(value || '')) {\n const elm = (entry || '')\n .toString()\n .replace(/\\r?\\n|\\r/g, ' ')\n .replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g, '')\n .trim();\n for (let id of stripWhitespaceInAngleBrackets(elm).split(/\\s+/)) {\n if (id.charAt(0) !== '<') {\n id = '<' + id;\n }\n if (id.charAt(id.length - 1) !== '>') {\n id = id + '>';\n }\n ids.push(id);\n }\n }\n return ids.join(' ').trim();\n }\n case 'Date':\n if (Object.prototype.toString.call(value) === '[object Date]') {\n return value.toUTCString().replace(/GMT/, '+0000');\n }\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n return this._encodeHeaderText(value);\n case 'Content-Type':\n case 'Content-Disposition':\n // if it includes a filename then it is already encoded\n return (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n default:\n value = (value || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n return this._encodeHeaderText(value);\n }\n }\n /**\n * Encodes a header value without a node at hand. Same as the instance method of a\n * node created with the given options.\n *\n * @param key Header key, case insensitive\n * @param value Header value\n * @param [options] Encoding options\n * @param [options.textEncoding] either 'Q' (the default) or 'B'\n * @returns Encoded header value\n */\n static encodeHeaderValue(key, value, options) {\n return new MimeNode(false, { textEncoding: options?.textEncoding }).encodeHeaderValue(key, value);\n }\n /**\n * Alias of encodeHeaderValue, kept for callers that used the method before it was public\n *\n * @internal\n */\n _encodeHeaderValue(key, value) {\n return this.encodeHeaderValue(key, value);\n }\n /**\n * Rebuilds address object using punycode and other adjustments\n *\n * @param addresses An array of address objects\n * @param [uniqueList] An array to be populated with addresses\n * @param [seenAddresses] Addresses already added to uniqueList, shared with recursive calls to keep deduplication linear\n * @return address string\n * @internal\n */\n _convertAddresses(addresses, uniqueList, seenAddresses) {\n const values = [];\n uniqueList = uniqueList || [];\n // Membership is checked once per address, so scanning uniqueList itself would make\n // a recipient list cost O(n^2). Groups recurse with the same set so that a nested\n // group still dedupes against the addresses collected around it, and a caller that\n // passes a partly filled list (To, then Cc, then Bcc) keeps deduping across headers.\n if (!seenAddresses) {\n seenAddresses = new Set();\n for (let i = 0; i < uniqueList.length; i++) {\n seenAddresses.add(uniqueList[i].address);\n }\n }\n [].concat(addresses || []).forEach(address => {\n if (address.address) {\n address.address = this._normalizeAddress(address.address);\n if (!address.name) {\n // an address that carries a special, be it a quoted local part or a domain\n // that could not be normalized, is only unambiguous inside angle brackets.\n // Without them a ',' or a ';' anywhere in it reads as a recipient separator\n // and the header would list more recipients than the envelope carries\n values.push(PLAIN_ADDRESS.test(address.address) ? address.address : `<${address.address}>`);\n }\n else {\n values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);\n }\n if (!seenAddresses.has(address.address)) {\n seenAddresses.add(address.address);\n uniqueList.push(address);\n }\n }\n else if (address.group) {\n const groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList, seenAddresses) : '').trim();\n values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);\n }\n });\n return values.join(', ');\n }\n /**\n * Normalizes an email address\n *\n * @param address An array of address objects\n * @return address string\n * @internal\n */\n _normalizeAddress(address) {\n address = (address || '')\n .toString()\n .replace(/[\\x00-\\x1F\\x7F<>]+/g, ' ') // remove unallowed characters\n .trim();\n if (!address) {\n // callers use an empty value to detect a missing address\n return address;\n }\n // dtext includes '@', so a domain literal is split off at the '@' in front of it and\n // not at the last one, which delivered 'a@[x@evil.com]' to evil.com\n const literal = address.charAt(address.length - 1) === ']' ? DOMAIN_LITERAL_TAIL.exec(address) : null;\n const lastAt = literal ? address.length - literal[1].length - 1 : address.lastIndexOf('@');\n if (lastAt < 0) {\n // Bare username, there is no domain to split off\n return this._normalizeLocalPart(address);\n }\n const user = address.substr(0, lastAt);\n const domain = address.substr(lastAt + 1);\n // Unicode in the local part is kept as is, see _normalizeLocalPart for the rest of it.\n // A domain has no quoting construct to fall back on, so whatever is not a valid domain\n // is kept as supplied and it is _convertAddresses that keeps such an address unambiguous.\n // Domains are punycoded when the local part is ASCII ('safe@jõgeva.ee' -> 'safe@xn--jgeva-dua.ee').\n // When the local part contains non-ASCII bytes the address already requires SMTPUTF8,\n // so the domain is kept (or decoded back) as UTF-8 for symmetry on both sides of '@'.\n let encodedDomain = domain;\n // A non-ASCII local part already requires SMTPUTF8, so the domain stays UTF-8 for\n // symmetry on both sides of the '@' rather than being encoded to an A-label\n const smtputf8 = /[\\x80-\\uFFFF]/.test(user);\n try {\n encodedDomain = shared.normalizeDomain(domain, smtputf8);\n }\n catch (_err) {\n // keep domain as supplied\n }\n return `${this._normalizeLocalPart(user)}@${encodedDomain}`;\n }\n /**\n * Normalizes the local part of an address into a form that can be emitted as is.\n *\n * A local part is either a dot-atom or a quoted-string, anything else is not a valid\n * addr-spec. The quotes of a quoted local part get lost along the way, and a bare\n * 'user@evil.com@good.com' leaves it to the receiver which '@' splits the domain off,\n * while the split here is always at the last one. So whatever is not already one of\n * the two valid forms goes back out as a quoted-string.\n *\n * @param user Local part of an address\n * @return Local part as a dot-atom or as a quoted-string\n * @internal\n */\n _normalizeLocalPart(user) {\n if (DOT_ATOM.test(user) || QUOTED_STRING.test(user)) {\n return user;\n }\n return mimeFuncs.quoteString(user);\n }\n /**\n * If needed, mime encodes the name part\n *\n * @param name Name part of an address\n * @returns Mime word encoded string if needed\n * @internal\n */\n _encodeAddressName(name) {\n if (!/^[\\w ]*$/.test(name)) {\n if (/^[\\x20-\\x7e]*$/.test(name)) {\n return mimeFuncs.quoteString(name);\n }\n else {\n return mimeFuncs.encodeWord(name, this._getTextEncoding(name), 52);\n }\n }\n return name;\n }\n /**\n * Encodes an unstructured header value. Such a value can only carry VCHAR and WSP, so a\n * control char or DEL has to be forced into the mime encoded word that a non-ascii value\n * would get anyway. HT stays as it is, it is valid folding whitespace here.\n *\n * @param value Header value to encode\n * @returns Mime word encoded string if needed\n * @internal\n */\n _encodeHeaderText(value) {\n return /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/.test(value)\n ? mimeFuncs.encodeWord(value, this._getTextEncoding(value), 52)\n : // encodeWords only encodes if needed, otherwise the original string is returned\n this._encodeWords(value);\n }\n /**\n * If needed, mime encodes the name part\n *\n * @param value Name part of an address\n * @returns Mime word encoded string if needed\n * @internal\n */\n _encodeWords(value) {\n // set encodeAll parameter to true even though it is against the recommendation of RFC2047,\n // by default only words that include non-ascii should be converted into encoded words\n // but some clients (eg. Zimbra) do not handle it properly and remove surrounding whitespace\n return mimeFuncs.encodeWords(value, this._getTextEncoding(value), 52, true);\n }\n /**\n * Detects best mime encoding for a text value\n *\n * @param value Value to check for\n * @return either 'Q' or 'B'\n * @internal\n */\n _getTextEncoding(value) {\n value = (value || '').toString();\n if (this.textEncoding) {\n return this.textEncoding;\n }\n // count latin alphabet symbols and 8-bit range symbols + control symbols\n // if there are more latin characters, then use quoted-printable\n // encoding, otherwise use base64\n let nonLatinLen = 0;\n let latinLen = 0;\n for (let i = 0, len = value.length; i < len; i++) {\n const code = value.charCodeAt(i);\n if ((code >= 0x00 && code <= 0x08) || code === 0x0b || code === 0x0c || (code >= 0x0e && code <= 0x1f) || code >= 0x80) {\n nonLatinLen++;\n }\n else if ((code >= 0x41 && code <= 0x5a) || (code >= 0x61 && code <= 0x7a)) {\n latinLen++;\n }\n }\n // if there are more latin symbols than binary/unicode, then prefer Q, otherwise B\n return nonLatinLen < latinLen ? 'Q' : 'B';\n }\n /**\n * Generates a message id\n *\n * @return Random Message-ID value\n * @internal\n */\n _generateMessageId() {\n return ('<' +\n [2, 2, 2, 6].reduce(\n // crux to generate UUID-like random strings\n (prev, len) => prev + '-' + crypto.randomBytes(len).toString('hex'), crypto.randomBytes(4).toString('hex')) +\n '@' +\n // try to use the domain of the FROM address or fallback to server hostname\n (this.getEnvelope().from || this.hostname || 'localhost').split('@').pop() +\n '>');\n }\n}\nexport default MimeNode;\n","import { Transform } from 'node:stream';\n/**\n * Encodes a Buffer into a base64 encoded string\n *\n * @param buffer Buffer to convert\n * @returns base64 encoded string\n */\nexport function encode(buffer) {\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer, 'utf-8');\n }\n return buffer.toString('base64');\n}\n/**\n * Turns a line length option into a whole number of characters, the default for anything unusable\n */\nfunction normalizeLineLength(lineLength) {\n const length = Math.floor(Number(lineLength));\n return Number.isFinite(length) && length >= 1 ? length : 76;\n}\n/**\n * Splits the bytes of `src` into lines of `lineLength` bytes, each followed by a line break. With\n * `final` set the last line, which may be shorter, gets no line break; otherwise only complete\n * lines are taken and the rest is left for the caller\n *\n * @param src Bytes to wrap\n * @param lineLength Line length\n * @param final Whether `src` ends the output\n * @returns The wrapped bytes and the number of trailing bytes not taken\n */\nfunction wrapBuffer(src, lineLength, final) {\n const lines = Math.ceil(src.length / lineLength);\n // the last line waits for more data unless this is the end: whether it gets a line break\n // depends on whether anything follows it\n const complete = Math.max(lines - 1, 0);\n let rest = src.length - complete * lineLength;\n const output = Buffer.allocUnsafe(complete * (lineLength + 2) + (final ? rest : 0));\n let to = 0;\n for (let from = 0; from < complete * lineLength; from += lineLength) {\n src.copy(output, to, from, from + lineLength);\n to += lineLength;\n output[to++] = 0x0d;\n output[to++] = 0x0a;\n }\n if (final) {\n to += src.copy(output, to, complete * lineLength);\n rest = 0;\n }\n if (to !== output.length) {\n // never hand out bytes of the unfilled allocation\n throw new Error('Unexpected wrapped length');\n }\n return { output, rest };\n}\n/**\n * Adds soft line breaks to a base64 string\n *\n * @param str base64 encoded string that might need line wrapping\n * @param [lineLength=76] Maximum allowed length for a line\n * @returns Soft-wrapped base64 encoded string\n */\nexport function wrap(str, lineLength) {\n str = (str || '').toString();\n // a negative length would step backwards through the input and never finish\n lineLength = Math.max(Number(lineLength) || 76, 1);\n if (str.length <= lineLength) {\n return str;\n }\n const result = [];\n let pos = 0;\n const chunkLength = lineLength * 1024;\n const wrapRegex = new RegExp('.{' + lineLength + '}', 'g');\n while (pos < str.length) {\n const wrappedLines = str.substr(pos, chunkLength).replace(wrapRegex, '$&\\r\\n').trim();\n result.push(wrappedLines);\n pos += chunkLength;\n }\n return result.join('\\r\\n').trim();\n}\n/**\n * Creates a transform stream for encoding data to base64 encoding\n *\n * The output is the same as `wrap(encode(input), lineLength)` no matter how the input is split\n * into chunks: every line but the last one ends with a line break, the last one does not\n *\n * @constructor\n * @param options Stream options\n * @param [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nexport class Encoder extends Transform {\n constructor(options) {\n super();\n this.options = options || {};\n if (this.options.lineLength !== false) {\n this.options.lineLength = normalizeLineLength(this.options.lineLength);\n }\n this._curLine = '';\n this._remainingBytes = false;\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n /**\n * Emits the encoded characters `b64` that follow the current line, keeping what can not be\n * emitted yet as the new current line\n *\n * @internal\n */\n _emit(b64, final) {\n const src = Buffer.from(this._curLine + b64, 'latin1');\n if (!src.length) {\n return;\n }\n let output = src;\n if (this.options.lineLength) {\n const wrapped = wrapBuffer(src, this.options.lineLength, final);\n output = wrapped.output;\n this._curLine = wrapped.rest ? src.toString('latin1', src.length - wrapped.rest) : '';\n }\n else {\n this._curLine = '';\n }\n if (output.length) {\n this.outputBytes += output.length;\n this.push(output);\n }\n }\n /** @internal */\n _transform(chunk, encoding, done) {\n let buf = encoding !== 'buffer' ? Buffer.from(chunk, encoding) : chunk;\n if (!buf || !buf.length) {\n return done();\n }\n this.inputBytes += buf.length;\n if (this._remainingBytes) {\n buf = Buffer.concat([this._remainingBytes, buf], this._remainingBytes.length + buf.length);\n this._remainingBytes = false;\n }\n const extra = buf.length % 3;\n if (extra) {\n this._remainingBytes = buf.subarray(buf.length - extra);\n buf = buf.subarray(0, buf.length - extra);\n }\n this._emit(encode(buf), false);\n done();\n }\n /** @internal */\n _flush(done) {\n this._emit(this._remainingBytes ? encode(this._remainingBytes) : '', true);\n this._remainingBytes = false;\n done();\n }\n}\n","import { Transform } from 'node:stream';\n/**\n * Encodes a Buffer into a Quoted-Printable encoded string\n *\n * @param buffer Buffer to convert\n * @returns Quoted-Printable encoded string\n */\n// the shortest line wrap() can make progress with: a complete =XX sequence and the soft break\nconst MIN_LINE_LENGTH = 4;\n// usable characters that do not need encoding\n// https://tools.ietf.org/html/rfc2045#section-6.7\nconst QP_RANGES = [\n [0x09], // <TAB>\n [0x0a], // <LF>\n [0x0d], // <CR>\n [0x20, 0x3c], // <SP>!\"#$%&'()*+,-./0123456789:;\n [0x3e, 0x7e] // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\n];\n// 1 for every byte value that is written as is, see QP_RANGES\nconst QP_LITERAL = new Uint8Array(256);\nfor (let i = 0; i < 256; i++) {\n QP_LITERAL[i] = checkRanges(i, QP_RANGES) ? 1 : 0;\n}\nconst HEX_DIGITS = Buffer.from('0123456789ABCDEF', 'latin1');\nconst isWhitespace = (c) => c === 0x20 || c === 0x09;\nexport function encode(buffer) {\n return encodeBytes(typeof buffer === 'string' ? Buffer.from(buffer, 'utf-8') : buffer);\n}\n/**\n * Encodes bytes that may be followed by more input\n *\n * @param buffer Bytes to encode\n * @param [next] The byte that follows the buffer, whitespace before it is kept literal unless it\n * is a line break. Without it the buffer ends the input and its trailing whitespace is encoded\n * @param [binary] Keep only CRLF pairs literal. A lone CR or LF is data, not a line break, and\n * anything that rewrites line endings on the way would change it\n * @param [previous] The byte before the buffer, for a buffer that starts with LF\n * @returns Quoted-Printable encoded string\n */\nfunction encodeBytes(buffer, next, binary, previous) {\n const len = buffer.length;\n // every byte takes three characters at most\n const output = Buffer.allocUnsafe(len * 3);\n let pos = 0;\n for (let i = 0; i < len; i++) {\n const ord = buffer[i];\n const following = i + 1 < len ? buffer[i + 1] : next;\n const lineBreakByte = binary && (ord === 0x0d || ord === 0x0a) ? (ord === 0x0d ? following === 0x0a : (i > 0 ? buffer[i - 1] : previous) === 0x0d) : true;\n // if the char is in allowed range, then keep as is, unless it is a WS in the end of a line\n if (QP_LITERAL[ord] && lineBreakByte && !(isWhitespace(ord) && (following === undefined || following === 0x0a || following === 0x0d))) {\n output[pos++] = ord;\n continue;\n }\n output[pos++] = 0x3d; // =\n output[pos++] = HEX_DIGITS[Math.floor(ord / 16)];\n output[pos++] = HEX_DIGITS[ord % 16];\n }\n return output.toString('latin1', 0, pos);\n}\n/**\n * Adds soft line breaks to a Quoted-Printable string\n *\n * @param str Quoted-Printable encoded string that might need line wrapping\n * @param [lineLength=76] Maximum allowed length for a line\n * @returns Soft-wrapped Quoted-Printable encoded string\n */\nexport function wrap(str, lineLength) {\n str = (str || '').toString();\n // a line has to hold a complete =XX sequence plus the soft break, shorter lengths\n // (or a negative one) would loop without consuming input\n lineLength = Math.max(Number(lineLength) || 76, MIN_LINE_LENGTH);\n if (str.length <= lineLength) {\n return str;\n }\n let pos = 0;\n const len = str.length;\n let match, code, line;\n const lineMargin = Math.floor(lineLength / 3);\n let result = '';\n // insert soft linebreaks where needed\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if ((match = line.match(/\\r\\n/))) {\n line = line.substr(0, match.index + match[0].length);\n result += line;\n pos += line.length;\n continue;\n }\n if (line.substr(-1) === '\\n') {\n result += line;\n pos += line.length;\n continue;\n }\n if ((match = line.substr(-lineMargin).match(/\\n.*?$/))) {\n // truncate to nearest line break\n line = line.substr(0, line.length - (match[0].length - 1));\n result += line;\n pos += line.length;\n continue;\n }\n if (line.length > lineLength - lineMargin && (match = line.substr(-lineMargin).match(/[ \\t.,!?][^ \\t.,!?]*$/))) {\n // truncate to nearest space\n line = line.substr(0, line.length - (match[0].length - 1));\n }\n else if (line.match(/[=][\\da-f]{0,2}$/i)) {\n // push incomplete encoding sequences to the next line\n if ((match = line.match(/[=][\\da-f]{0,1}$/i))) {\n line = line.substr(0, line.length - match[0].length);\n }\n // ensure that utf-8 sequences are not split\n while (line.length > 3 && line.length < len - pos && !line.match(/^(?:=[\\da-f]{2}){1,4}$/i) && (match = line.match(/[=][\\da-f]{2}$/gi))) {\n code = parseInt(match[0].substr(1, 2), 16);\n if (code < 128) {\n break;\n }\n line = line.substr(0, line.length - 3);\n if (code >= 0xc0) {\n break;\n }\n }\n }\n if (!line.length) {\n // the trimming above emptied the line, which only happens for an incomplete\n // escape at the very end of the input. Take it as is rather than loop on it\n line = str.substr(pos, lineLength);\n }\n if (pos + line.length < len && line.substr(-1) !== '\\n') {\n if (line.length === lineLength && line.match(/[=][\\da-f]{2}$/i)) {\n line = line.substr(0, line.length - 3);\n }\n else if (line.length === lineLength) {\n line = line.substr(0, line.length - 1);\n }\n pos += line.length;\n line += '=\\r\\n';\n }\n else {\n pos += line.length;\n }\n result += line;\n }\n return result;\n}\n/**\n * Helper function to check if a number is inside provided ranges\n *\n * @param nr Number to check for\n * @param ranges An Array of allowed values\n * @returns True if the value was found inside allowed ranges, false otherwise\n */\nfunction checkRanges(nr, ranges) {\n for (let i = ranges.length - 1; i >= 0; i--) {\n const range = ranges[i];\n if (!range.length) {\n continue;\n }\n if (range.length === 1 && nr === range[0]) {\n return true;\n }\n if (range.length === 2 && nr >= range[0] && nr <= range[1]) {\n return true;\n }\n }\n return false;\n}\n// Input is encoded and wrapped this many bytes at a time. wrap() works on strings, and a large\n// chunk handed over at once, such as a whole Buffer attachment, would be held several times over\n// as intermediate strings\nconst ENCODE_SLICE_SIZE = 64 * 1024;\n/**\n * Creates a transform stream for encoding data to Quoted-Printable encoding\n *\n * @constructor\n * @param options Stream options\n * @param [options.lineLength=76] Maximum length for lines, set to false to disable wrapping\n */\nexport class Encoder extends Transform {\n constructor(options) {\n super();\n this.options = options || {};\n if (this.options.lineLength !== false) {\n this.options.lineLength = this.options.lineLength || 76;\n }\n this._curLine = '';\n this._remainingBytes = false;\n this._lastByte = undefined;\n this.inputBytes = 0;\n this.outputBytes = 0;\n }\n /** @internal */\n _transform(chunk, encoding, done) {\n let buf = encoding !== 'buffer' ? Buffer.from(chunk, encoding) : chunk;\n if (!buf || !buf.length) {\n return done();\n }\n this.inputBytes += buf.length;\n if (this._remainingBytes) {\n buf = Buffer.concat([this._remainingBytes, buf], this._remainingBytes.length + buf.length);\n this._remainingBytes = false;\n }\n // Whitespace is encoded when it ends a line, and the end of the input counts as one. Hold\n // back the whitespace a chunk ends with until it is known what follows it, so the output\n // does not depend on where the input was split\n let end = buf.length;\n // a binary CR can only be written once it is known whether LF follows\n while (end > 0 && (isWhitespace(buf[end - 1]) || (this.options.binary && buf[end - 1] === 0x0d))) {\n end--;\n }\n if (buf.length - end <= ENCODE_SLICE_SIZE) {\n this._remainingBytes = end < buf.length ? Buffer.from(buf.subarray(end)) : false;\n buf = buf.subarray(0, end);\n }\n this._encodeSlices(buf);\n done();\n }\n /** @internal */\n _flush(done) {\n if (this._remainingBytes) {\n this._encodeSlices(this._remainingBytes);\n this._remainingBytes = false;\n }\n if (this._curLine) {\n this.outputBytes += this._curLine.length;\n this.push(this._curLine, 'ascii');\n this._curLine = '';\n }\n done();\n }\n /**\n * Encodes the input in slices of ENCODE_SLICE_SIZE bytes. Each slice is told the byte that\n * follows it, so a slice that ends in whitespace is encoded as if it was not split\n *\n * @internal\n */\n _encodeSlices(buf) {\n for (let start = 0; start < buf.length; start += ENCODE_SLICE_SIZE) {\n const end = Math.min(start + ENCODE_SLICE_SIZE, buf.length);\n this._encodeSlice(buf.subarray(start, end), end < buf.length ? buf[end] : undefined);\n this._lastByte = buf[end - 1];\n }\n }\n /** @internal */\n _encodeSlice(buf, next) {\n let qp;\n if (this.options.lineLength) {\n qp = wrap(this._curLine + encodeBytes(buf, next, this.options.binary, this._lastByte), this.options.lineLength);\n // the last line is kept until it is known whether it needs a soft break\n const lastLF = qp.lastIndexOf('\\n');\n this._curLine = qp.substring(lastLF + 1);\n qp = qp.substring(0, lastLF + 1);\n if (qp) {\n this.outputBytes += qp.length;\n this.push(qp, 'ascii');\n }\n }\n else {\n qp = encodeBytes(buf, next, this.options.binary, this._lastByte);\n this.outputBytes += qp.length;\n this.push(qp, 'ascii');\n }\n }\n}\n","/* eslint no-control-regex:0 */\nimport * as base64 from '../base64/index.js';\nimport * as qp from '../qp/index.js';\nimport * as mimeTypes from './mime-types.js';\nimport { isProtoKey } from '../shared/objects.js';\n/**\n * Checks if a value is plaintext string (uses only printable 7bit chars)\n *\n * When isParam is set the value is destined for a header parameter, so HT, CR and LF\n * are not plaintext either: a header parameter has no way to carry them. HT is a valid\n * fold point, so folding and unfolding a header would rewrite it as a space, and CR/LF\n * cannot appear in a header value at all. DEL is neither a token character nor qtext,\n * so it can not be carried bare or quoted. Such values have to go through the rfc2231\n * parameter continuation encoding instead, the same way a quote already does.\n *\n * @param value String to be tested\n * @param [isParam] Set to true if the value is a header parameter value\n * @returns true if it is a plaintext string\n */\nexport function isPlainText(value, isParam) {\n const re = isParam ? /[\\x00-\\x1f\\x7f\"\\u0080-\\uFFFF]/ : /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\u0080-\\uFFFF]/;\n return typeof value === 'string' && !re.test(value);\n}\n// A parameter value goes out as is only when it is plain text that does not look like an encoded\n// word. Receivers decode encoded words found in parameter values (libmime does so for unencoded\n// continuations), so as plain text it would come back as something else\nfunction isPlainParamValue(value) {\n return isPlainText(value, true) && !value.includes('=?');\n}\n/**\n * Wraps a value into a quoted-string. Inside one a quote would end the string early\n * and a backslash would escape whatever follows it, so both go out as quoted-pairs.\n *\n * @param value String to be quoted\n * @returns The value as a quoted-string, quotes included\n */\nexport function quoteString(value) {\n return '\"' + (value || '').toString().replace(/[\"\\\\]/g, '\\\\$&') + '\"';\n}\n/**\n * Checks if a multi line string containes lines longer than the selected value.\n *\n * Useful when detecting if a mail message needs any processing at all:\n * if only plaintext characters are used and lines are short, then there is\n * no need to encode the values in any way. If the value is plaintext but has\n * longer lines then allowed, then use format=flowed\n *\n * @param str Multi line string to check\n * @param lineLength Max line length to check for\n * @returns Returns true if there is at least one line longer than lineLength chars\n */\nexport function hasLongerLines(str, lineLength) {\n if (str.length > 128 * 1024) {\n // do not test strings longer than 128kB\n return true;\n }\n return new RegExp('^.{' + (lineLength + 1) + ',}', 'm').test(str);\n}\n/**\n * Encodes a string or an Buffer to an UTF-8 MIME Word (rfc2047)\n *\n * @param data String to be encoded\n * @param mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param [maxLength=0] If set, split mime words into several chunks if needed\n * @return Single or several mime words joined together\n */\nexport function encodeWord(data, mimeWordEncoding, maxLength) {\n mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);\n maxLength = maxLength || 0;\n let encodedStr;\n const toCharset = 'UTF-8';\n if (maxLength && maxLength > 7 + toCharset.length) {\n maxLength -= 7 + toCharset.length;\n }\n if (mimeWordEncoding === 'Q') {\n // https://tools.ietf.org/html/rfc2047#section-5 rule (3)\n encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\\-/=]/gi, chr => {\n const ord = chr.charCodeAt(0).toString(16).toUpperCase();\n if (chr === ' ') {\n return '_';\n }\n return '=' + (ord.length === 1 ? '0' + ord : ord);\n });\n }\n else if (mimeWordEncoding === 'B') {\n // the chunking loop below splits raw text and base64 encodes each part, so a\n // Buffer goes in as its UTF-8 string: handing it the base64 of the whole input\n // would encode the encoding itself and decode back to base64 text\n encodedStr = typeof data === 'string' ? data : data.toString('utf-8');\n maxLength = maxLength ? Math.max(3, ((maxLength - (maxLength % 4)) / 4) * 3) : 0;\n }\n if (maxLength && (mimeWordEncoding !== 'B' ? encodedStr : base64.encode(data)).length > maxLength) {\n if (mimeWordEncoding === 'Q') {\n encodedStr = splitMimeEncodedString(encodedStr, maxLength).join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n }\n else {\n // RFC2047 6.3 (2) states that encoded-word must include an integral number of characters, so no chopping unicode sequences\n const parts = [];\n let lpart = '';\n for (let i = 0, len = encodedStr.length; i < len; i++) {\n let chr = encodedStr.charAt(i);\n if (/[\\ud800-\\udbff]/.test(chr) && /[\\udc00-\\udfff]/.test(encodedStr.charAt(i + 1))) {\n // leading surrogate, so add the trailing surrogate as well\n // an unpaired one must not swallow the next unit, that would destroy\n // a valid pair following it\n chr += encodedStr.charAt(++i);\n }\n // check if we can add this character to the existing string\n // without breaking byte length limit\n if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {\n lpart += chr;\n }\n else {\n // we hit the length limit, so push the existing string and start over\n parts.push(base64.encode(lpart));\n lpart = chr;\n }\n }\n if (lpart) {\n parts.push(base64.encode(lpart));\n }\n if (parts.length > 1) {\n encodedStr = parts.join('?= =?' + toCharset + '?' + mimeWordEncoding + '?');\n }\n else {\n encodedStr = parts.join('');\n }\n }\n }\n else if (mimeWordEncoding === 'B') {\n encodedStr = base64.encode(data);\n }\n return '=?' + toCharset + '?' + mimeWordEncoding + '?' + encodedStr + (encodedStr.substr(-2) === '?=' ? '' : '?=');\n}\n// An encoded-word as RFC 2047 section 2 spells it: a charset token (with an optional RFC 2231\n// language), B or Q, and encoded text without '?' or whitespace. None of the parts can hold the\n// '?' that separates them, so the pattern never backtracks\nconst VALID_ENCODED_WORD = /^=\\?[^\\s()<>@,;:\"/[\\]?.=]+\\?[BbQq]\\?[^?\\s]+\\?=$/;\n// What a lenient decoder reads as an encoded-word: libmime and Python decode\n// '=?utf-8?Q?a b?=' across the space as well. Applied sticky at a '=?', and every part stops\n// at the next '?', so it does not backtrack either\nconst LENIENT_ENCODED_WORD = /[=]\\?[^?]*\\?[BbQq]\\?[^?]*\\?=/y;\n/**\n * Marks the text a receiver would read as an encoded-word when it is not one valid encoded-word\n * on its own. RFC 2047 section 7 requires that a word beginning with '=?' and ending with '?='\n * is a valid encoded-word, and decoders also decode a look-alike that spans whitespace, so\n * '=?utf-8?X?x?=' and 'see =?utf-8?Q?a b?= here' read differently on every receiver. A valid\n * encoded-word is left alone, which is what lets a caller pass a value that is already encoded,\n * as most other mail libraries do.\n *\n * The bounds of the word around each '=?' are found once per word and reused, walking back to\n * the start of a long word from every '=?' it holds would be quadratic.\n *\n * @param value String to look in\n * @param range The first and the last offset that needs encoding so far, -1 for none\n * @return The range, widened to cover the words of every invalid look-alike\n */\nfunction _markInvalidEncodedWords(value, range) {\n const len = value.length;\n const isSpace = (pos) => /\\s/.test(value.charAt(pos));\n // the word last looked at, its start and the offset just past it\n let wordStart = 0;\n let wordEnd = -1;\n const wordAt = (pos) => {\n if (pos < wordEnd) {\n return;\n }\n // the previous word ended at whitespace, so the walk back stops before reaching it\n wordStart = pos;\n while (wordStart > 0 && !isSpace(wordStart - 1)) {\n wordStart--;\n }\n wordEnd = pos;\n while (wordEnd < len && !isSpace(wordEnd)) {\n wordEnd++;\n }\n };\n let pos = value.indexOf('=?');\n while (pos >= 0) {\n wordAt(pos);\n const start = wordStart;\n LENIENT_ENCODED_WORD.lastIndex = pos;\n const match = LENIENT_ENCODED_WORD.exec(value);\n const end = match ? pos + match[0].length : wordEnd;\n if (match && end > wordEnd) {\n // the look-alike runs across whitespace, on to the word it ends in\n wordAt(end - 1);\n }\n const word = value.substring(start, wordEnd);\n // without a match, a word that begins with '=?' and ends with '?=' is still invalid\n const looksLike = match ? true : start === pos && word.length >= 4 && word.endsWith('?=');\n const valid = start === pos && wordEnd === end && word.length <= 75 && VALID_ENCODED_WORD.test(word);\n if (looksLike && !valid) {\n range[0] = range[0] < 0 ? start : Math.min(range[0], start);\n range[1] = Math.max(range[1], wordEnd - 1);\n }\n pos = value.indexOf('=?', match ? end : pos + 2);\n }\n return range;\n}\n/**\n * Finds word sequences with non ascii text, and words that look like an invalid encoded-word,\n * and converts these to mime words. A valid encoded-word is passed through as it is.\n *\n * @param value String to be encoded\n * @param mimeWordEncoding='Q' Encoding for the mime word, either Q or B\n * @param [maxLength=0] If set, split mime words into several chunks if needed\n * @param [encodeAll=false] If true and the value needs encoding then encodes entire string, not just the smallest match\n * @return String with possible mime words\n */\nexport function encodeWords(value, mimeWordEncoding, maxLength, encodeAll) {\n maxLength = maxLength || 0;\n // find the first and the last character that needs encoding, a quote or anything outside\n // printable ascii. A scan rather than a regex: matching the last such word with a\n // backtracking pattern took quadratic time on a long word of non-ascii characters\n let firstSpecial = -1;\n let lastSpecial = -1;\n for (let i = 0; i < value.length; i++) {\n const code = value.charCodeAt(i);\n if (code === 0x22 || code >= 0x80) {\n if (firstSpecial < 0) {\n firstSpecial = i;\n }\n lastSpecial = i;\n }\n }\n if (value.indexOf('=?') >= 0) {\n [firstSpecial, lastSpecial] = _markInvalidEncodedWords(value, [firstSpecial, lastSpecial]);\n }\n if (firstSpecial < 0) {\n return value;\n }\n if (encodeAll) {\n // the value needs encoding and it is requested to encode everything\n return encodeWord(value, mimeWordEncoding, maxLength);\n }\n // encode from the start of the word holding the first such character to the end of the\n // word holding the last one, so the encoded words stay separated from the plain text by\n // the whitespace that was already there\n let startIndex = firstSpecial;\n while (startIndex > 0 && !/\\s/.test(value.charAt(startIndex - 1))) {\n startIndex--;\n }\n let endIndex = lastSpecial + 1;\n while (endIndex < value.length && !/\\s/.test(value.charAt(endIndex))) {\n endIndex++;\n }\n return ((startIndex ? value.substr(0, startIndex) : '') +\n encodeWord(value.substring(startIndex, endIndex), mimeWordEncoding || 'Q', maxLength) +\n (endIndex < value.length ? value.substr(endIndex) : ''));\n}\n/**\n * Joins parsed header value together as 'value; param1=value1; param2=value2'\n * PS: We are following RFC 822 for the list of special characters that we need to keep in quotes.\n * Refer: https://www.w3.org/Protocols/rfc1341/4_Content-Type.html\n * @param structured Parsed header value\n * @return joined header value\n */\nexport function buildHeaderValue(structured) {\n const paramsArray = [];\n Object.keys(structured.params || {}).forEach(key => {\n // filename might include unicode characters so it is a special case\n // other values probably do not\n const value = structured.params[key];\n // a parameter name is a token too and it is emitted without any quoting around it\n const param = key.replace(/[\\x00-\\x1f\\x7f]/g, '');\n if (!isPlainParamValue(value) || value.length >= 75) {\n buildHeaderParam(param, value, 50).forEach(encodedParam => {\n if (!/[\\s\"\\\\;:/=(),<>@[\\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {\n paramsArray.push(encodedParam.key + '=' + encodedParam.value);\n }\n else {\n paramsArray.push(encodedParam.key + '=' + JSON.stringify(encodedParam.value));\n }\n });\n }\n else if (!value.length || /[\\s'\"\\\\;:/=(),<>@[\\]?]|^-/.test(value)) {\n // a parameter value is a token or a quoted-string and a token is never empty, so\n // a valueless parameter such as the 'flag' of 'multipart/mixed; flag; boundary=b'\n // goes out as 'flag=\"\"' rather than as the 'flag=' that parses as neither\n paramsArray.push(param + '=' + JSON.stringify(value));\n }\n else {\n paramsArray.push(param + '=' + value);\n }\n });\n // the value ahead of the parameters is a token, it has no way to carry a control\n // char or DEL and there is no quoting construct around it to escape one into\n const value = typeof structured.value === 'string' ? structured.value.replace(/[\\x00-\\x1f\\x7f]/g, '') : structured.value;\n return value + (paramsArray.length ? '; ' + paramsArray.join('; ') : '');\n}\n/**\n * Encodes a string or an Buffer to an UTF-8 Parameter Value Continuation encoding (rfc2231)\n * Useful for splitting long parameter values.\n *\n * For example\n * title=\"unicode string\"\n * becomes\n * title*0*=utf-8''unicode\n * title*1*=%20string\n *\n * @param key Parameter name the generated keys are built from, for example title\n * @param data String to be encoded\n * @param [maxLength=50] Max length for generated chunks\n * @return A list of encoded keys and headers\n */\nexport function buildHeaderParam(key, data, maxLength) {\n const list = [];\n let encodedStr = typeof data === 'string' ? data : (data || '').toString();\n let chr;\n let line;\n let startPos = 0;\n let i, len;\n maxLength = maxLength || 50;\n // process ascii only text\n if (isPlainParamValue(data)) {\n // check if conversion is even needed\n if (encodedStr.length <= maxLength) {\n return [\n {\n key,\n value: encodedStr\n }\n ];\n }\n encodedStr = encodedStr.replace(new RegExp('.{' + maxLength + '}', 'g'), str => {\n list.push({\n line: str\n });\n return '';\n });\n if (encodedStr) {\n list.push({\n line: encodedStr\n });\n }\n }\n else {\n if (/[\\uD800-\\uDBFF]/.test(encodedStr)) {\n // string containts surrogate pairs, so normalize it to an array of bytes\n const encodedStrArr = [];\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr.charAt(i);\n if (/[\\ud800-\\udbff]/.test(chr) && /[\\udc00-\\udfff]/.test(encodedStr.charAt(i + 1))) {\n // an unpaired leading surrogate must not consume the next unit, that\n // would tear apart a valid pair following it\n chr += encodedStr.charAt(i + 1);\n encodedStrArr.push(chr);\n i++;\n }\n else {\n encodedStrArr.push(chr);\n }\n }\n encodedStr = encodedStrArr;\n }\n // first line includes the charset and language info and needs to be encoded\n // even if it does not contain any unicode characters\n line = \"utf-8''\";\n let encoded = true;\n startPos = 0;\n // process text with unicode or special chars\n for (i = 0, len = encodedStr.length; i < len; i++) {\n chr = encodedStr[i];\n if (encoded) {\n chr = safeEncodeURIComponent(chr);\n }\n else {\n // try to urlencode current char\n chr = chr === ' ' ? chr : safeEncodeURIComponent(chr);\n // By default it is not required to encode a line, the need\n // only appears when the string contains unicode or special chars\n // in this case we start processing the line over and encode all chars\n if (chr !== encodedStr[i]) {\n // Check if it is even possible to add the encoded char to the line\n // If not, there is no reason to use this line, just push it to the list\n // and start a new line with the char that needs encoding\n if ((safeEncodeURIComponent(line) + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n // the line we start here holds an encoded char, so it has to be\n // flagged as one. otherwise it gets an unstarred continuation key\n // and a receiver reads the percent escapes as literal text\n line = '';\n encoded = true;\n }\n else {\n encoded = true;\n i = startPos;\n line = '';\n continue;\n }\n }\n }\n // if the line is already too long, push it to the list and start a new one\n if ((line + chr).length >= maxLength) {\n list.push({\n line,\n encoded\n });\n line = chr = encodedStr[i] === ' ' ? ' ' : safeEncodeURIComponent(encodedStr[i]);\n if (chr === encodedStr[i]) {\n encoded = false;\n startPos = i - 1;\n }\n else {\n encoded = true;\n }\n }\n else {\n line += chr;\n }\n }\n if (line) {\n list.push({\n line,\n encoded\n });\n }\n }\n return list.map((item, i) => ({\n // encoded lines: {name}*{part}*\n // unencoded lines: {name}*{part}\n // if any line needs to be encoded then the first line (part==0) is always encoded\n key: key + '*' + i + (item.encoded ? '*' : ''),\n value: item.line\n }));\n}\n/**\n * An RFC 2045 token: printable ASCII without SPACE, the control characters, DEL and the\n * tspecials. A charset name is one, and the name a continuation carries is written into\n * the encoded word the parameter value becomes, so it is checked against this before it\n * goes in. Whitespace used to come off it only because the value was trimmed first.\n */\nconst TOKEN = /^[^\\x00-\\x20\\x7f()<>@,;:\\\\\"/[\\]?=]+$/;\n/**\n * Offset of the ')' that closes the RFC 822 comment opening at `start`, or -1 when the\n * comment never closes. Comments nest, and a backslash escapes the character after it\n */\nfunction _findCommentEnd(str, start) {\n let depth = 0;\n for (let i = start, len = str.length; i < len; i++) {\n const c = str.charAt(i);\n if (c === '\\\\') {\n i++;\n }\n else if (c === '(') {\n depth++;\n }\n else if (c === ')' && --depth === 0) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Whether a string can be a header parameter name.\n *\n * A parameter name is a token, so it is never empty. A \"__proto__\" name would target the\n * prototype chain of the params object instead of an own property of it and read back as\n * Object.prototype, so it is no name either.\n *\n * @param name Candidate parameter name, already lowercased\n * @return true when the name can be used\n */\nfunction _isParamName(name) {\n return !!name && !isProtoKey(name);\n}\n/**\n * Parses a header value with key=value arguments into a structured\n * object.\n *\n * parseHeaderValue('content-type: text/plain; CHARSET='UTF-8'') ->\n * {\n * 'value': 'text/plain',\n * 'params': {\n * 'charset': 'UTF-8'\n * }\n * }\n *\n * @param str Header value\n * @param options Options, see ParseHeaderValueOptions\n * @return Header value as a parsed structure\n */\nexport function parseHeaderValue(str, options) {\n const response = {\n value: '',\n params: {}\n };\n // Cleared again by an unclosed '(', see the loop\n let stripComments = !!options?.stripComments;\n // A duplicated parameter resolves to its first occurrence, the way a duplicated header\n // does. Letting the last one win disagrees with the receivers that take the first, and\n // the two readings of 'boundary=\"b\"; boundary=\"c\"' name different delimiters. The\n // continuation join below is the only writer of the name it builds, so it tests the\n // name with _isParamName directly rather than taking that rule along from here.\n const setParam = (name, value) => {\n name = name.toLowerCase();\n if (_isParamName(name) && !Object.prototype.hasOwnProperty.call(response.params, name)) {\n response.params[name] = value;\n }\n };\n let key = false;\n let value = '';\n let stage = 'value';\n let quote = false;\n let escaped = false;\n let chr;\n // Whitespace seen outside a quoted string is held back until a significant character\n // follows it, so the whitespace around a value is dropped without trimming spaces the\n // sender quoted on purpose. Trimming the stored value instead loses the trailing space\n // of 'filename*0=\"Annual Report \"', which the next continuation section is appended to.\n let pendingSpace = '';\n let quoteClosed = false;\n // Whitespace ahead of the first character of a value is padding and is dropped, the\n // whitespace between two characters of it is content\n const flushSpace = () => {\n if (value.length) {\n value += pendingSpace;\n }\n pendingSpace = '';\n };\n const addChr = (c) => {\n flushSpace();\n value += c;\n };\n const takeValue = () => {\n const taken = value;\n value = '';\n pendingSpace = '';\n quoteClosed = false;\n return taken;\n };\n const storeValue = () => {\n const taken = takeValue();\n if (key === false) {\n response.value = taken;\n }\n else {\n setParam(key, taken);\n }\n };\n // A parameter name with no '=' is a valueless parameter, not the start of the next one.\n // Without this the name keeps growing across the ';' and swallows whatever follows, which\n // is how 'multipart/mixed; flag; boundary=\"AAA\"' lost its boundary to a parameter named\n // 'flag; boundary' and left the node declaring the generated boundary beside the asked\n // for one, so a receiver reading the first of the two found no delimiter it matched.\n const storeEmptyKey = () => {\n setParam(takeValue().trim(), '');\n };\n for (let i = 0, len = str.length; i < len; i++) {\n chr = str.charAt(i);\n // With stripComments, an RFC 822 comment stands anywhere outside a quoted string but\n // right behind a token it would continue, see ParseHeaderValueOptions. In the value\n // of a parameter, no pending whitespace means the last significant character was the\n // '=' or a character of the token\n if (stripComments && chr === '(' && !quote && !quoteClosed && !(stage === 'value' && key !== false && !pendingSpace)) {\n let end = _findCommentEnd(str, i);\n if (end < 0 && str.indexOf(';', i) < 0) {\n // a comment that never closes runs to the end of the value, unless a\n // parameter follows it, which is content then and survives\n end = len - 1;\n }\n if (end >= 0) {\n i = end;\n continue;\n }\n // looking for a closing ')' again would scan a run of unclosed '(' to its end\n // once for each of them\n stripComments = false;\n }\n if (stage === 'key') {\n if (chr === '=') {\n key = takeValue().trim();\n stage = 'value';\n continue;\n }\n if (chr === ';') {\n storeEmptyKey();\n continue;\n }\n value += chr;\n }\n else {\n if (quoteClosed && chr !== ';') {\n // Nothing behind a closed quoted string reaches the value. RFC 2045 says a\n // parameter value is a token or a quoted string and not both, so what follows\n // one is junk and only the ';' that ends the parameter still counts. Tested\n // ahead of the branches rather than beside the append at the foot of them,\n // where each branch above was a way around it: a second '\"' reopened quoting\n // and swallowed the rest of the header, so 'boundary=\"AAA\" \"; boundary=BBB\"'\n // read as a single boundary of 'AAA ', and the junk of\n // 'boundary=\"AAA\" (unterminated comment' still joined the declared boundary\n // through the escape branch. quoteClosed is only ever set while no quote is\n // open, and this is what keeps one from being opened afterwards.\n escaped = false;\n continue;\n }\n if (escaped) {\n addChr(chr);\n }\n else if (quote && chr === '\\\\') {\n // a backslash only escapes inside a quoted string, everywhere else it is an\n // ordinary character. Treating it as an escape turns the parameter value\n // 'C:\\Users\\me\\report.txt' into 'C:Usersmereport.txt'\n escaped = true;\n continue;\n }\n else if (quote && chr === quote) {\n quote = false;\n quoteClosed = true;\n }\n else if (!quote && chr === '\"') {\n quote = chr;\n flushSpace();\n }\n else if (!quote && chr === ';') {\n storeValue();\n stage = 'key';\n }\n else if (!quote && (chr === ' ' || chr === '\\t')) {\n pendingSpace += chr;\n }\n else {\n addChr(chr);\n }\n escaped = false;\n }\n }\n if (stage === 'value') {\n storeValue();\n }\n else {\n // a key with no value, as in 'Header-Key: somevalue; key=value; emptykey'\n storeEmptyKey();\n }\n // handle parameter value continuations\n // https://tools.ietf.org/html/rfc2231#section-3\n // Sections are collected in a list and ordered below rather than written into an array\n // at their own section number. An index write makes the array as long as the number the\n // header asked for, and the join that follows walks all of it, so the 55 byte value\n // \"attachment; filename*0*=utf-8''a; filename*4000000000=b\" held a core for over two\n // minutes.\n const continuations = new Map();\n Object.keys(response.params).forEach(key => {\n const match = key.match(/(\\*(\\d+)|\\*(\\d+)\\*|\\*)$/);\n if (!match) {\n // not a continuation parameter, there is nothing to join\n return;\n }\n const actualKey = key.substr(0, match.index);\n const nr = Number(match[2] || match[3]) || 0;\n // RFC 2231 section 4.1: only a section whose name ends in '*' is percent encoded\n const encoded = match[0].substr(-1) === '*';\n // remove the old reference\n let value = response.params[key];\n delete response.params[key];\n if (!_isParamName(actualKey)) {\n // the joined value can not be written back under this name. It is empty when the\n // continuation suffix was all there was of it, as in the bare '*' of 'text/plain; a;*'\n return;\n }\n let continuation = continuations.get(actualKey);\n if (!continuation) {\n continuation = { charset: false, sections: [] };\n continuations.set(actualKey, continuation);\n }\n const charsetMatch = nr === 0 && encoded ? value.match(/^([^']*)'[^']*'(.*)$/) : null;\n if (charsetMatch) {\n // the charset is a token, and anything else named as one is no charset a consumer\n // could resolve, so it reads as the unnamed case rather than being carried into\n // the encoded word below. A \"\\r\\n\" of a prefix would otherwise reach a consumer\n // of the parsed value as the charset of a word that no decoder can act on\n continuation.charset = TOKEN.test(charsetMatch[1]) ? charsetMatch[1] : 'iso-8859-1';\n value = charsetMatch[2];\n }\n continuation.sections.push({ nr, value, encoded });\n });\n // concatenate split rfc2231 strings and convert encoded strings to mime encoded words\n continuations.forEach((continuation, key) => {\n if (Object.prototype.hasOwnProperty.call(response.params, key)) {\n // The same name was also given as a plain parameter, which the starred keys were\n // just deleted from around, so this write would be the only one in the function\n // to override a name already taken. 'filename=plain.txt; filename*0=evil.txt'\n // resolves to the plain parameter either way round, so the reading does not come\n // down to which of the two spellings the sender put first\n return;\n }\n continuation.sections.sort((a, b) => a.nr - b.nr);\n if (!continuation.charset) {\n // nothing said which charset the percent escapes of an encoded section are in,\n // so every section is passed on as the text it already is\n response.params[key] = continuation.sections.map(section => section.value).join('');\n return;\n }\n // convert \"%AB\" to \"=?charset?Q?=AB?=\"\n response.params[key] = '=?' + continuation.charset + '?Q?' + continuation.sections.map(_encodeContinuationSection).join('') + '?=';\n });\n return response;\n}\n/**\n * Renders one parameter value continuation section as the payload of a Q encoded word.\n *\n * A section whose name ends in '*' is percent encoded and its escapes carry the bytes of\n * the value, so they only have to be rewritten into the \"=AB\" spelling a Q encoded word\n * uses. A section without the '*' is literal text (RFC 2231 section 4.1), so its '%' is a\n * '%' and is escaped along with the characters a Q encoded word can not carry bare.\n * Decoding a literal section invents bytes that never appeared on the wire: it is how the\n * value 'filename*0*=utf-8''safe; filename*1=%2F..%2F..%2Fetc%2Fpasswd' was emitted as a\n * filename every receiving client reads back as 'safe/../../etc/passwd'.\n *\n * @param section One collected continuation section\n * @return The section as Q encoded word payload\n */\nfunction _encodeContinuationSection(section) {\n const specials = section.encoded ? /[=?_\\s]/g : /[=?_\\s%]/g;\n return (section.value\n // fix invalidly encoded chars\n .replace(specials, s => {\n const c = s.charCodeAt(0).toString(16);\n if (s === ' ') {\n return '_';\n }\n return '%' + (c.length < 2 ? '0' : '') + c;\n })\n // change from urlencoding to percent encoding\n .replace(/%/g, '='));\n}\n/**\n * Returns file extension for a content type string. If no suitable extensions\n * are found, 'bin' is used as the default extension\n *\n * @param mimeType Content type to be checked for\n * @return File extension\n */\nexport function detectExtension(mimeType) {\n return mimeTypes.detectExtension(mimeType);\n}\n/**\n * Returns content type for a file extension. If no suitable content types\n * are found, 'application/octet-stream' is used as the default content type\n *\n * @param extension Extension to be checked for\n * @return File extension\n */\nexport function detectMimeType(extension) {\n return mimeTypes.detectMimeType(extension);\n}\n/**\n * Folds long lines, useful for folding header lines (afterSpace=false) and\n * flowed text (afterSpace=true)\n *\n * @param str String to be folded\n * @param [lineLength=76] Maximum length of a line\n * @param afterSpace If true, leave a space in th end of a line\n * @return String with folded lines\n */\nexport function foldLines(str, lineLength, afterSpace) {\n str = (str || '').toString();\n lineLength = lineLength || 76;\n let pos = 0;\n const len = str.length;\n let result = '';\n let line, match;\n while (pos < len) {\n line = str.substr(pos, lineLength);\n if (line.length < lineLength) {\n result += line;\n break;\n }\n if ((match = line.match(/^[^\\n\\r]*(\\r?\\n|\\r)/))) {\n line = match[0];\n result += line;\n pos += line.length;\n continue;\n }\n else if ((match = line.match(/(\\s+)[^\\s]*$/)) && match[0].length - (afterSpace ? (match[1] || '').length : 0) < line.length) {\n line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || '').length : 0)));\n }\n else if ((match = str.substr(pos + line.length).match(/^[^\\s]+(\\s*)/))) {\n line = line + match[0].substr(0, match[0].length - (!afterSpace ? (match[1] || '').length : 0));\n }\n result += line;\n pos += line.length;\n if (pos < len) {\n result += '\\r\\n';\n }\n }\n return result;\n}\n/**\n * Splits a mime encoded string. Needed for dividing mime words into smaller chunks\n *\n * @param str Mime encoded string to be split up\n * @param maxlen Maximum length of characters for one part (minimum 12)\n * @return Split string\n */\nexport function splitMimeEncodedString(str, maxlen) {\n const lines = [];\n let curLine, fallbackLine, match, chr, done;\n // require at least 12 symbols to fit possible 4 octet UTF-8 sequences\n maxlen = Math.max(maxlen || 0, 12);\n while (str.length) {\n curLine = str.substr(0, maxlen);\n // move incomplete escaped char back to main\n if ((match = curLine.match(/[=][0-9A-F]?$/i))) {\n curLine = curLine.substr(0, match.index);\n }\n // Malformed input (a run of stray UTF-8 continuation bytes) has no split point\n // that keeps a character sequence whole, so the loop below walks back to an\n // empty line looking for one. Keep the widest chunk that at least does not cut\n // a \"=XX\" escape in half, so the part stays a decodable encoded word.\n fallbackLine = curLine.length ? curLine : str.substr(0, maxlen);\n done = false;\n while (!done && curLine.length) {\n done = true;\n // check if not middle of a unicode char sequence\n if ((match = str.substr(curLine.length).match(/^[=]([0-9A-F]{2})/i))) {\n chr = parseInt(match[1], 16);\n // invalid sequence, move one char back anc recheck\n if (chr < 0xc2 && chr > 0x7f) {\n curLine = curLine.substr(0, curLine.length - 3);\n done = false;\n }\n }\n }\n if (!curLine.length) {\n curLine = fallbackLine;\n }\n lines.push(curLine);\n str = str.substr(curLine.length);\n }\n return lines;\n}\nexport function encodeURICharComponent(chr) {\n let res = '';\n let ord = chr.charCodeAt(0).toString(16).toUpperCase();\n if (ord.length % 2) {\n ord = '0' + ord;\n }\n if (ord.length > 2) {\n for (let i = 0, len = ord.length / 2; i < len; i++) {\n res += '%' + ord.substr(i, 2);\n }\n }\n else {\n res += '%' + ord;\n }\n return res;\n}\nexport function safeEncodeURIComponent(str) {\n str = (str || '').toString();\n try {\n // might throw if we try to encode invalid sequences, eg. partial emoji\n str = encodeURIComponent(str);\n }\n catch (_E) {\n // an unpaired surrogate has no utf-8 representation, so run the value through a\n // utf-8 roundtrip to get the same U+FFFD every other encoder here produces and\n // retry. the value must never come back unencoded, it goes into a header parameter\n // where a bare quote or semicolon would break it out into a parameter of its own\n str = encodeURIComponent(Buffer.from(str, 'utf-8').toString('utf-8'));\n }\n // ensure chars that are not handled by encodeURICompent are converted as well\n return str.replace(/[\\x00-\\x1F *'()<>@,;:\\\\\"[\\]?=\\u007F-\\uFFFF]/g, chr => encodeURICharComponent(chr));\n}\n","/* eslint-disable no-bitwise -- the kind of a token is a set of bit flags packed into one slot of a typed array */\n/** The token is an operator, a text run otherwise */\nconst TOKEN_OPERATOR = 1;\n/** The next character continues the same run without whitespace in between */\nconst TOKEN_NO_BREAK = 2;\n/** The text run holds characters its value leaves out or changes, so it is no plain slice */\nconst TOKEN_DIRTY = 4;\n/** A backslash escapes the next character in the text run, inside a quoted string or a comment */\nconst TOKEN_ESCAPES = 8;\n/** The text run opens on a character an escaping backslash in front of it has escaped */\nconst TOKEN_STARTS_ESCAPED = 16;\n/**\n * The tokens of an address field, kept as offsets into it.\n *\n * Every token used to be an object of its own, an operator for every ',' and a value string\n * for every run of text, and a list of one letter names, 'a,a,a,...', took some 65 times its\n * size in tokens before any address was read. A token is now three numbers in one typed\n * array, its kind and the range of the field it covers, and its value is sliced off the field\n * when it is read. The few text runs whose value differs from their slice, as they hold an\n * escaping backslash, a line break or a control character, are rebuilt once and kept aside.\n */\nclass TokenList {\n constructor(str) {\n this.str = str;\n this.slots = new Int32Array(48);\n this.length = 0;\n this.cleaned = new Map();\n }\n /**\n * Appends a token\n *\n * @param kind Kind and flags of the token\n * @param start Offset of its first character\n * @param end Offset just past its last character\n * @return Index of the token\n */\n push(kind, start, end) {\n if ((this.length + 1) * 3 > this.slots.length) {\n const grown = new Int32Array(this.slots.length * 2);\n grown.set(this.slots);\n this.slots = grown;\n }\n const at = this.length * 3;\n this.slots[at] = kind;\n this.slots[at + 1] = start;\n this.slots[at + 2] = end;\n return this.length++;\n }\n /**\n * Offset of the first character of a token that is part of its value. A text run that is\n * no plain slice of the field still spans the whitespace and control characters its value\n * is trimmed of.\n */\n contentStart(index) {\n let start = this.slots[index * 3 + 1];\n const end = this.slots[index * 3 + 2];\n while (start < end && _isDroppedCode(this.str.charCodeAt(start))) {\n start++;\n }\n return start;\n }\n /**\n * Offset just past the last character of a token that is part of its value\n */\n contentEnd(index) {\n const start = this.slots[index * 3 + 1];\n let end = this.slots[index * 3 + 2];\n while (end > start && _isDroppedCode(this.str.charCodeAt(end - 1))) {\n end--;\n }\n return end;\n }\n /**\n * The character of an operator token, an empty string for a text run\n */\n operatorAt(index) {\n const at = index * 3;\n return this.slots[at] & TOKEN_OPERATOR ? this.str.charAt(this.slots[at + 1]) : '';\n }\n /**\n * Whether a token is an operator\n */\n isOperator(index) {\n return (this.slots[index * 3] & TOKEN_OPERATOR) !== 0;\n }\n /**\n * Whether the next character continues the run of a token without whitespace in between\n */\n noBreak(index) {\n return (this.slots[index * 3] & TOKEN_NO_BREAK) !== 0;\n }\n /**\n * Value of a token\n */\n value(index) {\n const cleaned = this.cleaned.get(index);\n if (cleaned !== undefined) {\n return cleaned;\n }\n return this.str.slice(this.slots[index * 3 + 1], this.slots[index * 3 + 2]);\n }\n}\n/**\n * A domain literal that ends an address. dtext includes '@' (RFC 5322 3.4.1), so the '@'\n * in front of the literal is the one that splits the domain off, not the last one: reading\n * 'a@[x@evil.com]' at its last '@' made it an address at evil.com.\n */\nconst DOMAIN_LITERAL_TAIL = /@(\\[[^[\\]\\\\]*\\])$/;\n/**\n * Offset of the '@' that splits the domain off an address, or -1 when there is none\n *\n * @param address Address to split\n * @return Offset of the '@'\n */\nfunction _domainAt(address) {\n const literal = address.charAt(address.length - 1) === ']' ? DOMAIN_LITERAL_TAIL.exec(address) : null;\n return literal ? address.length - literal[1].length - 1 : address.lastIndexOf('@');\n}\n/**\n * Restores the quoting of a local part that was read out of a quoted string.\n *\n * RFC 5321 allows '@' inside a quoted local part, so handing '\"user@evil.com\"@good.com'\n * on as the bare 'user@evil.com@good.com' leaves it to the consumer which '@' splits the\n * domain off. Getting that wrong is a misrouting vector, so the quotes go back on. The\n * same holds for the other specials: a ',' or a ';' that loses its quotes reads as a\n * recipient separator once the consumer puts the address back into a header.\n *\n * This module has no dependencies so that it can ship on its own, which is why the two\n * grammar tests below are spelled out here instead of shared with src/mime-node. Keeping\n * only what is ambiguous quoted is deliberate, mime-node applies the stricter RFC 5321\n * dot-atom rule on top of this when it emits an address.\n *\n * @param address Address with an unquoted local part\n * @return Address with the local part as a quoted-string\n */\nfunction _quoteLocalPart(address) {\n const lastAt = _domainAt(address);\n if (lastAt < 0) {\n // no domain to split off, nothing can be misrouted\n return address;\n }\n const user = address.substr(0, lastAt);\n if (/^[^\\s\"(),:;<>@[\\\\\\]]+$/.test(user) || /^\"(?:[^\"\\\\]|\\\\[\\s\\S])*\"$/.test(user)) {\n // a local part that carries no special reads the same with or without the quotes,\n // and one that is already a complete quoted-string needs nothing either\n return address;\n }\n return '\"' + user.replace(/[\"\\\\]/g, '\\\\$&') + '\"@' + address.substr(lastAt + 1);\n}\n/**\n * Reached for every parsed address, so it is built once rather than per call.\n */\nconst HAS_WHITESPACE = /\\s/;\n/**\n * An addr-spec that carries its whitespace legally, inside a quoted local part. The\n * optional tail is the malformed shape: a real mailbox with wreckage trailing it.\n */\nconst QUOTED_LOCAL_ADDR = /^(\"(?:[^\"\\\\]|\\\\[\\s\\S])*\"@\\S+)(?:\\s+([\\s\\S]+))?$/;\n/**\n * One run holding a single '@' and no whitespace, the shape an addr-spec has to have.\n */\nconst ADDR_SPEC = /^[^@\\s]+@[^@\\s]+$/;\n/**\n * The same with a domain literal for the domain, which may hold an '@' of its own.\n */\nconst LITERAL_ADDR_SPEC = /^[^@\\s]+@\\[[^[\\]\\\\\\s]*\\]$/;\n/**\n * The '@' and domain that follow a quoted local part in the same run.\n */\nconst QUOTED_LOCAL_DOMAIN = /^@(?:[^@\\s\"]+|\\[[^[\\]\\\\\\s]*\\])$/;\n/**\n * Whether a whitespace free run reads as an addr-spec under the strict grammar\n *\n * @param value Run to check\n * @return true when it does\n */\nfunction _isAddrSpec(value) {\n return ADDR_SPEC.test(value) || LITERAL_ADDR_SPEC.test(value);\n}\n/**\n * The looser reading applied once the strict one finds nothing, which tolerates the\n * further '@' that a domain should not have but malformed headers carry anyway.\n */\nconst LOOSE_ADDR_SPEC = /^[^@\\s]+@\\S+$/;\n/**\n * An addr-spec sitting inside free text, together with the whitespace around it. Sticky\n * on purpose: it is run at the one offset _looseAddressStart picks rather than being let\n * loose to search, see there.\n */\nconst LOOSE_TEXT_ADDR = /\\s*\\b[^@\\s]+@[^\\s]+\\b\\s*/y;\n/**\n * The characters JS `\\s` matches, which the scan below has to agree with to land on the\n * same match the pattern would.\n */\nfunction _isSpaceCode(code) {\n return (code === 0x20 ||\n (code >= 0x09 && code <= 0x0d) ||\n code === 0xa0 ||\n code === 0x1680 ||\n (code >= 0x2000 && code <= 0x200a) ||\n code === 0x2028 ||\n code === 0x2029 ||\n code === 0x202f ||\n code === 0x205f ||\n code === 0x3000 ||\n code === 0xfeff);\n}\n/**\n * Checks for the whitespace RFC 5322 folding whitespace is made of: SP and HTAB, plus the\n * line break a fold carries. The other characters _isSpaceCode accepts are atext under\n * RFC 6532, and parsers disagree on them: mailauth keeps U+00A0 in a domain, so joining a\n * domain across one names a domain that reader never sees\n *\n * @param code Character code\n * @return true if the character is folding whitespace\n */\nfunction _isFoldingSpaceCode(code) {\n return code === 0x20 || code === 0x09 || code === 0x0d || code === 0x0a;\n}\n/**\n * Checks if every character in a stretch of the field is folding whitespace\n *\n * @param str The field\n * @param from Offset of the first character\n * @param to Offset just past the last one\n * @return true if the stretch holds nothing but folding whitespace\n */\nfunction _isFoldingGap(str, from, to) {\n for (let i = from; i < to; i++) {\n if (!_isFoldingSpaceCode(str.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n}\n/**\n * Checks for a character the value of a text run is trimmed of, or leaves out: whitespace,\n * C0 controls and DEL\n *\n * @param code Character code\n * @return true if the character is not part of the value at the edge of a run\n */\nfunction _isDroppedCode(code) {\n return code < 0x20 || code === 0x7f || _isSpaceCode(code);\n}\n/**\n * The characters JS `\\w` matches without the unicode flag, the set the `\\b` in\n * LOOSE_TEXT_ADDR is read against. charCodeAt off either end of the string gives NaN,\n * which compares false throughout, so out of range reads as the non-word the pattern\n * treats them as.\n */\nfunction _isWordCode(code) {\n return (code >= 0x30 && code <= 0x39) || (code >= 0x41 && code <= 0x5a) || (code >= 0x61 && code <= 0x7a) || code === 0x5f;\n}\n/**\n * Whether `\\b` holds at an offset\n */\nfunction _isBoundary(text, at) {\n return _isWordCode(text.charCodeAt(at - 1)) !== _isWordCode(text.charCodeAt(at));\n}\n/**\n * Offset of the first '@' in `text` between `from` and `to`, or -1 when the range holds none.\n *\n * indexOf would scan on to the end of the value, and the value here is a whole header. The\n * walk below steps one whitespace delimited run at a time and only ever uses a '@' that sits\n * inside the run it is on, so an unbounded probe rescans everything behind that run once per\n * run and grows with the square of the header: 400KB of free text carrying no '@' took a\n * quarter of a second. GHSA-v53p-9fqp-m79j took the pattern search out of this walk and left\n * the probe unbounded behind it.\n *\n * @param text Text to look in\n * @param from Offset to start at\n * @param to Offset to stop before\n * @return Offset of the '@', or -1\n */\nfunction _indexOfAt(text, from, to) {\n for (let i = from; i < to; i++) {\n if (text.charCodeAt(i) === 0x40) {\n return i;\n }\n }\n return -1;\n}\n/**\n * A quoted-string a value opens with.\n */\nconst LEADING_QUOTED_STRING = /^\"(?:[^\"\\\\]|\\\\[\\s\\S])*\"/;\n/**\n * Drops the whitespace on either side of the '@' at an offset.\n *\n * obs-local-part and obs-domain allow CFWS around the '@' (RFC 5322 4.4), so 'user @ good.com'\n * names user@good.com. Kept, the whitespace went into the envelope as '\"user \"@ good.com'.\n * The scan is by index, a pattern such as /\\s+@/ backtracks over a long whitespace run that\n * no '@' follows.\n *\n * The whitespace around the dots of the domain that follows is dropped as well, see\n * _joinDomainDotSpacing.\n *\n * @param value Value holding the '@'\n * @param at Offset of the '@', or -1\n * @return The value with the whitespace beside that '@' removed\n */\nfunction _joinAtSpacing(value, at) {\n if (at < 0) {\n return value;\n }\n let start = at;\n while (start > 0 && _isSpaceCode(value.charCodeAt(start - 1))) {\n start--;\n }\n let end = at + 1;\n while (end < value.length && _isSpaceCode(value.charCodeAt(end))) {\n end++;\n }\n const joined = start === at && end === at + 1 ? value : value.slice(0, start) + '@' + value.slice(end);\n return _joinDomainDotSpacing(joined, start);\n}\n// The ASCII atext characters: printable, and none of the RFC 5322 specials\nconst ASCII_ATEXT = new Uint8Array(0x80);\nfor (let code = 0x21; code < 0x7f; code++) {\n ASCII_ATEXT[code] = '()<>[]:;@\\\\,.\"'.indexOf(String.fromCharCode(code)) < 0 ? 1 : 0;\n}\n/**\n * Checks if a character can be part of an atom: anything but the specials, whitespace and\n * the control characters (RFC 5322 3.2.3, with non-ASCII allowed as RFC 6532 does)\n *\n * @param code Character code\n * @return true if the character is atext\n */\nfunction _isAtextCode(code) {\n return code < 0x80 ? ASCII_ATEXT[code] === 1 : !_isSpaceCode(code);\n}\n/**\n * Drops the whitespace around the dots of the domain behind the '@' at an offset.\n *\n * obs-domain is atoms with CFWS around the dots (RFC 5322 4.4), so 'user@victim.example\n * .allowed.example' names user@victim.example.allowed.example. Read as two runs, the domain\n * ended at the whitespace and the envelope went to victim.example, a different domain than\n * the one an RFC 5322 parser, and an application validating the address with one, reads\n * (GHSA-3q53-mvfw-q9v8). A comment around a dot reaches here as whitespace.\n *\n * Only SP, HTAB and a fold count as the whitespace, see _isFoldingSpaceCode.\n *\n * Only a dot with an atom on both sides joins, as for a conformant parser: whitespace that\n * is not beside a dot ends the domain, and so does a dot that no atom follows, which keeps\n * 'user@example.com .' from becoming a domain with a trailing dot. A domain literal is left\n * alone. Everything from where the domain ends is kept as it is.\n *\n * @param value Value holding the '@'\n * @param at Offset of the '@'\n * @return The value with the whitespace around the dots of that domain removed\n */\nfunction _joinDomainDotSpacing(value, at) {\n const len = value.length;\n // '[' is no atext, so a domain literal ends the walk before it starts\n let pos = at + 1;\n let spaced = false;\n for (;;) {\n const labelStart = pos;\n while (pos < len && _isAtextCode(value.charCodeAt(pos))) {\n pos++;\n }\n if (pos === labelStart) {\n break;\n }\n // the dot, with the whitespace on either side of it, and the label behind it\n let next = pos;\n while (next < len && _isFoldingSpaceCode(value.charCodeAt(next))) {\n next++;\n }\n if (value.charCodeAt(next) !== 0x2e) {\n break;\n }\n next++;\n while (next < len && _isFoldingSpaceCode(value.charCodeAt(next))) {\n next++;\n }\n if (next >= len || !_isAtextCode(value.charCodeAt(next))) {\n break;\n }\n spaced = spaced || next !== pos + 1;\n pos = next;\n }\n if (!spaced) {\n return value;\n }\n // every whitespace character the walk covered sits beside a dot\n let domain = '';\n for (let k = at + 1; k < pos; k++) {\n if (!_isFoldingSpaceCode(value.charCodeAt(k))) {\n domain += value.charAt(k);\n }\n }\n return value.slice(0, at + 1) + domain + value.slice(pos);\n}\n/**\n * Drops the whitespace beside the '@' that splits the domain off a value. That is the '@'\n * right after a quoted local part the value opens with, or else the only '@' it holds outside\n * any quoted string. With several it is not clear which one the whitespace belongs to, and\n * '<x@evil.com @good.com>' is left to the addr-spec recovery to read as it always has.\n *\n * @param value Value to clean up\n * @return The value with the whitespace beside that '@' removed\n */\nfunction _collapseAtSpacing(value) {\n const quoted = LEADING_QUOTED_STRING.exec(value);\n if (quoted) {\n let at = quoted[0].length;\n while (at < value.length && _isSpaceCode(value.charCodeAt(at))) {\n at++;\n }\n if (value.charAt(at) === '@' && value.indexOf('@', at + 1) < 0) {\n return _joinAtSpacing(value, at);\n }\n }\n const at = value.indexOf('@');\n if (at < 0 || value.indexOf('@', at + 1) >= 0 || value.lastIndexOf('\"') > at) {\n return value;\n }\n return _joinAtSpacing(value, at);\n}\n/**\n * Finds the offset LOOSE_TEXT_ADDR matches at, or -1 when it does not match at all.\n *\n * Letting the pattern search for itself is quadratic: '[^@\\s]+' is retried from every\n * offset and rescans the run to the next '@' each time, so 140KB of header holding no\n * usable '@' blocks the event loop for about ten seconds (GHSA-v53p-9fqp-m79j). The search is also unnecessary.\n * '[^@\\s]+' crosses neither whitespace nor a '@', so a match can only begin at the head of\n * a whitespace delimited run or just past a '@' inside one, and '[^\\s]+\\b' gives characters\n * back until it lands on a boundary, so the only end it can take in that run is the last\n * boundary in it. Both are found in one pass, and the pattern is then run at that single\n * offset.\n *\n * @param text Free text to look in\n * @return Offset to match at, or -1\n */\nfunction _looseAddressStart(text) {\n const len = text.length;\n let pos = 0;\n while (pos < len) {\n while (pos < len && _isSpaceCode(text.charCodeAt(pos))) {\n pos++;\n }\n if (pos >= len) {\n break;\n }\n const runStart = pos;\n let runEnd = pos;\n while (runEnd < len && !_isSpaceCode(text.charCodeAt(runEnd))) {\n runEnd++;\n }\n let at = _indexOfAt(text, runStart, runEnd);\n if (at >= 0) {\n let lastBoundary = -1;\n for (let k = runEnd; k > runStart; k--) {\n if (_isBoundary(text, k)) {\n lastBoundary = k;\n break;\n }\n }\n let atomStart = runStart;\n while (lastBoundary >= 0 && at >= 0) {\n // '[^@\\s]+' has to cover a character before the '@' and '[^\\s]+' one after it,\n // and the boundary that ends the match has to sit past both\n if (at > atomStart && runEnd > at + 1 && lastBoundary > at + 1) {\n for (let start = atomStart; start < at; start++) {\n if (_isBoundary(text, start)) {\n if (start > runStart) {\n return start;\n }\n // the leading '\\s*' is greedy, so a match that begins at the run\n // takes the whitespace in front of it along\n let padded = runStart;\n while (padded > 0 && _isSpaceCode(text.charCodeAt(padded - 1))) {\n padded--;\n }\n return padded;\n }\n }\n }\n atomStart = at + 1;\n at = _indexOfAt(text, atomStart, runEnd);\n }\n }\n pos = runEnd;\n }\n return -1;\n}\n/**\n * Recovers the addr-spec from an angle-addr that came back holding unquoted whitespace.\n *\n * A malformed header can put more than a mailbox between the angle brackets, most often\n * because the generator wrote the recipient twice: '<user@example.com user@example.com>'\n * or '<example.com user@example.com>'. Whitespace is not addr-spec, so the whole run can\n * never be a mailbox anyone could deliver to, and passing it on as the address loses the\n * recipient that is sitting right there in the header.\n *\n * The run that still reads as an addr-spec is kept and whatever is left over becomes\n * display text rather than being dropped. Candidates are read strictly first and then\n * under the looser grammar, the same two tiers the unquoted-text branch below applies to\n * the same problem, so that '<a@b@c.com junk>' and a bare 'a@b@c.com junk' agree on the\n * recipient. When several runs qualify the first wins, which is what that branch's looser\n * tier does within a token.\n *\n * A quoted local part is left alone: RFC 5321 allows whitespace inside it, so\n * '<\"user name\"@example.com>' is well formed and means exactly what it says.\n *\n * @param data Collected address parts, mutated in place\n */\nfunction _recoverAddrSpec(data) {\n data.address = _collapseAtSpacing(data.address);\n if (!HAS_WHITESPACE.test(data.address)) {\n return;\n }\n let address;\n let rest;\n const quoted = data.address.match(QUOTED_LOCAL_ADDR);\n if (quoted) {\n if (!quoted[2]) {\n // the whitespace sits inside the quoted local part, this is a well formed mailbox\n return;\n }\n // a real mailbox with wreckage trailing it, so peel the addr-spec off whole rather\n // than splitting into the quotes\n address = quoted[1];\n rest = [quoted[2]];\n }\n else {\n if (data.address.indexOf('\"') >= 0) {\n // Splitting on whitespace loses track of where the quoted string starts and ends,\n // and this module does not take addresses out of quoted strings: the run picked out\n // of '<junk \"user@evil.com b\"@good.com>' would be an address from the domain the\n // quotes were hiding. Every well formed shape was already handled above, so what is\n // left is wreckage either way and the original is the honest answer\n return;\n }\n const parts = data.address.split(/\\s+/);\n let addrIndex = parts.findIndex(_isAddrSpec);\n if (addrIndex < 0) {\n addrIndex = parts.findIndex(part => LOOSE_ADDR_SPEC.test(part));\n }\n if (addrIndex < 0) {\n // nothing in there reads as an address, there is no better answer than the original\n return;\n }\n address = parts.splice(addrIndex, 1)[0];\n rest = parts;\n }\n data.address = address;\n data.text = [data.text]\n .concat(rest)\n .filter(part => part)\n .join(' ');\n}\n/**\n * Takes the RFC 5322 comments out of the contents of an angle-addr.\n *\n * The tokenizer tracks a single open operator, so once '<' is open a '(' is plain text and\n * a comment inside the brackets reached the address verbatim: 'Name <user@example.com(x)evil.com>'\n * put 'user@example.com(x)evil.com' into the envelope, a value that is no mailbox and that a\n * receiver stripping the comment reads as 'user@example.comevil.com' (GHSA-g73g-hqqh-jr95).\n * A comment is folding whitespace, so it is read as a space that splits two atoms and as\n * nothing next to an '@', the same rule the token walk applies outside the brackets. Quoted\n * strings and domain literals are copied through untouched, a '(' in there is not a comment.\n * An unexpected '<' outside them drops everything in front of it, comments included.\n *\n * RFC 822 also let an angle-addr name the relays to go through in front of the mailbox,\n * '<@relay1,@relay2:user@example.com>', which RFC 5322 still parses as obs-route. The route\n * is not part of the mailbox, and folded into the local part it made\n * '\"@relay1,@relay2:user\"@example.com' a recipient that does not exist. A local part can not\n * start with '@', so contents that do, up to the first ':' outside a domain literal and in\n * front of any quoted string, are a route and are dropped, as long as a mailbox with an '@'\n * of its own follows.\n *\n * @param address Contents of the angle brackets\n * @return The address with the comments removed, and the text of the comments\n */\nfunction _stripAddressComments(address) {\n const comments = [];\n let result = '';\n let comment = '';\n let depth = 0;\n let closer = '';\n // carried along rather than read back off the growing result, which would flatten it on\n // every comment (see lastChars in _handleAddress)\n let lastChar = '';\n // A comment that just closed stands for a space, written once the next character shows\n // whether one is wanted: not beside an '@', and not on top of whitespace that follows.\n // Deciding on the spot saw only the character right after the ')', so a second comment\n // in a row hid the '@' behind it and 'a(x)(y)@b' read as 'a @b'\n let pendingSpace = false;\n // first character of the result and whether a quoted string has opened since, which\n // together tell a route from a local part\n let firstChar = '';\n let quoteSeen = false;\n let routeEnd = -1;\n for (let i = 0, len = address.length; i < len; i++) {\n const chr = address.charAt(i);\n if (depth) {\n if (chr === '\\\\' && i < len - 1) {\n comment += address.charAt(++i);\n }\n else if (chr === '(') {\n depth++;\n comment += chr;\n }\n else if (chr === ')' && !--depth) {\n comments.push(comment.trim());\n comment = '';\n pendingSpace = lastChar !== '@';\n }\n else {\n comment += chr;\n }\n continue;\n }\n if (pendingSpace && chr !== '(') {\n pendingSpace = false;\n if (chr !== '@' && chr !== '<' && !_isSpaceCode(address.charCodeAt(i))) {\n result += ' ';\n lastChar = ' ';\n }\n }\n if (closer) {\n if (chr === '\\\\' && closer === '\"' && i < len - 1) {\n result += chr + address.charAt(++i);\n lastChar = address.charAt(i);\n continue;\n }\n if (chr === closer) {\n closer = '';\n }\n }\n else if (chr === '\"') {\n closer = '\"';\n quoteSeen = true;\n }\n else if (chr === ':' && routeEnd < 0 && firstChar === '@' && !quoteSeen) {\n routeEnd = result.length + 1;\n }\n else if (chr === '[') {\n closer = ']';\n }\n else if (chr === '(') {\n depth = 1;\n continue;\n }\n else if (chr === '<') {\n // Apple Mail drops everything between an unexpected '<' and the address after it.\n // Read here rather than off the raw brackets so that a '<' inside a quoted string,\n // a comment or a domain literal stays where it is: '<\"a<b\"@victim.com>' cut at\n // the first '<' left the address 'b\"@victim.com'\n result = '';\n lastChar = '';\n comments.length = 0;\n firstChar = '';\n quoteSeen = false;\n routeEnd = -1;\n continue;\n }\n result += chr;\n lastChar = chr;\n if (!firstChar && !_isSpaceCode(address.charCodeAt(i))) {\n firstChar = chr;\n }\n }\n if (routeEnd >= 0 && result.indexOf('@', routeEnd) >= 0) {\n result = result.slice(routeEnd);\n }\n if (depth) {\n // an unterminated comment runs to the end of the address\n comments.push(comment.trim());\n }\n return { address: result.trim(), comments: comments.filter(text => text) };\n}\n/**\n * Walks the tokens of one entry of an address list and sorts them into the runs of display\n * text, angle-addr and comment they belong to\n *\n * @param tokens Tokens of the whole address list\n * @param from Index of the first token of the entry\n * @param to Index just past the last token of the entry\n * @return The collected runs, and whether the display text came out of a comment\n */\nfunction _collectAddressParts(tokens, from, to) {\n let state = 'text';\n const data = {\n address: [],\n comment: [],\n text: [],\n textWasQuoted: [],\n quotedLocalAt: []\n };\n let insideQuotes = false;\n // whether the last text run holds nothing but quoted text so far, which is what a quoted\n // local part is until the '@' after it joins the run\n let lastTextPureQuoted = false;\n // whether the last text run holds an unquoted '@', so that it runs on into a domain, and\n // whether nothing but comments has come since it, see the join below\n let lastTextHasAt = false;\n let lastTextOpen = false;\n // Where the last text run, or the last comment since it, ended in the field, and whether\n // everything between it and the comments since was folding whitespace. The tokens are\n // trimmed of any whitespace, so this is read off the field itself.\n let gapFrom = 0;\n let gapsFolding = true;\n // Last character of the run each state is currently accumulating. Reading it back off\n // the accumulator with slice(-1) makes the engine flatten the whole growing string on\n // every token, which is quadratic over an address built from many comment-joined atoms\n // (GHSA-prgh-xp8r-p3m5). A run only ever grows by the token appended below, so the\n // character is carried along instead of re-read.\n const lastChars = { address: '', comment: '', text: '' };\n // Filter out <addresses>, (comments) and regular text\n for (let i = from; i < to; i++) {\n const value = tokens.value(i);\n // the operator in front of this token, if there is one, and whether it runs on into it\n const prevOperator = i > from ? tokens.operatorAt(i - 1) : '';\n const prevNoBreak = i > from && tokens.noBreak(i - 1);\n if (tokens.isOperator(i)) {\n switch (value) {\n case '<':\n state = 'address';\n insideQuotes = false;\n lastTextOpen = false;\n break;\n case '(':\n state = 'comment';\n insideQuotes = false;\n gapsFolding = gapsFolding && _isFoldingGap(tokens.str, gapFrom, tokens.contentStart(i));\n break;\n case '\"':\n insideQuotes = !insideQuotes;\n state = 'text';\n lastTextOpen = false;\n break;\n default:\n state = 'text';\n insideQuotes = false;\n if (value !== ')') {\n lastTextOpen = false;\n }\n else {\n gapFrom = tokens.contentEnd(i);\n }\n break;\n }\n }\n else {\n // An empty quoted string is dropped by the tokenizer, leaving no text token of its\n // own for textWasQuoted to be recorded on, so the pair of quote operators right in\n // front of this token is all that is left of it and the run it opens carries the\n // quoting instead. Without this '\"\"@example.com' reads as the bare '@example.com',\n // the quotes never go back on, and the value is no longer an addr-spec a trailing\n // comment can be peeled off of. It only ever opens a run: a run that already holds\n // material collected outside the quotes is not a quoted string, whatever follows it\n const opensAfterEmptyQuotedString = prevOperator === '\"' && prevNoBreak && i > from + 1 && tokens.operatorAt(i - 2) === '\"';\n // A comment is folding whitespace. It may sit inside an addr-spec, on either side\n // of the '@', but it cannot join two atoms into one: gluing across it would read\n // 'user@example.com(x)evil.com' as the single domain 'example.comevil.com' and\n // deliver to a domain the sender never named.\n // A comment beside a dot of a domain is CFWS inside obs-domain, with or without\n // folding whitespace around it, so 'user@victim.example(x).allowed.example' names\n // one domain (GHSA-3q53-mvfw-q9v8). Any other whitespace in between keeps them apart.\n // A ')' always leaves the walk in unquoted text, so neither needs checking here.\n // Neither join across a comment takes in a second '@' once the run holds one: the\n // address would then split at the last '@', and 'user@company(x).com@attacker.net',\n // which an RFC 5322 parser reads as user@company.com, would go to attacker.net.\n const parts = data[state];\n const secondAt = lastTextHasAt && prevOperator === ')' && value.indexOf('@') >= 0;\n const joinsDomain = !secondAt &&\n lastTextOpen &&\n lastTextHasAt &&\n prevOperator === ')' &&\n (lastChars.text === '.' || value.charAt(0) === '.') &&\n gapsFolding &&\n _isFoldingGap(tokens.str, gapFrom, tokens.contentStart(i));\n const joins = joinsDomain || (!secondAt && prevNoBreak && parts.length > 0 && (prevOperator !== ')' || lastChars[state] === '@' || value.charAt(0) === '@'));\n if (joins) {\n const last = data[state].length - 1;\n if (state === 'text' && !insideQuotes) {\n if (lastTextPureQuoted && value.charAt(0) === '@') {\n data.quotedLocalAt[last] = data.text[last].length;\n }\n lastTextPureQuoted = false;\n }\n data[state][last] += value;\n lastChars[state] = value.charAt(value.length - 1);\n if (state === 'text' && insideQuotes) {\n data.textWasQuoted[last] = true;\n }\n }\n else {\n data[state].push(value);\n lastChars[state] = value.charAt(value.length - 1);\n if (state === 'text') {\n data.textWasQuoted.push(insideQuotes || opensAfterEmptyQuotedString);\n // an empty quoted string leaves no text of its own, so the '@' opens the run\n data.quotedLocalAt.push(opensAfterEmptyQuotedString && value.charAt(0) === '@' ? 0 : -1);\n lastTextPureQuoted = insideQuotes;\n }\n }\n if (state === 'text') {\n lastTextHasAt = (joins && lastTextHasAt) || (!insideQuotes && value.indexOf('@') >= 0);\n lastTextOpen = true;\n gapFrom = tokens.contentEnd(i);\n gapsFolding = true;\n }\n }\n }\n // If there is no text but a comment, replace the two. A comment is never part of a\n // mailbox, so text that came out of one only ever names it: reading an address out of it\n // made '(a@evil.com)' a recipient where no conformant reading has a mailbox at all\n let textFromComment = false;\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n textFromComment = true;\n }\n return { data, textFromComment };\n}\n/**\n * Name of a group, from the tokens in front of its ':'. A comment names it when no text does,\n * as it names a mailbox.\n *\n * @param tokens Tokens of the whole address list\n * @param from Index of the first token in front of the ':'\n * @param to Index of the ':'\n * @return Name of the group\n */\nfunction _groupName(tokens, from, to) {\n // http://tools.ietf.org/html/rfc2822#appendix-A.1.3\n return _collectAddressParts(tokens, from, to).data.text.join(' ');\n}\n/**\n * Converts tokens for a single address into an address object\n *\n * @param tokens Tokens of the whole address list\n * @param from Index of the first token of this address\n * @param to Index just past the last token of this address\n * @return Address object\n */\nfunction _handleAddress(tokens, from, to) {\n const collected = _collectAddressParts(tokens, from, to);\n const data = collected.data;\n let textFromComment = collected.textFromComment;\n // Comments come out of the angle-addr before anything asks whether one was found, so\n // that brackets holding nothing but a comment read the same as empty ones\n const addressComments = [];\n const addressParts = [];\n for (const part of data.address) {\n const stripped = _stripAddressComments(part);\n for (const comment of stripped.comments) {\n addressComments.push(comment);\n }\n if (stripped.address) {\n addressParts.push(stripped.address);\n }\n }\n data.address = addressParts;\n // If no address was found, try to detect one from regular text\n if (!data.address.length && data.text.length && !textFromComment) {\n // Whitespace beside the '@' is CFWS, so 'user @ good.com' is read as one run. Both\n // tiers read the collapsed runs, and only a run an address comes out of is replaced\n // by its collapsed form, the display text keeps its spacing\n const candidates = data.text.map((part) => _collapseAtSpacing(part));\n // The first addr-spec in the text is the mailbox, as it is for a conformant parser\n // reading as far as it can. Taking the last one let a comment part two of them and\n // pick the second, 'user@good.com (x) evil@evil.com' went to evil.com, while the\n // same two without the comment, one run, went to good.com\n for (let i = 0; i < data.text.length; i++) {\n // Security: Do not extract email addresses from quoted strings.\n // RFC 5321 allows @ inside quoted local-parts like \"user@domain\"@example.com.\n // Extracting emails from quoted text leads to misrouting vulnerabilities.\n // A run that is a quoted local part with its '@' and domain is an addr-spec of\n // its own, with the quoting put back on, and takes its turn like any other\n const local = data.quotedLocalAt[i];\n const quotedLocal = data.textWasQuoted[i] && local >= 0 && QUOTED_LOCAL_DOMAIN.test(data.text[i].slice(local)) ? _quoteLocalPart(data.text[i]) : '';\n if (quotedLocal || (!data.textWasQuoted[i] && _isAddrSpec(candidates[i]))) {\n data.address = [quotedLocal || candidates[i]];\n data.text.splice(i, 1);\n data.textWasQuoted.splice(i, 1);\n data.quotedLocalAt.splice(i, 1);\n break;\n }\n }\n // Try a looser regex match if strict match found nothing\n if (!data.address.length) {\n let extracted = false;\n for (let i = 0; i < data.text.length; i++) {\n // Security: Do not extract email addresses from quoted strings\n if (!data.textWasQuoted[i]) {\n // the strict tier found nothing, so it spliced nothing and the indexes still line up\n const part = candidates[i];\n let remainder = data.text[i];\n const at = _looseAddressStart(part);\n if (at >= 0) {\n LOOSE_TEXT_ADDR.lastIndex = at;\n const match = LOOSE_TEXT_ADDR.exec(part);\n if (match) {\n data.address = [match[0].trim()];\n extracted = true;\n remainder = part.slice(0, at) + ' ' + part.slice(at + match[0].length);\n }\n }\n data.text[i] = remainder.trim();\n if (extracted) {\n break;\n }\n }\n }\n }\n }\n // If there's still no text but a comment exists, replace the two\n if (!data.text.length && data.comment.length) {\n data.text = data.comment;\n data.comment = [];\n }\n // Keep only the first address occurrence, push others to regular text\n if (data.address.length > 1) {\n data.text = data.text.concat(data.address.splice(1));\n }\n // An address is only taken from unquoted text, so anything left in the text at this\n // point that still has to serve as the address carries its quoting in this flag\n const addressFromQuotedText = !data.address.length && data.textWasQuoted.some(wasQuoted => wasQuoted);\n // Join values with spaces\n data.text = data.text.join(' ');\n data.address = data.address.join(' ');\n if (addressFromQuotedText && data.text.indexOf('@') >= 0) {\n // A quoted run with no '@' in it is a display name and nothing else, so it stays\n // where it is. Moving it over anyway made a comment the mailbox was read from:\n // '\"Display Name\" <(a comment)>' handed on 'Display Name' as the address with the\n // comment as the name, and a quoted name holding a ',' or a ';' became an address\n // that reads as two recipients once a consumer writes it back into a header.\n //\n // The mailbox is still sitting in the text, so it moves over here and is quoted\n // before the recovery below rather than after it. Anything else the text holds\n // came along with it: a comment ends the domain but leaves the atoms behind it in\n // the same text, and '\"user\"@example.com(x)evil.com' was handed on as the address\n // 'user@example.com evil.com', a second domain riding into the envelope recipient\n // on a value that is no addr-spec at all (GHSA-g57g-f23g-4646). Putting the quotes\n // back first is what lets the recovery tell the whitespace an addr-spec may carry\n // from the wreckage trailing one, as only a quoted local part may hold whitespace\n // The quotes are gone at this point, so the '@' the domain splits off at is the\n // last one, not the single one _collapseAtSpacing insists on\n data.address = _quoteLocalPart(_joinAtSpacing(data.text, _domainAt(data.text)));\n data.text = '';\n }\n _recoverAddrSpec(data);\n // a comment names the mailbox only when nothing else does, as one outside the brackets\n if (!data.text && addressComments.length) {\n data.text = addressComments.join(' ');\n textFromComment = true;\n }\n const address = {\n address: data.address || (textFromComment ? '' : data.text) || '',\n name: data.text || data.address || ''\n };\n if (address.address === address.name) {\n if (/@/.test(address.address || '')) {\n address.name = '';\n }\n else {\n address.address = '';\n }\n }\n return address;\n}\n/* eslint-disable no-bitwise -- see TokenList */\n/**\n * Creates a Tokenizer object for tokenizing address field strings\n *\n * @constructor\n * @param str Address field string\n */\nclass Tokenizer {\n constructor(str) {\n this.str = (str || '').toString();\n this.operatorCurrent = '';\n this.operatorExpecting = '';\n this.node = -1;\n this.escaped = false;\n this.inDomainLiteral = false;\n this.afterAt = false;\n this.inGroup = false;\n this.innerQuoted = false;\n this.innerComment = 0;\n this.innerLiteral = false;\n this.innerEscaped = false;\n this.list = new TokenList(this.str);\n /**\n * Operator tokens and which tokens are expected to end the sequence\n */\n this.operators = {\n '\"': '\"',\n '(': ')',\n '<': '>',\n ',': '',\n // A group is read in the same pass as the rest of the list, so its ':' only marks\n // where the name ends and its members are tokenized like any other address\n ':': '',\n // Semicolons are not a legal delimiter per the RFC2822 grammar other\n // than for terminating a group, but they are also not valid for any\n // other use in this context. Given that some mail clients have\n // historically allowed the semicolon as a delimiter equivalent to the\n // comma in their UI, it makes sense to treat them the same as a comma\n // when used outside of a group.\n ';': ''\n };\n }\n /**\n * Tokenizes the original input string\n *\n * @return An array of operator|text tokens\n */\n tokenize() {\n const str = this.str;\n const len = str.length;\n for (let i = 0; i < len; i++) {\n this.checkChar(str.charAt(i), i);\n }\n this._closeText(len);\n // Compacted in place: a text run is trimmed to its value and one left empty is\n // dropped, and the value of a run that is no plain slice is rebuilt and kept aside\n const list = this.list;\n const slots = list.slots;\n let kept = 0;\n for (let i = 0, count = list.length; i < count; i++) {\n const kind = slots[i * 3];\n let start = slots[i * 3 + 1];\n let end = slots[i * 3 + 2];\n if (kind & TOKEN_DIRTY) {\n const value = this._cleanValue(start, end, kind).trim();\n if (!value) {\n continue;\n }\n list.cleaned.set(kept, value);\n }\n else if (!(kind & TOKEN_OPERATOR)) {\n while (start < end && _isSpaceCode(str.charCodeAt(start))) {\n start++;\n }\n while (end > start && _isSpaceCode(str.charCodeAt(end - 1))) {\n end--;\n }\n if (start === end) {\n continue;\n }\n }\n slots[kept * 3] = kind;\n slots[kept * 3 + 1] = start;\n slots[kept * 3 + 2] = end;\n kept++;\n }\n list.length = kept;\n return list;\n }\n /**\n * Ends the text run being collected, if there is one\n *\n * @param end Offset just past its last character\n */\n _closeText(end) {\n if (this.node >= 0) {\n this.list.slots[this.node * 3 + 2] = end;\n this.node = -1;\n }\n }\n /**\n * Rebuilds the value of a text run that is no plain slice of the field, applying the\n * rules checkChar collects characters by: an escaping backslash is dropped, a line break\n * reads as a space and any other control character is left out\n *\n * @param start Offset of the first character of the run\n * @param end Offset just past its last character\n * @param kind Kind and flags of the run\n * @return Value of the run\n */\n _cleanValue(start, end, kind) {\n const str = this.str;\n const escapes = (kind & TOKEN_ESCAPES) !== 0;\n let escaped = (kind & TOKEN_STARTS_ESCAPED) !== 0;\n let value = '';\n for (let i = start; i < end; i++) {\n const chr = str.charAt(i);\n if (escapes && !escaped && chr === '\\\\') {\n escaped = true;\n continue;\n }\n escaped = false;\n if (chr === '\\n') {\n value += ' ';\n }\n else if (chr.charCodeAt(0) >= 0x21 || chr === ' ' || chr === '\\t') {\n value += chr;\n }\n }\n return value;\n }\n /**\n * Checks if a character is an operator or text and acts accordingly\n *\n * @param chr Character from the address field\n * @param i Offset of the character in the field\n */\n checkChar(chr, i) {\n // Track RFC 5322 domain-literals (\"[\" *dtext \"]\"). The \":\" of an IPv6\n // address-literal (user@[IPv6:2001:db8::1]) is dtext and must not be treated as\n // the group delimiter while inside the brackets. That is the only operator the\n // literal hides: letting it hide the others as well meant a \"[\" could turn the\n // comment, quoted string or angle-addr after it into text and pick a different\n // mailbox, '[ ( ] <a@victim.com> ) <b@evil.com>' yielded a@victim.com where\n // RFC 5322 reads b@evil.com. A \"[\" also only opens a literal right after the \"@\"\n // of an addr-spec, so the group delimiter of a display name holding one stays\n // intact. Quoted strings and comments are handled separately via\n // operatorExpecting, so only enter this state when no operator is open. The list\n // separators \",\" and \";\" always end the literal (and split the address list) so\n // that an unclosed \"[\" cannot swallow later recipients.\n if (!this.escaped && !this.operatorExpecting) {\n if (!this.inDomainLiteral && chr === '[' && this.afterAt) {\n this.inDomainLiteral = true;\n }\n else if (this.inDomainLiteral && (chr === ']' || chr === ',' || chr === ';')) {\n this.inDomainLiteral = false;\n }\n }\n // The closer of an angle-addr is only read outside the quoted strings, comments and\n // domain literals it holds. Looking for nothing but the closer let a '>' inside a\n // quoted local part end the angle-addr, '<\"a@evil.com>\"@good.com>' was read as an\n // address at evil.com. The characters are still collected as they are, the angle-addr\n // is read again later\n let nested = false;\n if (this.operatorExpecting === '>') {\n nested = this._trackInner(chr);\n if (!nested && chr === ';' && this.inGroup) {\n // The ';' of a group ends an angle-addr left open inside it, as it always did\n // when a group was cut out of the field at its ';' and parsed on its own. Read\n // as text instead, an unclosed '<' swallowed the end of the group and every\n // recipient after it\n this._closeText(i);\n this.operatorExpecting = '';\n this._resetInner();\n }\n }\n else if (this.operatorExpecting === ')' && !this.escaped) {\n // Comments nest (RFC 5322 3.2.2). Ending one at the first ')' let the ')' of a\n // nested comment close the outer one and released the rest of it, an address\n // included, into the header\n if (chr === '(') {\n this.innerComment++;\n }\n else if (chr === ')' && this.innerComment) {\n this.innerComment--;\n nested = true;\n }\n }\n if (this.escaped) {\n // ignore next condition blocks\n }\n else if (chr === this.operatorExpecting && !nested) {\n const nextChr = this.str.charAt(i + 1);\n this._closeText(i);\n this.list.push(nextChr && ![' ', '\\t', '\\r', '\\n', ',', ';'].includes(nextChr) ? TOKEN_OPERATOR | TOKEN_NO_BREAK : TOKEN_OPERATOR, i, i + 1);\n if (chr !== ')') {\n // a comment is folding whitespace, it does not part the \"@\" from the \"[\"\n this.afterAt = false;\n }\n this.operatorExpecting = '';\n this.escaped = false;\n this._resetInner();\n return;\n }\n else if (!this.operatorExpecting && !(this.inDomainLiteral && chr === ':') && chr in this.operators) {\n this._closeText(i);\n this.list.push(TOKEN_OPERATOR, i, i + 1);\n if (chr === ':') {\n this.inGroup = true;\n }\n else if (chr === ';') {\n this.inGroup = false;\n }\n if (chr !== '(') {\n this.afterAt = false;\n }\n this.operatorExpecting = this.operators[chr];\n this.escaped = false;\n this._resetInner();\n return;\n }\n else if (['\"', \"'\", ')'].includes(this.operatorExpecting) && chr === '\\\\') {\n // A backslash escapes the next character inside a quoted string and inside a\n // comment alike (RFC 5322 3.2.2, ccontent includes quoted-pair). Honouring it\n // only in quoted strings let an escaped parenthesis close the comment, which\n // released the rest of it, an address included, into the header\n this.escaped = true;\n if (this.node >= 0) {\n // the backslash is left out of the value\n this.list.slots[this.node * 3] |= TOKEN_DIRTY;\n }\n return;\n }\n if (this.node < 0) {\n this.node = this.list.push((this.operatorExpecting === '\"' || this.operatorExpecting === ')' ? TOKEN_ESCAPES : 0) | (this.escaped ? TOKEN_STARTS_ESCAPED : 0), i, i);\n }\n if (chr === '\\n') {\n // Convert newlines to spaces. Carriage return is ignored as \\r and \\n usually\n // go together anyway and there already is a WS for \\n. Lone \\r means something is fishy.\n chr = ' ';\n this.list.slots[this.node * 3] |= TOKEN_DIRTY;\n }\n if (chr.charCodeAt(0) >= 0x21 || chr === ' ' || chr === '\\t') {\n // the character is part of the value, which is read off the field later\n // text inside a quoted string or a comment is not part of an addr-spec. Tracked\n // as it goes rather than read back off the value (see lastChars in _handleAddress)\n if (!this.operatorExpecting && chr !== ' ' && chr !== '\\t') {\n this.afterAt = chr === '@';\n }\n }\n else {\n // skip command bytes\n this.list.slots[this.node * 3] |= TOKEN_DIRTY;\n }\n this.escaped = false;\n }\n /**\n * Tracks the quoted strings, comments and domain literals inside an angle-addr, which its\n * closer must not be read from. A backslash escapes the next character inside a quoted\n * string and a comment. A domain literal opens right after an \"@\" and ends at the \"]\".\n * dtext holds the list separators as well, and inside the brackets they never split the\n * list anyway.\n *\n * @param chr Character from the address field\n * @return true while the character sits inside one of them, the one that closes it included\n */\n _trackInner(chr) {\n if (this.innerEscaped) {\n this.innerEscaped = false;\n return true;\n }\n if (this.innerQuoted) {\n if (chr === '\\\\') {\n this.innerEscaped = true;\n }\n else if (chr === '\"') {\n this.innerQuoted = false;\n }\n return true;\n }\n if (this.innerComment) {\n if (chr === '\\\\') {\n this.innerEscaped = true;\n }\n else if (chr === '(') {\n this.innerComment++;\n }\n else if (chr === ')') {\n this.innerComment--;\n }\n return true;\n }\n if (this.innerLiteral) {\n if (chr === ']') {\n this.innerLiteral = false;\n }\n return true;\n }\n if (chr === '\"') {\n this.innerQuoted = true;\n return true;\n }\n if (chr === '(') {\n this.innerComment = 1;\n return true;\n }\n if (chr === '[' && this.afterAt) {\n this.innerLiteral = true;\n return true;\n }\n // afterAt is otherwise only kept outside the operators and is cleared when one opens\n // or ends, so inside an angle-addr it serves the literal tracked here\n if (!_isSpaceCode(chr.charCodeAt(0))) {\n this.afterAt = chr === '@';\n }\n return false;\n }\n /**\n * Forgets the nesting collected for the operator that just opened or ended\n */\n _resetInner() {\n this.innerQuoted = false;\n this.innerComment = 0;\n this.innerLiteral = false;\n this.innerEscaped = false;\n }\n}\n/* eslint-enable no-bitwise */\n/**\n * Folds the fragments an unquoted display name holding a comma is split into back together.\n *\n * \"Joe Foo, PhD <joe@example.com>\" is split on the comma into\n * [{name:\"Joe Foo\", address:\"\"}, {name:\"PhD\", address:\"joe@example.com\"}]. A name-only entry\n * followed by an entry with both name and address is recombined. Walked back to front so\n * that a run of fragments folds into one entry in a single pass. Splicing each fragment out\n * of the list instead would cost O(n^2).\n *\n * @param list Parsed entries, in order\n * @return The entries with the fragments folded in\n */\nfunction _mergeNameFragments(list) {\n const merged = [];\n for (let i = list.length - 1; i >= 0; i--) {\n const current = list[i];\n const next = merged.length ? merged[merged.length - 1] : null;\n if (next && current.address === '' && current.name && !current.group && next.address && next.name) {\n next.name = current.name + ', ' + next.name;\n }\n else {\n merged.push(current);\n }\n }\n return merged.reverse();\n}\n/**\n * Parses an address list, groups included, in a single pass over its tokens.\n *\n * A group used to be cut out of the field at the ';' that ends it and parsed again as an\n * address list of its own, recursively, so every level of nesting parsed what was left of\n * the field once more and the depth had to be capped. RFC 5322 does not nest groups at all,\n * and the nested ones were flattened anyway. The tokens are now walked once: a ':' opens a\n * group, its members are read as they come, a ';' closes it. A ':' inside an open group\n * stands for a group nested in it, whose name is dropped and whose members belong to the\n * outer one, which is how they were flattened before. The first ';' ends the group, nested\n * or not, as it did.\n *\n * @param str Address field\n * @return An array of address objects\n */\nfunction _parseAddressList(str) {\n const tokens = new Tokenizer(str).tokenize();\n const parsedAddresses = [];\n let group = null;\n let members = [];\n // Every address is handed over as the range of the token list it covers, as soon as the\n // separator after it is seen. Copying the tokens of each address into an array of its own,\n // and collecting those before handling any, held a second structure as large as the token\n // list for the whole parse, and an array that receives a single push is allocated room for\n // seventeen: a list of one letter names took some 80 times its size in that alone\n let from = 0;\n for (let i = 0, len = tokens.length; i <= len; i++) {\n const operator = i < len ? tokens.operatorAt(i) : '';\n if (i < len && operator !== ',' && operator !== ';' && operator !== ':') {\n continue;\n }\n if (operator === ':') {\n if (!group) {\n group = { name: _groupName(tokens, from, i), group: [] };\n members = [];\n }\n from = i + 1;\n continue;\n }\n if (i > from) {\n // Appended in place. Rebuilding the accumulator with concat() would copy every\n // entry collected so far on each address, making a flat list cost O(n^2).\n const address = _handleAddress(tokens, from, i);\n if (group) {\n members.push(address);\n }\n else {\n parsedAddresses.push(address);\n }\n }\n from = i + 1;\n if (group && (operator === ';' || i === len)) {\n group.group = _mergeNameFragments(members);\n parsedAddresses.push(group);\n group = null;\n }\n }\n return _mergeNameFragments(parsedAddresses);\n}\nfunction addressparser(str, options) {\n const parsedAddresses = _parseAddressList(str);\n if (options?.flatten) {\n const flatAddresses = [];\n const walkAddressList = (list) => {\n list.forEach(entry => {\n if (entry.group) {\n return walkAddressList(entry.group);\n }\n flatAddresses.push(entry);\n });\n };\n walkAddressList(parsedAddresses);\n return flatAddresses;\n }\n return parsedAddresses;\n}\nexport default addressparser;\n","import { Transform } from 'node:stream';\nexport default class LastNewline extends Transform {\n constructor() {\n super();\n this.lastByte = false;\n }\n /** @internal */\n _transform(chunk, encoding, done) {\n if (chunk.length) {\n this.lastByte = chunk[chunk.length - 1];\n }\n this.push(chunk);\n done();\n }\n /** @internal */\n _flush(done) {\n if (this.lastByte === 0x0a) {\n return done();\n }\n if (this.lastByte === 0x0d) {\n this.push(Buffer.from('\\n'));\n return done();\n }\n this.push(Buffer.from('\\r\\n'));\n return done();\n }\n}\n","import { Transform } from 'node:stream';\n/**\n * Ensures that only <CR><LF> sequences are used for linebreaks\n *\n * @param options Stream options\n */\nexport default class LeWindows extends Transform {\n constructor(options) {\n super(options);\n this.lastByte = false;\n }\n /**\n * Escapes dots\n * @internal\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0a) {\n // \\n\n if ((i && chunk[i - 1] !== 0x0d) || (!i && this.lastByte !== 0x0d)) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n this.push(buf);\n }\n this.push(Buffer.from('\\r\\n'));\n lastPos = i + 1;\n }\n }\n }\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n }\n else if (!lastPos) {\n this.push(chunk);\n }\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n}\n","import { Transform } from 'node:stream';\n/**\n * Ensures that only <LF> is used for linebreaks\n *\n * @param options Stream options\n */\nexport default class LeUnix extends Transform {\n constructor(options) {\n super(options);\n }\n /**\n * Escapes dots\n * @internal\n */\n _transform(chunk, encoding, done) {\n let buf;\n let lastPos = 0;\n for (let i = 0, len = chunk.length; i < len; i++) {\n if (chunk[i] === 0x0d) {\n // \\r\n buf = chunk.slice(lastPos, i);\n lastPos = i + 1;\n this.push(buf);\n }\n }\n if (lastPos && lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n this.push(buf);\n }\n else if (!lastPos) {\n this.push(chunk);\n }\n done();\n }\n}\n","/* eslint no-undefined: 0 */\nimport MimeNode from '../mime-node/index.js';\nimport * as mimeFuncs from '../mime-funcs/index.js';\nimport * as errors from '../errors.js';\nimport { parseDataURI, copyOwnKeys } from '../shared/index.js';\n/**\n * Creates the object for composing a MimeNode instance out from the mail options\n *\n * @constructor\n * @param mail Mail options\n */\n/**\n * Tells whether a content value is a content descriptor object (something to load or to\n * use as is) rather than the content itself\n */\nfunction isContentObject(value) {\n const content = value;\n return typeof value === 'object' && !!(content.content || content.path || content.href || content.raw);\n}\n/**\n * Tells whether attachment content is a string or a Buffer that 7bit can describe: ASCII\n * only, no NUL and no line over the 998 octets of RFC 5322. Anything else, a stream or a\n * file path included, can not be checked here\n */\nfunction fitsSevenBit(content) {\n let at;\n let length;\n if (typeof content === 'string') {\n at = i => content.charCodeAt(i);\n length = content.length;\n }\n else if (Buffer.isBuffer(content)) {\n at = i => content[i];\n length = content.length;\n }\n else {\n return false;\n }\n let lineLength = 0;\n for (let i = 0; i < length; i++) {\n const c = at(i);\n if (c === 0 || c > 0x7f) {\n return false;\n }\n if (c === 0x0a || c === 0x0d) {\n lineLength = 0;\n }\n else if (++lineLength > 998) {\n return false;\n }\n }\n return true;\n}\nclass MailComposer {\n constructor(mail) {\n this.mail = mail || {};\n this.message = false;\n }\n /**\n * Builds MimeNode instance\n */\n compile() {\n this._alternatives = this.getAlternatives();\n this._htmlNode = this._alternatives.filter(alternative => /^text\\/html\\b/i.test(alternative.contentType)).pop();\n this._attachments = this.getAttachments(!!this._htmlNode);\n this._useRelated = !!(this._htmlNode && this._attachments.related.length);\n this._useAlternative = this._alternatives.length > 1;\n this._useMixed = this._attachments.attached.length > 1 || (this._alternatives.length && this._attachments.attached.length === 1);\n // Compose MIME tree\n if (this.mail.raw) {\n this.message = new MimeNode('message/rfc822', {\n newline: this.mail.newline,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess\n }).setRaw(this.mail.raw);\n }\n else if (this._useMixed) {\n this.message = this._createMixed();\n }\n else if (this._useAlternative) {\n this.message = this._createAlternative();\n }\n else if (this._useRelated) {\n this.message = this._createRelated();\n }\n else {\n this.message = this._createContentNode(false, []\n .concat(this._alternatives || [])\n .concat(this._attachments.attached || [])\n .shift() || {\n contentType: 'text/plain',\n content: ''\n });\n }\n // Add custom headers\n if (this.mail.headers) {\n this.message.addHeader(this.mail.headers);\n }\n // after the custom headers, so it replaces an OTP-Token from them, the field may appear only once\n if (this.mail.otp) {\n this.message.setHeader('OTP-Token', formatOtpToken(this.mail.otp));\n }\n // Add headers to the root node, always overrides custom headers\n ['from', 'sender', 'to', 'cc', 'bcc', 'reply-to', 'in-reply-to', 'references', 'subject', 'message-id', 'date'].forEach(header => {\n const key = header.replace(/-(\\w)/g, (o, c) => c.toUpperCase());\n if (this.mail[key]) {\n this.message.setHeader(header, this.mail[key]);\n }\n });\n // Sets custom envelope\n if (this.mail.envelope) {\n this.message.setEnvelope(this.mail.envelope);\n }\n // ensure Message-Id value\n this.message.messageId();\n return this.message;\n }\n /**\n * List all attachments. Resulting attachment objects can be used as input for MimeNode nodes\n *\n * @param findRelated If true separate related attachments from attached ones\n * @returns An object of arrays (`related` and `attached`)\n */\n getAttachments(findRelated) {\n let eventObject;\n const attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {\n if (/^data:/i.test((attachment.path || attachment.href))) {\n attachment = this._processDataUrl(attachment);\n }\n const contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n const isImage = /^image\\//i.test(contentType);\n const isMessageNode = /^message\\//i.test(contentType);\n const contentDisposition = attachment.contentDisposition || (isMessageNode || (isImage && attachment.cid) ? 'inline' : 'attachment');\n let contentTransferEncoding;\n if ('contentTransferEncoding' in attachment) {\n // also contains `false`, to set\n contentTransferEncoding = attachment.contentTransferEncoding;\n }\n else if (isMessageNode) {\n // a message/* part can not be encoded (RFC 2046 5.2.1), so the label has to describe\n // the content as it is. A stream or a file might hold non-ASCII bytes that can not be\n // checked here, so only content at hand that fits 7bit is labelled as such\n // content with an `encoding` is decoded later, so what it decodes to is not known here either\n contentTransferEncoding = !attachment.encoding && fitsSevenBit(attachment.content) ? '7bit' : '8bit';\n }\n else {\n contentTransferEncoding = 'base64'; // the default\n }\n const data = {\n contentType,\n contentDisposition,\n contentTransferEncoding\n };\n if (attachment.filename) {\n data.filename = attachment.filename;\n }\n else if (!isMessageNode && attachment.filename !== false) {\n // a backslash separates as well, so a Windows path does not put the sender's directories in the headers\n data.filename = (attachment.path || attachment.href || '').split(/[/\\\\]/).pop().split('?').shift() || 'attachment-' + (i + 1);\n if (data.filename.indexOf('.') < 0) {\n data.filename += '.' + mimeFuncs.detectExtension(data.contentType);\n }\n }\n if (/^https?:\\/\\//i.test(attachment.path)) {\n attachment.href = attachment.path;\n attachment.path = undefined;\n }\n if (attachment.cid) {\n data.cid = attachment.cid;\n }\n if (attachment.raw) {\n data.raw = attachment.raw;\n }\n else if (attachment.path) {\n data.content = {\n path: attachment.path\n };\n }\n else if (attachment.href) {\n data.content = {\n href: attachment.href,\n httpHeaders: attachment.httpHeaders,\n tls: attachment.tls\n };\n }\n else {\n data.content = attachment.content || '';\n }\n if (attachment.encoding) {\n data.encoding = attachment.encoding;\n }\n if (attachment.headers) {\n data.headers = attachment.headers;\n }\n return data;\n });\n if (this.mail.icalEvent) {\n eventObject = Object.assign({}, this._getIcalEvent());\n eventObject.contentType = 'application/ics';\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n eventObject.filename = eventObject.filename || 'invite.ics';\n eventObject.headers['Content-Disposition'] = 'attachment';\n eventObject.headers['Content-Transfer-Encoding'] = 'base64';\n }\n if (!findRelated) {\n return {\n attached: attachments.concat(eventObject || []),\n related: []\n };\n }\n return {\n attached: attachments.filter(attachment => !attachment.cid).concat(eventObject || []),\n related: attachments.filter(attachment => !!attachment.cid)\n };\n }\n /**\n * Returns the icalEvent value with `path`/`href`/data uri input normalized into\n * a `content` entry, the same way as for regular attachments. The same event is\n * included twice (as a text/calendar alternative and as an application/ics\n * attachment), so the shared content object is marked to be resolved just once\n * and the buffered result is reused by the second node.\n *\n * @returns Normalized icalEvent data\n * @internal\n */\n _getIcalEvent() {\n if (!this._icalEvent) {\n let icalEvent;\n if (isContentObject(this.mail.icalEvent)) {\n // an own \"__proto__\" key would make the copy inherit path/href from caller\n // data, and the mapping below then replaces the content the caller did set\n icalEvent = copyOwnKeys({}, this.mail.icalEvent);\n }\n else {\n icalEvent = {\n content: this.mail.icalEvent\n };\n }\n if (/^data:/i.test((icalEvent.path || icalEvent.href))) {\n icalEvent = this._processDataUrl(icalEvent);\n }\n if (/^https?:\\/\\//i.test(icalEvent.path)) {\n icalEvent.href = icalEvent.path;\n icalEvent.path = undefined;\n }\n if (!icalEvent.raw) {\n // map file path and URL values into `content`, otherwise the content\n // nodes would render an empty body\n if (icalEvent.path) {\n icalEvent.content = {\n path: icalEvent.path\n };\n icalEvent.path = undefined;\n }\n else if (icalEvent.href) {\n icalEvent.content = {\n href: icalEvent.href,\n httpHeaders: icalEvent.httpHeaders,\n tls: icalEvent.tls\n };\n icalEvent.href = undefined;\n }\n }\n if (icalEvent.content && typeof icalEvent.content === 'object') {\n // we are going to have the same attachment twice, so mark this to be\n // resolved just once\n icalEvent.content._resolve = true;\n }\n this._icalEvent = icalEvent;\n }\n return this._icalEvent;\n }\n /**\n * List alternatives. Resulting objects can be used as input for MimeNode nodes\n *\n * @returns An array of alternative elements. Includes the `text` and `html` values as well\n */\n getAlternatives() {\n const alternatives = [];\n let text, html, watchHtml, amp, eventObject;\n if (this.mail.text) {\n if (isContentObject(this.mail.text)) {\n text = this.mail.text;\n }\n else {\n text = {\n content: this.mail.text\n };\n }\n text.contentType = 'text/plain; charset=utf-8';\n }\n if (this.mail.watchHtml) {\n if (isContentObject(this.mail.watchHtml)) {\n watchHtml = this.mail.watchHtml;\n }\n else {\n watchHtml = {\n content: this.mail.watchHtml\n };\n }\n watchHtml.contentType = 'text/watch-html; charset=utf-8';\n }\n if (this.mail.amp) {\n if (isContentObject(this.mail.amp)) {\n amp = this.mail.amp;\n }\n else {\n amp = {\n content: this.mail.amp\n };\n }\n amp.contentType = 'text/x-amp-html; charset=utf-8';\n }\n // NB! when including attachments with a calendar alternative you might end up in a blank screen on some clients\n if (this.mail.icalEvent) {\n eventObject = Object.assign({}, this._getIcalEvent());\n eventObject.filename = false;\n eventObject.contentType = 'text/calendar; charset=utf-8; method=' + (eventObject.method || 'PUBLISH').toString().trim().toUpperCase();\n if (!eventObject.headers) {\n eventObject.headers = {};\n }\n }\n if (this.mail.html) {\n if (isContentObject(this.mail.html)) {\n html = this.mail.html;\n }\n else {\n html = {\n content: this.mail.html\n };\n }\n html.contentType = 'text/html; charset=utf-8';\n }\n []\n .concat(text || [])\n .concat(watchHtml || [])\n .concat(amp || [])\n .concat(html || [])\n .concat(eventObject || [])\n .concat(this.mail.alternatives || [])\n .forEach(alternative => {\n if (/^data:/i.test((alternative.path || alternative.href))) {\n alternative = this._processDataUrl(alternative);\n }\n const data = {\n contentType: alternative.contentType || mimeFuncs.detectMimeType(alternative.filename || alternative.path || alternative.href || 'txt'),\n contentTransferEncoding: alternative.contentTransferEncoding\n };\n if (alternative.filename) {\n data.filename = alternative.filename;\n }\n if (/^https?:\\/\\//i.test(alternative.path)) {\n alternative.href = alternative.path;\n alternative.path = undefined;\n }\n if (alternative.raw) {\n data.raw = alternative.raw;\n }\n else if (alternative.path) {\n data.content = {\n path: alternative.path\n };\n }\n else if (alternative.href) {\n data.content = {\n href: alternative.href,\n httpHeaders: alternative.httpHeaders,\n tls: alternative.tls\n };\n }\n else {\n data.content = alternative.content || '';\n }\n if (alternative.encoding) {\n data.encoding = alternative.encoding;\n }\n if (alternative.headers) {\n data.headers = alternative.headers;\n }\n alternatives.push(data);\n });\n return alternatives;\n }\n /**\n * Builds multipart/mixed node. It should always contain different type of elements on the same level\n * eg. text + attachments\n *\n * @param parentNode Parent for this note. If it does not exist, a root node is created\n * @returns MimeNode node element\n * @internal\n */\n _createMixed(parentNode) {\n const node = parentNode\n ? parentNode.createChild('multipart/mixed', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n })\n : new MimeNode('multipart/mixed', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n if (this._useAlternative) {\n this._createAlternative(node);\n }\n else if (this._useRelated) {\n this._createRelated(node);\n }\n []\n .concat((!this._useAlternative && this._alternatives) || [])\n .concat(this._attachments.attached || [])\n .forEach(element => {\n // if the element is a html node from related subpart then ignore it\n if (!this._useRelated || element !== this._htmlNode) {\n this._createContentNode(node, element);\n }\n });\n return node;\n }\n /**\n * Builds multipart/alternative node. It should always contain same type of elements on the same level\n * eg. text + html view of the same data\n *\n * @param parentNode Parent for this note. If it does not exist, a root node is created\n * @returns MimeNode node element\n * @internal\n */\n _createAlternative(parentNode) {\n const node = parentNode\n ? parentNode.createChild('multipart/alternative', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n })\n : new MimeNode('multipart/alternative', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n this._alternatives.forEach(alternative => {\n if (this._useRelated && this._htmlNode === alternative) {\n this._createRelated(node);\n }\n else {\n this._createContentNode(node, alternative);\n }\n });\n return node;\n }\n /**\n * Builds multipart/related node. It should always contain html node with related attachments\n *\n * @param parentNode Parent for this note. If it does not exist, a root node is created\n * @returns MimeNode node element\n * @internal\n */\n _createRelated(parentNode) {\n const node = parentNode\n ? parentNode.createChild('multipart/related; type=\"text/html\"', {\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n })\n : new MimeNode('multipart/related; type=\"text/html\"', {\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n this._createContentNode(node, this._htmlNode);\n this._attachments.related.forEach(alternative => this._createContentNode(node, alternative));\n return node;\n }\n /**\n * Creates a regular node with contents\n *\n * @param parentNode Parent for this note. If it does not exist, a root node is created\n * @param element Node data\n * @returns MimeNode node element\n * @internal\n */\n _createContentNode(parentNode, element) {\n element = element || {};\n element.content = element.content || '';\n const encoding = (element.encoding || 'utf8')\n .toString()\n .toLowerCase()\n .replace(/[-_\\s]/g, '');\n const node = parentNode\n ? parentNode.createChild(element.contentType, {\n filename: element.filename,\n textEncoding: this.mail.textEncoding,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n })\n : new MimeNode(element.contentType, {\n filename: element.filename,\n baseBoundary: this.mail.baseBoundary,\n textEncoding: this.mail.textEncoding,\n boundaryPrefix: this.mail.boundaryPrefix,\n disableUrlAccess: this.mail.disableUrlAccess,\n disableFileAccess: this.mail.disableFileAccess,\n normalizeHeaderKey: this.mail.normalizeHeaderKey,\n newline: this.mail.newline\n });\n // add custom headers\n if (element.headers) {\n node.addHeader(element.headers);\n }\n if (element.cid) {\n node.setHeader('Content-Id', '<' + element.cid.replace(/[<>]/g, '') + '>');\n }\n if (element.contentTransferEncoding) {\n node.setHeader('Content-Transfer-Encoding', element.contentTransferEncoding);\n }\n else if (this.mail.encoding && /^text\\//i.test(element.contentType)) {\n node.setHeader('Content-Transfer-Encoding', this.mail.encoding);\n }\n if (!/^text\\//i.test(element.contentType) || element.contentDisposition) {\n node.setHeader('Content-Disposition', element.contentDisposition || (element.cid && /^image\\//i.test(element.contentType) ? 'inline' : 'attachment'));\n }\n if (typeof element.content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {\n element.content = Buffer.from(element.content, encoding);\n }\n // prefer pregenerated raw content\n if (element.raw) {\n node.setRaw(element.raw);\n }\n else {\n node.setContent(element.content);\n }\n return node;\n }\n /**\n * Parses data uri and converts it to a Buffer\n *\n * @param element Content element\n * @return Parsed element\n * @internal\n */\n _processDataUrl(element) {\n const dataUrl = element.path || element.href;\n // Early validation to prevent ReDoS\n if (!dataUrl || typeof dataUrl !== 'string') {\n return element;\n }\n if (!dataUrl.startsWith('data:')) {\n return element;\n }\n if (dataUrl.length > 52428800) {\n // 52428800 chars = 50MB limit for data URL string (~37.5MB decoded image)\n // Extract content type before rejecting to preserve MIME type\n let detectedType = 'application/octet-stream';\n const commaPos = dataUrl.indexOf(',');\n if (commaPos > 0 && commaPos < 200) {\n // Parse header safely with size limit\n const header = dataUrl.substring(5, commaPos); // skip 'data:'\n const parts = header.split(';');\n if (parts[0] && parts[0].includes('/')) {\n detectedType = parts[0].trim();\n }\n }\n // Return empty content for excessively long data URLs\n return Object.assign(copyOwnKeys({}, element), {\n path: false,\n href: false,\n content: Buffer.alloc(0),\n contentType: element.contentType || detectedType\n });\n }\n let parsedDataUri;\n try {\n parsedDataUri = parseDataURI(dataUrl);\n }\n catch (_err) {\n return element;\n }\n if (!parsedDataUri) {\n return element;\n }\n element.content = parsedDataUri.data;\n element.contentType = element.contentType || parsedDataUri.contentType;\n if ('path' in element) {\n element.path = false;\n }\n if ('href' in element) {\n element.href = false;\n }\n return element;\n }\n}\n/**\n * Returns the value of the OTP-Token header for the otp option. The header is defined by\n * draft-goto-otp-token-01, an Internet-Draft that expires on 25 March 2027. By then check\n * for a newer revision of the draft or a published RFC, the header name and its\n * parameters are still open questions in the draft.\n */\nfunction formatOtpToken(otp) {\n // a structured field String can only hold printable ascii. The code is a secret the recipient\n // compares against the one in the message body, so it is rejected rather than cleaned up\n if (typeof otp.code !== 'string' || !/^[\\x20-\\x7e]+$/.test(otp.code)) {\n throw otpError('The otp code must be a non-empty string of printable ASCII characters');\n }\n // a structured field String escapes the same two characters as a quoted-string\n return mimeFuncs.quoteString(otp.code) + '; origin=' + mimeFuncs.quoteString(getOtpOrigin(otp.origin));\n}\n/**\n * Returns the canonical ascii serialization of the origin the code is bound to. The draft\n * requires a potentially trustworthy origin, so only https is accepted, plus http on a\n * loopback host for local development\n */\nfunction getOtpOrigin(origin) {\n let url;\n try {\n url = new URL(String(origin));\n }\n catch {\n // handled below\n }\n // the WHATWG parser lets characters such as a quote or a brace into a host, which the\n // origin grammar the draft requires (RFC 6454) does not allow, so a receiver would discard\n // the header. Only a DNS name, an IPv4 address or a bracketed IPv6 address is accepted.\n // Userinfo is refused as well, an origin never has it and it turns a value built as\n // 'https://example.com' + input into the origin of whatever host follows an \"@\"\n if (!url || url.username || url.password || !/^([a-z0-9_-]+\\.)*[a-z0-9_-]+$|^\\[[0-9a-f:.]+\\]$/.test(url.hostname)) {\n throw otpError('The otp origin must be an absolute https URL');\n }\n const isLoopback = /^(localhost|.+\\.localhost|127(\\.\\d+){3}|\\[::1\\])$/.test(url.hostname);\n if (url.protocol !== 'https:' && !(url.protocol === 'http:' && isLoopback)) {\n throw otpError('The otp origin must be an https URL, or an http URL on a loopback host');\n }\n // the URL parser already lowercases the host, converts it to punycode and drops the default port\n return url.origin;\n}\nfunction otpError(message) {\n const err = new Error(message);\n err.code = errors.EOTP;\n return err;\n}\nexport default MailComposer;\n","import { Transform } from 'node:stream';\n/**\n * Drops the SP and HTAB from both ends of a field name.\n *\n * An index scan rather than `/^[ \\t]+|[ \\t]+$/g`, which retries the trailing branch at\n * every offset of a blank run that is followed by other text: the run is consumed greedily,\n * `$` fails, and the engine gives the characters back one at a time before moving on to\n * start the same walk one offset further in. A field name carrying a 128 KiB run of spaces\n * between two atoms took about 6.7 seconds to trim, and the cost grows with its square.\n *\n * Not `.trim()`, which takes the other Unicode spaces along: an NBSP in front of a field\n * name would come off and select the name into the signed set, where the relaxed\n * canonicalization in sign.ts deliberately leaves everything but SP and HTAB alone.\n *\n * @param str Field name to trim\n * @return The field name without the surrounding SP and HTAB\n */\nfunction _trimFieldName(str) {\n let start = 0;\n let end = str.length;\n while (start < end && (str.charCodeAt(start) === 0x20 || str.charCodeAt(start) === 0x09)) {\n start++;\n }\n while (end > start && (str.charCodeAt(end - 1) === 0x20 || str.charCodeAt(end - 1) === 0x09)) {\n end--;\n }\n return str.slice(start, end);\n}\n/**\n * MessageParser instance is a transform stream that separates message headers\n * from the rest of the body. Headers are emitted with the 'headers' event. Message\n * body is passed on as the resulting stream.\n */\nclass MessageParser extends Transform {\n constructor(options) {\n super(options);\n this.lastBytes = Buffer.alloc(4);\n this.headersParsed = false;\n this.headerBytes = 0;\n this.headerChunks = [];\n this.rawHeaders = false;\n this.bodySize = 0;\n }\n /**\n * Keeps count of the last 4 bytes in order to detect line breaks on chunk boundaries\n *\n * @param data Next data chunk from the stream\n */\n updateLastBytes(data) {\n const lblen = this.lastBytes.length;\n const nblen = Math.min(data.length, lblen);\n // shift existing bytes\n for (let i = 0, len = lblen - nblen; i < len; i++) {\n this.lastBytes[i] = this.lastBytes[i + nblen];\n }\n // add new bytes\n for (let i = 1; i <= nblen; i++) {\n this.lastBytes[lblen - i] = data[data.length - i];\n }\n }\n /**\n * Finds and removes message headers from the remaining body. We want to keep\n * headers separated until final delivery to be able to modify these\n *\n * @param data Next chunk of data\n * @return Returns true if headers are already found or false otherwise\n */\n checkHeaders(data) {\n if (this.headersParsed) {\n return true;\n }\n const lblen = this.lastBytes.length;\n let headerPos = 0;\n for (let i = 0, len = this.lastBytes.length + data.length; i < len; i++) {\n let chr;\n if (i < lblen) {\n chr = this.lastBytes[i];\n }\n else {\n chr = data[i - lblen];\n }\n if (chr === 0x0a && i) {\n const pr1 = i - 1 < lblen ? this.lastBytes[i - 1] : data[i - 1 - lblen];\n const pr2 = i > 1 ? (i - 2 < lblen ? this.lastBytes[i - 2] : data[i - 2 - lblen]) : false;\n if (pr1 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n }\n else if (pr1 === 0x0d && pr2 === 0x0a) {\n this.headersParsed = true;\n headerPos = i - lblen + 1;\n this.headerBytes += headerPos;\n break;\n }\n }\n }\n if (this.headersParsed) {\n this.headerChunks.push(data.slice(0, headerPos));\n this.rawHeaders = Buffer.concat(this.headerChunks, this.headerBytes);\n this.headerChunks = null;\n this.emit('headers', this.parseHeaders());\n if (data.length > headerPos) {\n const chunk = data.slice(headerPos);\n this.bodySize += chunk.length;\n // this would be the first chunk of data sent downstream\n this.push(chunk);\n }\n return false;\n }\n this.headerBytes += data.length;\n this.headerChunks.push(data);\n // store last 4 bytes to catch header break\n this.updateLastBytes(data);\n return false;\n }\n /** @internal */\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n let headersFound;\n try {\n headersFound = this.checkHeaders(chunk);\n }\n catch (E) {\n return callback(E);\n }\n if (headersFound) {\n this.bodySize += chunk.length;\n this.push(chunk);\n }\n callback();\n }\n /** @internal */\n _flush(callback) {\n if (this.headerChunks) {\n // no empty line was seen, so the message consists of headers only\n this.rawHeaders = Buffer.concat(this.headerChunks, this.headerBytes);\n this.headerChunks = null;\n this.emit('headers', this.parseHeaders());\n }\n callback();\n }\n parseHeaders() {\n // the header bytes are kept as they are, one character per byte, so the\n // signature covers exactly the bytes the receiving side canonicalizes\n // Only SP and HTAB fold a line, and only they are trimmed from the field name, the\n // same whitespace the relaxed canonicalization in sign.ts works with\n const rawLines = (this.rawHeaders || Buffer.alloc(0)).toString('binary').split(/\\r?\\n/);\n // Unfold in a single forward pass and only ever test a freshly split line for the\n // continuation prefix. Testing an already merged line instead would rescan a string\n // that grows with every continuation line, so a header folded into many continuation\n // lines (a large recipient list, for example) would take quadratic time to unfold\n const lines = [];\n for (const rawLine of rawLines) {\n if (lines.length && /^[ \\t]/.test(rawLine)) {\n lines[lines.length - 1] += '\\n' + rawLine;\n }\n else {\n lines.push(rawLine);\n }\n }\n return lines\n .filter(line => /[^ \\t\\r]/.test(line))\n .map(line => ({\n key: _trimFieldName(line.substr(0, line.indexOf(':'))).toLowerCase(),\n line\n }));\n }\n}\nexport default MessageParser;\n","// streams through a message body and calculates relaxed body hash\nimport { Transform } from 'node:stream';\nimport crypto from 'node:crypto';\nconst CHAR_CR = 0x0d;\nconst CHAR_LF = 0x0a;\nconst CHAR_SPACE = 0x20;\nconst CHAR_TAB = 0x09;\nconst CRLF = Buffer.from('\\r\\n');\n// a run of empty lines is hashed from this buffer in slices\nconst EMPTY_LINES = Buffer.alloc(4096, CRLF);\n/**\n * Passes the message body through unchanged and hashes its relaxed\n * canonicalization (RFC 6376 section 3.4.4) on the side: whitespace at the end\n * of a line is dropped, runs of whitespace within a line become a single space,\n * every line ends with CRLF, empty lines at the end of the body are ignored and\n * a non-empty body always ends with CRLF. Bytes are canonicalized as they arrive,\n * so a line of any length costs constant memory.\n */\nclass RelaxedBody extends Transform {\n constructor(options) {\n super();\n options = options || {};\n this.bodyHash = crypto.createHash(options.hashAlgo || 'sha256');\n this.byteLength = 0;\n this.debug = options.debug;\n this._debugBody = options.debug ? [] : false;\n this._lineHasContent = false;\n this._pendingWsp = false;\n this._pendingCr = false;\n this._pendingEmptyLines = 0;\n }\n /** @internal */\n _hashCanonical(data) {\n if (!data.length) {\n return;\n }\n this.bodyHash.update(data);\n if (this._debugBody) {\n this._debugBody.push(Buffer.from(data));\n }\n }\n /** @internal */\n _hashEmptyLines() {\n while (this._pendingEmptyLines > 0) {\n const count = Math.min(this._pendingEmptyLines, EMPTY_LINES.length / 2);\n this._hashCanonical(EMPTY_LINES.subarray(0, count * 2));\n this._pendingEmptyLines -= count;\n }\n }\n /**\n * Writes a content byte, with the space a pending run of whitespace collapses to,\n * into the output buffer and returns the new write position. Kept a method rather\n * than a closure so the write position stays a plain local in the byte loop\n * @internal\n */\n _emitContent(out, outPos, c) {\n if (!this._lineHasContent) {\n if (this._pendingEmptyLines) {\n // the first content byte of a line is where the empty lines before it\n // become part of the body, so hash what is in the buffer before them\n this._hashCanonical(out.subarray(0, outPos));\n outPos = 0;\n this._hashEmptyLines();\n }\n this._lineHasContent = true;\n }\n if (this._pendingWsp) {\n out[outPos++] = CHAR_SPACE;\n this._pendingWsp = false;\n }\n out[outPos++] = c;\n return outPos;\n }\n updateHash(chunk, final) {\n // every byte contributes itself at most once, plus a CR for a bare LF\n // and, once per chunk, a pending space and CR carried over from before\n const out = Buffer.allocUnsafe(chunk.length * 2 + 2);\n let outPos = 0;\n for (let i = 0; i < chunk.length; i++) {\n const c = chunk[i];\n if (c === CHAR_LF) {\n // end of line, a CR right before it and any trailing whitespace are dropped\n if (this._lineHasContent) {\n out[outPos++] = CHAR_CR;\n out[outPos++] = CHAR_LF;\n this._lineHasContent = false;\n }\n else {\n this._pendingEmptyLines++;\n }\n this._pendingWsp = false;\n this._pendingCr = false;\n continue;\n }\n if (this._pendingCr) {\n // not followed by LF, so the CR is content\n outPos = this._emitContent(out, outPos, CHAR_CR);\n this._pendingCr = false;\n }\n if (c === CHAR_CR) {\n this._pendingCr = true;\n }\n else if (c === CHAR_SPACE || c === CHAR_TAB) {\n this._pendingWsp = true;\n }\n else {\n outPos = this._emitContent(out, outPos, c);\n }\n }\n if (final && this._pendingCr) {\n // a CR at the very end of the body is content\n outPos = this._emitContent(out, outPos, CHAR_CR);\n this._pendingCr = false;\n }\n this._hashCanonical(out.subarray(0, outPos));\n }\n /** @internal */\n _transform(chunk, encoding, callback) {\n if (!chunk || !chunk.length) {\n return callback();\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n this.updateHash(chunk);\n this.byteLength += chunk.length;\n this.push(chunk);\n callback();\n }\n /** @internal */\n _flush(callback) {\n this.updateHash(Buffer.alloc(0), true);\n if (this._lineHasContent) {\n // the body does not end with a line break, add one\n this._hashCanonical(CRLF);\n }\n this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);\n callback();\n }\n}\nexport default RelaxedBody;\n","import * as shared from '../shared/index.js';\nimport * as mimeFuncs from '../mime-funcs/index.js';\nimport crypto from 'node:crypto';\nimport * as errors from '../errors.js';\n/**\n * Error for a hashAlgo value the crypto module does not know\n */\nfunction unsupportedHashAlgoError(hashAlgo) {\n const err = new Error('Unsupported DKIM hash algorithm \"' + hashAlgo + '\"');\n err.code = errors.ECONFIG;\n return err;\n}\n/**\n * Returns DKIM signature header line\n *\n * @param headers Parsed headers object from MessageParser\n * @param hashAlgo Hash algorithm the body hash was calculated with, for example \"sha256\"\n * @param bodyHash Base64 encoded hash of the message\n * @param options DKIM options\n * @param options.domainName Domain name to be signed for\n * @param options.keySelector DKIM key selector to use\n * @param options.privateKey DKIM private key to use\n * @return Complete header line\n */\nfunction sign(headers, hashAlgo, bodyHash, options) {\n options = options || {};\n // all listed fields from RFC4871 #5.5, plus List-Unsubscribe-Post: RFC 8058 only allows\n // one-click unsubscribe when the signature covers it next to List-Unsubscribe\n const defaultFieldNames = 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +\n 'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +\n 'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +\n 'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +\n 'List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post:List-Subscribe:List-Post:' +\n 'List-Owner:List-Archive:OTP-Token';\n const fieldNames = options.headerFieldNames || defaultFieldNames;\n const canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);\n const dkimHeader = generateDKIMHeader(options.domainName, options.keySelector, canonicalizedHeaderData.fieldNames, hashAlgo, bodyHash);\n canonicalizedHeaderData.headers += 'dkim-signature:' + relaxedHeaderLine(dkimHeader);\n let signer;\n try {\n signer = crypto.createSign(('rsa-' + hashAlgo).toUpperCase());\n }\n catch (_E) {\n throw unsupportedHashAlgoError(hashAlgo);\n }\n // the header lines are 'binary' strings, so this reproduces the original header bytes\n signer.update(canonicalizedHeaderData.headers, 'latin1');\n let signature;\n try {\n signature = signer.sign(options.privateKey, 'base64');\n }\n catch (_E) {\n return false;\n }\n return dkimHeader + signature.replace(/(^.{73}|.{75}(?!\\r?\\n|\\r))/g, '$&\\r\\n ').trim();\n}\nsign.relaxedHeaders = relaxedHeaders;\nsign.unsupportedHashAlgoError = unsupportedHashAlgoError;\nexport default sign;\nfunction generateDKIMHeader(domainName, keySelector, fieldNames, hashAlgo, bodyHash) {\n // the caller supplied tag values are interpolated straight into the tag list, and none of\n // them has any way to carry a control char, DEL, or one of the delimiters that would close\n // the value and open a tag of its own\n const cleanTagValue = (value) => (value || '').toString().replace(/[\\x00-\\x1f\\x7f;=]/g, '');\n const dkim = [\n 'v=1',\n 'a=rsa-' + hashAlgo,\n 'c=relaxed/relaxed',\n 'd=' + shared.normalizeDomain(cleanTagValue(domainName), false),\n 'q=dns/txt',\n 's=' + cleanTagValue(keySelector),\n 'bh=' + bodyHash,\n 'h=' + cleanTagValue(fieldNames)\n ].join('; ');\n return mimeFuncs.foldLines('DKIM-Signature: ' + dkim, 76) + ';\\r\\n b=';\n}\nfunction relaxedHeaders(headers, fieldNames, skipFields) {\n const includedFields = new Set();\n const skip = new Set();\n const headerFields = new Map();\n (skipFields || '')\n .toLowerCase()\n .split(':')\n .forEach(field => {\n skip.add(field.trim());\n });\n (fieldNames || '')\n .toLowerCase()\n .split(':')\n .filter(field => !skip.has(field.trim()))\n .forEach(field => {\n includedFields.add(field.trim());\n });\n for (let i = headers.length - 1; i >= 0; i--) {\n const line = headers[i];\n // only include the first value from bottom to top\n if (includedFields.has(line.key) && !headerFields.has(line.key)) {\n headerFields.set(line.key, relaxedHeaderLine(line.line));\n }\n }\n const headersList = [];\n const fields = [];\n includedFields.forEach(field => {\n if (headerFields.has(field)) {\n fields.push(field);\n headersList.push(field + ':' + headerFields.get(field));\n }\n });\n return {\n headers: headersList.join('\\r\\n') + '\\r\\n',\n fieldNames: fields.join(':')\n };\n}\n/**\n * Relaxed canonicalization of a header field value (RFC 6376 section 3.4.2): unfold, turn\n * every run of SP and HTAB into a single SP and drop the whitespace next to the colon and\n * at the end. Only SP and HTAB count as whitespace, so bytes that decode to other space\n * characters, such as a non-breaking space in a UTF-8 header, stay as they are\n */\nfunction relaxedHeaderLine(line) {\n return line\n .substr(line.indexOf(':') + 1)\n .replace(/\\r?\\n/g, '')\n .replace(/[ \\t]+/g, ' ')\n .replace(/^ | $/g, '');\n}\n","// FIXME:\n// replace this Transform mess with a method that pipes input argument to output argument\nimport MessageParser from './message-parser.js';\nimport RelaxedBody from './relaxed-body.js';\nimport sign from './sign.js';\nimport { PassThrough } from 'node:stream';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport crypto from 'node:crypto';\nimport { copyOwnKeys } from '../shared/objects.js';\nconst DKIM_ALGO = 'sha256';\nconst MAX_MESSAGE_SIZE = 10 * 1024 * 1024; // buffer messages larger than this to disk\nclass DKIMSigner {\n constructor(options, keys, input, output) {\n this.options = options || {};\n this.keys = keys;\n this.cacheTreshold = Number(this.options.cacheTreshold) || MAX_MESSAGE_SIZE;\n this.hashAlgo = this.options.hashAlgo || DKIM_ALGO;\n this.cacheDir = this.options.cacheDir || false;\n this.chunks = [];\n this.chunklen = 0;\n this.readPos = 0;\n this.cachePath = this.cacheDir ? path.join(this.cacheDir, 'message.' + Date.now() + '-' + crypto.randomBytes(14).toString('hex')) : false;\n this.cache = false;\n this.headers = false;\n this.bodyHash = false;\n this.parser = false;\n this.relaxedBody = false;\n this.input = input;\n this.output = output;\n this.output.usingCache = false;\n this.hasErrored = false;\n this.input.on('error', err => this.fail(err));\n // A consumer that goes away before the signed message was read in full destroys the\n // output. Stop reading the input and drop the cache file instead of leaving them open\n this.output.once('close', () => {\n if (this.output.writableFinished) {\n return;\n }\n this.hasErrored = true;\n this.input.unpipe();\n this.input.destroy();\n this.cleanup();\n });\n }\n /**\n * Ends the output with an error and releases the cache file\n */\n fail(err) {\n this.hasErrored = true;\n this.cleanup();\n this.output.destroy(err);\n }\n cleanup() {\n if (!this.cache || !this.cachePath) {\n return;\n }\n const cache = this.cache;\n this.cache = false;\n cache.destroy();\n fs.unlink(this.cachePath, () => false);\n }\n createReadCache() {\n // pipe remainings to cache file\n this.cache = fs.createReadStream(this.cachePath);\n this.cache.once('error', err => this.fail(err));\n this.cache.once('close', () => {\n this.cleanup();\n });\n this.cache.pipe(this.output);\n }\n sendNextChunk() {\n while (!this.hasErrored) {\n if (this.readPos >= this.chunks.length) {\n if (!this.cache) {\n this.output.end();\n return;\n }\n return this.createReadCache();\n }\n const chunk = this.chunks[this.readPos++];\n if (this.output.write(chunk) === false) {\n this.output.once('drain', () => {\n this.sendNextChunk();\n });\n return;\n }\n }\n }\n sendSignedOutput() {\n if (this.hasErrored) {\n return;\n }\n let keyPos = 0;\n const signNextKey = () => {\n if (keyPos >= this.keys.length) {\n this.output.write(this.parser.rawHeaders);\n setImmediate(() => this.sendNextChunk());\n return;\n }\n const key = this.keys[keyPos++];\n let dkimField;\n try {\n dkimField = sign(this.headers, this.hashAlgo, this.bodyHash, {\n domainName: key.domainName,\n keySelector: key.keySelector,\n privateKey: key.privateKey,\n headerFieldNames: this.options.headerFieldNames,\n skipFields: this.options.skipFields\n });\n }\n catch (err) {\n this.fail(err);\n return;\n }\n if (dkimField) {\n this.output.write(Buffer.from(dkimField + '\\r\\n'));\n }\n setImmediate(signNextKey);\n };\n if (this.bodyHash && this.headers) {\n return signNextKey();\n }\n this.output.write(this.parser.rawHeaders);\n this.sendNextChunk();\n }\n createWriteCache() {\n this.output.usingCache = true;\n // pipe remainings to cache file. It holds the message body and cacheDir is often a\n // shared directory such as /tmp, so nobody but the owner gets to read it\n this.cache = fs.createWriteStream(this.cachePath, { mode: 0o600 });\n this.cache.once('error', err => {\n // drain input\n this.relaxedBody.unpipe(this.cache);\n this.relaxedBody.on('readable', () => {\n while (this.relaxedBody.read() !== null) {\n // do nothing\n }\n });\n this.fail(err);\n });\n this.cache.once('close', () => {\n if (this.hasErrored) {\n return;\n }\n this.sendSignedOutput();\n });\n this.relaxedBody.removeAllListeners('readable');\n this.relaxedBody.pipe(this.cache);\n }\n signStream() {\n this.parser = new MessageParser();\n this.relaxedBody = new RelaxedBody({\n hashAlgo: this.hashAlgo\n });\n this.parser.on('headers', value => {\n this.headers = value;\n });\n this.relaxedBody.on('hash', value => {\n this.bodyHash = value;\n });\n this.relaxedBody.on('readable', () => {\n let chunk;\n if (this.cache) {\n return;\n }\n while ((chunk = this.relaxedBody.read()) !== null) {\n this.chunks.push(chunk);\n this.chunklen += chunk.length;\n if (this.chunklen >= this.cacheTreshold && this.cachePath) {\n return this.createWriteCache();\n }\n }\n });\n this.relaxedBody.on('end', () => {\n if (this.cache) {\n return;\n }\n this.sendSignedOutput();\n });\n this.parser.pipe(this.relaxedBody);\n setImmediate(() => this.input.pipe(this.parser));\n }\n}\nclass DKIM {\n constructor(options) {\n this.options = options || {};\n this.keys = [].concat(this.options.keys || {\n domainName: options.domainName,\n keySelector: options.keySelector,\n privateKey: options.privateKey\n });\n }\n sign(input, extraOptions) {\n const output = new PassThrough();\n let inputStream = input;\n let writeValue = false;\n if (Buffer.isBuffer(input)) {\n writeValue = input;\n inputStream = new PassThrough();\n }\n else if (typeof input === 'string') {\n writeValue = Buffer.from(input);\n inputStream = new PassThrough();\n }\n let options = this.options;\n if (extraOptions && Object.keys(extraOptions).length) {\n // extraOptions is mail.data._dkim, caller supplied message data. An own\n // \"__proto__\" key there would let every option this signer reads and the\n // transport did not set, such as skipFields, answer from the caller\n options = copyOwnKeys({}, extraOptions);\n copyOwnKeys(options, this.options);\n }\n const signer = new DKIMSigner(options, this.keys, inputStream, output);\n setImmediate(() => {\n try {\n signer.signStream();\n }\n catch (_E) {\n // the body hash is created here, an unknown hashAlgo throws inside this timer\n // where nothing else could catch it\n signer.fail(sign.unsupportedHashAlgoError(signer.hashAlgo));\n return;\n }\n if (writeValue) {\n setImmediate(() => {\n inputStream.end(writeValue);\n });\n }\n });\n return output;\n }\n}\nexport default DKIM;\n","/**\n * Minimal HTTP/S proxy client\n */\nimport net from 'node:net';\nimport tls from 'node:tls';\nimport * as urllib from '../shared/url.js';\nimport * as errors from '../errors.js';\n// Cap the CONNECT response we buffer before the header terminator, so a proxy that\n// never sends \\r\\n\\r\\n cannot grow memory unboundedly before the socket times out.\nconst MAX_RESPONSE_HEADER_BYTES = 64 * 1024;\n// URL hostnames keep the brackets around an IPv6 literal, socket options and net.isIPv6 take it without\nconst unbracket = (host) => (typeof host === 'string' && host.startsWith('[') && host.endsWith(']') ? host.slice(1, -1) : host);\nfunction httpProxyClient(proxyUrl, destinationPort, destinationHost, tlsOptions, callback) {\n if (typeof tlsOptions === 'function') {\n callback = tlsOptions;\n tlsOptions = {};\n }\n tlsOptions = tlsOptions || {};\n // the error paths hand over the error alone\n const done = callback;\n // Reject CRLF in the destination before it reaches the CONNECT request line\n // and Host header. A tainted host/port could otherwise inject additional\n // request headers into the proxy connection (HTTP request splitting).\n destinationPort = Number(destinationPort) || 0;\n if (!destinationPort || /[\\r\\n]/.test(destinationHost)) {\n const err = new Error('Invalid proxy destination');\n err.code = errors.EPROXY;\n setImmediate(() => done(err));\n return;\n }\n const proxy = urllib.parse(proxyUrl);\n // the CONNECT request line and the Host header take an IPv6 destination in brackets\n const authority = (net.isIPv6(unbracket(destinationHost)) ? '[' + unbracket(destinationHost) + ']' : destinationHost) + ':' + destinationPort;\n const connectOptions = {\n host: proxy.hostname,\n port: Number(proxy.port) ? Number(proxy.port) : proxy.protocol === 'https:' ? 443 : 80\n };\n let connect;\n if (proxy.protocol === 'https:') {\n // Validate the proxy's TLS certificate by default. A caller that uses a\n // self-signed proxy (e.g. integration tests) opts out explicitly with\n // tls.rejectUnauthorized === false.\n connectOptions.rejectUnauthorized = tlsOptions.rejectUnauthorized !== false;\n connect = tls.connect.bind(tls);\n }\n else {\n connect = net.connect.bind(net);\n }\n // The handshake is bounded as a whole, a proxy that keeps sending a byte now and then can\n // not hold the connection open past it\n const timeout = Number(tlsOptions.timeout) || httpProxyClient.timeout || 30 * 1000;\n let socket;\n // Single settlement path for the handshake: every temporary listener and the timer are\n // dropped exactly once. Once the tunnel is up, the responsibility to handle errors is passed\n // to whoever uses this socket\n let finished = false;\n let timer;\n const cleanup = () => {\n clearTimeout(timer);\n socket.removeListener('data', onSocketData);\n socket.removeListener('error', fail);\n socket.removeListener('close', onEarlyClose);\n };\n function fail(err) {\n if (finished) {\n return;\n }\n finished = true;\n cleanup();\n try {\n socket.destroy();\n }\n catch (_E) {\n // ignore\n }\n done(err);\n }\n function onEarlyClose() {\n const err = new Error('Proxy closed the connection before the tunnel was established');\n err.code = errors.EPROXY;\n fail(err);\n }\n // The response is collected as chunks and only the bytes that just arrived, together\n // with the three before them, are searched for the end of the headers. Appending to a\n // string and searching all of it again re-read the whole response on every chunk.\n const chunks = [];\n let received = 0;\n let tail = '';\n function onSocketData(chunk) {\n if (finished) {\n return;\n }\n const window = tail + chunk.toString('binary');\n const windowEnd = window.indexOf('\\r\\n\\r\\n');\n chunks.push(chunk);\n received += chunk.length;\n tail = window.slice(-3);\n if (windowEnd < 0) {\n if (received > MAX_RESPONSE_HEADER_BYTES) {\n const err = new Error('Proxy response headers too large');\n err.code = errors.EPROXY;\n fail(err);\n }\n return;\n }\n // Stop reading before anything is put back. A socket that keeps flowing would emit the\n // bytes after the headers, a greeting the proxy sent together with its own response,\n // before the next owner of the socket has a listener for them\n socket.removeListener('data', onSocketData);\n socket.pause();\n const headerEnd = received - window.length + windowEnd;\n const response = Buffer.concat(chunks, received);\n if (response.length > headerEnd + 4) {\n socket.unshift(response.subarray(headerEnd + 4));\n }\n // check response code\n const match = response.toString('binary', 0, headerEnd).match(/^HTTP\\/\\d+\\.\\d+ (\\d+)/i);\n if (!match || (match[1] || '').charAt(0) !== '2') {\n const err = new Error('Invalid response from proxy' + ((match && ': ' + match[1]) || ''));\n err.code = errors.EPROXY;\n return fail(err);\n }\n // proxy connection is now established\n finished = true;\n cleanup();\n // A fresh socket starts flowing once something listens for 'data', a paused one would\n // not. Keep that behaviour for the next owner of the socket\n const resumeOnData = (event) => {\n if (event === 'data') {\n socket.removeListener('newListener', resumeOnData);\n socket.resume();\n }\n };\n socket.on('newListener', resumeOnData);\n return done(null, socket);\n }\n socket = connect(connectOptions, () => {\n if (finished) {\n return;\n }\n const reqHeaders = {\n Host: authority,\n Connection: 'close'\n };\n if (proxy.auth) {\n reqHeaders['Proxy-Authorization'] = 'Basic ' + Buffer.from(proxy.auth).toString('base64');\n }\n socket.write(\n // HTTP method\n 'CONNECT ' +\n authority +\n ' HTTP/1.1\\r\\n' +\n // HTTP request headers\n Object.keys(reqHeaders)\n .map(key => key + ': ' + reqHeaders[key])\n .join('\\r\\n') +\n // End request\n '\\r\\n\\r\\n');\n socket.on('data', onSocketData);\n });\n timer = setTimeout(() => {\n const err = new Error('Proxy socket timed out');\n err.code = errors.ETIMEDOUT;\n fail(err);\n }, timeout);\n socket.once('error', fail);\n socket.once('close', onEarlyClose);\n}\nexport default httpProxyClient;\n","import * as shared from '../shared/index.js';\nimport MimeNode from '../mime-node/index.js';\nimport * as mimeFuncs from '../mime-funcs/index.js';\n// Only an own key counts as already set. `key in obj` also matches every member of\n// Object.prototype, which silently drops a transporter default legitimately named\n// toString or constructor.\nconst hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);\nexport default class MailMessage {\n constructor(mailer, data) {\n this.mailer = mailer;\n this.data = {};\n this.message = null;\n data = data || {};\n const options = mailer.options || {};\n const defaults = mailer._defaults || {};\n shared.copyOwnKeys(this.data, data);\n this.data.headers = this.data.headers || {};\n // Apply defaults. `_defaults` is caller supplied too, it is the second argument of\n // createTransport, so it needs the same treatment as `data` above\n shared.copyOwnKeys(this.data, defaults, key => hasOwn(this.data, key));\n // headers is a special case. Allow setting individual default headers\n shared.copyOwnKeys(this.data.headers, defaults.headers, key => hasOwn(this.data.headers, key));\n // force specific keys from transporter options\n ['disableFileAccess', 'disableUrlAccess', 'normalizeHeaderKey', 'maxRecipients'].forEach(key => {\n if (key in options) {\n this.data[key] = options[key];\n }\n });\n // The access flags are a sandbox rather than a message field, so `defaults` counts as\n // transporter configuration for them. For a transporter plugin it is the only channel\n // there is, createTransport leaves `options` undefined for one, and the defaults copy\n // above yields to anything the message already set, which let message data switch the\n // sandbox back off. Closing is one way here, same as in resolveContent below: either\n // side may switch a flag on, neither can switch off what the other closed.\n ['disableFileAccess', 'disableUrlAccess'].forEach(key => {\n if (!(key in options) && hasOwn(defaults, key)) {\n this.data[key] = this.data[key] || defaults[key];\n }\n });\n }\n resolveContent(data, key, options, callback) {\n // Most plugins call this with the legacy (data, key, callback) signature, which carries\n // no access policy. The policy belongs to the message, so apply it here. Explicit\n // options may only tighten it, never reopen what the transporter closed.\n if (!callback && typeof options === 'function') {\n callback = options;\n options = false;\n }\n options = options || {};\n const policy = {\n disableFileAccess: this.data.disableFileAccess || options.disableFileAccess,\n disableUrlAccess: this.data.disableUrlAccess || options.disableUrlAccess\n };\n return shared.resolveContent(data, key, policy, callback);\n }\n resolveAll(callback) {\n const keys = [\n [this.data, 'html'],\n [this.data, 'text'],\n [this.data, 'watchHtml'],\n [this.data, 'amp'],\n [this.data, 'icalEvent']\n ];\n if (this.data.alternatives && this.data.alternatives.length) {\n this.data.alternatives.forEach((alternative, i) => {\n keys.push([this.data.alternatives, i]);\n });\n }\n if (this.data.attachments && this.data.attachments.length) {\n this.data.attachments.forEach((attachment, i) => {\n if (!attachment.filename) {\n // a backslash separates as well, so a Windows path does not put the sender's directories in the headers\n attachment.filename =\n (attachment.path || attachment.href || '').split(/[/\\\\]/).pop().split('?').shift() || 'attachment-' + (i + 1);\n if (attachment.filename.indexOf('.') < 0) {\n attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);\n }\n }\n if (!attachment.contentType) {\n attachment.contentType = mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || 'bin');\n }\n keys.push([this.data.attachments, i]);\n });\n }\n const mimeNode = new MimeNode();\n const addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];\n addressKeys.forEach(address => {\n let value;\n if (this.message) {\n value = [].concat(mimeNode._parseAddresses(this.message.getHeader(address === 'replyTo' ? 'reply-to' : address)) || []);\n }\n else if (this.data[address]) {\n value = [].concat(mimeNode._parseAddresses(this.data[address]) || []);\n }\n if (value && value.length) {\n this.data[address] = value;\n }\n else if (address in this.data) {\n this.data[address] = null;\n }\n });\n const singleKeys = ['from', 'sender'];\n singleKeys.forEach(address => {\n if (this.data[address]) {\n this.data[address] = this.data[address].shift();\n }\n });\n let pos = 0;\n const resolveNext = () => {\n if (pos >= keys.length) {\n return callback(null, this.data);\n }\n const args = keys[pos++];\n if (!args[0] || !args[0][args[1]]) {\n return resolveNext();\n }\n shared.resolveContent(...args, { disableFileAccess: this.data.disableFileAccess, disableUrlAccess: this.data.disableUrlAccess }, (err, value) => {\n if (err) {\n return callback(err);\n }\n const node = {\n content: value\n };\n if (args[0][args[1]] && typeof args[0][args[1]] === 'object' && !Buffer.isBuffer(args[0][args[1]])) {\n // The keys are the caller's, so copying them takes the same \"__proto__\"\n // rule as the constructor. `key in node` stays as the already-set test\n // here, unlike for the defaults: it also skips the Object.prototype\n // member names, and letting message data land a `toString` string on a\n // node only buys a TypeError the first time something stringifies it.\n shared.copyOwnKeys(node, args[0][args[1]], key => key in node || ['content', 'path', 'href', 'raw'].includes(key));\n }\n args[0][args[1]] = node;\n resolveNext();\n });\n };\n setImmediate(() => resolveNext());\n }\n /**\n * Destroys the content streams of the message once sending failed. A stream that was not\n * read to the end would otherwise keep the file or the socket behind it open\n */\n releaseStreams() {\n const data = this.data;\n const values = [data.html, data.text, data.watchHtml, data.amp, data.raw, data.icalEvent];\n for (const key of ['attachments', 'alternatives']) {\n if (Array.isArray(data[key])) {\n // one at a time, spreading a long enough list into the arguments throws\n for (const entry of data[key]) {\n values.push(entry);\n }\n }\n }\n for (const value of values) {\n if (value && typeof value === 'object') {\n shared.destroyStream(value);\n shared.destroyStream(value.content);\n shared.destroyStream(value.raw);\n }\n }\n }\n normalize(callback) {\n const envelope = this.message.getEnvelope();\n const messageId = this.message.messageId();\n this.resolveAll((err, data) => {\n if (err) {\n return callback(err);\n }\n data.envelope = envelope;\n data.messageId = messageId;\n ['html', 'text', 'watchHtml', 'amp'].forEach(key => {\n if (data[key] && data[key].content) {\n if (typeof data[key].content === 'string') {\n data[key] = data[key].content;\n }\n else if (Buffer.isBuffer(data[key].content)) {\n data[key] = data[key].content.toString();\n }\n }\n });\n if (data.icalEvent && Buffer.isBuffer(data.icalEvent.content)) {\n data.icalEvent.content = data.icalEvent.content.toString('base64');\n data.icalEvent.encoding = 'base64';\n }\n if (data.alternatives && data.alternatives.length) {\n data.alternatives.forEach((alternative) => {\n if (alternative && alternative.content && Buffer.isBuffer(alternative.content)) {\n alternative.content = alternative.content.toString('base64');\n alternative.encoding = 'base64';\n }\n });\n }\n if (data.attachments && data.attachments.length) {\n data.attachments.forEach((attachment) => {\n if (attachment && attachment.content && Buffer.isBuffer(attachment.content)) {\n attachment.content = attachment.content.toString('base64');\n attachment.encoding = 'base64';\n }\n });\n }\n data.normalizedHeaders = {};\n Object.keys(data.headers || {}).forEach(key => {\n if (shared.isProtoKey(key)) {\n return;\n }\n let value = [].concat(data.headers[key] || []).shift();\n value = (value && value.value) || value;\n if (value) {\n if (['references', 'in-reply-to', 'message-id', 'content-id'].includes(key)) {\n value = this.message.encodeHeaderValue(key, value);\n }\n data.normalizedHeaders[key] = value;\n }\n });\n if (data.list && typeof data.list === 'object') {\n const listHeaders = this._getListHeaders(data.list);\n listHeaders.forEach(entry => {\n data.normalizedHeaders[entry.key] = entry.value.map(val => (val && val.value) || val).join(', ');\n });\n }\n if (data.references) {\n data.normalizedHeaders.references = this.message.encodeHeaderValue('references', data.references);\n }\n if (data.inReplyTo) {\n data.normalizedHeaders['in-reply-to'] = this.message.encodeHeaderValue('in-reply-to', data.inReplyTo);\n }\n return callback(null, data);\n });\n }\n setMailerHeader() {\n if (!this.message || !this.data.xMailer) {\n return;\n }\n this.message.setHeader('X-Mailer', this.data.xMailer);\n }\n setPriorityHeaders() {\n if (!this.message || !this.data.priority) {\n return;\n }\n switch ((this.data.priority || '').toString().toLowerCase()) {\n case 'high':\n this.message.setHeader('X-Priority', '1 (Highest)');\n this.message.setHeader('X-MSMail-Priority', 'High');\n this.message.setHeader('Importance', 'High');\n break;\n case 'low':\n this.message.setHeader('X-Priority', '5 (Lowest)');\n this.message.setHeader('X-MSMail-Priority', 'Low');\n this.message.setHeader('Importance', 'Low');\n break;\n default:\n // do not add anything, since all messages are 'Normal' by default\n }\n }\n setListHeaders() {\n if (!this.message || !this.data.list || typeof this.data.list !== 'object') {\n return;\n }\n // add optional List-* headers\n this._getListHeaders(this.data.list).forEach(listHeader => {\n listHeader.value.forEach(value => {\n this.message.addHeader(listHeader.key, value);\n });\n });\n }\n /** @internal */\n _getListHeaders(listData) {\n // make sure an url looks like <protocol:url>\n return Object.keys(listData).map(key => ({\n key: 'list-' + key.toLowerCase().trim(),\n value: [].concat(listData[key] || []).map(value => ({\n prepared: true,\n foldLines: true,\n value: []\n .concat(value || [])\n .map(value => {\n if (typeof value === 'string') {\n value = {\n url: value\n };\n }\n if (value && value.url) {\n // strip CR/LF so a comment can't inject extra header lines. DEL is neither\n // qtext nor ctext, so it can not be carried literally by either construct\n // and has to become an encoded word like any other non-plaintext value\n let comment = (value.comment || '').toString().replace(/\\r?\\n|\\r/g, ' ');\n const needsEncoding = !mimeFuncs.isPlainText(comment) || /\\x7f/.test(comment);\n if (key.toLowerCase().trim() === 'id') {\n // List-ID: \"comment\" <domain>, where an unescaped quote or a trailing\n // backslash in the comment would swallow the <domain> behind it\n comment = needsEncoding ? mimeFuncs.encodeWord(comment) : mimeFuncs.quoteString(comment);\n // List-ID expects a bare domain-like identifier, so strip the\n // scheme prefix that _formatListUrl adds or passes through\n return (value.comment ? comment + ' ' : '') + this._formatListUrl(value.url).replace(/^<[^:]+:\\/{0,2}/, '<');\n }\n // List-*: <http://domain> (comment)\n // the ctext specials go out as quoted-pairs, otherwise a \")\" closes the\n // comment early and leaves the rest as junk, an unpaired \"(\" opens a\n // nested comment that never closes, and a trailing backslash escapes\n // the closing \")\" so the comment swallows whatever follows it\n comment = needsEncoding ? mimeFuncs.encodeWord(comment) : comment.replace(/[()\\\\]/g, '\\\\$&');\n return this._formatListUrl(value.url) + (value.comment ? ' (' + comment + ')' : '');\n }\n return '';\n })\n .filter(value => value)\n .join(', ')\n }))\n }));\n }\n /** @internal */\n _formatListUrl(url) {\n // a url has no way to carry a control char or DEL, and the angle brackets around it\n // are not a quoting construct, so anything left here lands in the header raw\n url = url.replace(/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/g, '').replace(/[\\s<]+|[\\s>]+/g, '');\n if (/^(https?|mailto|ftp):/.test(url)) {\n return '<' + url + '>';\n }\n if (/^[^@]+@[^@]+$/.test(url)) {\n return '<mailto:' + url + '>';\n }\n return '<http://' + url + '>';\n }\n}\n","import { Transform } from 'node:stream';\n// bytes inserted into the output, shared as they are only ever copied by Buffer.concat\nconst INSERT_LF = Buffer.from('\\n');\nconst INSERT_LF_DOT = Buffer.from('\\n.');\nconst INSERT_CR = Buffer.from('\\r');\nconst INSERT_DOT = Buffer.from('.');\n/**\n * Escapes dots in the beginning of lines. Ends the stream with <CR><LF>.<CR><LF>\n * Also makes sure that only <CR><LF> sequences are used for linebreaks, bare CR and bare LF\n * are both turned into <CR><LF>\n *\n * @param options Stream options\n */\nexport default class DataStream extends Transform {\n constructor(options) {\n super(options);\n this.options = options || {};\n this.inByteCount = 0;\n this.outByteCount = 0;\n this.lastByte = false;\n }\n /**\n * Escapes dots\n * @internal\n */\n _transform(chunk, encoding, done) {\n const chunks = [];\n let chunklen = 0;\n let i, len, lastPos = 0;\n let buf;\n if (!chunk || !chunk.length) {\n return done();\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk);\n }\n this.inByteCount += chunk.length;\n for (i = 0, len = chunk.length; i < len; i++) {\n const byte = chunk[i];\n const prev = i ? chunk[i - 1] : this.lastByte;\n let insert = false;\n if (prev === 0x0d && byte !== 0x0a) {\n // a bare CR becomes CRLF. A receiver that treats a lone CR as a line end would\n // otherwise see \"\\r.\\r\" as the end of the data (SMTP smuggling), so a dot\n // following it is stuffed like at the start of any other line\n insert = byte === 0x2e ? INSERT_LF_DOT : INSERT_LF;\n }\n else if (byte === 0x0a && prev !== 0x0d) {\n // a bare LF becomes CRLF\n insert = INSERT_CR;\n }\n else if (byte === 0x2e && (prev === 0x0a || prev === false)) {\n // a dot at the start of a line\n insert = INSERT_DOT;\n }\n if (insert) {\n if (i > lastPos) {\n buf = chunk.slice(lastPos, i);\n chunks.push(buf);\n chunklen += buf.length;\n }\n chunks.push(insert);\n chunklen += insert.length;\n lastPos = i;\n }\n }\n if (chunks.length) {\n // add last piece\n if (lastPos < chunk.length) {\n buf = chunk.slice(lastPos);\n chunks.push(buf);\n chunklen += buf.length;\n }\n this.outByteCount += chunklen;\n this.push(Buffer.concat(chunks, chunklen));\n }\n else {\n this.outByteCount += chunk.length;\n this.push(chunk);\n }\n this.lastByte = chunk[chunk.length - 1];\n done();\n }\n /**\n * Finalizes the stream with a dot on a single line\n * @internal\n */\n _flush(done) {\n let buf;\n if (this.lastByte === 0x0a) {\n buf = Buffer.from('.\\r\\n');\n }\n else if (this.lastByte === 0x0d) {\n buf = Buffer.from('\\n.\\r\\n');\n }\n else {\n buf = Buffer.from('\\r\\n.\\r\\n');\n }\n this.outByteCount += buf.length;\n this.push(buf);\n done();\n }\n}\n","/**\n * Reads the Message-ID a receiving server gave the message out of its final 250 reply. Some\n * servers replace the Message-ID header of a submitted message with one of their own, and\n * the copy the recipients and the sent folder get carries that one instead of the id the\n * message was built with. Only replies in a format known to carry such an id are read.\n */\n// Microsoft 365 and Outlook.com: \"250 2.0.0 OK <id@host.prod.outlook.com> [Hostname=...]\"\nconst OUTLOOK_REPLY = /^250 2\\.0\\.0 OK (<[^<>\\s]+\\.prod\\.outlook\\.com>)/i;\n// Amazon SES: \"250 Ok 0100018b5c3c0a4f-...-000000\", the local part of the Message-ID it sets\nconst SES_REPLY = /^250 Ok ([0-9a-f]+(?:-[0-9a-f]+)+)$/i;\n// an AWS region name such as us-east-1 or ap-southeast-2\nconst AWS_REGION = /^[a-z]{2}(?:-[a-z]+)+-\\d+$/;\n/**\n * Finds the AWS region an SES SMTP endpoint is in from its hostname, such as\n * email-smtp.eu-west-1.amazonaws.com or a VPC endpoint name under it\n *\n * @param host SMTP hostname\n * @returns Region name, or undefined for a host outside amazonaws.com and awsapps.com\n */\nfunction sesRegion(host) {\n const labels = host.toLowerCase().replace(/\\.$/, '').split('.');\n const domain = labels.slice(-2).join('.');\n if (domain !== 'amazonaws.com' && domain !== 'awsapps.com') {\n return undefined;\n }\n return labels.slice(0, -2).find(label => AWS_REGION.test(label));\n}\n/**\n * Reads the server assigned Message-ID out of the final reply to a message\n *\n * @param response Final server reply for the message\n * @param [host] Hostname the connection was made to, SES replies are only read for an SES host\n * @returns The Message-ID with its angle brackets, or undefined when the reply names none\n */\nexport function parseServerMessageId(response, host) {\n const reply = (response || '').toString().trim();\n const outlook = reply.match(OUTLOOK_REPLY);\n if (outlook) {\n return outlook[1];\n }\n const ses = reply.match(SES_REPLY);\n if (ses && host) {\n const region = sesRegion(host);\n if (region) {\n // the SES Message-ID domain is email.amazonses.com in us-east-1 and the region elsewhere\n return '<' + ses[1].toLowerCase() + '@' + (region === 'us-east-1' ? 'email' : region) + '.amazonses.com>';\n }\n }\n return undefined;\n}\n","import * as packageData from '../package-info.js';\nimport { EventEmitter } from 'node:events';\nimport net from 'node:net';\nimport tls from 'node:tls';\nimport os from 'node:os';\nimport crypto from 'node:crypto';\nimport DataStream from './data-stream.js';\nimport { PassThrough } from 'node:stream';\nimport * as shared from '../shared/index.js';\nimport { parseServerMessageId } from './server-message-id.js';\nimport { ERR_ACCESS_DENIED, isPermanentResponseCode, isTransientError } from '../errors.js';\n// default timeout values in ms\nconst CONNECTION_TIMEOUT = 2 * 60 * 1000; // how much to wait for the connection to be established\nconst SOCKET_TIMEOUT = 10 * 60 * 1000; // how much to wait for socket inactivity before disconnecting the client\nconst GREETING_TIMEOUT = 30 * 1000; // how much to wait after connection is established but SMTP greeting is not receieved\nconst DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname\nconst CLOSE_TIMEOUT = 5 * 1000; // how much to wait for the server to close its side after we closed ours\nconst KEEPALIVE_DELAY = 30 * 1000; // idle time before TCP keepalive probes start, keeps NAT mappings of idle connections alive\nconst TEARDOWN_NOOP = () => { }; // reusable no-op handler for absorbing errors during socket teardown\n// Random order, so that connections spread over the addresses of a host\nfunction shuffle(list) {\n const result = list.slice();\n for (let i = result.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [result[i], result[j]] = [result[j], result[i]];\n }\n return result;\n}\n// Every timeout is reported with the ETIMEDOUT code, timeoutType tells which one it was\nfunction timeoutError(message, timeoutType) {\n const err = new Error(message);\n err.timeoutType = timeoutType;\n return err;\n}\n// how many bytes a single server response may occupy while it is still being received.\n// Generous compared to any real reply, it only stops a peer that never completes one\nconst MAX_RESPONSE_SIZE = 1024 * 1024;\n/**\n * Re-interpret a server response stored in fake 8-bit byte-container form\n * (the result of chunk.toString('binary') in _onData) as UTF-8.\n *\n * Server reply text has no formally defined charset (RFC 5321 §4.2.1), but\n * modern MTAs commonly use UTF-8. The byte-container plumbing in _onData is\n * required to reassemble multi-byte sequences split across socket chunks;\n * this helper performs the actual decode at the line boundary, falling back\n * to the byte-container form when the bytes are not valid UTF-8 so that\n * legacy 8-bit replies are still recoverable byte-for-byte.\n */\nfunction decodeServerResponse(str) {\n if (!str) {\n return str;\n }\n const utf8 = Buffer.from(str, 'binary').toString('utf8');\n // The input is a byte container (each char is in U+0000..U+00FF) so it can never\n // already contain U+FFFD; any \\uFFFD in the result was inserted by Node's UTF-8\n // decoder for invalid bytes, which means we should return the original bytes intact.\n return utf8.includes('\\uFFFD') ? str : utf8;\n}\n/**\n * True when the last line of a queued reply is a continuation (\"250-...\"), which means\n * the rest of the reply is still on its way.\n *\n * Called with the byte-container form the queue holds (see _onData): the check only looks\n * at leading ASCII digits and '-' of the last line, and a UTF-8 continuation byte is never\n * 0x0A, so line boundaries and the tested prefix are the same before and after decoding.\n * The last line is read with lastIndexOf rather than split() because a queue entry may hold\n * a whole multiline reply and only its final line matters.\n */\nfunction isPartialResponse(str) {\n return isPartialLine(str.slice(str.lastIndexOf('\\n') + 1));\n}\n/**\n * True when a single reply line is a continuation (\"250-...\"). Used where the line is\n * already known to be one line, which skips the scan isPartialResponse needs to find the\n * last line of a whole reply.\n */\nfunction isPartialLine(line) {\n return /^\\d+-/.test(line);\n}\n/**\n * The log form of a command a custom authentication handler sends. Such a command carries\n * the credentials in whatever shape its mechanism uses, so only an AUTH verb with its\n * mechanism name is kept, the way the built-in mechanisms hide their own secrets.\n *\n * @param cmd Command the handler sends\n * @return What the transaction log gets instead\n */\nfunction maskAuthCommand(cmd) {\n const match = (cmd || '').toString().match(/^AUTH\\s+[^\\s]+/i);\n if (!match) {\n return '/* secret */';\n }\n return match[0].length === cmd.length ? cmd : match[0] + ' /* secret */';\n}\n/**\n * Generates a SMTP connection object\n *\n * Optional options object takes the following possible properties:\n *\n * * **port** - is the port to connect to (defaults to 587 or 465)\n * * **host** - is the hostname or IP address to connect to (defaults to 'localhost')\n * * **secure** - use SSL\n * * **ignoreTLS** - ignore server support for STARTTLS (has no effect when requireTLS is set)\n * * **requireTLS** - forces the client to use STARTTLS, takes precedence over ignoreTLS and opportunisticTLS\n * * **name** - the name of the client server\n * * **localAddress** - outbound address to bind to (see: http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener)\n * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 30 seconds)\n * * **connectionTimeout** - how many milliseconds to wait for the connection to establish (defaults to 2 minutes)\n * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 10 minutes)\n * * **socketCloseTimeout** - Time in ms to wait for the peer to close after ending the socket (defaults to 5 seconds, 0 destroys immediately)\n * * **maxResponseSize** - Largest single server response to accept in bytes (defaults to 1 MB)\n * * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)\n * * **lmtp** - if true, uses LMTP instead of SMTP protocol\n * * **logger** - bunyan compatible logger interface\n * * **debug** - if true pass SMTP traffic to the logger\n * * **tls** - options for createCredentials\n * * **socket** - existing socket to use instead of creating a new one (see: http://nodejs.org/api/net.html#net_class_net_socket)\n * * **secured** - boolean indicates that the provided socket has already been upgraded to tls\n *\n * @constructor\n * @namespace SMTP Client module\n * @param [options] Option properties\n */\nclass SMTPConnection extends EventEmitter {\n constructor(options) {\n super(options);\n this.id = crypto.randomBytes(8).toString('base64').replace(/\\W/g, '');\n this.stage = 'init';\n this.options = options || {};\n if (this.options.requireTLS && (this.options.ignoreTLS || this.options.opportunisticTLS)) {\n // requireTLS wins, a contradictory configuration must not quietly fall back to plaintext.\n // Copied so the caller's (possibly shared) options object is left as it was\n this.options = Object.assign({}, this.options, { ignoreTLS: false, opportunisticTLS: false });\n }\n this.secureConnection = !!this.options.secure;\n this.alreadySecured = !!this.options.secured;\n this.port = Number(this.options.port) || (this.secureConnection ? 465 : 587);\n this.host = this.options.host || 'localhost';\n this.servername = this.options.servername ? this.options.servername : !net.isIP(this.host) ? this.host : false;\n this.allowInternalNetworkInterfaces = this.options.allowInternalNetworkInterfaces || false;\n if (typeof this.options.secure === 'undefined' && this.port === 465) {\n // if secure option is not set but port is 465, then default to secure\n this.secureConnection = true;\n }\n this.name = (this.options.name || this._getHostname()).toString().replace(/[\\r\\n]+/g, '');\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-connection',\n sid: this.id\n });\n this.customAuth = new Map();\n for (const key of Object.keys(this.options.customAuth || {})) {\n const mapKey = (key || '').toString().trim().toUpperCase();\n if (mapKey) {\n this.customAuth.set(mapKey, this.options.customAuth[key]);\n }\n }\n this.version = packageData.version;\n this.authenticated = false;\n this.destroyed = false;\n this.secure = !!this.secureConnection;\n this._remainder = '';\n this._responseQueue = [];\n this._responsePartial = false;\n this.lastServerResponse = false;\n this._socket = false;\n this._supportedAuth = [];\n this.allowsAuth = false;\n this._envelope = false;\n this._supportedExtensions = [];\n this._maxAllowedSize = 0;\n this._responseActions = [];\n this._recipientQueue = [];\n this._phaseTimer = false;\n this._plaintextEhlo = false;\n this._destroyed = false;\n this._closing = false;\n this._currentDataStream = false;\n this._pendingSend = false;\n this._connectCallback = false;\n this._onSocketData = chunk => this._onData(chunk);\n this._onSocketError = error => this._onError(error, 'ESOCKET', false, 'CONN');\n this._onSocketClose = () => this._onClose();\n this._onSocketEnd = () => this._onEnd();\n this._onSocketTimeout = () => this._onTimeout();\n this._onConnectionSocketError = err => this._onError(err, 'ESOCKET', false, 'CONN');\n }\n /**\n * Creates a connection to a SMTP server and sets up connection\n * listener\n */\n connect(connectCallback) {\n if (this._connectCalled && !this._destroyed) {\n // A connection is opened once. A second call would open a second socket over the\n // first one and run the session handlers of both against the same state\n const err = this._formatError('Cannot connect - connect() was already called for this connection', 'ECONNECTION', false, 'API');\n if (typeof connectCallback === 'function') {\n setImmediate(() => connectCallback(err));\n return;\n }\n this.logger.warn({ tnx: 'smtp' }, '%s', err.message);\n return;\n }\n this._connectCalled = true;\n if (typeof connectCallback === 'function') {\n this._connectCallback = connectCallback;\n this.once('connect', () => {\n this._connectCallback = false;\n this.logger.debug({\n tnx: 'smtp'\n }, 'SMTP handshake finished');\n connectCallback();\n });\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n // connectionTimeout covers the whole of connecting: the DNS lookup and every address tried\n const connectionTimeout = this.options.connectionTimeout || CONNECTION_TIMEOUT;\n // a transport that first opened a proxy connection for this one sets when that started\n this._connectionDeadline = (this._connectStartedAt || Date.now()) + connectionTimeout;\n let opts = {\n port: this.port,\n host: this.host,\n allowInternalNetworkInterfaces: this.allowInternalNetworkInterfaces,\n timeout: Math.min(this.options.dnsTimeout || DNS_TIMEOUT, connectionTimeout)\n };\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n this._setupConnectionHandlers();\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() => this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n }));\n }\n else {\n setImmediate(() => this._onConnect());\n }\n return;\n }\n else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return this._resolveAndConnect(opts, _resolved => {\n if (this._destroyed || this._closing) {\n return;\n }\n try {\n this._socket.connect(this.port, this.host, () => {\n // a `secure` connection over a caller-provided socket must still\n // perform the TLS handshake, otherwise AUTH and the message body\n // would be sent in cleartext despite the caller requesting TLS\n if (this.secureConnection && !this.alreadySecured) {\n return this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n });\n }\n this._onConnect();\n });\n this._setupConnectionHandlers();\n }\n catch (E) {\n setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n return;\n }\n });\n }\n else {\n if (this.secureConnection) {\n Object.assign(opts, this.options.tls || {});\n // ensure servername for SNI\n if (this.servername && !opts.servername) {\n opts.servername = this.servername;\n }\n }\n return this._resolveAndConnect(opts, resolved => {\n let addresses = resolved._addresses || [];\n if (opts.localAddress) {\n // a socket bound to an address of one family can not reach the other one\n const localFamily = net.isIPv6(opts.localAddress) ? 6 : 4;\n const sameFamily = addresses.filter(addr => net.isIP(addr) === localFamily);\n addresses = sameFamily.length ? sameFamily : addresses;\n }\n if (addresses.length > 1) {\n // net.connect tries the addresses in turn and moves on to the next one when an\n // attempt fails or takes too long. With both families it starts on IPv6 and\n // alternates (RFC 8305), so a host with a broken IPv6 path costs a fraction of\n // a second instead of a whole connection timeout\n const ipv6 = addresses.filter(addr => net.isIPv6(addr));\n const ipv4 = addresses.filter(addr => !net.isIPv6(addr));\n const ordered = shuffle(ipv6).concat(shuffle(ipv4));\n opts.host = this.host;\n opts.autoSelectFamily = true;\n if (!ipv6.length || !ipv4.length) {\n // a slow address of the only family gets its share of the time, not the\n // quarter second meant for an address family that does not work\n const remaining = this._connectionDeadline - Date.now();\n opts.autoSelectFamilyAttemptTimeout = Math.max(Math.floor(remaining / ordered.length), 10);\n }\n opts.lookup = ((hostname, lookupOptions, callback) => {\n if (lookupOptions && lookupOptions.all) {\n const all = ordered.map(address => ({ address, family: net.isIPv6(address) ? 6 : 4 }));\n return setImmediate(() => callback(null, all));\n }\n setImmediate(() => callback(null, ordered[0], net.isIPv6(ordered[0]) ? 6 : 4));\n });\n }\n else if (addresses.length) {\n opts.host = addresses[0];\n }\n this._connectToHost(opts, this.secureConnection);\n });\n }\n }\n /**\n * Resolves the hostname and applies resolved values to opts,\n * then calls the provided callback with the resolved data\n *\n * @param opts Connection options (modified in place)\n * @param callback Called with resolved data on success\n * @internal\n */\n _resolveAndConnect(opts, callback) {\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug({\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n }, 'Resolved %s as %s [cache %s]', opts.host, resolved.host, resolved.cached ? 'hit' : 'miss');\n for (const key of Object.keys(resolved)) {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n }\n callback(resolved);\n });\n }\n /**\n * Attempts to connect to the specified host address\n *\n * @param opts Connection options\n * @param secure Whether to use TLS\n * @internal\n */\n _connectToHost(opts, secure) {\n // If the client was closed while DNS resolution was in flight, do not open\n // a socket here: close() ran with this._socket still unset and so had\n // nothing to tear down, and _onConnect's remedial close() is a no-op once\n // _closing is set, the freshly connected socket would leak.\n if (this._destroyed || this._closing) {\n return;\n }\n const connectFn = secure ? tls.connect : net.connect;\n try {\n this._socket = connectFn(opts, () => this._onConnect());\n this._setupConnectionHandlers();\n }\n catch (E) {\n setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n return;\n }\n }\n /**\n * Sets up connection timeout and error handlers\n * @internal\n */\n _setupConnectionHandlers() {\n this._startPhase(Math.max((this._connectionDeadline || Date.now()) - Date.now(), 0), timeoutError('Connection timeout', 'CONNECT_TIMEOUT'));\n this._socket.on('error', this._onConnectionSocketError);\n }\n /**\n * Starts the timer of a connection phase: connecting, waiting for the greeting or a TLS\n * upgrade. The phases follow one another, so starting one ends the one before\n *\n * @param timeout Time the phase may take\n * @param err Error to fail with when it takes longer\n * @internal\n */\n _startPhase(timeout, err) {\n this._clearPhase();\n this._phaseTimer = setTimeout(() => {\n this._phaseTimer = false;\n this._onError(err, 'ETIMEDOUT', false, 'CONN');\n }, timeout);\n }\n /**\n * Time the greeting or a STARTTLS upgrade may take: greetingTimeout, cut short by what is left\n * of connectionTimeout\n *\n * @internal\n */\n _remainingSetupTime() {\n return Math.min(this.options.greetingTimeout || GREETING_TIMEOUT, Math.max((this._connectionDeadline || Infinity) - Date.now(), 1));\n }\n /** @internal */\n _clearPhase() {\n clearTimeout(this._phaseTimer);\n this._phaseTimer = false;\n }\n /**\n * Sends QUIT\n */\n quit() {\n this._sendCommand('QUIT');\n this._responseActions.push(this.close);\n }\n /**\n * Closes the connection to the server\n */\n close() {\n this._clearPhase();\n this._responseActions = [];\n // allow to run this function only once\n if (this._closing) {\n return;\n }\n this._closing = true;\n // anything but a non-negative finite number keeps the default grace period\n const configuredCloseTimeout = this.options.socketCloseTimeout;\n const socketCloseTimeout = typeof configuredCloseTimeout === 'number' && Number.isFinite(configuredCloseTimeout) && configuredCloseTimeout >= 0\n ? configuredCloseTimeout\n : CLOSE_TIMEOUT;\n const closeMethod = this.stage === 'init' || socketCloseTimeout === 0 ? 'destroy' : 'end';\n this.logger.debug({\n tnx: 'smtp'\n }, 'Closing connection to the server using \"%s\"', closeMethod);\n // after STARTTLS this is the TLS socket, tear that one down and not the plain socket it\n // wraps (Node 27 exposes the wrapped socket as `.socket`)\n const socket = this._socket;\n // Detach any in-flight DATA stream from the socket so the source stream\n // can be garbage-collected once the socket is gone.\n if (this._currentDataStream) {\n try {\n this._currentDataStream.unpipe(this._socket);\n }\n catch (_E) {\n // ignore\n }\n this._currentDataStream = false;\n }\n // Detach from the message stream as well and release whatever it reads from, the message\n // can not be sent over this connection anymore. The listener is swapped for a no-op rather\n // than removed, a stream destroyed with an error would otherwise throw it as unhandled\n if (this._pendingSend) {\n const { stream, onStreamError } = this._pendingSend;\n if (stream) {\n stream.removeListener('error', onStreamError);\n stream.on('error', TEARDOWN_NOOP);\n stream.destroy();\n }\n this._pendingSend = false;\n }\n if (socket && !socket.destroyed) {\n try {\n // Clear socket timeout to prevent timer leaks\n socket.setTimeout(0);\n // Remove all listeners to allow proper garbage collection\n socket.removeListener('data', this._onSocketData);\n socket.removeListener('timeout', this._onSocketTimeout);\n socket.removeListener('close', this._onSocketClose);\n socket.removeListener('end', this._onSocketEnd);\n socket.removeListener('error', this._onSocketError);\n socket.removeListener('error', this._onConnectionSocketError);\n // Absorb errors that may fire during socket teardown (e.g. server\n // sending cleartext after TLS shutdown triggers ERR_SSL_BAD_RECORD_TYPE)\n socket.on('error', TEARDOWN_NOOP);\n socket[closeMethod]();\n if (closeMethod === 'end') {\n // end() only closes our side, a server that never closes its own would keep\n // the socket, and the process with it, around for good\n const closeTimer = setTimeout(() => socket.destroy(), socketCloseTimeout);\n if (typeof closeTimer.unref === 'function') {\n closeTimer.unref();\n }\n socket.once('close', () => clearTimeout(closeTimer));\n }\n }\n catch (_E) {\n // just ignore\n }\n }\n this._destroy();\n }\n /**\n * Authenticate user\n */\n login(authData, callback) {\n const isDestroyedMessage = this._isDestroyedMessage('login');\n if (isDestroyedMessage) {\n return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n this._auth = authData || {};\n // Select SASL authentication method\n this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;\n // XOAUTH2 needs a token generator or a custom handler, without either the method\n // can not be run even when it is the only one the server advertised\n const canUseXOAuth2 = !!this._auth.oauth2 || this.customAuth.has('XOAUTH2');\n if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {\n this._authMethod = 'XOAUTH2';\n }\n else if (!this._authMethod || (this._authMethod === 'XOAUTH2' && !this._auth.oauth2)) {\n // use the first supported method that can be run\n const supported = this._supportedAuth.find(method => method !== 'XOAUTH2' || canUseXOAuth2);\n this._authMethod = (supported || 'PLAIN').toUpperCase().trim();\n }\n // a token login needs no credentials, every other method and every custom handler\n // gets them filled in from the user and pass values\n if ((this._authMethod !== 'XOAUTH2' || this.customAuth.has('XOAUTH2')) &&\n (!this._auth.credentials || !this._auth.credentials.user || !this._auth.credentials.pass)) {\n if ((this._auth.user && this._auth.pass) || this.customAuth.has(this._authMethod)) {\n this._auth.credentials = {\n user: this._auth.user,\n pass: this._auth.pass,\n options: this._auth.options\n };\n }\n else {\n return callback(this._formatError('Missing credentials for \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n }\n if (this.customAuth.has(this._authMethod)) {\n const handler = this.customAuth.get(this._authMethod);\n let lastResponse;\n let returned = false;\n const resolve = () => {\n if (returned) {\n return;\n }\n returned = true;\n this.logger.info({\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n }, 'User %s authenticated', JSON.stringify(this._auth.user));\n this.authenticated = true;\n callback(null, true);\n };\n const reject = (err) => {\n if (returned) {\n return;\n }\n returned = true;\n callback(this._formatError(err, 'EAUTH', lastResponse, 'AUTH ' + this._authMethod));\n };\n // one implementation serves both sendCommand overloads, the promise is returned\n // exactly when no callback was given\n const sendCommand = (cmd, done) => {\n let promise;\n if (!done) {\n promise = new Promise((resolve, reject) => {\n done = shared.callbackPromise(resolve, reject);\n });\n }\n this._responseActions.push(str => {\n lastResponse = str;\n let codes = str.match(/^(\\d+)(?:\\s(\\d+\\.\\d+\\.\\d+))?\\s/);\n let data = {\n command: cmd,\n response: str\n };\n if (codes) {\n data.status = Number(codes[1]) || 0;\n if (codes[2]) {\n data.code = codes[2];\n }\n data.text = str.substr(codes[0].length);\n }\n else {\n data.text = str;\n data.status = 0; // just in case we need to perform numeric comparisons\n }\n done(null, data);\n });\n setImmediate(() => this._sendCommand(cmd, maskAuthCommand(cmd)));\n return promise;\n };\n const handlerResponse = handler({\n auth: this._auth,\n method: this._authMethod,\n extensions: [].concat(this._supportedExtensions),\n authMethods: [].concat(this._supportedAuth),\n maxAllowedSize: this._maxAllowedSize || false,\n sendCommand: sendCommand,\n resolve,\n reject\n });\n if (handlerResponse && typeof handlerResponse.catch === 'function') {\n // a promise was returned\n handlerResponse.then(resolve).catch(reject);\n }\n return;\n }\n switch (this._authMethod) {\n case 'XOAUTH2':\n this._handleXOauth2Token(false, callback);\n return;\n case 'LOGIN':\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_USER(str, callback);\n });\n this._sendCommand('AUTH LOGIN');\n return;\n case 'PLAIN':\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n this._sendCommand('AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n this._auth.credentials.pass, 'utf-8').toString('base64'), \n // log entry without passwords\n 'AUTH PLAIN ' +\n Buffer.from(\n //this._auth.user+'\\u0000'+\n '\\u0000' + // skip authorization identity as it causes problems with some servers\n this._auth.credentials.user +\n '\\u0000' +\n '/* secret */', 'utf-8').toString('base64'));\n return;\n case 'CRAM-MD5':\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5(str, callback);\n });\n this._sendCommand('AUTH CRAM-MD5');\n return;\n }\n return callback(this._formatError('Unknown authentication method \"' + this._authMethod + '\"', 'EAUTH', false, 'API'));\n }\n /**\n * Sends a message\n *\n * @param envelope Envelope object, {from: addr, to: [addr]}\n * @param message String, Buffer or a Stream\n * @param done Callback to return once sending is completed\n */\n send(envelope, message, done) {\n // ensure that the callback is only called once. The public callback type has a\n // required result, the error paths hand over the error alone\n let returned = false;\n const callback = (err, info) => {\n if (returned) {\n return;\n }\n returned = true;\n if (this._pendingSend && this._pendingSend.callback === callback) {\n this._pendingSend = false;\n }\n done(err, info);\n };\n if (!message) {\n return callback(this._formatError('Empty message', 'EMESSAGE', false, 'API'));\n }\n const isDestroyedMessage = this._isDestroyedMessage('send message');\n if (isDestroyedMessage) {\n return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n // reject larger messages than allowed\n if (this._maxAllowedSize && envelope.size > this._maxAllowedSize) {\n setImmediate(() => {\n callback(this._formatError('Message size larger than allowed ' + this._maxAllowedSize, 'EMESSAGE', false, 'MAIL FROM'));\n });\n return;\n }\n const pendingSend = {\n callback,\n stream: false,\n onStreamError: err => callback(this._formatError(err, 'ESTREAM', false, 'API'))\n };\n if (typeof message.on === 'function') {\n pendingSend.stream = message;\n pendingSend.stream.on('error', pendingSend.onStreamError);\n }\n this._pendingSend = pendingSend;\n const startTime = Date.now();\n this._setEnvelope(envelope, (err, info) => {\n if (err) {\n // the message is not going to be sent, release whatever the stream reads from\n if (typeof message.destroy === 'function') {\n message.destroy();\n }\n return callback(err);\n }\n const envelopeTime = Date.now();\n const stream = this._createSendStream((err, str) => {\n if (err) {\n return callback(err);\n }\n // the envelope info becomes the send result once the timings are on it\n const result = info;\n result.envelopeTime = envelopeTime - startTime;\n result.messageTime = Date.now() - envelopeTime;\n result.messageSize = stream.outByteCount;\n result.response = str;\n const serverMessageId = parseServerMessageId(result.response, this.options.host);\n if (serverMessageId) {\n result.serverMessageId = serverMessageId;\n }\n // an LMTP server answers the message once per recipient, so recipients can be\n // refused after the envelope info was built without any rejected errors on it\n const rejectedErrors = this._envelope?.rejectedErrors;\n if (!result.rejectedErrors && rejectedErrors && rejectedErrors.length) {\n result.rejectedErrors = rejectedErrors;\n }\n return callback(null, result);\n });\n if (typeof message.pipe === 'function') {\n message.pipe(stream);\n }\n else {\n stream.write(message);\n stream.end();\n }\n });\n }\n /**\n * Resets connection state\n *\n * @param callback Callback to return once connection is reset\n */\n reset(callback) {\n const isDestroyedMessage = this._isDestroyedMessage('reset');\n if (isDestroyedMessage) {\n return callback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'API'));\n }\n this._sendCommand('RSET');\n this._responseActions.push(str => {\n if (str.charAt(0) !== '2') {\n return callback(this._formatError('Could not reset session state. response=' + str, 'EPROTOCOL', str, 'RSET'));\n }\n this._envelope = false;\n return callback(null, true);\n });\n }\n /**\n * Connection listener that is run when the connection to\n * the server is opened\n *\n * @event\n * @internal\n */\n _onConnect() {\n const socket = this._socket;\n this._clearPhase();\n this.logger.info({\n tnx: 'network',\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort\n }, '%s established to %s:%s', this.secure ? 'Secure connection' : 'Connection', socket.remoteAddress, socket.remotePort);\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n this.stage = 'connected';\n // clear existing listeners for the socket\n socket.removeListener('data', this._onSocketData);\n socket.removeListener('timeout', this._onSocketTimeout);\n socket.removeListener('close', this._onSocketClose);\n socket.removeListener('end', this._onSocketEnd);\n // Switch from connection-phase error handler to normal error handler\n socket.removeListener('error', this._onConnectionSocketError);\n // _upgradeConnection (options.connection + secure) may already have attached\n // the normal handler; remove it first so we never end up with a duplicate\n socket.removeListener('error', this._onSocketError);\n socket.on('error', this._onSocketError);\n socket.on('data', this._onSocketData);\n socket.once('close', this._onSocketClose);\n socket.once('end', this._onSocketEnd);\n socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n socket.on('timeout', this._onSocketTimeout);\n // keepalive also covers sockets handed over by a proxy or by the caller\n if (typeof socket.setKeepAlive === 'function') {\n socket.setKeepAlive(true, KEEPALIVE_DELAY);\n }\n // Commands are written in the batches they belong to (see cork() for PIPELINING), Nagle\n // would only hold a write back until the server acknowledged the previous one. Against a\n // server that delays its ACKs that costs 40ms on every message\n if (typeof socket.setNoDelay === 'function') {\n socket.setNoDelay(true);\n }\n // bounded by greetingTimeout and by what is left of connectionTimeout, which covers setting\n // the session up from the DNS lookup to the end of a STARTTLS upgrade\n this._startPhase(this._remainingSetupTime(), timeoutError('Greeting never received', 'GREETING_TIMEOUT'));\n this._responseActions.push(this._actionGreeting);\n // we have a 'data' listener set up so resume socket if it was paused\n socket.resume();\n }\n /**\n * Ends the session after a 421 reply. The replies queued for commands sent along with the\n * answered one are not going to come, so the message in flight is failed here\n *\n * @param str The 421 reply\n * @internal\n */\n _onServerClosing(str) {\n if (this._destroyed) {\n return;\n }\n const pendingSend = this._pendingSend;\n const envelope = this._envelope;\n this._responseActions = [];\n this.close();\n if (pendingSend) {\n pendingSend.callback((envelope && envelope.mailError) || this._formatError('Server closed the connection', 'ECONNECTION', str, 'CONN'));\n }\n }\n /**\n * 'data' listener for data coming from the server\n *\n * @event\n * @param chunk Data chunk coming from the server\n * @internal\n */\n _onData(chunk) {\n if (this._destroyed || !chunk || !chunk.length) {\n return;\n }\n const maxResponseSize = this.options.maxResponseSize || MAX_RESPONSE_SIZE;\n const data = chunk.toString('binary');\n // A chunk without a line break only extends the line currently being received, so\n // keep it in the remainder and leave that string unflattened. Splitting the whole\n // remainder again on every chunk would rescan everything buffered for that line so\n // far, which is quadratic in the length of a line the peer never terminates\n if (!data.includes('\\n')) {\n this._remainder += data;\n if (this._remainder.length > maxResponseSize) {\n return this._onResponseTooLarge();\n }\n return;\n }\n const lines = (this._remainder + data).split(/\\r?\\n/);\n this._remainder = lines.pop();\n for (let i = 0, len = lines.length; i < len; i++) {\n if (this._responsePartial) {\n this._responseQueue[this._responseQueue.length - 1] += '\\n' + lines[i];\n }\n else {\n this._responseQueue.push(lines[i]);\n }\n // The line just added is the last line of that queue entry, so it alone decides\n // whether the reply is still partial. Looking for the last line of the accumulated\n // entry instead would rescan a string that grows with every continuation line,\n // which is quadratic in the size of the reply\n this._responsePartial = isPartialLine(lines[i]);\n // Checked as each line lands, so a peer that never completes a reply cannot keep\n // buffering, and the limit does not depend on how it split its bytes into chunks\n if (this._responsePartial && this._responseQueue[this._responseQueue.length - 1].length > maxResponseSize) {\n return this._onResponseTooLarge();\n }\n }\n if (this._remainder.length > maxResponseSize) {\n return this._onResponseTooLarge();\n }\n if (this._responsePartial) {\n return;\n }\n this._processResponse();\n }\n /**\n * Drops a connection whose peer keeps extending a reply it never completes, releasing\n * whatever was buffered for that reply\n * @internal\n */\n _onResponseTooLarge() {\n this._remainder = '';\n this._responseQueue = [];\n this._responsePartial = false;\n this._onError(new Error('Server response exceeds maximum allowed size'), 'EPROTOCOL', false, 'CONN');\n }\n /**\n * 'error' listener for the socket\n *\n * @event\n * @param err Error object\n * @param type Error name\n * @param data Server response that triggered the error, false if there is none\n * @param command SMTP command that was in flight\n * @internal\n */\n _onError(err, type, data, command) {\n this._clearPhase();\n if (this._destroyed) {\n // just ignore, already closed\n // this might happen when a socket is canceled because of reached timeout\n // but the socket timeout error itself receives only after\n return;\n }\n err = this._formatError(err, type, data, command);\n // the message carries the server response, it is an argument and not the format string\n if (isTransientError(err)) {\n this.logger.warn({ tnx: 'smtp', err }, '%s', err.message);\n }\n else {\n this.logger.error({ tnx: 'smtp', err }, '%s', err.message);\n }\n // close() forgets the send in flight, it is completed with this same error afterwards so\n // a late message stream error has nothing left to report\n const pendingSend = this._pendingSend;\n this.emit('error', err);\n this.close();\n if (pendingSend) {\n pendingSend.callback(err);\n }\n }\n /** @internal */\n _formatError(message, type, response, command) {\n let err;\n if (/Error\\]$/i.test(Object.prototype.toString.call(message))) {\n err = message;\n }\n else {\n err = new Error(message);\n }\n // a permission model denial keeps its own code, see ERR_ACCESS_DENIED\n if (type && type !== 'Error' && err.code !== ERR_ACCESS_DENIED) {\n // the code of a system error, such as ECONNREFUSED, still tells what happened\n if (err.code && err.code !== type && !err.originalCode) {\n err.originalCode = err.code;\n }\n err.code = type;\n }\n if (response) {\n err.response = response;\n err.message += ': ' + response;\n }\n const responseCode = (typeof response === 'string' && Number((response.match(/^\\d+/) || [])[0])) || false;\n if (responseCode) {\n err.responseCode = responseCode;\n err.permanent = isPermanentResponseCode(responseCode);\n }\n if (command) {\n err.command = command;\n }\n return err;\n }\n /**\n * 'close' listener for the socket\n *\n * @event\n * @internal\n */\n _onClose() {\n let serverResponse = false;\n if (this._remainder && this._remainder.trim()) {\n this.lastServerResponse = serverResponse = decodeServerResponse(this._remainder.trim());\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug({\n tnx: 'server'\n }, serverResponse);\n }\n }\n this.logger.info({\n tnx: 'network'\n }, 'Connection closed');\n // the unterminated remainder is only reported as a reply (and so gives the error a responseCode)\n // when it starts like a complete failure reply, not for a fragment such as \"55\" or a 250\n const failureResponse = typeof serverResponse === 'string' && /^[45]\\d{2}[ -]/.test(serverResponse) ? serverResponse : false;\n if (this.upgrading && !this._destroyed) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ETLS', failureResponse, 'CONN');\n }\n if (!failureResponse && this._responseActions[0] === this._actionGreeting && this._connectCallback && !this._destroyed) {\n // A silent close before the greeting is handed to the connect() callback rather than\n // emitted as 'error', callers that never saw an error for it must not start throwing one\n const connectCallback = this._connectCallback;\n this._connectCallback = false;\n const err = this._formatError(new Error('Connection closed unexpectedly'), 'ECONNECTION', false, 'CONN');\n this.logger.warn({ tnx: 'network' }, err.message);\n connectCallback(err);\n this.close();\n return;\n }\n if (!failureResponse && this.stage === 'connected' && !this._responseActions.length && !this._pendingSend && !this._destroyed && !this._closing) {\n // nothing was waiting for the server, so this is the server ending an idle session\n // (usually after its idle timeout), not a failure\n this.logger.info({\n tnx: 'network'\n }, 'Server closed the idle connection');\n return this._destroy();\n }\n if (failureResponse || (this._responseActions[0] !== this.close && !this._destroyed)) {\n return this._onError(new Error('Connection closed unexpectedly'), 'ECONNECTION', failureResponse, 'CONN');\n }\n this._destroy();\n }\n /**\n * 'end' listener for the socket\n *\n * @event\n * @internal\n */\n _onEnd() {\n if (this._socket && !this._socket.destroyed) {\n // Peer sent FIN, finish our half of the close gracefully rather\n // than destroying. 'close' fires after the OS finalizes teardown.\n this._socket.end();\n }\n }\n /**\n * 'timeout' listener for the socket\n *\n * @event\n * @internal\n */\n _onTimeout() {\n return this._onError(timeoutError('Timeout', 'SOCKET_TIMEOUT'), 'ETIMEDOUT', false, 'CONN');\n }\n /**\n * Destroys the client, emits 'end'\n * @internal\n */\n _destroy() {\n if (this._destroyed) {\n return;\n }\n this._destroyed = true;\n // keep the documented public flag in sync with the private state\n this.destroyed = true;\n // a connection the server dropped before the greeting would otherwise keep\n // the greeting timer, and with it the process, alive until it fires\n this._clearPhase();\n this.emit('end');\n }\n /**\n * Upgrades the connection to TLS\n *\n * @param callback Callback function to run when the connection\n * has been secured\n * @internal\n */\n _upgradeConnection(callback) {\n if (this._destroyed || this._closing) {\n return;\n }\n // RFC 3207 section 6: the client MUST discard any knowledge obtained from\n // the server that was not received over the TLS-protected session. Drop any\n // buffered input received before the handshake so a man-in-the-middle cannot\n // inject plaintext bytes after the \"220\" reply (e.g. a CRLF-free fragment that\n // would otherwise be prepended to the first post-TLS response and parsed as\n // part of the secured EHLO capabilities). STARTTLS response injection.\n const discarded = this._remainder.length + this._responseQueue.reduce((total, response) => total + response.length, 0);\n if (discarded) {\n // a server does not send anything here on its own, this is worth knowing about\n this.logger.warn({\n tnx: 'smtp',\n discarded\n }, 'Discarded %s bytes received in plaintext after the STARTTLS response', discarded);\n }\n this._plaintextEhlo = false;\n this._remainder = '';\n this._responseQueue = [];\n this._responsePartial = false;\n // do not remove all listeners or it breaks node v0.10 as there's\n // apparently a 'finish' event set that would be cleared as well\n // we can safely keep 'error', 'end', 'close' etc. events\n const socketPlain = this._socket;\n socketPlain.removeListener('data', this._onSocketData); // incoming data is going to be gibberish from this point onwards\n socketPlain.removeListener('timeout', this._onSocketTimeout); // timeout will be re-set for the new socket object\n socketPlain.setTimeout(0);\n const opts = Object.assign({\n socket: socketPlain,\n host: this.host\n }, this.options.tls || {});\n // ensure servername for SNI\n if (this.servername && !opts.servername) {\n opts.servername = this.servername;\n }\n // Remove all listeners from the plain socket to allow proper garbage\n // collection. Used on both the TLS-success path and the synchronous\n // tls.connect() throw path; either way the plain socket is done.\n const removePlainSocketListeners = () => {\n socketPlain.removeListener('close', this._onSocketClose);\n socketPlain.removeListener('end', this._onSocketEnd);\n socketPlain.removeListener('error', this._onSocketError);\n // the connection-phase handler is attached when upgrading a pre-opened\n // options.connection socket; strip it so nothing lingers on the plain socket\n socketPlain.removeListener('error', this._onConnectionSocketError);\n };\n this.upgrading = true;\n // the socket timeout only notices a server that sends nothing at all, a handshake that\n // trickles along would otherwise hold the connection for as long as the server likes\n // STARTTLS is the last step of setting the session up\n this._startPhase(this._remainingSetupTime(), timeoutError('TLS handshake timed out', 'UPGRADE_TIMEOUT'));\n // tls.connect is not an asynchronous function however it may still throw errors and requires to be wrapped with try/catch\n try {\n this._socket = tls.connect(opts, () => {\n this._clearPhase();\n this.secure = true;\n this.upgrading = false;\n this._socket.on('data', this._onSocketData);\n removePlainSocketListeners();\n return callback(null, true);\n });\n }\n catch (err) {\n this._clearPhase();\n removePlainSocketListeners();\n return callback(err);\n }\n this._socket.on('error', this._onSocketError);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT); // 10 min.\n this._socket.on('timeout', this._onSocketTimeout);\n // resume in case the socket was paused\n socketPlain.resume();\n }\n /**\n * Processes queued responses from the server\n * @internal\n */\n _processResponse() {\n if (!this._responseQueue.length) {\n return false;\n }\n const raw = (this._responseQueue.shift() || '').toString();\n // Skip unexpected empty lines without consuming a response action or\n // overwriting lastServerResponse; reprocess whatever else is queued.\n if (!raw.trim()) {\n setImmediate(() => this._processResponse());\n return;\n }\n if (isPartialResponse(raw)) {\n // the rest of the reply is still on its way: put it back on the queue and wait\n // rather than dropping it. It has not been received in full, so it must not be\n // reported as the last server response either\n this._responseQueue.unshift(raw);\n return;\n }\n const str = (this.lastServerResponse = decodeServerResponse(raw));\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug({\n tnx: 'server'\n }, str.replace(/\\r?\\n$/, ''));\n }\n const action = this._responseActions.shift();\n // RFC 5321 4.2: 421 means the server is about to close the connection, whatever it answers\n const closing = /^421[ -]/.test(str);\n if (typeof action === 'function') {\n // the command gets its own error first, the code tells which step failed\n action.call(this, str);\n if (closing) {\n return this._onServerClosing(str);\n }\n setImmediate(() => this._processResponse());\n }\n else if (closing && !this._pendingSend && this.stage === 'connected') {\n // RFC 5321 4.2: a server may send 421 at any time when it is about to close the\n // connection. Nothing was waiting for a reply, so this ends an idle session\n this.logger.info({\n tnx: 'smtp'\n }, 'Server closed the idle connection: %s', str);\n this.close();\n }\n else {\n return this._onError(new Error('Unexpected Response'), 'EPROTOCOL', str, 'CONN');\n }\n }\n /**\n * Send a command to the server, append \\r\\n\n *\n * @param str String to be sent to the server\n * @param logStr Optional string to be used for logging instead of the actual string\n * @internal\n */\n _sendCommand(str, logStr) {\n if (this._destroyed) {\n // Connection already closed, can't send any more data\n return;\n }\n const socket = this._socket;\n if (socket.destroyed) {\n return this.close();\n }\n if (this.options.debug || this.options.transactionLog) {\n this.logger.debug({\n tnx: 'client'\n }, (logStr || str || '').toString().replace(/\\r?\\n$/, ''));\n }\n socket.write(Buffer.from(str + '\\r\\n', 'utf-8'));\n }\n /**\n * Initiates a new message by submitting envelope data, starting with\n * MAIL FROM: command\n *\n * @param envelope Envelope object in the form of\n * {from:'...', to:['...']}\n * or\n * {from:{address:'...',name:'...'}, to:[address:'...',name:'...']}\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _setEnvelope(envelope, callback) {\n const args = [];\n let useSmtpUtf8 = false;\n this._envelope = (envelope || {});\n this._envelope.from = ((this._envelope.from && this._envelope.from.address) || this._envelope.from || '').toString().trim();\n this._envelope.to = []\n .concat(this._envelope.to || [])\n .map(to => ((to && to.address) || to || '').toString().trim());\n if (!this._envelope.to.length) {\n return callback(this._formatError('No recipients defined', 'EENVELOPE', false, 'API'));\n }\n if (this._envelope.from && /[\\r\\n<>]/.test(this._envelope.from)) {\n return callback(this._formatError('Invalid sender ' + JSON.stringify(this._envelope.from), 'EENVELOPE', false, 'API'));\n }\n // check if the sender address uses only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.from)) {\n useSmtpUtf8 = true;\n }\n for (let i = 0, len = this._envelope.to.length; i < len; i++) {\n if (!this._envelope.to[i] || /[\\r\\n<>]/.test(this._envelope.to[i])) {\n return callback(this._formatError('Invalid recipient ' + JSON.stringify(this._envelope.to[i]), 'EENVELOPE', false, 'API'));\n }\n // check if the recipients addresses use only ASCII characters,\n // otherwise require usage of SMTPUTF8 extension\n if (/[\\x80-\\uFFFF]/.test(this._envelope.to[i])) {\n useSmtpUtf8 = true;\n }\n }\n // clone the recipients array for latter manipulation\n this._envelope.rcptQueue = [].concat(this._envelope.to || []);\n this._envelope.rejected = [];\n this._envelope.rejectedErrors = [];\n this._envelope.accepted = [];\n if (this._envelope.dsn) {\n try {\n this._envelope.dsn = this._setDsnEnvelope(this._envelope.dsn);\n }\n catch (err) {\n return callback(this._formatError('Invalid DSN ' + err.message, 'EENVELOPE', false, 'API'));\n }\n }\n // RFC 8689: validate REQUIRETLS eligibility before queuing the MAIL FROM\n // response action, so a rejection here cannot leave an orphaned action in\n // _responseActions (which would consume the next reply and desync a reused\n // connection).\n if (this._envelope.requireTLSExtensionEnabled) {\n if (!this.secure) {\n return callback(this._formatError('REQUIRETLS can only be used over TLS connections (RFC 8689)', 'EREQUIRETLS', false, 'MAIL FROM'));\n }\n if (!this._supportedExtensions.includes('REQUIRETLS')) {\n return callback(this._formatError('Server does not support REQUIRETLS extension (RFC 8689)', 'EREQUIRETLS', false, 'MAIL FROM'));\n }\n }\n // RFC 2920: with PIPELINING the whole envelope and DATA go out without waiting for the\n // replies in between, which saves two round trips for every message\n this._envelope.pipelined = this._supportedExtensions.includes('PIPELINING');\n this._responseActions.push(str => {\n this._actionMAIL(str, callback);\n });\n // If the server supports SMTPUTF8 and the envelope includes an internationalized\n // email address then append SMTPUTF8 keyword to the MAIL FROM command\n if (useSmtpUtf8 && this._supportedExtensions.includes('SMTPUTF8')) {\n args.push('SMTPUTF8');\n this._usingSmtpUtf8 = true;\n }\n // If the server supports 8BITMIME and the message might contain non-ascii bytes\n // then append the 8BITMIME keyword to the MAIL FROM command\n if (this._envelope.use8BitMime && this._supportedExtensions.includes('8BITMIME')) {\n args.push('BODY=8BITMIME');\n this._using8BitMime = true;\n }\n if (this._envelope.size && this._supportedExtensions.includes('SIZE')) {\n const sizeValue = Number(this._envelope.size) || 0;\n if (sizeValue > 0) {\n args.push('SIZE=' + sizeValue);\n }\n }\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the MAIL FROM command\n if (this._envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (this._envelope.dsn.ret) {\n args.push('RET=' + shared.encodeXText(this._envelope.dsn.ret));\n }\n if (this._envelope.dsn.envid) {\n args.push('ENVID=' + shared.encodeXText(this._envelope.dsn.envid));\n }\n }\n // RFC 8689: append the REQUIRETLS keyword to MAIL FROM. Eligibility\n // (TLS connection + server support) was already validated above, before\n // the response action was queued.\n if (this._envelope.requireTLSExtensionEnabled) {\n args.push('REQUIRETLS');\n }\n const mailFrom = 'MAIL FROM:<' + this._envelope.from + '>' + (args.length ? ' ' + args.join(' ') : '');\n this._recipientQueue = [];\n if (!this._envelope.pipelined) {\n this._sendCommand(mailFrom);\n return;\n }\n // corked, so the batch leaves in one segment instead of the first command alone\n const socket = this._socket;\n socket.cork();\n this._sendCommand(mailFrom);\n while (this._envelope.rcptQueue.length) {\n this._sendRcpt(this._envelope.rcptQueue.shift(), callback);\n }\n this._responseActions.push(str => {\n this._actionDATA(str, callback);\n });\n this._sendCommand('DATA');\n socket.uncork();\n }\n /**\n * Sends RCPT TO for a recipient and queues the handler for the reply\n *\n * @param recipient Recipient address\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _sendRcpt(recipient, callback) {\n this._recipientQueue.push(recipient);\n this._responseActions.push(str => {\n this._actionRCPT(str, callback);\n });\n this._sendCommand('RCPT TO:<' + recipient + '>' + this._getDsnRcptToArgs());\n }\n /** @internal */\n _setDsnEnvelope(params) {\n let ret = (params.ret || params.return || '').toString().toUpperCase() || null;\n if (ret) {\n switch (ret) {\n case 'HDRS':\n case 'HEADERS':\n ret = 'HDRS';\n break;\n case 'FULL':\n case 'BODY':\n ret = 'FULL';\n break;\n }\n }\n if (ret && !['FULL', 'HDRS'].includes(ret)) {\n throw new Error('ret: ' + JSON.stringify(ret));\n }\n const envid = (params.envid || params.id || '').toString() || null;\n let notify = params.notify || null;\n if (notify) {\n if (typeof notify === 'string') {\n notify = notify.split(',');\n }\n notify = notify.map(n => n.trim().toUpperCase());\n const validNotify = ['NEVER', 'SUCCESS', 'FAILURE', 'DELAY'];\n const invalidNotify = notify.filter(n => !validNotify.includes(n));\n if (invalidNotify.length || (notify.length > 1 && notify.includes('NEVER'))) {\n throw new Error('notify: ' + JSON.stringify(notify.join(',')));\n }\n notify = notify.join(',');\n }\n let orcpt = (params.recipient || params.orcpt || '').toString() || null;\n if (orcpt && orcpt.indexOf(';') < 0) {\n orcpt = 'rfc822;' + orcpt;\n }\n return {\n ret,\n envid,\n notify,\n orcpt\n };\n }\n /** @internal */\n _getDsnRcptToArgs() {\n const envelope = this._envelope;\n const args = [];\n // If the server supports DSN and the envelope includes an DSN prop\n // then append DSN params to the RCPT TO command\n if (envelope.dsn && this._supportedExtensions.includes('DSN')) {\n if (envelope.dsn.notify) {\n args.push('NOTIFY=' + shared.encodeXText(envelope.dsn.notify));\n }\n if (envelope.dsn.orcpt) {\n args.push('ORCPT=' + shared.encodeXText(envelope.dsn.orcpt));\n }\n }\n return args.length ? ' ' + args.join(' ') : '';\n }\n /** @internal */\n _createSendStream(callback) {\n const envelope = this._envelope;\n const dataStream = new DataStream();\n if (this.options.lmtp) {\n envelope.accepted.forEach((recipient, i) => {\n const final = i === envelope.accepted.length - 1;\n this._responseActions.push(str => {\n this._actionLMTPStream(recipient, final, str, callback);\n });\n });\n }\n else {\n this._responseActions.push(str => {\n this._actionSMTPStream(str, callback);\n });\n }\n this._currentDataStream = dataStream;\n dataStream.pipe(this._socket, {\n end: false\n });\n if (this.options.debug) {\n const logStream = new PassThrough();\n logStream.on('readable', () => {\n let chunk;\n while ((chunk = logStream.read())) {\n this.logger.debug({\n tnx: 'message'\n }, chunk.toString('binary').replace(/\\r?\\n$/, ''));\n }\n });\n dataStream.pipe(logStream);\n }\n dataStream.once('end', () => {\n if (this._currentDataStream === dataStream) {\n this._currentDataStream = false;\n }\n this.logger.info({\n tnx: 'message',\n inByteCount: dataStream.inByteCount,\n outByteCount: dataStream.outByteCount\n }, '<%s bytes encoded mime message (source size %s bytes)>', dataStream.outByteCount, dataStream.inByteCount);\n });\n return dataStream;\n }\n /** ACTIONS **/\n /**\n * Will be run after the connection is created and the server sends\n * a greeting. If the incoming message starts with 220 initiate\n * SMTP session by sending EHLO command\n *\n * @param str Message from the server\n * @internal\n */\n _actionGreeting(str) {\n this._clearPhase();\n if (str.substr(0, 3) !== '220') {\n this._onError(new Error('Invalid greeting. response=' + str), 'EPROTOCOL', str, 'CONN');\n return;\n }\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n }\n else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n }\n /**\n * Handles server response for LHLO command. If it yielded in\n * error, emit 'error', otherwise treat this as an EHLO response\n *\n * @param str Message from the server\n * @internal\n */\n _actionLHLO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid LHLO. response=' + str), 'EPROTOCOL', str, 'LHLO');\n return;\n }\n this._actionEHLO(str);\n }\n /**\n * Handles server response for EHLO command. If it yielded in\n * error, try HELO instead, otherwise initiate TLS negotiation\n * if STARTTLS is supported by the server or move into the\n * authentication phase.\n *\n * @param str Message from the server\n * @internal\n */\n _actionEHLO(str) {\n if (str.substr(0, 3) === '421') {\n this._onError(new Error('Server terminates connection. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n if (str.charAt(0) !== '2') {\n if (this.options.requireTLS) {\n this._onError(new Error('EHLO failed but HELO does not support required STARTTLS. response=' + str), 'ECONNECTION', str, 'EHLO');\n return;\n }\n // Try HELO instead\n this._responseActions.push(this._actionHELO);\n this._sendCommand('HELO ' + this.name);\n return;\n }\n // Detect if the server supports STARTTLS\n if (!this.secure && !this.options.ignoreTLS && (/[ -]STARTTLS\\b/im.test(str) || this.options.requireTLS)) {\n // kept for opportunisticTLS, a session that stays in plaintext still has these extensions\n this._plaintextEhlo = str;\n this._sendCommand('STARTTLS');\n this._responseActions.push(this._actionSTARTTLS);\n return;\n }\n this._parseEhloExtensions(str);\n this.emit('connect');\n }\n /**\n * Reads the extensions and the authentication mechanisms out of an EHLO response\n *\n * @param str EHLO response from the server\n * @internal\n */\n _parseEhloExtensions(str) {\n let match;\n this._ehloLines = str\n .split(/\\r?\\n/)\n .map(line => line.replace(/^\\d+[ -]/, '').trim())\n .filter(line => line)\n .slice(1);\n // Detect if the server supports SMTPUTF8\n if (/[ -]SMTPUTF8\\b/im.test(str)) {\n this._supportedExtensions.push('SMTPUTF8');\n }\n // Detect if the server supports DSN\n if (/[ -]DSN\\b/im.test(str)) {\n this._supportedExtensions.push('DSN');\n }\n // Detect if the server supports 8BITMIME\n if (/[ -]8BITMIME\\b/im.test(str)) {\n this._supportedExtensions.push('8BITMIME');\n }\n // Detect if the server supports REQUIRETLS (RFC 8689)\n if (/[ -]REQUIRETLS\\b/im.test(str)) {\n this._supportedExtensions.push('REQUIRETLS');\n }\n // Detect if the server supports PIPELINING\n if (/[ -]PIPELINING\\b/im.test(str)) {\n this._supportedExtensions.push('PIPELINING');\n }\n // Detect if the server supports AUTH\n if (/[ -]AUTH\\b/i.test(str)) {\n this.allowsAuth = true;\n }\n // Detect the advertised SASL mechanisms. The list is split into whole tokens rather\n // than searched for each name with a pattern: the patterns this replaced let two\n // whitespace runs overlap and backtracked quadratically over an AUTH line padded with\n // spaces, so a hostile server could stall the event loop from its EHLO reply\n // (GHSA-4ffr-jq9g-5ffx).\n const authMechanisms = new Set();\n for (const line of this._ehloLines) {\n const authMatch = /^AUTH[\\s=](.*)/i.exec(line);\n if (authMatch) {\n for (const mechanism of authMatch[1].split(/[\\s=]+/)) {\n authMechanisms.add(mechanism.toUpperCase());\n }\n }\n }\n // listed in order of preference, the first one the credentials allow is used\n for (const mechanism of ['PLAIN', 'LOGIN', 'CRAM-MD5', 'XOAUTH2']) {\n if (authMechanisms.has(mechanism)) {\n this._supportedAuth.push(mechanism);\n }\n }\n // Detect if the server supports SIZE extensions (and the max allowed size)\n if ((match = str.match(/[ -]SIZE(?:[ \\t]+(\\d+))?/im))) {\n this._supportedExtensions.push('SIZE');\n this._maxAllowedSize = Number(match[1]) || 0;\n }\n }\n /**\n * Handles server response for HELO command. If it yielded in\n * error, emit 'error', otherwise move into the authentication phase.\n *\n * @param str Message from the server\n * @internal\n */\n _actionHELO(str) {\n if (str.charAt(0) !== '2') {\n this._onError(new Error('Invalid HELO. response=' + str), 'EPROTOCOL', str, 'HELO');\n return;\n }\n // assume that authentication is enabled (most probably is not though)\n this.allowsAuth = true;\n this.emit('connect');\n }\n /**\n * Handles server response for STARTTLS command. If there's an error\n * try HELO instead, otherwise initiate TLS upgrade. If the upgrade\n * succeedes restart the EHLO\n *\n * @param str Message from the server\n * @internal\n */\n _actionSTARTTLS(str) {\n if (str.charAt(0) !== '2') {\n if (this.options.opportunisticTLS) {\n this.logger.info({\n tnx: 'smtp'\n }, 'Failed STARTTLS upgrade, continuing unencrypted');\n // the plaintext session goes on with what the server announced for it, except for\n // AUTH: credentials are not sent over a connection that failed to encrypt\n if (this._plaintextEhlo) {\n this._parseEhloExtensions(this._plaintextEhlo);\n this._plaintextEhlo = false;\n this.allowsAuth = false;\n this._supportedAuth = [];\n }\n this.emit('connect');\n return;\n }\n this._onError(new Error('Error upgrading connection with STARTTLS'), 'ETLS', str, 'STARTTLS');\n return;\n }\n this._upgradeConnection((err, secured) => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'STARTTLS');\n return;\n }\n this.logger.info({\n tnx: 'smtp'\n }, 'Connection upgraded with STARTTLS');\n if (secured) {\n // restart session\n if (this.options.lmtp) {\n this._responseActions.push(this._actionLHLO);\n this._sendCommand('LHLO ' + this.name);\n }\n else {\n this._responseActions.push(this._actionEHLO);\n this._sendCommand('EHLO ' + this.name);\n }\n }\n else {\n this.emit('connect');\n }\n });\n }\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 VXNlcm5hbWU6' (base64 for 'Username:'). Data to be sent as\n * response needs to be base64 encoded username. We do not need\n * exact match but settle with 334 response in general as some\n * hosts invalidly use a longer message than VXNlcm5hbWU6\n *\n * @param str Message from the server\n * @param callback Callback to run once the authentication sequence completes\n * @internal\n */\n _actionAUTH_LOGIN_USER(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 VXNlcm5hbWU6'\n callback(this._formatError('Invalid login sequence while waiting for \"334 VXNlcm5hbWU6\"', 'EAUTH', str, 'AUTH LOGIN'));\n return;\n }\n this._responseActions.push(str => {\n this._actionAUTH_LOGIN_PASS(str, callback);\n });\n this._sendCommand(Buffer.from(this._auth.credentials.user + '', 'utf-8').toString('base64'));\n }\n /**\n * Handle the response for AUTH CRAM-MD5 command. We are expecting\n * '334 <challenge string>'. Data to be sent as response needs to be\n * base64 decoded challenge string, MD5 hashed using the password as\n * a HMAC key, prefixed by the username and a space, and finally all\n * base64 encoded again.\n *\n * @param str Message from the server\n * @param callback Callback to run once the authentication sequence completes\n * @internal\n */\n _actionAUTH_CRAM_MD5(str, callback) {\n const challengeMatch = str.match(/^334\\s+(.+)$/);\n if (!challengeMatch) {\n return callback(this._formatError('Invalid login sequence while waiting for server challenge string', 'EAUTH', str, 'AUTH CRAM-MD5'));\n }\n // Decode from base64\n const base64decoded = Buffer.from(challengeMatch[1], 'base64').toString('ascii');\n const hmacMD5 = crypto.createHmac('md5', this._auth.credentials.pass);\n hmacMD5.update(base64decoded);\n const prepended = this._auth.credentials.user + ' ' + hmacMD5.digest('hex');\n this._responseActions.push(str => {\n this._actionAUTH_CRAM_MD5_PASS(str, callback);\n });\n this._sendCommand(Buffer.from(prepended).toString('base64'), \n // hidden hash for logs\n Buffer.from(this._auth.credentials.user + ' /* secret */').toString('base64'));\n }\n /**\n * Handles the response to CRAM-MD5 authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param str Message from the server\n * @param callback Callback to run once the authentication sequence completes\n * @internal\n */\n _actionAUTH_CRAM_MD5_PASS(str, callback) {\n if (!str.match(/^235\\s+/)) {\n return callback(this._formatError('Invalid login sequence while waiting for \"235\"', 'EAUTH', str, 'AUTH CRAM-MD5'));\n }\n this.logger.info({\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n }, 'User %s authenticated', JSON.stringify(this._auth.user));\n this.authenticated = true;\n callback(null, true);\n }\n /**\n * Handle the response for AUTH LOGIN command. We are expecting\n * '334 UGFzc3dvcmQ6' (base64 for 'Password:'). Data to be sent as\n * response needs to be base64 encoded password.\n *\n * @param str Message from the server\n * @param callback Callback to run once the authentication sequence completes\n * @internal\n */\n _actionAUTH_LOGIN_PASS(str, callback) {\n if (!/^334[ -]/.test(str)) {\n // expecting '334 UGFzc3dvcmQ6'\n return callback(this._formatError('Invalid login sequence while waiting for \"334 UGFzc3dvcmQ6\"', 'EAUTH', str, 'AUTH LOGIN'));\n }\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, callback);\n });\n this._sendCommand(Buffer.from((this._auth.credentials.pass || '').toString(), 'utf-8').toString('base64'), \n // Hidden pass for logs\n Buffer.from('/* secret */', 'utf-8').toString('base64'));\n }\n /**\n * Handles the response for authentication, if there's no error,\n * the user can be considered logged in. Start waiting for a message to send\n *\n * @param str Message from the server\n * @param isRetry True if this is a retry after a failed login, or the callback itself\n * @param [callback] Callback to run once the authentication sequence completes\n * @internal\n */\n _actionAUTHComplete(str, isRetry, callback) {\n if (!callback && typeof isRetry === 'function') {\n callback = isRetry;\n isRetry = false;\n }\n if (str.substr(0, 3) === '334') {\n this._responseActions.push(str => {\n if (isRetry || this._authMethod !== 'XOAUTH2') {\n this._actionAUTHComplete(str, true, callback);\n }\n else {\n // fetch a new OAuth2 access token\n setImmediate(() => this._handleXOauth2Token(true, callback));\n }\n });\n this._sendCommand('');\n return;\n }\n if (str.charAt(0) !== '2') {\n this.logger.info({\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n }, 'User %s failed to authenticate', JSON.stringify(this._auth.user));\n return callback(this._formatError('Invalid login', 'EAUTH', str, 'AUTH ' + this._authMethod));\n }\n this.logger.info({\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authenticated',\n method: this._authMethod\n }, 'User %s authenticated', JSON.stringify(this._auth.user));\n this.authenticated = true;\n callback(null, true);\n }\n /**\n * Handle response for a MAIL FROM: command\n *\n * @param str Message from the server\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _actionMAIL(str, callback) {\n const envelope = this._envelope;\n if (Number(str.charAt(0)) !== 2) {\n const message = this._usingSmtpUtf8 && /^550 /.test(str) && /[\\x80-\\uFFFF]/.test(envelope.from)\n ? 'Internationalized mailbox name not allowed'\n : 'Mail command failed';\n envelope.mailError = this._formatError(message, 'EENVELOPE', str, 'MAIL FROM');\n }\n this._advanceEnvelope(str, callback);\n }\n /**\n * Handle response for a RCPT TO: command\n *\n * @param str Message from the server\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _actionRCPT(str, callback) {\n const envelope = this._envelope;\n let err;\n const curRecipient = this._recipientQueue.shift();\n if (Number(str.charAt(0)) !== 2) {\n // this is a soft error\n const message = this._usingSmtpUtf8 && /^553 /.test(str) && /[\\x80-\\uFFFF]/.test(curRecipient)\n ? 'Internationalized mailbox name not allowed'\n : 'Recipient command failed';\n envelope.rejected.push(curRecipient);\n // store error for the failed recipient\n err = this._formatError(message, 'EENVELOPE', str, 'RCPT TO');\n err.recipient = curRecipient;\n envelope.rejectedErrors.push(err);\n }\n else {\n envelope.accepted.push(curRecipient);\n }\n this._advanceEnvelope(str, callback);\n }\n /**\n * Moves the envelope on after a reply to MAIL FROM or RCPT TO. A pipelined envelope sent every\n * command at once and is decided by the reply to DATA. Otherwise the commands go one at a\n * time: the next recipient, or once every reply is in, DATA or the error that ends the message\n *\n * @param str The reply that was handled\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _advanceEnvelope(str, callback) {\n const envelope = this._envelope;\n if (envelope.pipelined) {\n return;\n }\n if (envelope.mailError) {\n return callback(envelope.mailError);\n }\n if (envelope.rcptQueue.length) {\n return this._sendRcpt(envelope.rcptQueue.shift(), callback);\n }\n if (this._recipientQueue.length) {\n // replies still to come\n return;\n }\n const err = this._envelopeError(str);\n if (err) {\n return callback(err);\n }\n this._responseActions.push(str => {\n this._actionDATA(str, callback);\n });\n this._sendCommand('DATA');\n }\n /**\n * Decides how the envelope went once every reply to MAIL FROM and RCPT TO is in. Called after\n * the last RCPT TO reply, or with PIPELINING on the reply to the DATA command sent along\n *\n * @param str The reply being handled\n * @returns The error to fail the message with, or null when DATA can go ahead\n * @internal\n */\n _envelopeError(str) {\n const envelope = this._envelope;\n if (envelope.mailError) {\n return envelope.mailError;\n }\n if (envelope.accepted.length) {\n return null;\n }\n // report a temporary rejection when there is one, taking the last reply would mark the\n // whole message as permanently failed although some recipients were only deferred\n const deferred = envelope.rejectedErrors.find(rejectedErr => rejectedErr.responseCode && rejectedErr.responseCode < 500);\n const lastRejected = envelope.rejectedErrors[envelope.rejectedErrors.length - 1];\n const reply = deferred?.response ?? (envelope.pipelined && lastRejected ? lastRejected.response : str);\n // every recipient was rejected\n const err = this._formatError(\"Can't send mail - all recipients were rejected\", 'EENVELOPE', reply, 'RCPT TO');\n err.rejected = envelope.rejected;\n err.rejectedErrors = envelope.rejectedErrors;\n return err;\n }\n /**\n * Handle response for a DATA command\n *\n * @param str Message from the server\n * @param callback Callback to run once the envelope is processed\n * @internal\n */\n _actionDATA(str, callback) {\n const envelope = this._envelope;\n if (envelope.pipelined) {\n const err = this._envelopeError(str);\n if (err) {\n if (/^3/.test(str)) {\n if (envelope.mailError) {\n // A server that refused the sender has no transaction to end, one that\n // took DATA anyway can not be trusted with an empty message either.\n // Drop the connection instead of answering it\n this.close();\n return callback(err);\n }\n // A server must refuse DATA without an accepted recipient, this one took it\n // anyway. End the empty message, it has nobody to go to, so the session\n // stays usable\n this._responseActions.push(() => callback(err));\n this._sendCommand('.');\n return;\n }\n return callback(err);\n }\n }\n // response should be 354 but according to this issue https://github.com/eleith/emailjs/issues/24\n // some servers might use 250 instead, so lets check for 2 or 3 as the first digit\n if (!/^[23]/.test(str)) {\n return callback(this._formatError('Data command failed', 'EENVELOPE', str, 'DATA'));\n }\n const response = {\n accepted: envelope.accepted,\n rejected: envelope.rejected\n };\n if (this._ehloLines && this._ehloLines.length) {\n response.ehlo = this._ehloLines;\n }\n if (envelope.rejectedErrors.length) {\n response.rejectedErrors = envelope.rejectedErrors;\n }\n callback(null, response);\n }\n /**\n * Handle response for a DATA stream when using SMTP\n * We expect a single response that defines if the sending succeeded or failed\n *\n * @param str Message from the server\n * @param callback Callback to run with the final send result\n * @internal\n */\n _actionSMTPStream(str, callback) {\n if (Number(str.charAt(0)) !== 2) {\n return callback(this._formatError('Message failed', 'EMESSAGE', str, 'DATA'));\n }\n return callback(null, str);\n }\n /**\n * Handle response for a DATA stream\n * We expect a separate response for every recipient. All recipients can either\n * succeed or fail separately\n *\n * @param recipient The recipient this response applies to\n * @param final Is this the final recipient?\n * @param str Message from the server\n * @param callback Callback to run with the final send result\n * @internal\n */\n _actionLMTPStream(recipient, final, str, callback) {\n const envelope = this._envelope;\n let err;\n if (Number(str.charAt(0)) !== 2) {\n // Message failed\n err = this._formatError('Message failed for recipient ' + recipient, 'EMESSAGE', str, 'DATA');\n err.recipient = recipient;\n envelope.rejected.push(recipient);\n envelope.rejectedErrors.push(err);\n for (let i = 0, len = envelope.accepted.length; i < len; i++) {\n if (envelope.accepted[i] === recipient) {\n envelope.accepted.splice(i, 1);\n }\n }\n }\n if (final) {\n return callback(null, str);\n }\n }\n /** @internal */\n _handleXOauth2Token(isRetry, callback) {\n this._auth.oauth2.getToken(isRetry, (err, accessToken) => {\n if (err) {\n this.logger.info({\n tnx: 'smtp',\n username: this._auth.user,\n action: 'authfail',\n method: this._authMethod\n }, 'User %s failed to authenticate', JSON.stringify(this._auth.user));\n return callback(this._formatError(err, 'EAUTH', false, 'AUTH XOAUTH2'));\n }\n this._responseActions.push(str => {\n this._actionAUTHComplete(str, isRetry, callback);\n });\n this._sendCommand('AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token(accessToken), \n // Hidden for logs\n 'AUTH XOAUTH2 ' + this._auth.oauth2.buildXOAuth2Token('/* secret */'));\n });\n }\n /**\n *\n * @param command\n * @internal\n */\n _isDestroyedMessage(command) {\n if (this._destroyed) {\n return 'Cannot ' + command + ' - smtp connection is already destroyed.';\n }\n if (this._socket) {\n if (this._socket.destroyed) {\n return 'Cannot ' + command + ' - smtp connection socket is already destroyed.';\n }\n if (!this._socket.writable) {\n return 'Cannot ' + command + ' - smtp connection socket is already half-closed.';\n }\n }\n }\n /** @internal */\n _getHostname() {\n // defaul hostname is machine hostname or [IP]\n let defaultHostname;\n try {\n defaultHostname = os.hostname() || '';\n }\n catch (_err) {\n // fails on windows 7\n defaultHostname = 'localhost';\n }\n // ignore if not FQDN\n if (!defaultHostname || defaultHostname.indexOf('.') < 0) {\n defaultHostname = '[127.0.0.1]';\n }\n // IP should be enclosed in []\n if (defaultHostname.match(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/)) {\n defaultHostname = '[' + defaultHostname + ']';\n }\n return defaultHostname;\n }\n}\nexport default SMTPConnection;\n","import { Stream } from 'node:stream';\nimport nmfetch from '../fetch/index.js';\nimport crypto from 'node:crypto';\nimport * as shared from '../shared/index.js';\nimport * as errors from '../errors.js';\n/**\n * XOAUTH2 access_token generator for Gmail.\n * Create client ID for web applications in Google API console to use it.\n * See Offline Access for receiving the needed refreshToken for an user\n * https://developers.google.com/accounts/docs/OAuth2WebServer#offline\n *\n * Usage for generating access tokens with a custom method using provisionCallback:\n * provisionCallback(user, renew, callback)\n * * user is the username to get the token for\n * * renew is a boolean that if true indicates that existing token failed and needs to be renewed\n * * callback is the callback to run with (error, accessToken [, expires])\n * * accessToken is a string\n * * expires is an optional expire time in milliseconds\n * If provisionCallback is used, then Nodemailer does not try to attempt generating the token by itself\n *\n * @constructor\n * @param options Client information for token generation\n * @param options.user User e-mail address\n * @param options.clientId Client ID value\n * @param options.clientSecret Client secret value\n * @param options.refreshToken Refresh token for an user\n * @param options.accessUrl Endpoint for token generation, defaults to 'https://accounts.google.com/o/oauth2/token'\n * @param options.accessToken An existing valid accessToken\n * @param options.privateKey Private key for JSW\n * @param options.expires Optional Access Token expire time in ms\n * @param options.timeout Optional TTL for Access Token in seconds\n * @param options.provisionCallback Function to run when a new access token is required\n * @param options.tls Optional TLS options forwarded to the HTTPS token request. Defaults to strict cert validation; supply { rejectUnauthorized: false } only for self-hosted OAuth providers on private CAs.\n */\nclass XOAuth2 extends Stream {\n constructor(options, logger) {\n super();\n this.options = options || {};\n this.configError = false;\n if (options && options.serviceClient) {\n if (!options.privateKey || !options.user) {\n // reported through getToken() rather than an 'error' event: the transports forward\n // that event up to the Mail object, where nothing may be listening\n const err = new Error('Options \"privateKey\" and \"user\" are required for service account!');\n err.code = errors.EOAUTH2;\n this.configError = err;\n }\n const serviceRequestTimeout = Math.min(Math.max(Number(this.options.serviceRequestTimeout) || 0, 0), 3600);\n this.options.serviceRequestTimeout = serviceRequestTimeout || 5 * 60;\n }\n this.logger = shared.getLogger({\n logger\n }, {\n component: this.options.component || 'OAuth2'\n });\n this.provisionCallback = typeof this.options.provisionCallback === 'function' ? this.options.provisionCallback : false;\n this.options.accessUrl = this.options.accessUrl || 'https://accounts.google.com/o/oauth2/token';\n this.options.customHeaders = this.options.customHeaders || {};\n this.options.customParams = this.options.customParams || {};\n this.accessToken = this.options.accessToken || false;\n if (this.options.expires && Number(this.options.expires)) {\n this.expires = this.options.expires;\n }\n else {\n const timeout = Math.max(Number(this.options.timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n }\n this.renewing = false; // Track if renewal is in progress\n this.renewalQueue = []; // Queue for pending requests during renewal\n }\n /**\n * Returns or generates (if previous has expired) a XOAuth2 token\n *\n * @param renew If false then use cached access token (if available)\n * @param callback Callback function with error object and token string\n */\n getToken(renew, callback) {\n // the error paths hand over the error alone\n const done = callback;\n if (this.configError) {\n return done(this.configError);\n }\n if (!renew && this.accessToken && (!this.expires || this.expires > Date.now())) {\n this.logger.debug({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'reuse'\n }, 'Reusing existing access token for %s', this.options.user);\n return callback(null, this.accessToken);\n }\n // check if it is possible to renew, if not, return the current token or error\n if (!this.provisionCallback && !this.options.refreshToken && !this.options.serviceClient) {\n if (this.accessToken) {\n this.logger.debug({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'reuse'\n }, 'Reusing existing access token (no refresh capability) for %s', this.options.user);\n return callback(null, this.accessToken);\n }\n this.logger.error({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n }, 'Cannot renew access token for %s: No refresh mechanism available', this.options.user);\n const err = new Error(\"Can't create new access token for user\");\n err.code = errors.EOAUTH2;\n return done(err);\n }\n // If renewal already in progress, queue this request instead of starting another\n if (this.renewing) {\n this.renewalQueue.push({ renew, callback: done });\n return;\n }\n this.renewing = true;\n // Handles token renewal completion - processes queued requests and cleans up\n const generateCallback = (err, accessToken) => {\n this.renewalQueue.forEach(item => item.callback(err, accessToken));\n this.renewalQueue = [];\n this.renewing = false;\n if (err) {\n this.logger.error({\n err,\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n }, 'Failed generating new Access Token for %s', this.options.user);\n }\n else {\n this.logger.info({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'renew'\n }, 'Generated new Access Token for %s', this.options.user);\n }\n // Complete original request\n done(err, accessToken);\n };\n if (this.provisionCallback) {\n this.provisionCallback(this.options.user, !!renew, (err, accessToken, expires) => {\n if (!err && accessToken) {\n this.accessToken = accessToken;\n this.expires = expires || 0;\n }\n generateCallback(err, accessToken);\n });\n }\n else {\n this.generateToken(generateCallback);\n }\n }\n /**\n * Updates token values\n *\n * @param accessToken New access token\n * @param timeout Access token lifetime in seconds\n *\n * Emits 'token': { user: User email-address, accessToken: the new accessToken, timeout: TTL in seconds}\n */\n updateToken(accessToken, timeout) {\n this.accessToken = accessToken;\n timeout = Math.max(Number(timeout) || 0, 0);\n this.expires = (timeout && Date.now() + timeout * 1000) || 0;\n this.emit('token', {\n user: this.options.user,\n accessToken: accessToken || '',\n expires: this.expires\n });\n }\n /**\n * Generates a new XOAuth2 token with the credentials provided at initialization\n *\n * @param callback Callback function with error object and token string\n */\n generateToken(callback) {\n // the error paths hand over the error alone\n const done = callback;\n let urlOptions;\n let loggedUrlOptions;\n if (this.options.serviceClient) {\n // service account - https://developers.google.com/identity/protocols/OAuth2ServiceAccount\n const iat = Math.floor(Date.now() / 1000); // unix time\n const tokenData = {\n iss: this.options.serviceClient,\n scope: this.options.scope || 'https://mail.google.com/',\n sub: this.options.user,\n aud: this.options.accessUrl,\n iat,\n exp: iat + this.options.serviceRequestTimeout\n };\n let token;\n try {\n token = this.jwtSignRS256(tokenData);\n }\n catch (_err) {\n const err = new Error(\"Can't generate token. Check your auth options\");\n err.code = errors.EOAUTH2;\n return done(err);\n }\n urlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: token\n };\n loggedUrlOptions = {\n grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',\n assertion: tokenData\n };\n }\n else {\n if (!this.options.refreshToken) {\n const err = new Error(\"Can't create new access token for user\");\n err.code = errors.EOAUTH2;\n return done(err);\n }\n // web app - https://developers.google.com/identity/protocols/OAuth2WebServer\n urlOptions = {\n client_id: this.options.clientId || '',\n client_secret: this.options.clientSecret || '',\n refresh_token: this.options.refreshToken,\n grant_type: 'refresh_token'\n };\n loggedUrlOptions = {\n client_id: this.options.clientId || '',\n client_secret: (this.options.clientSecret || '').substr(0, 6) + '...',\n refresh_token: (this.options.refreshToken || '').substr(0, 6) + '...',\n grant_type: 'refresh_token'\n };\n }\n const customParams = this.options.customParams || {};\n Object.assign(urlOptions, customParams);\n // a custom param is as likely to be a client assertion or an API key as a tenant\n // name, so the log gets the same glimpse of it that it gets of the client secret\n for (const key of Object.keys(customParams)) {\n const param = customParams[key];\n loggedUrlOptions[key] = (param === undefined || param === null ? '' : String(param)).substr(0, 6) + '...';\n }\n this.logger.debug({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'generate'\n }, 'Requesting token using: %s', JSON.stringify(loggedUrlOptions));\n this.postRequest(this.options.accessUrl, urlOptions, this.options, (error, body) => {\n let data;\n if (error) {\n return done(error);\n }\n try {\n data = JSON.parse(body.toString());\n }\n catch (E) {\n return done(E);\n }\n if (!data || typeof data !== 'object') {\n this.logger.debug({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n }, 'Response: %s', (body || '').toString());\n const err = new Error('Invalid authentication response');\n err.code = errors.EOAUTH2;\n return done(err);\n }\n const logData = Object.assign({}, data);\n if (logData.access_token) {\n logData.access_token = (logData.access_token || '').toString().substr(0, 6) + '...';\n }\n this.logger.debug({\n tnx: 'OAUTH2',\n user: this.options.user,\n action: 'post'\n }, 'Response: %s', JSON.stringify(logData));\n if (data.error) {\n // Error Response : https://tools.ietf.org/html/rfc6749#section-5.2\n let errorMessage = data.error;\n if (data.error_description) {\n errorMessage += ': ' + data.error_description;\n }\n if (data.error_uri) {\n errorMessage += ' (' + data.error_uri + ')';\n }\n const err = new Error(errorMessage);\n err.code = errors.EOAUTH2;\n return done(err);\n }\n if (data.access_token) {\n this.updateToken(data.access_token, data.expires_in);\n return callback(null, this.accessToken);\n }\n const err = new Error('No access token');\n err.code = errors.EOAUTH2;\n return done(err);\n });\n }\n /**\n * Converts an access_token and user id into a base64 encoded XOAuth2 token\n *\n * @param [accessToken] Access token string\n * @return Base64 encoded token for IMAP or SMTP login\n */\n buildXOAuth2Token(accessToken) {\n const authData = ['user=' + (this.options.user || ''), 'auth=Bearer ' + (accessToken || this.accessToken), '', ''];\n return Buffer.from(authData.join('\\x01'), 'utf-8').toString('base64');\n }\n /**\n * Custom POST request handler.\n * This is only needed to keep paths short in Windows, usually this module\n * is a dependency of a dependency and if it tries to require something\n * like the request module the paths get way too long to handle for Windows.\n * As we do only a simple POST request we do not actually require complicated\n * logic support (no redirects, no nothing) anyway.\n *\n * @param url Url to POST to\n * @param payload Payload to POST\n * @param params Client options, the customHeaders and tls values are used for the request\n * @param callback Callback function with (err, buff)\n */\n postRequest(url, payload, params, callback) {\n let returned = false;\n const chunks = [];\n let chunklen = 0;\n const fetchOptions = {\n method: 'post',\n headers: params.customHeaders,\n body: payload,\n allowErrorResponse: true,\n // unset falls back to the fetch default, a stalled token endpoint would otherwise keep\n // `renewing` set and queue every later request\n timeout: params.requestTimeout\n };\n // OAuth2 token endpoints are credential-bearing. src/fetch already\n // validates certs by default; pin rejectUnauthorized:true here so the\n // token fetch stays strict, while still layering params.tls (the\n // user's options.tls) on top so callers with a self-hosted provider on\n // a private CA can override.\n if (/^https:/i.test(url)) {\n fetchOptions.tls = Object.assign({ rejectUnauthorized: true }, params.tls || {});\n }\n const req = nmfetch(url, fetchOptions);\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n req.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(err);\n });\n req.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return callback(null, Buffer.concat(chunks, chunklen));\n });\n }\n /**\n * Encodes a buffer or a string into Base64url format\n *\n * @param data The data to convert\n * @return The encoded string\n */\n toBase64URL(data) {\n if (typeof data === 'string') {\n data = Buffer.from(data);\n }\n return data\n .toString('base64')\n .replace(/[=]+/g, '') // remove '='s\n .replace(/\\+/g, '-') // '+' → '-'\n .replace(/\\//g, '_'); // '/' → '_'\n }\n /**\n * Creates a JSON Web Token signed with RS256 (SHA256 + RSA)\n *\n * @param payload The payload to include in the generated token\n * @return The generated and signed token\n */\n jwtSignRS256(payload) {\n const signedPayload = ['{\"alg\":\"RS256\",\"typ\":\"JWT\"}', JSON.stringify(payload)].map(val => this.toBase64URL(val)).join('.');\n const signature = crypto\n .createSign('RSA-SHA256')\n .update(signedPayload)\n .sign(this.options.privateKey);\n return signedPayload + '.' + this.toBase64URL(signature);\n }\n}\nexport default XOAuth2;\n","import SMTPConnection from '../smtp-connection/index.js';\nimport { assign } from '../shared/index.js';\nimport XOAuth2 from '../xoauth2/index.js';\nimport * as errors from '../errors.js';\nimport { EventEmitter } from 'node:events';\n/**\n * Creates an element for the pool\n *\n * @constructor\n * @param pool SMTPPool instance\n */\nexport default class PoolResource extends EventEmitter {\n constructor(pool) {\n super();\n this.pool = pool;\n this.options = pool.options;\n this.logger = this.pool.logger;\n if (this.options.auth) {\n switch ((this.options.auth.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n const oauth2 = new XOAuth2(this.options.auth, this.logger);\n oauth2.provisionCallback = (this.pool.mailer && this.pool.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n this.auth = {\n type: 'OAUTH2',\n user: this.options.auth.user,\n oauth2,\n method: 'XOAUTH2'\n };\n oauth2.on('token', (token) => this.pool.mailer.emit('token', token));\n oauth2.on('error', err => this._fail(err));\n break;\n }\n default:\n if (!this.options.auth.user && !this.options.auth.pass) {\n break;\n }\n this.auth = {\n type: (this.options.auth.type || '').toString().toUpperCase() || 'LOGIN',\n user: this.options.auth.user,\n credentials: {\n user: this.options.auth.user || '',\n pass: this.options.auth.pass,\n options: this.options.auth.options\n },\n method: (this.options.auth.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n this._connection = false;\n this._connected = false;\n this._closed = false;\n this.messages = 0;\n this.available = true;\n this._failed = false;\n this._sending = false;\n this._idleTimer = false;\n }\n /**\n * Emits 'error' for the first failure only. A dead resource can report the same failure more\n * than once (the connection error, then the send callback), the pool handles it once\n * @internal\n */\n _fail(err) {\n if (this._failed) {\n return;\n }\n this._failed = true;\n this.emit('error', err);\n }\n /**\n * Initiates a connection to the SMTP server\n *\n * @param callback Callback function to run once the connection is established or failed\n */\n connect(callback) {\n // the proxy handshake, if any, counts against connectionTimeout as well\n const connectStartedAt = Date.now();\n this.pool.getSocket(Object.assign({}, this.options, { connectStartedAt }), (err, socketOptions) => {\n if (this._closed) {\n socketOptions && socketOptions.connection?.destroy();\n return;\n }\n if (err) {\n // nothing was connected, so no 'close' event is coming that would free the\n // slot this resource holds in the pool, report the failure the way a failed\n // login does\n this._fail(err);\n return callback(err);\n }\n let returned = false;\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info({\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n }, 'Using proxied socket from %s:%s to %s:%s', socketOptions.connection.remoteAddress, socketOptions.connection.remotePort, options.host || '', options.port || '');\n options = Object.assign(assign(false, options), socketOptions);\n }\n this.connection = new SMTPConnection(options);\n this.connection._connectStartedAt = connectStartedAt;\n this.connection.on('error', (err) => {\n if (this._closed || this._sending) {\n // the send callback gets the same error and decides what it means for the message\n return;\n }\n if (this._connected && errors.isTransientError(err)) {\n // the server ended a connection that had nothing in flight, usually after it\n // was idle for a while. The 'end' that follows closes this resource\n this.logger.info({\n tnx: 'pool',\n cid: this.id\n }, 'Connection #%s was closed by the server: %s', this.id, err.message);\n return;\n }\n this._fail(err);\n if (returned || this._closed) {\n return;\n }\n returned = true;\n return callback(err);\n });\n this.connection.once('end', () => {\n this.close();\n returned = true;\n });\n this.connection.connect(err => {\n if (returned || this._closed) {\n return;\n }\n if (err) {\n // a close before the greeting, the 'end' that follows closes this resource\n // and the pool requeues or fails the entry, bounded by maxRequeues\n returned = true;\n return;\n }\n if (this.auth && (this.connection.allowsAuth || options.forceAuth)) {\n this.connection.login(this.auth, err => {\n if (returned || this._closed) {\n return;\n }\n returned = true;\n if (err) {\n this.connection.close();\n this._fail(err);\n return callback(err);\n }\n this._connected = true;\n callback(null, true);\n });\n }\n else {\n returned = true;\n this._connected = true;\n return callback(null, true);\n }\n });\n });\n }\n /**\n * Sends an e-mail to be sent using the selected settings\n *\n * @param mail Mail object\n * @param callback Callback function\n */\n send(mail, callback) {\n if (this._closed) {\n return;\n }\n if (!this._connected) {\n return this.connect(err => {\n if (err) {\n return callback(err);\n }\n return this.send(mail, callback);\n });\n }\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info({\n tnx: 'send',\n messageId,\n cid: this.id\n }, 'Sending message %s using #%s to <%s>', messageId, this.id, recipients.join(', '));\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n // RFC 8689: Pass requireTLSExtensionEnabled to envelope for MAIL FROM parameter\n if (mail.data.requireTLSExtensionEnabled) {\n envelope.requireTLSExtensionEnabled = mail.data.requireTLSExtensionEnabled;\n }\n this._sending = true;\n // a connection that sent messages before may have been dropped by the server in between\n const reused = this.messages > 0;\n const messageStream = mail.message.createReadStream();\n this.connection.send(envelope, messageStream, (err, info) => {\n if (mail.data.signal?.aborted) {\n return;\n }\n this._sending = false;\n this.messages++;\n if (err) {\n if (reused && messageStream.readableDidRead === false && errors.isTransientError(err)) {\n // Not a byte of the message was sent, so it can go out over another\n // connection. The pool requeues the message when this resource closes\n this.logger.info({\n tnx: 'pool',\n cid: this.id,\n messageId\n }, 'Connection #%s was closed by the server before message %s was sent: %s', this.id, messageId, err.message);\n this.connection.close();\n return;\n }\n if ((err.code === errors.EENVELOPE || err.code === errors.EMESSAGE) && err.responseCode !== 421 && !this.connection._destroyed) {\n // The server refused this message, the connection itself is fine. Reset the\n // session and keep using it instead of opening a new one\n this.connection.reset(resetErr => {\n if (resetErr) {\n this.connection.close();\n return;\n }\n this._release();\n });\n return callback(err);\n }\n this.connection.close();\n this._fail(err);\n return callback(err);\n }\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n setImmediate(() => this._release());\n callback(null, info);\n });\n }\n /**\n * Makes the connection available for the next message, or closes it once it has sent\n * maxMessages messages\n *\n * @internal\n */\n _release() {\n if (this._closed) {\n return;\n }\n if (this.messages >= this.options.maxMessages) {\n const err = new Error('Resource exhausted');\n err.code = errors.EMAXLIMIT;\n this.connection.close();\n this._fail(err);\n return;\n }\n this.pool._checkRateLimit(() => {\n if (this._closed) {\n return;\n }\n this.available = true;\n this._startIdleTimer();\n this.emit('available');\n });\n }\n /** @internal */\n _startIdleTimer() {\n if (!this.options.idleTimeout || this.options.idleTimeout < 0) {\n return;\n }\n // one timer per connection, restarted every time the connection becomes available. A\n // connection that is busy when it fires is simply not closed\n if (this._idleTimer && typeof this._idleTimer.refresh === 'function') {\n this._idleTimer.refresh();\n return;\n }\n clearTimeout(this._idleTimer);\n this._idleTimer = setTimeout(() => {\n if (!this.available) {\n return;\n }\n this.logger.debug({\n tnx: 'pool',\n cid: this.id\n }, 'Closing connection #%s after it was idle for %sms', this.id, this.options.idleTimeout);\n // not handed another message while it says goodbye\n this.available = false;\n this.connection.quit();\n }, this.options.idleTimeout);\n if (typeof this._idleTimer.unref === 'function') {\n this._idleTimer.unref();\n }\n }\n /** @internal */\n _stopIdleTimer() {\n clearTimeout(this._idleTimer);\n this._idleTimer = false;\n }\n /**\n * Closes the connection\n */\n close() {\n if (this._closed) {\n return;\n }\n this._closed = true;\n this.available = false;\n this._connected = false;\n this._stopIdleTimer();\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n if (this.connection) {\n this.connection.close();\n }\n this.emit('close');\n }\n}\n","// Generated by scripts/build.js from services.json. Do not edit by hand.\nexport const services = {\n \"126\": {\n \"description\": \"126 Mail (NetEase)\",\n \"host\": \"smtp.126.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"163\": {\n \"description\": \"163 Mail (NetEase)\",\n \"host\": \"smtp.163.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"1und1\": {\n \"description\": \"1&1 Mail (German hosting provider)\",\n \"host\": \"smtp.1und1.de\",\n \"port\": 465,\n \"secure\": true,\n \"authMethod\": \"LOGIN\"\n },\n \"Aliyun\": {\n \"description\": \"Alibaba Cloud Mail\",\n \"domains\": [\n \"aliyun.com\"\n ],\n \"host\": \"smtp.aliyun.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"AliyunQiye\": {\n \"description\": \"Alibaba Cloud Enterprise Mail\",\n \"host\": \"smtp.qiye.aliyun.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"AOL\": {\n \"description\": \"AOL Mail\",\n \"domains\": [\n \"aol.com\"\n ],\n \"host\": \"smtp.aol.com\",\n \"port\": 587\n },\n \"Aruba\": {\n \"description\": \"Aruba PEC (Italian email provider)\",\n \"domains\": [\n \"aruba.it\",\n \"pec.aruba.it\"\n ],\n \"aliases\": [\n \"Aruba PEC\"\n ],\n \"host\": \"smtps.aruba.it\",\n \"port\": 465,\n \"secure\": true,\n \"authMethod\": \"LOGIN\"\n },\n \"Bluewin\": {\n \"description\": \"Bluewin (Swiss email provider)\",\n \"host\": \"smtpauths.bluewin.ch\",\n \"domains\": [\n \"bluewin.ch\"\n ],\n \"port\": 465\n },\n \"BOL\": {\n \"description\": \"BOL Mail (Brazilian provider)\",\n \"domains\": [\n \"bol.com.br\"\n ],\n \"host\": \"smtp.bol.com.br\",\n \"port\": 587,\n \"requireTLS\": true\n },\n \"DebugMail\": {\n \"description\": \"DebugMail (email testing service)\",\n \"host\": \"debugmail.io\",\n \"port\": 25\n },\n \"Disroot\": {\n \"description\": \"Disroot (privacy-focused provider)\",\n \"domains\": [\n \"disroot.org\"\n ],\n \"host\": \"disroot.org\",\n \"port\": 587,\n \"secure\": false,\n \"authMethod\": \"LOGIN\"\n },\n \"DynectEmail\": {\n \"description\": \"Dyn Email Delivery\",\n \"aliases\": [\n \"Dynect\"\n ],\n \"host\": \"smtp.dynect.net\",\n \"port\": 25\n },\n \"ElasticEmail\": {\n \"description\": \"Elastic Email\",\n \"aliases\": [\n \"Elastic Email\"\n ],\n \"host\": \"smtp.elasticemail.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Ethereal\": {\n \"description\": \"Ethereal Email (email testing service)\",\n \"aliases\": [\n \"ethereal.email\"\n ],\n \"host\": \"smtp.ethereal.email\",\n \"port\": 587\n },\n \"FastMail\": {\n \"description\": \"FastMail\",\n \"domains\": [\n \"fastmail.com\",\n \"fastmail.fm\"\n ],\n \"host\": \"smtp.fastmail.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Feishu Mail\": {\n \"description\": \"Feishu Mail (Lark)\",\n \"aliases\": [\n \"Feishu\",\n \"FeishuMail\"\n ],\n \"domains\": [\n \"www.feishu.cn\"\n ],\n \"host\": \"smtp.feishu.cn\",\n \"port\": 465,\n \"secure\": true\n },\n \"Forward Email\": {\n \"description\": \"Forward Email (email forwarding service)\",\n \"aliases\": [\n \"FE\",\n \"ForwardEmail\"\n ],\n \"domains\": [\n \"forwardemail.net\"\n ],\n \"host\": \"smtp.forwardemail.net\",\n \"port\": 465,\n \"secure\": true\n },\n \"GandiMail\": {\n \"description\": \"Gandi Mail\",\n \"aliases\": [\n \"Gandi\",\n \"Gandi Mail\"\n ],\n \"host\": \"mail.gandi.net\",\n \"port\": 587\n },\n \"Gmail\": {\n \"description\": \"Gmail\",\n \"aliases\": [\n \"Google Mail\"\n ],\n \"domains\": [\n \"gmail.com\",\n \"googlemail.com\"\n ],\n \"host\": \"smtp.gmail.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"GmailWorkspace\": {\n \"description\": \"Gmail Workspace\",\n \"aliases\": [\n \"Google Workspace Mail\"\n ],\n \"host\": \"smtp-relay.gmail.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"GMX\": {\n \"description\": \"GMX Mail\",\n \"domains\": [\n \"gmx.com\",\n \"gmx.net\",\n \"gmx.de\"\n ],\n \"host\": \"mail.gmx.com\",\n \"port\": 587\n },\n \"Godaddy\": {\n \"description\": \"GoDaddy Email (US)\",\n \"host\": \"smtpout.secureserver.net\",\n \"port\": 25\n },\n \"GodaddyAsia\": {\n \"description\": \"GoDaddy Email (Asia)\",\n \"host\": \"smtp.asia.secureserver.net\",\n \"port\": 25\n },\n \"GodaddyEurope\": {\n \"description\": \"GoDaddy Email (Europe)\",\n \"host\": \"smtp.europe.secureserver.net\",\n \"port\": 25\n },\n \"Groundmail\": {\n \"description\": \"Groundmail\",\n \"host\": \"smtp.groundmail.dev\",\n \"port\": 587,\n \"secure\": false,\n \"requireTLS\": true\n },\n \"hot.ee\": {\n \"description\": \"Hot.ee (Estonian email provider)\",\n \"host\": \"mail.hot.ee\"\n },\n \"Hotmail\": {\n \"description\": \"Outlook.com / Hotmail\",\n \"aliases\": [\n \"Outlook\",\n \"Outlook.com\",\n \"Hotmail.com\"\n ],\n \"domains\": [\n \"hotmail.com\",\n \"outlook.com\"\n ],\n \"host\": \"smtp-mail.outlook.com\",\n \"port\": 587\n },\n \"iCloud\": {\n \"description\": \"iCloud Mail\",\n \"aliases\": [\n \"Me\",\n \"Mac\"\n ],\n \"domains\": [\n \"icloud.com\",\n \"me.com\",\n \"mac.com\"\n ],\n \"host\": \"smtp.mail.me.com\",\n \"port\": 587\n },\n \"Infomaniak\": {\n \"description\": \"Infomaniak Mail (Swiss hosting provider)\",\n \"host\": \"mail.infomaniak.com\",\n \"domains\": [\n \"ik.me\",\n \"ikmail.com\",\n \"etik.com\"\n ],\n \"port\": 587\n },\n \"KolabNow\": {\n \"description\": \"KolabNow (secure email service)\",\n \"domains\": [\n \"kolabnow.com\"\n ],\n \"aliases\": [\n \"Kolab\"\n ],\n \"host\": \"smtp.kolabnow.com\",\n \"port\": 465,\n \"secure\": true,\n \"authMethod\": \"LOGIN\"\n },\n \"Loopia\": {\n \"description\": \"Loopia (Swedish hosting provider)\",\n \"host\": \"mailcluster.loopia.se\",\n \"port\": 465\n },\n \"Loops\": {\n \"description\": \"Loops\",\n \"host\": \"smtp.loops.so\",\n \"port\": 587\n },\n \"mail.ee\": {\n \"description\": \"Mail.ee (Estonian email provider)\",\n \"host\": \"smtp.mail.ee\"\n },\n \"Mail.ru\": {\n \"description\": \"Mail.ru\",\n \"host\": \"smtp.mail.ru\",\n \"port\": 465,\n \"secure\": true\n },\n \"Mailcatch.app\": {\n \"description\": \"Mailcatch (email testing service)\",\n \"host\": \"sandbox-smtp.mailcatch.app\",\n \"port\": 2525\n },\n \"Maildev\": {\n \"description\": \"MailDev (local email testing)\",\n \"port\": 1025,\n \"ignoreTLS\": true\n },\n \"MailerSend\": {\n \"description\": \"MailerSend\",\n \"host\": \"smtp.mailersend.net\",\n \"port\": 587\n },\n \"Mailgun\": {\n \"description\": \"Mailgun\",\n \"host\": \"smtp.mailgun.org\",\n \"port\": 465,\n \"secure\": true\n },\n \"Mailjet\": {\n \"description\": \"Mailjet\",\n \"host\": \"in.mailjet.com\",\n \"port\": 587\n },\n \"Mailosaur\": {\n \"description\": \"Mailosaur (email testing service)\",\n \"host\": \"mailosaur.io\",\n \"port\": 25\n },\n \"MailSenpai\": {\n \"description\": \"MailSenpai (SMTP Senpai, EU)\",\n \"host\": \"relay.mailsenpai.com\",\n \"port\": 2525,\n \"secure\": false\n },\n \"Mailtrap\": {\n \"description\": \"Mailtrap\",\n \"host\": \"live.smtp.mailtrap.io\",\n \"port\": 587\n },\n \"Mandrill\": {\n \"description\": \"Mandrill (by Mailchimp)\",\n \"host\": \"smtp.mandrillapp.com\",\n \"port\": 587\n },\n \"Naver\": {\n \"description\": \"Naver Mail (Korean email provider)\",\n \"host\": \"smtp.naver.com\",\n \"port\": 587\n },\n \"OhMySMTP\": {\n \"description\": \"OhMySMTP (email delivery service)\",\n \"host\": \"smtp.ohmysmtp.com\",\n \"port\": 587,\n \"secure\": false\n },\n \"One\": {\n \"description\": \"One.com Email\",\n \"host\": \"send.one.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"OpenMailBox\": {\n \"description\": \"OpenMailBox\",\n \"aliases\": [\n \"OMB\",\n \"openmailbox.org\"\n ],\n \"host\": \"smtp.openmailbox.org\",\n \"port\": 465,\n \"secure\": true\n },\n \"Outlook365\": {\n \"description\": \"Microsoft 365 / Office 365\",\n \"host\": \"smtp.office365.com\",\n \"port\": 587,\n \"secure\": false\n },\n \"Oveyon\": {\n \"description\": \"Oveyon\",\n \"host\": \"smtp.oveyon.com\",\n \"port\": 587,\n \"secure\": false,\n \"requireTLS\": true\n },\n \"Postmark\": {\n \"description\": \"Postmark\",\n \"aliases\": [\n \"PostmarkApp\"\n ],\n \"host\": \"smtp.postmarkapp.com\",\n \"port\": 2525\n },\n \"Proton\": {\n \"description\": \"Proton Mail\",\n \"aliases\": [\n \"ProtonMail\",\n \"Proton.me\",\n \"Protonmail.com\",\n \"Protonmail.ch\"\n ],\n \"domains\": [\n \"proton.me\",\n \"protonmail.com\",\n \"pm.me\",\n \"protonmail.ch\"\n ],\n \"host\": \"smtp.protonmail.ch\",\n \"port\": 587,\n \"requireTLS\": true\n },\n \"qiye.aliyun\": {\n \"description\": \"Alibaba Mail Enterprise Edition\",\n \"host\": \"smtp.mxhichina.com\",\n \"port\": \"465\",\n \"secure\": true\n },\n \"QQ\": {\n \"description\": \"QQ Mail\",\n \"domains\": [\n \"qq.com\"\n ],\n \"host\": \"smtp.qq.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"QQex\": {\n \"description\": \"QQ Enterprise Mail\",\n \"aliases\": [\n \"QQ Enterprise\"\n ],\n \"domains\": [\n \"exmail.qq.com\"\n ],\n \"host\": \"smtp.exmail.qq.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Resend\": {\n \"description\": \"Resend\",\n \"host\": \"smtp.resend.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Runbox\": {\n \"description\": \"Runbox (Norwegian email provider)\",\n \"domains\": [\n \"runbox.com\"\n ],\n \"host\": \"smtp.runbox.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SendCloud\": {\n \"description\": \"SendCloud (Chinese email delivery)\",\n \"host\": \"smtp.sendcloud.net\",\n \"port\": 2525\n },\n \"SendGrid\": {\n \"description\": \"SendGrid\",\n \"host\": \"smtp.sendgrid.net\",\n \"port\": 587\n },\n \"SendinBlue\": {\n \"description\": \"Brevo (formerly Sendinblue)\",\n \"aliases\": [\n \"Brevo\"\n ],\n \"host\": \"smtp-relay.brevo.com\",\n \"port\": 587\n },\n \"Sendora\": {\n \"description\": \"Sendora\",\n \"host\": \"smtp.sendora.se\",\n \"port\": 465,\n \"secure\": true\n },\n \"SendPulse\": {\n \"description\": \"SendPulse\",\n \"host\": \"smtp-pulse.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES\": {\n \"description\": \"AWS SES US East (N. Virginia)\",\n \"host\": \"email-smtp.us-east-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-NORTHEAST-1\": {\n \"description\": \"AWS SES Asia Pacific (Tokyo)\",\n \"host\": \"email-smtp.ap-northeast-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-NORTHEAST-2\": {\n \"description\": \"AWS SES Asia Pacific (Seoul)\",\n \"host\": \"email-smtp.ap-northeast-2.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-NORTHEAST-3\": {\n \"description\": \"AWS SES Asia Pacific (Osaka)\",\n \"host\": \"email-smtp.ap-northeast-3.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-SOUTH-1\": {\n \"description\": \"AWS SES Asia Pacific (Mumbai)\",\n \"host\": \"email-smtp.ap-south-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-SOUTHEAST-1\": {\n \"description\": \"AWS SES Asia Pacific (Singapore)\",\n \"host\": \"email-smtp.ap-southeast-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-AP-SOUTHEAST-2\": {\n \"description\": \"AWS SES Asia Pacific (Sydney)\",\n \"host\": \"email-smtp.ap-southeast-2.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-CA-CENTRAL-1\": {\n \"description\": \"AWS SES Canada (Central)\",\n \"host\": \"email-smtp.ca-central-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-EU-CENTRAL-1\": {\n \"description\": \"AWS SES Europe (Frankfurt)\",\n \"host\": \"email-smtp.eu-central-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-EU-NORTH-1\": {\n \"description\": \"AWS SES Europe (Stockholm)\",\n \"host\": \"email-smtp.eu-north-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-EU-WEST-1\": {\n \"description\": \"AWS SES Europe (Ireland)\",\n \"host\": \"email-smtp.eu-west-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-EU-WEST-2\": {\n \"description\": \"AWS SES Europe (London)\",\n \"host\": \"email-smtp.eu-west-2.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-EU-WEST-3\": {\n \"description\": \"AWS SES Europe (Paris)\",\n \"host\": \"email-smtp.eu-west-3.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-SA-EAST-1\": {\n \"description\": \"AWS SES South America (São Paulo)\",\n \"host\": \"email-smtp.sa-east-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-EAST-1\": {\n \"description\": \"AWS SES US East (N. Virginia)\",\n \"host\": \"email-smtp.us-east-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-EAST-2\": {\n \"description\": \"AWS SES US East (Ohio)\",\n \"host\": \"email-smtp.us-east-2.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-GOV-EAST-1\": {\n \"description\": \"AWS SES GovCloud (US-East)\",\n \"host\": \"email-smtp.us-gov-east-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-GOV-WEST-1\": {\n \"description\": \"AWS SES GovCloud (US-West)\",\n \"host\": \"email-smtp.us-gov-west-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-WEST-1\": {\n \"description\": \"AWS SES US West (N. California)\",\n \"host\": \"email-smtp.us-west-1.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"SES-US-WEST-2\": {\n \"description\": \"AWS SES US West (Oregon)\",\n \"host\": \"email-smtp.us-west-2.amazonaws.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Seznam\": {\n \"description\": \"Seznam Email (Czech email provider)\",\n \"aliases\": [\n \"Seznam Email\"\n ],\n \"domains\": [\n \"seznam.cz\",\n \"email.cz\",\n \"post.cz\",\n \"spoluzaci.cz\"\n ],\n \"host\": \"smtp.seznam.cz\",\n \"port\": 465,\n \"secure\": true\n },\n \"SMTP2GO\": {\n \"description\": \"SMTP2GO\",\n \"host\": \"mail.smtp2go.com\",\n \"port\": 2525\n },\n \"SpacePost\": {\n \"description\": \"SpacePost\",\n \"host\": \"smtp.spacepost.dev\",\n \"port\": 25976,\n \"secure\": false,\n \"requireTLS\": true\n },\n \"Sparkpost\": {\n \"description\": \"SparkPost\",\n \"aliases\": [\n \"SparkPost\",\n \"SparkPost Mail\"\n ],\n \"domains\": [\n \"sparkpost.com\"\n ],\n \"host\": \"smtp.sparkpostmail.com\",\n \"port\": 587,\n \"secure\": false\n },\n \"Tipimail\": {\n \"description\": \"Tipimail (email delivery service)\",\n \"host\": \"smtp.tipimail.com\",\n \"port\": 587\n },\n \"TurboSMTP\": {\n \"description\": \"TurboSMTP\",\n \"host\": \"pro.turbo-smtp.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"TurboSMTP-EU\": {\n \"description\": \"TurboSMTP (EU region)\",\n \"host\": \"pro.eu.turbo-smtp.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Tutanota\": {\n \"description\": \"Tutanota (Tuta Mail)\",\n \"domains\": [\n \"tutanota.com\",\n \"tuta.com\",\n \"tutanota.de\",\n \"tuta.io\"\n ],\n \"host\": \"smtp.tutanota.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Yahoo\": {\n \"description\": \"Yahoo Mail\",\n \"domains\": [\n \"yahoo.com\"\n ],\n \"host\": \"smtp.mail.yahoo.com\",\n \"port\": 465,\n \"secure\": true\n },\n \"Yandex\": {\n \"description\": \"Yandex Mail\",\n \"domains\": [\n \"yandex.ru\"\n ],\n \"host\": \"smtp.yandex.ru\",\n \"port\": 465,\n \"secure\": true\n },\n \"Zimbra\": {\n \"description\": \"Zimbra Mail Server\",\n \"aliases\": [\n \"Zimbra Collaboration\"\n ],\n \"host\": \"smtp.zimbra.com\",\n \"port\": 587,\n \"requireTLS\": true\n },\n \"Zoho\": {\n \"description\": \"Zoho Mail\",\n \"host\": \"smtp.zoho.com\",\n \"port\": 465,\n \"secure\": true,\n \"authMethod\": \"LOGIN\"\n }\n};\n","import { services } from './services.js';\nconst normalized = {};\nObject.keys(services).forEach(key => {\n const service = services[key];\n const normalizedService = normalizeService(service);\n normalized[normalizeKey(key)] = normalizedService;\n [].concat(service.aliases || []).forEach(alias => {\n normalized[normalizeKey(alias)] = normalizedService;\n });\n [].concat(service.domains || []).forEach(domain => {\n normalized[normalizeKey(domain)] = normalizedService;\n });\n});\nfunction normalizeKey(key) {\n return key.replace(/[^a-zA-Z0-9.-]/g, '').toLowerCase();\n}\nfunction normalizeService(service) {\n const response = {};\n Object.keys(service).forEach(key => {\n if (!['domains', 'aliases'].includes(key)) {\n response[key] = service[key];\n }\n });\n return response;\n}\n/**\n * Resolves SMTP config for given key. Key can be a name (like 'Gmail'), alias (like 'Google Mail') or\n * an email address (like 'test@googlemail.com').\n *\n * @param key Service name, alias or an email address\n * @returns SMTP config or false if not found\n */\nexport default function wellKnown(key) {\n key = normalizeKey(key.split('@').pop());\n return normalized[key] || false;\n}\n","import { EventEmitter } from 'node:events';\nimport PoolResource from './pool-resource.js';\nimport SMTPConnection from '../smtp-connection/index.js';\nimport wellKnown from '../well-known/index.js';\nimport * as shared from '../shared/index.js';\nimport * as errors from '../errors.js';\nimport * as packageData from '../package-info.js';\n/** First delay before a requeued message is retried, doubled on every further requeue */\nconst REQUEUE_BASE_DELAY = 50;\n/** Upper bound for the requeue delay */\nconst REQUEUE_MAX_DELAY = 2000;\n/**\n * Creates a SMTP pool transport object for Nodemailer\n *\n * @constructor\n * @param options SMTP Connection options\n */\nclass SMTPPool extends EventEmitter {\n constructor(options) {\n super();\n this.supportsAbortSignal = true;\n options = options || {};\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n let urlData;\n let service = options.service;\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n this.options = shared.assign(false, // create new object\n options, // regular options\n urlData, // url options\n (service && wellKnown(service)) // wellknown options\n );\n this.options.maxConnections = this.options.maxConnections || 5;\n this.options.maxMessages = this.options.maxMessages || 100;\n // a default bound, a server that closes every connection before the greeting would otherwise be retried forever\n this.options.maxRequeues = typeof this.options.maxRequeues === 'number' ? this.options.maxRequeues : 5;\n // below the 5 minutes RFC 5321 asks servers to wait at least, the connection is closed by us\n // and not by the server in the middle of handing it a message\n this.options.idleTimeout = typeof this.options.idleTimeout === 'number' ? this.options.idleTimeout : 4 * 60 * 1000;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-pool'\n });\n this.name = 'SMTP (pool)';\n this.version = packageData.version + '[client:' + packageData.version + ']';\n this._rateLimit = {\n counter: 0,\n timeout: null,\n waiting: [],\n checkpoint: false,\n delta: Number(this.options.rateDelta) || 1000,\n limit: Number(this.options.rateLimit) || 0\n };\n this._closed = false;\n this._queue = [];\n this._connections = [];\n this._connectionCounter = 0;\n this._pending = 0;\n this.idling = true;\n setImmediate(() => {\n if (this.idling) {\n this.emit('idle');\n }\n });\n }\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param options Connection options\n * @param callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n setImmediate(() => callback(null, false));\n }\n /**\n * Queues an e-mail to be sent using the selected settings\n *\n * @param mail Mail object\n * @param callback Callback function\n */\n send(mail, callback) {\n if (this._closed) {\n // Mail.sendMail ignores the return value, so without a callback its promise would never settle\n const err = new Error('Connection pool was closed');\n err.code = errors.ECONNECTION;\n setImmediate(() => callback(err));\n return false;\n }\n // counted until the callback runs, whichever path runs it: delivered, failed, requeued\n // until it gives up, aborted, or drained by close()\n let counted = true;\n let detachSignal;\n this._pending++;\n const entry = {\n mail,\n requeueAttempts: 0,\n callback: (err, info) => {\n if (!counted) {\n return;\n }\n counted = false;\n this._pending--;\n detachSignal?.();\n entry.resource = undefined;\n callback(err, info);\n }\n };\n this._queue.push(entry);\n const signal = mail.data.signal;\n if (signal) {\n // one listener for the original entry, retained across connection-close retries\n detachSignal = this._watchAbortSignal(entry, signal, () => counted);\n if (signal.aborted) {\n return true;\n }\n }\n if (this.idling && this._queue.length >= this.options.maxConnections) {\n this.idling = false;\n }\n setImmediate(() => this._processMessages());\n return true;\n }\n /**\n * Fails a queued or assigned entry when its signal aborts: removes it from the queue, or\n * closes the connection delivering it, so other deliveries in the pool can continue.\n * Returns a function that removes the listener.\n * @internal\n */\n _watchAbortSignal(entry, signal, isPending) {\n const onAbort = () => {\n if (!isPending()) {\n return;\n }\n const index = this._queue.indexOf(entry);\n if (index !== -1) {\n this._queue.splice(index, 1);\n }\n const resource = entry.resource;\n if (resource && resource.queueEntry === entry) {\n // Detach before closing: the close handler must not retry this message.\n resource.queueEntry = false;\n resource.close();\n }\n try {\n entry.callback(errors.createAbortError(signal));\n }\n finally {\n // Removing a queued entry can make the pool idle again.\n setImmediate(() => this._processMessages());\n }\n };\n signal.addEventListener('abort', onAbort, { once: true });\n if (signal.aborted) {\n setImmediate(onAbort);\n }\n return () => signal.removeEventListener('abort', onAbort);\n }\n /**\n * Closes the pool. Idle connections are closed at once and a connection in the middle of a\n * delivery finishes it first, unless `force` is set: then it is closed too and its message\n * fails. `force` is for a caller that has given up on a delivery, such as one a server is\n * stalling by trickling its replies, which no socket timeout notices.\n *\n * @param options.force - Also close connections that are delivering a message\n */\n close(options) {\n let connection;\n const len = this._connections.length;\n this._closed = true;\n // release connections gated by the rate limiter so they become\n // available and are torn down below instead of leaking with a\n // cleared timer that never fires\n this._clearRateLimit();\n if (!len && !this._queue.length) {\n return;\n }\n // remove all available connections, and with `force` the busy ones too\n const force = !!options?.force;\n for (let i = len - 1; i >= 0; i--) {\n if (this._connections[i] && (force || this._connections[i].available)) {\n connection = this._connections[i];\n connection.close();\n this.logger.info({\n tnx: 'connection',\n cid: connection.id,\n action: 'removed'\n }, 'Connection #%s removed', connection.id);\n }\n }\n if (len && !this._connections.length) {\n this.logger.debug({\n tnx: 'connection'\n }, 'All connections removed');\n }\n if (!this._queue.length) {\n return;\n }\n // make sure that entire queue would be cleaned\n const invokeCallbacks = () => {\n if (!this._queue.length) {\n this.logger.debug({\n tnx: 'connection'\n }, 'Pending queue entries cleared');\n return;\n }\n const entry = this._queue.shift();\n if (entry && typeof entry.callback === 'function') {\n try {\n entry.callback(new Error('Connection pool was closed'));\n }\n catch (E) {\n // the queue is drained without a connection, so there is no cid to log\n this.logger.error({\n err: E,\n tnx: 'callback'\n }, 'Callback error: %s', E.message);\n }\n }\n setImmediate(invokeCallbacks);\n };\n setImmediate(invokeCallbacks);\n }\n /**\n * Check the queue and available connections. If there is a message to be sent and there is\n * an available connection, then use this connection to send the mail\n * @internal\n */\n _processMessages() {\n // do nothing if already closed\n if (this._closed) {\n return;\n }\n // do nothing if queue is empty\n if (!this._queue.length) {\n if (!this.idling) {\n // no pending jobs\n this.idling = true;\n this.emit('idle');\n }\n return;\n }\n // find first available connection\n let connection = this._connections.find(c => c.available);\n if (!connection && this._connections.length < this.options.maxConnections) {\n connection = this._createConnection();\n }\n if (!connection) {\n // no more free connection slots available\n this.idling = false;\n return;\n }\n // check if there is free space in the processing queue\n if (!this.idling && this._queue.length < this.options.maxConnections) {\n this.idling = true;\n this.emit('idle');\n }\n const entry = (connection.queueEntry = this._queue.shift());\n entry.resource = connection;\n entry.messageId = (connection.queueEntry.mail.message.getHeader('message-id') || '').replace(/[<>\\s]/g, '');\n connection.available = false;\n this.logger.debug({\n tnx: 'pool',\n cid: connection.id,\n messageId: entry.messageId,\n action: 'assign'\n }, 'Assigned message <%s> to #%s (%s)', entry.messageId, connection.id, connection.messages + 1);\n if (this._rateLimit.limit) {\n this._rateLimit.counter++;\n if (!this._rateLimit.checkpoint) {\n this._rateLimit.checkpoint = Date.now();\n }\n }\n connection.send(entry.mail, (err, info) => {\n // only process callback if current handler is not changed\n if (entry === connection.queueEntry) {\n try {\n entry.callback(err, info);\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'callback',\n cid: connection.id\n }, 'Callback error for #%s: %s', connection.id, E.message);\n }\n connection.queueEntry = false;\n }\n });\n }\n /**\n * Creates a new pool resource\n * @internal\n */\n _createConnection() {\n const connection = new PoolResource(this);\n connection.id = ++this._connectionCounter;\n this.logger.info({\n tnx: 'pool',\n cid: connection.id,\n action: 'conection'\n }, 'Created new pool resource #%s', connection.id);\n // resource comes available\n connection.on('available', () => {\n this.logger.debug({\n tnx: 'connection',\n cid: connection.id,\n action: 'available'\n }, 'Connection #%s became available', connection.id);\n if (this._closed) {\n // if already closed run close() that will remove this connections from connections list\n this.close();\n }\n else {\n // check if there's anything else to send\n this._processMessages();\n }\n });\n // resource is terminated with an error\n connection.once('error', (err) => {\n if (err.code !== errors.EMAXLIMIT) {\n this.logger.warn({\n err,\n tnx: 'pool',\n cid: connection.id\n }, 'Pool Error for #%s: %s', connection.id, err.message);\n }\n else {\n this.logger.debug({\n tnx: 'pool',\n cid: connection.id,\n action: 'maxlimit'\n }, 'Max messages limit exchausted for #%s', connection.id);\n }\n if (connection.queueEntry) {\n try {\n connection.queueEntry.callback(err);\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'callback',\n cid: connection.id\n }, 'Callback error for #%s: %s', connection.id, E.message);\n }\n connection.queueEntry = false;\n }\n // remove the erroneus connection from connections list\n this._removeConnection(connection);\n this._continueProcessing();\n });\n connection.once('close', () => {\n this.logger.info({\n tnx: 'connection',\n cid: connection.id,\n action: 'closed'\n }, 'Connection #%s was closed', connection.id);\n this._removeConnection(connection);\n if (connection.queueEntry) {\n // If the connection closed when sending, add the message to the queue again\n // if max number of requeues is not reached yet\n // Note that we must wait a bit.. because the callback of the 'error' handler might be called\n // in the next event loop\n setTimeout(() => {\n let delay = 0;\n if (connection.queueEntry) {\n // a closed pool (a forced close ends a delivery on purpose) fails the\n // message rather than queueing it for a retry that would never run\n if (!this._closed && this._shouldRequeuOnConnectionClose(connection.queueEntry)) {\n delay = this._requeueEntryOnConnectionClose(connection);\n }\n else {\n this._failDeliveryOnConnectionClose(connection);\n }\n }\n if (delay) {\n // back off, a server that keeps dropping connections is not hammered\n setTimeout(() => this._continueProcessing(), delay);\n }\n else {\n this._continueProcessing();\n }\n }, 50);\n }\n else {\n if (!this._closed && this.idling && !this._connections.length) {\n this.emit('clear');\n }\n this._continueProcessing();\n }\n });\n this._connections.push(connection);\n return connection;\n }\n /** @internal */\n _shouldRequeuOnConnectionClose(queueEntry) {\n if (this.options.maxRequeues < 0) {\n return true;\n }\n return queueEntry.requeueAttempts < this.options.maxRequeues;\n }\n /** @internal */\n _failDeliveryOnConnectionClose(connection) {\n if (connection.queueEntry && connection.queueEntry.callback) {\n try {\n const err = new Error('Reached maximum number of retries after connection was closed');\n err.code = errors.ECONNECTION;\n connection.queueEntry.callback(err);\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'callback',\n messageId: connection.queueEntry.messageId,\n cid: connection.id\n }, 'Callback error for #%s: %s', connection.id, E.message);\n }\n connection.queueEntry = false;\n }\n }\n /** @internal */\n _requeueEntryOnConnectionClose(connection) {\n const delay = Math.min(REQUEUE_BASE_DELAY * 2 ** connection.queueEntry.requeueAttempts, REQUEUE_MAX_DELAY);\n connection.queueEntry.requeueAttempts += 1;\n this.logger.debug({\n tnx: 'pool',\n cid: connection.id,\n messageId: connection.queueEntry.messageId,\n action: 'requeue'\n }, 'Re-queued message <%s> for #%s. Attempt: #%s', connection.queueEntry.messageId, connection.id, connection.queueEntry.requeueAttempts);\n connection.queueEntry.resource = undefined;\n this._queue.unshift(connection.queueEntry);\n connection.queueEntry = false;\n return delay;\n }\n /**\n * Continue to process message if the pool hasn't closed\n * @internal\n */\n _continueProcessing() {\n if (this._closed) {\n this.close();\n }\n else {\n setTimeout(() => this._processMessages(), 100);\n }\n }\n /**\n * Remove resource from pool\n *\n * @param connection The PoolResource to remove\n * @internal\n */\n _removeConnection(connection) {\n const index = this._connections.indexOf(connection);\n if (index !== -1) {\n this._connections.splice(index, 1);\n }\n }\n /**\n * Checks if connections have hit current rate limit and if so, queues the availability callback\n *\n * @param callback Callback function to run once rate limiter has been cleared\n * @internal\n */\n _checkRateLimit(callback) {\n if (!this._rateLimit.limit) {\n return callback();\n }\n const now = Date.now();\n if (this._rateLimit.counter < this._rateLimit.limit) {\n return callback();\n }\n this._rateLimit.waiting.push(callback);\n if (this._rateLimit.checkpoint <= now - this._rateLimit.delta) {\n return this._clearRateLimit();\n }\n if (!this._rateLimit.timeout) {\n this._rateLimit.timeout = setTimeout(() => this._clearRateLimit(), this._rateLimit.delta - (now - this._rateLimit.checkpoint));\n this._rateLimit.checkpoint = now;\n }\n }\n /**\n * Clears current rate limit limitation and runs paused callback\n * @internal\n */\n _clearRateLimit() {\n clearTimeout(this._rateLimit.timeout);\n this._rateLimit.timeout = null;\n this._rateLimit.counter = 0;\n this._rateLimit.checkpoint = false;\n // resume all paused connections\n while (this._rateLimit.waiting.length) {\n const cb = this._rateLimit.waiting.shift();\n setImmediate(cb);\n }\n }\n /**\n * Returns true if there are free slots in the queue\n */\n isIdle() {\n return this.idling;\n }\n /**\n * Counts the messages the pool has not finished with yet: the ones waiting in the queue\n * plus the ones a connection is transmitting right now. isIdle() only tells whether the\n * pool can take another message, it is already true while a message is still being sent,\n * so use this to check that nothing would be lost by closing the pool. A message that is\n * re-queued after its connection dropped is counted until its callback runs, also while it waits to be put back on the queue, and\n * it is no longer counted by the time its callback runs.\n *\n * @returns Number of queued and in-flight messages\n */\n pendingCount() {\n return this._pending;\n }\n verify(callback) {\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n // the error paths hand over the error alone\n const done = callback;\n const auth = new PoolResource(this).auth;\n // the proxy handshake, if any, counts against connectionTimeout as well\n const connectStartedAt = Date.now();\n this.getSocket(Object.assign({}, this.options, { connectStartedAt }), (err, socketOptions) => {\n if (err) {\n return done(err);\n }\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info({\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n }, 'Using proxied socket from %s:%s to %s:%s', socketOptions.connection.remoteAddress, socketOptions.connection.remotePort, options.host || '', options.port || '');\n options = Object.assign(shared.assign(false, options), socketOptions);\n }\n const connection = new SMTPConnection(options);\n connection._connectStartedAt = connectStartedAt;\n let returned = false;\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n connection.close();\n return done(err);\n });\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n return done(new Error('Connection closed'));\n });\n const finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n connection.quit();\n return done(null, true);\n };\n connection.connect(err => {\n if (returned) {\n return;\n }\n if (err) {\n returned = true;\n connection.close();\n return done(err);\n }\n if (auth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(auth, err => {\n if (returned) {\n return;\n }\n if (err) {\n returned = true;\n connection.close();\n return done(err);\n }\n finalize();\n });\n }\n else if (!auth && connection.allowsAuth && options.forceAuth) {\n const err = new Error('Authentication info was not provided');\n err.code = errors.ENOAUTH;\n returned = true;\n connection.close();\n return done(err);\n }\n else {\n finalize();\n }\n });\n });\n return promise;\n }\n}\nexport default SMTPPool;\n","import { EventEmitter } from 'node:events';\nimport SMTPConnection from '../smtp-connection/index.js';\nimport wellKnown from '../well-known/index.js';\nimport * as shared from '../shared/index.js';\nimport XOAuth2 from '../xoauth2/index.js';\nimport * as errors from '../errors.js';\nimport * as packageData from '../package-info.js';\n// The keys a message's `auth` may set on top of the transport's auth settings: the ones that\n// say who logs in and with what. Everything else in the auth block (accessUrl, clientId,\n// clientSecret, customHeaders, customParams, tls, privateKey, serviceClient and the rest)\n// names the endpoint the credentials go to or is a secret of the application itself, and\n// a message that could set `auth.accessUrl` and force a refresh would have the transport's\n// client secret and refresh token posted to a URL of its choosing\nconst MESSAGE_AUTH_KEYS = ['type', 'user', 'pass', 'accessToken', 'refreshToken', 'expires'];\n/**\n * Creates a SMTP transport object for Nodemailer\n *\n * @constructor\n * @param options Connection options\n */\nclass SMTPTransport extends EventEmitter {\n constructor(options) {\n super();\n this.supportsAbortSignal = true;\n options = options || {};\n if (typeof options === 'string') {\n options = {\n url: options\n };\n }\n let urlData;\n let service = options.service;\n if (typeof options.getSocket === 'function') {\n this.getSocket = options.getSocket;\n }\n if (options.url) {\n urlData = shared.parseConnectionUrl(options.url);\n service = service || urlData.service;\n }\n this.options = shared.assign(false, // create new object\n options, // regular options\n urlData, // url options\n (service && wellKnown(service)) // wellknown options\n );\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'smtp-transport'\n });\n this.name = 'SMTP';\n this.version = packageData.version + '[client:' + packageData.version + ']';\n if (this.options.auth) {\n this.auth = this.getAuth({});\n }\n }\n /**\n * Placeholder function for creating proxy sockets. This method immediatelly returns\n * without a socket\n *\n * @param options Connection options\n * @param callback Callback function to run with the socket keys\n */\n getSocket(options, callback) {\n // return immediatelly\n setImmediate(() => callback(null, false));\n }\n getAuth(authOpts) {\n if (!authOpts) {\n if (this.auth && this.auth.oauth2 && this.mailer) {\n // Transport-level auth is resolved in the constructor, before the Mail wrapper\n // assigns `this.mailer`, so a provision callback registered with\n // `transporter.set('oauth2_provision_cb', ...)` has to be re-checked here\n this.auth.oauth2.provisionCallback = this.mailer.get('oauth2_provision_cb') || this.auth.oauth2.provisionCallback;\n }\n return this.auth;\n }\n const authData = Object.assign({}, this.options.auth && typeof this.options.auth === 'object' ? this.options.auth : {});\n if (typeof authOpts === 'object') {\n // see MESSAGE_AUTH_KEYS\n shared.copyOwnKeys(authData, authOpts, key => !MESSAGE_AUTH_KEYS.includes(key));\n }\n if (Object.keys(authData).length === 0) {\n return false;\n }\n switch ((authData.type || '').toString().toUpperCase()) {\n case 'OAUTH2': {\n if (!authData.service && !authData.user) {\n return false;\n }\n const oauth2 = new XOAuth2(authData, this.logger);\n oauth2.provisionCallback = (this.mailer && this.mailer.get('oauth2_provision_cb')) || oauth2.provisionCallback;\n oauth2.on('token', (token) => this.mailer.emit('token', token));\n oauth2.on('error', err => this.emit('error', err));\n return {\n type: 'OAUTH2',\n user: authData.user,\n oauth2,\n method: 'XOAUTH2'\n };\n }\n default:\n return {\n type: (authData.type || '').toString().toUpperCase() || 'LOGIN',\n user: authData.user,\n credentials: {\n user: authData.user || '',\n pass: authData.pass,\n options: authData.options\n },\n method: (authData.method || '').trim().toUpperCase() || this.options.authMethod || false\n };\n }\n }\n /**\n * Sends an e-mail using the selected settings\n *\n * @param mail Mail object\n * @param callback Callback function\n */\n send(mail, callback) {\n const signal = mail.data.signal;\n let returned = false;\n let connection;\n let perCallAuth;\n const cleanupPerCallAuth = () => {\n if (perCallAuth && perCallAuth !== this.auth && perCallAuth.oauth2) {\n perCallAuth.oauth2.removeAllListeners();\n }\n perCallAuth = null;\n };\n const finish = (err, info) => {\n if (returned) {\n return;\n }\n returned = true;\n signal?.removeEventListener('abort', onAbort);\n cleanupPerCallAuth();\n connection?.close();\n callback(err, info);\n };\n function onAbort() {\n finish(errors.createAbortError(signal));\n }\n if (signal) {\n signal.addEventListener('abort', onAbort, { once: true });\n if (signal.aborted) {\n setImmediate(onAbort);\n return;\n }\n }\n // the proxy handshake, if any, counts against connectionTimeout as well\n const connectStartedAt = Date.now();\n this.getSocket(Object.assign({}, this.options, { connectStartedAt }), (err, socketOptions) => {\n if (returned) {\n socketOptions && socketOptions.connection?.destroy();\n return;\n }\n if (err) {\n return finish(err);\n }\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info({\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n }, 'Using proxied socket from %s:%s to %s:%s', socketOptions.connection.remoteAddress, socketOptions.connection.remotePort, options.host || '', options.port || '');\n // only copy options if we need to modify it\n options = Object.assign(shared.assign(false, options), socketOptions);\n }\n const smtp = (connection = new SMTPConnection(options));\n smtp._connectStartedAt = connectStartedAt;\n smtp.once('error', err => finish(err));\n const sendMessage = () => {\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n if (mail.data.dsn) {\n envelope.dsn = mail.data.dsn;\n }\n // RFC 8689: Pass requireTLSExtensionEnabled to envelope for MAIL FROM parameter\n if (mail.data.requireTLSExtensionEnabled) {\n envelope.requireTLSExtensionEnabled = mail.data.requireTLSExtensionEnabled;\n }\n this.logger.info({\n tnx: 'send',\n messageId\n }, 'Sending message %s to <%s>', messageId, recipients.join(', '));\n smtp.send(envelope, mail.message.createReadStream(), (err, info) => {\n if (returned) {\n // the connection error handler has already reported this send\n return;\n }\n if (err) {\n this.logger.error({\n err,\n tnx: 'send'\n }, 'Send error for %s: %s', messageId, err.message);\n return finish(err);\n }\n info.envelope = {\n from: envelope.from,\n to: envelope.to\n };\n info.messageId = messageId;\n try {\n return finish(null, info);\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'callback'\n }, 'Callback error for %s: %s', messageId, E.message);\n }\n });\n };\n smtp.connect(err => {\n if (returned) {\n return;\n }\n if (err) {\n // the server closed the connection before the greeting\n return finish(err);\n }\n perCallAuth = this.getAuth(mail.data.auth);\n if (perCallAuth && (smtp.allowsAuth || options.forceAuth)) {\n smtp.login(perCallAuth, err => {\n cleanupPerCallAuth();\n if (returned) {\n return;\n }\n if (err) {\n return finish(err);\n }\n sendMessage();\n });\n }\n else {\n sendMessage();\n }\n });\n });\n }\n verify(callback) {\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n // the error paths hand over the error alone\n const done = callback;\n // the proxy handshake, if any, counts against connectionTimeout as well\n const connectStartedAt = Date.now();\n this.getSocket(Object.assign({}, this.options, { connectStartedAt }), (err, socketOptions) => {\n if (err) {\n return done(err);\n }\n let options = this.options;\n if (socketOptions && socketOptions.connection) {\n this.logger.info({\n tnx: 'proxy',\n remoteAddress: socketOptions.connection.remoteAddress,\n remotePort: socketOptions.connection.remotePort,\n destHost: options.host || '',\n destPort: options.port || '',\n action: 'connected'\n }, 'Using proxied socket from %s:%s to %s:%s', socketOptions.connection.remoteAddress, socketOptions.connection.remotePort, options.host || '', options.port || '');\n options = Object.assign(shared.assign(false, options), socketOptions);\n }\n const connection = new SMTPConnection(options);\n connection._connectStartedAt = connectStartedAt;\n let returned = false;\n let perCallAuth;\n const cleanupPerCallAuth = () => {\n if (perCallAuth && perCallAuth !== this.auth && perCallAuth.oauth2) {\n perCallAuth.oauth2.removeAllListeners();\n }\n perCallAuth = null;\n };\n connection.once('error', err => {\n if (returned) {\n return;\n }\n returned = true;\n cleanupPerCallAuth();\n connection.close();\n return done(err);\n });\n connection.once('end', () => {\n if (returned) {\n return;\n }\n returned = true;\n cleanupPerCallAuth();\n return done(new Error('Connection closed'));\n });\n const finalize = () => {\n if (returned) {\n return;\n }\n returned = true;\n cleanupPerCallAuth();\n connection.quit();\n return done(null, true);\n };\n connection.connect(err => {\n if (returned) {\n return;\n }\n if (err) {\n returned = true;\n connection.close();\n return done(err);\n }\n perCallAuth = this.getAuth({});\n if (perCallAuth && (connection.allowsAuth || options.forceAuth)) {\n connection.login(perCallAuth, err => {\n cleanupPerCallAuth();\n if (returned) {\n return;\n }\n if (err) {\n returned = true;\n connection.close();\n return done(err);\n }\n finalize();\n });\n }\n else if (!perCallAuth && connection.allowsAuth && options.forceAuth) {\n const err = new Error('Authentication info was not provided');\n err.code = errors.ENOAUTH;\n returned = true;\n cleanupPerCallAuth();\n connection.close();\n return done(err);\n }\n else {\n finalize();\n }\n });\n });\n return promise;\n }\n /**\n * Releases resources\n */\n close() {\n if (this.auth && this.auth.oauth2) {\n this.auth.oauth2.removeAllListeners();\n }\n this.emit('close');\n }\n}\nexport default SMTPTransport;\n","import { spawn } from 'node:child_process';\nimport { pipeline } from 'node:stream';\nimport * as packageData from '../package-info.js';\nimport * as shared from '../shared/index.js';\nimport * as errors from '../errors.js';\nimport LeWindows from '../mime-node/le-windows.js';\nimport LeUnix from '../mime-node/le-unix.js';\n// how long an stdin error waits for the exit code of the process before it is reported\nconst STDIN_ERROR_EXIT_WAIT = 1000;\n/**\n * Generates a Transport object for Sendmail\n *\n * Possible options can be the following:\n *\n * * **path** optional path to sendmail binary\n * * **newline** either 'windows' or 'unix'\n * * **args** an array of arguments for the sendmail binary\n *\n * @constructor\n * @param optional config parameter for Sendmail\n */\nclass SendmailTransport {\n constructor(options) {\n options = options || {};\n // use a reference to spawn for mocking purposes\n this._spawn = spawn;\n this.options = options;\n this.name = 'Sendmail';\n this.version = packageData.version;\n this.path = 'sendmail';\n this.args = false;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'sendmail'\n });\n if (typeof options === 'string') {\n this.path = options;\n }\n else if (typeof options === 'object') {\n if (options.path) {\n this.path = options.path;\n }\n if (Array.isArray(options.args)) {\n this.args = options.args;\n }\n }\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n /**\n * <p>Compiles a mailcomposer message and forwards it to handler that sends it.</p>\n *\n * @param mail MailComposer object\n * @param done Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself. send() runs after the message was\n // compiled, so mail.message is set\n mail.message.keepBcc = true;\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n let returned;\n const hasInvalidAddresses = []\n .concat(envelope.from || [])\n .concat(envelope.to || [])\n // a local part is either a dot-atom or a quoted-string, so a leading dash sits at\n // offset 0 or, behind the opening quote, at offset 1. Only the first shape is read\n // as an option by sendmail, but both are the address this guard keeps out of argv\n .some(addr => /^\"?-/.test(addr));\n if (hasInvalidAddresses) {\n const err = new Error('Can not send mail. Invalid envelope addresses.');\n err.code = errors.ESENDMAIL;\n return done(err);\n }\n // force -i to keep single dots\n const args = this.args ? ['-i'].concat(this.args).concat(envelope.to) : ['-i'].concat(envelope.from ? ['-f', envelope.from] : []).concat(envelope.to);\n const callback = (err) => {\n if (returned) {\n // ignore any additional responses, already done\n return;\n }\n returned = true;\n if (typeof done === 'function') {\n if (err) {\n return done(err);\n }\n return done(null, {\n envelope,\n messageId,\n response: 'Messages queued for delivery'\n });\n }\n };\n let sendmail;\n try {\n sendmail = this._spawn(this.path, args);\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'spawn',\n messageId\n }, 'Error occurred while spawning sendmail. %s', E.message);\n return callback(E);\n }\n if (sendmail) {\n let stream;\n // ended once the whole message was handed to stdin\n const messageWritten = () => !!stream && stream.readableEnded;\n // an EPIPE says less than the exit code that usually follows it, so it is only\n // reported when the process exits without one\n let stdinError = null;\n // releases whatever the message is still being read from\n const release = () => {\n if (stream && !messageWritten()) {\n stream.destroy();\n }\n };\n const fail = (err) => {\n release();\n callback(err);\n };\n sendmail.on('error', err => {\n this.logger.error({\n err,\n tnx: 'spawn',\n messageId\n }, 'Error occurred when sending message %s. %s', messageId, err.message);\n fail(err);\n });\n // 'close' follows 'exit' with the same arguments, it is only listened to in case the\n // process ends without an 'exit' event\n const onExit = (code, signal) => {\n let err = null;\n if (code) {\n err = new Error(code === 127 ? 'Sendmail command not found, process exited with code ' + code : 'Sendmail exited with code ' + code);\n }\n else if (signal) {\n err = new Error('Sendmail was terminated by ' + signal);\n }\n else if (!messageWritten()) {\n // exiting with 0 before the message was written does not mean it was queued\n err = new Error('Sendmail exited before the message was written');\n }\n else if (stdinError) {\n err = stdinError;\n }\n if (!err) {\n return callback();\n }\n err.code = err.code || errors.ESENDMAIL;\n this.logger.error({\n err,\n tnx: 'stdin',\n messageId\n }, 'Error sending message %s to sendmail. %s', messageId, err.message);\n fail(err);\n };\n sendmail.once('exit', onExit);\n sendmail.once('close', onExit);\n sendmail.stdin.on('error', err => {\n this.logger.error({\n err,\n tnx: 'stdin',\n messageId\n }, 'Error occurred when piping message %s to sendmail. %s', messageId, err.message);\n if (stdinError) {\n return;\n }\n stdinError = err;\n release();\n // a process that closed its stdin normally exits right after, with a code that\n // tells more than the EPIPE. Report the EPIPE if it does not\n const exitTimer = setTimeout(() => fail(err), STDIN_ERROR_EXIT_WAIT);\n sendmail.once('exit', () => clearTimeout(exitTimer));\n });\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info({\n tnx: 'send',\n messageId\n }, 'Sending message %s to <%s>', messageId, recipients.join(', '));\n const sourceStream = mail.message.createReadStream();\n stream = sourceStream;\n if (this.options.newline) {\n // apply the transport-level line ending transform; the message-level\n // `newline` option is handled by MimeNode in createReadStream()\n stream = pipeline(sourceStream, this.winbreak ? new LeWindows() : new LeUnix(), () => false);\n }\n stream.once('error', err => {\n this.logger.error({\n err,\n tnx: 'stdin',\n messageId\n }, 'Error occurred when generating message %s. %s', messageId, err.message);\n sendmail.kill('SIGINT'); // do not deliver the message\n callback(err);\n });\n stream.pipe(sendmail.stdin);\n }\n else {\n const err = new Error('sendmail was not found');\n err.code = errors.ESENDMAIL;\n return callback(err);\n }\n }\n}\nexport default SendmailTransport;\n","import * as packageData from '../package-info.js';\nimport * as shared from '../shared/index.js';\nimport LeWindows from '../mime-node/le-windows.js';\nimport LeUnix from '../mime-node/le-unix.js';\n/**\n * Generates a Transport object for streaming\n *\n * Possible options can be the following:\n *\n * * **buffer** if true, then returns the message as a Buffer object instead of a stream\n * * **newline** either 'windows' or 'unix'\n *\n * @constructor\n * @param optional config parameter\n */\nclass StreamTransport {\n constructor(options) {\n options = options || {};\n this.options = options;\n this.name = 'StreamTransport';\n this.version = packageData.version;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'stream-transport'\n });\n this.winbreak = ['win', 'windows', 'dos', '\\r\\n'].includes((options.newline || '').toString().toLowerCase());\n }\n /**\n * Compiles a mailcomposer message and forwards it to handler that sends it\n *\n * @param mail MailComposer object\n * @param done Callback function to run when the sending is completed\n */\n send(mail, done) {\n // We probably need this in the output. send() runs after the message was compiled,\n // so mail.message is set\n mail.message.keepBcc = true;\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info({\n tnx: 'send',\n messageId\n }, 'Sending message %s to <%s> using %s line breaks', messageId, recipients.join(', '), this.winbreak ? '<CR><LF>' : '<LF>');\n setImmediate(() => {\n let stream;\n try {\n stream = mail.message.createReadStream();\n if (this.options.newline) {\n // apply the transport-level line ending transform; the message-level\n // `newline` option is handled by MimeNode in createReadStream()\n const sourceStream = stream;\n stream = sourceStream.pipe(this.winbreak ? new LeWindows() : new LeUnix());\n sourceStream.once('error', err => stream.emit('error', err));\n }\n }\n catch (E) {\n this.logger.error({\n err: E,\n tnx: 'send',\n messageId\n }, 'Creating send stream failed for %s. %s', messageId, E.message);\n return done(E);\n }\n if (!this.options.buffer) {\n stream.once('error', err => {\n this.logger.error({\n err,\n tnx: 'send',\n messageId\n }, 'Failed creating message for %s. %s', messageId, err.message);\n });\n return done(null, {\n envelope,\n messageId,\n message: stream\n });\n }\n const chunks = [];\n let chunklen = 0;\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n stream.once('error', err => {\n this.logger.error({\n err,\n tnx: 'send',\n messageId\n }, 'Failed creating message for %s. %s', messageId, err.message);\n return done(err);\n });\n stream.on('end', () => done(null, {\n envelope,\n messageId,\n message: Buffer.concat(chunks, chunklen)\n }));\n });\n }\n}\nexport default StreamTransport;\n","import * as packageData from '../package-info.js';\nimport * as shared from '../shared/index.js';\n/**\n * Generates a Transport object to generate JSON output\n *\n * @constructor\n * @param optional config parameter\n */\nclass JSONTransport {\n constructor(options) {\n options = options || {};\n this.options = options;\n this.name = 'JSONTransport';\n this.version = packageData.version;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'json-transport'\n });\n }\n /**\n * <p>Compiles a mailcomposer message and forwards it to handler that sends it.</p>\n *\n * @param mail MailComposer object\n * @param done Callback function to run when the sending is completed\n */\n send(mail, done) {\n // Sendmail strips this header line by itself. send() runs after the message was\n // compiled, so mail.message is set\n mail.message.keepBcc = true;\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info({\n tnx: 'send',\n messageId\n }, 'Composing JSON structure of %s to <%s>', messageId, recipients.join(', '));\n setImmediate(() => {\n mail.normalize((err, data) => {\n if (err) {\n this.logger.error({\n err,\n tnx: 'send',\n messageId\n }, 'Failed building JSON structure for %s. %s', messageId, err.message);\n return done(err);\n }\n delete data.envelope;\n delete data.normalizedHeaders;\n // the per-message AbortSignal is not message data\n delete data.signal;\n // the message field is the object itself with skipEncoding, the\n // createTransport overload for that option types the result accordingly\n return done(null, {\n envelope,\n messageId,\n message: this.options.skipEncoding ? data : JSON.stringify(data)\n });\n });\n });\n }\n}\nexport default JSONTransport;\n","import EventEmitter from 'node:events';\nimport * as packageData from '../package-info.js';\nimport * as shared from '../shared/index.js';\nimport * as errors from '../errors.js';\nimport LeWindows from '../mime-node/le-windows.js';\nimport MimeNode from '../mime-node/index.js';\n/**\n * Tags AWS SDK rejections that carry no `code` property (SDK v3 errors only\n * have a `name`) with the generic SES transport error code, keeping the\n * original error object intact\n */\nfunction tagSesError(err) {\n if (err && typeof err === 'object' && !err.code) {\n err.code = errors.ESES;\n }\n return err;\n}\n/**\n * Generates a Transport object for AWS SES\n *\n * @constructor\n * @param optional config parameter\n */\nclass SESTransport extends EventEmitter {\n constructor(options) {\n super();\n if (!options || !options.SES || !options.SES.sesClient) {\n const error = new Error('Missing SES configuration, expecting { sesClient, SendEmailCommand } from @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/');\n error.code = errors.ECONFIG;\n throw error;\n }\n this.options = options;\n this.ses = this.options.SES;\n this.name = 'SESTransport';\n this.version = packageData.version;\n this.logger = shared.getLogger(this.options, {\n component: this.options.component || 'ses-transport'\n });\n }\n getRegion(cb) {\n if (this.ses.sesClient.config && typeof this.ses.sesClient.config.region === 'function') {\n // Resolve the region provider. Use the two-argument form of then() so that a\n // synchronous throw from cb is not recaught here and used to invoke cb a second time.\n this.ses.sesClient.config.region().then(region => cb(null, region), err => cb(err));\n return;\n }\n return cb(null, false);\n }\n /**\n * Compiles a mailcomposer message and forwards it to SES\n *\n * @param mail MailComposer object\n * @param callback Callback function to run when the sending is completed\n */\n send(mail, callback) {\n // send() runs after the message was compiled, so mail.message is set\n let fromHeader = mail.message._headers.find(header => /^from$/i.test(header.key));\n if (fromHeader) {\n const mimeNode = new MimeNode('text/plain');\n fromHeader = mimeNode._convertAddresses(mimeNode._parseAddresses(fromHeader.value));\n }\n const envelope = mail.message.getEnvelope();\n const messageId = mail.message.messageId();\n const recipients = [].concat(envelope.to || []);\n if (recipients.length > 3) {\n recipients.push('...and ' + recipients.splice(2).length + ' more');\n }\n this.logger.info({\n tnx: 'send',\n messageId\n }, 'Sending message %s to <%s>', messageId, recipients.join(', '));\n const getRawMessage = (next) => {\n // do not use Message-ID and Date in DKIM signature\n if (!mail.data._dkim) {\n mail.data._dkim = {};\n }\n if (mail.data._dkim.skipFields && typeof mail.data._dkim.skipFields === 'string') {\n mail.data._dkim.skipFields += ':date:message-id';\n }\n else {\n mail.data._dkim.skipFields = 'date:message-id';\n }\n const sourceStream = mail.message.createReadStream();\n const stream = sourceStream.pipe(new LeWindows());\n const chunks = [];\n let chunklen = 0;\n stream.on('readable', () => {\n let chunk;\n while ((chunk = stream.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n sourceStream.once('error', err => stream.emit('error', err));\n stream.once('error', err => next(err));\n stream.once('end', () => next(null, Buffer.concat(chunks, chunklen)));\n };\n setImmediate(() => getRawMessage((err, raw) => {\n if (err) {\n this.logger.error({\n err,\n tnx: 'send',\n messageId\n }, 'Failed creating message for %s. %s', messageId, err.message);\n return callback(err);\n }\n // mail.data.ses is caller supplied message data, so copy its own keys only\n const sesMessage = shared.copyOwnKeys({\n Content: {\n Raw: {\n // required\n Data: raw // required\n }\n },\n FromEmailAddress: fromHeader || envelope.from,\n Destination: {\n ToAddresses: envelope.to\n }\n }, mail.data.ses);\n this.getRegion((err, region) => {\n if (err || !region) {\n region = 'us-east-1';\n }\n let sendPromise;\n try {\n // command construction or dispatch can throw synchronously on a\n // misconfigured SDK; surface it as a single error callback instead\n // of letting it escape into getRegion's promise chain\n const command = new this.ses.SendEmailCommand(sesMessage);\n sendPromise = this.ses.sesClient.send(command);\n }\n catch (err) {\n tagSesError(err);\n this.logger.error({\n err,\n tnx: 'send'\n }, 'Send error for %s: %s', messageId, err.message);\n setImmediate(() => callback(err));\n return;\n }\n sendPromise\n .then(data => {\n if (region === 'us-east-1') {\n region = 'email';\n }\n const info = {\n envelope: {\n from: envelope.from,\n to: envelope.to\n },\n messageId: '<' + data.MessageId + (!/@/.test(data.MessageId) ? '@' + region + '.amazonses.com' : '') + '>',\n response: data.MessageId,\n raw: raw\n };\n // invoke the callback outside the promise chain so a throw from it\n // is not recaught by .catch() and used to call it a second time\n setImmediate(() => callback(null, info));\n })\n .catch(err => {\n tagSesError(err);\n this.logger.error({\n err,\n tnx: 'send'\n }, 'Send error for %s: %s', messageId, err.message);\n setImmediate(() => callback(err));\n });\n });\n }));\n }\n verify(callback) {\n let promise;\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const done = callback;\n const cb = (err) => {\n if (err && !['InvalidParameterValue', 'MessageRejected'].includes(err.code || err.Code || err.name)) {\n return done(tagSesError(err));\n }\n return done(null, true);\n };\n const sesMessage = {\n Content: {\n Raw: {\n Data: Buffer.from('From: <invalid@invalid>\\r\\nTo: <invalid@invalid>\\r\\n Subject: Invalid\\r\\n\\r\\nInvalid')\n }\n },\n FromEmailAddress: 'invalid@invalid',\n Destination: {\n ToAddresses: ['invalid@invalid']\n }\n };\n // the region value is not used for anything when verifying, but the lookup\n // exercises the client configuration the same way as send() does\n this.getRegion(() => {\n let sendPromise;\n try {\n const command = new this.ses.SendEmailCommand(sesMessage);\n sendPromise = this.ses.sesClient.send(command);\n }\n catch (err) {\n setImmediate(() => cb(err));\n return;\n }\n sendPromise.then(() => setImmediate(() => cb(null))).catch(err => setImmediate(() => cb(err)));\n });\n return promise;\n }\n}\nexport default SESTransport;\n","import Mail from './mailer/index.js';\nimport * as shared from './shared/index.js';\nimport SMTPPool from './smtp-pool/index.js';\nimport SMTPTransport from './smtp-transport/index.js';\nimport SendmailTransport from './sendmail-transport/index.js';\nimport StreamTransport from './stream-transport/index.js';\nimport JSONTransport from './json-transport/index.js';\nimport SESTransport from './ses-transport/index.js';\nimport * as errors from './errors.js';\nimport nmfetch from './fetch/index.js';\nimport * as packageData from './package-info.js';\n// Read on use rather than at load, so that importing the module does not touch the\n// environment (Deno refuses that without --allow-env, even for apps that never use Ethereal)\nconst etherealApi = () => (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\\/+$/, '');\nconst etherealWeb = () => (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\\/+$/, '');\nconst etherealApiKey = () => (process.env.ETHEREAL_API_KEY || '').replace(/\\s*/g, '') || null;\nconst etherealCache = () => ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());\nlet testAccount = false;\nexport function createTransport(transporter, defaults) {\n let options;\n if (\n // provided transporter is a configuration object, not transporter plugin\n (typeof transporter === 'object' && typeof transporter.send !== 'function') ||\n // provided transporter looks like a connection url\n (typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))) {\n const urlConfig = typeof transporter === 'string' ? transporter : transporter.url;\n if (urlConfig) {\n // parse a configuration URL into configuration options. The other keys of a\n // configuration object apply where the url does not set them, merged the same\n // way the SMTP transports merge their own url option\n const parsed = shared.parseConnectionUrl(urlConfig);\n options = (typeof transporter === 'object'\n ? shared.assign(false, shared.copyOwnKeys({}, transporter, key => key === 'url'), parsed)\n : parsed);\n }\n else {\n options = transporter;\n }\n if (options.pool) {\n transporter = new SMTPPool(options);\n }\n else if (options.sendmail) {\n transporter = new SendmailTransport(options);\n }\n else if (options.streamTransport) {\n transporter = new StreamTransport(options);\n }\n else if (options.jsonTransport) {\n transporter = new JSONTransport(options);\n }\n else if (options.SES) {\n const ses = options.SES;\n if (ses.ses && ses.aws) {\n const error = new Error('Using legacy SES configuration, expecting @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/');\n error.code = errors.ECONFIG;\n throw error;\n }\n transporter = new SESTransport(options);\n }\n else {\n transporter = new SMTPTransport(options);\n }\n }\n return new Mail(transporter, options, defaults);\n}\nexport function createTestAccount(apiUrl, callback) {\n let promise;\n if (!callback && typeof apiUrl === 'function') {\n callback = apiUrl;\n apiUrl = false;\n }\n if (!callback) {\n promise = new Promise((resolve, reject) => {\n callback = shared.callbackPromise(resolve, reject);\n });\n }\n const done = callback;\n if (etherealCache() && testAccount) {\n setImmediate(() => done(null, testAccount));\n return promise;\n }\n apiUrl = apiUrl || etherealApi();\n const chunks = [];\n let chunklen = 0;\n const requestHeaders = {};\n const requestBody = {\n requestor: packageData.name,\n version: packageData.version\n };\n const apiKey = etherealApiKey();\n if (apiKey) {\n requestHeaders.Authorization = 'Bearer ' + apiKey;\n }\n const fetchOptions = {\n contentType: 'application/json',\n method: 'POST',\n headers: requestHeaders,\n body: Buffer.from(JSON.stringify(requestBody))\n };\n // Credential-bearing request to the Ethereal API. src/fetch already\n // validates certs by default; pin rejectUnauthorized:true here so this\n // call stays strict regardless of any future default change and is never\n // relaxed for a real-cert endpoint.\n if (/^https:/i.test(apiUrl)) {\n fetchOptions.tls = { rejectUnauthorized: true };\n }\n const req = nmfetch(apiUrl + '/user', fetchOptions);\n req.on('readable', () => {\n let chunk;\n while ((chunk = req.read()) !== null) {\n chunks.push(chunk);\n chunklen += chunk.length;\n }\n });\n req.once('error', err => done(err));\n req.once('end', () => {\n const res = Buffer.concat(chunks, chunklen);\n let data;\n try {\n data = JSON.parse(res.toString());\n }\n catch (E) {\n return done(E);\n }\n if (data.status !== 'success' || data.error) {\n return done(new Error(data.error || 'Request failed'));\n }\n delete data.status;\n testAccount = data;\n done(null, testAccount);\n });\n return promise;\n}\n/**\n * Resolves the Ethereal web URL for a message sent through an Ethereal test account\n *\n * @param info Result object of sendMail()\n * @returns URL of the message in the Ethereal web interface, or false if the response does not carry one\n */\nexport function getTestMessageUrl(info) {\n if (!info || !info.response) {\n return false;\n }\n const infoProps = new Map();\n // Extract the trailing \"[...]\" part of the response (no \"]\" allowed inside)\n // with linear string scanning; the equivalent regex /\\[([^\\]]+)\\]$/ was\n // flagged for polynomial backtracking on adversarial server responses\n const response = info.response.toString();\n if (response.length > 2 && response.charAt(response.length - 1) === ']') {\n const open = response.indexOf('[', response.lastIndexOf(']', response.length - 2) + 1);\n if (open >= 0 && open < response.length - 2) {\n const props = response.substring(open + 1, response.length - 1);\n props.replace(/\\b([A-Z0-9]+)=([^\\s]+)/g, (m, key, value) => {\n infoProps.set(key, value);\n return m;\n });\n }\n }\n if (infoProps.has('STATUS') && infoProps.has('MSGID')) {\n return ((testAccount && testAccount.web) || etherealWeb()) + '/message/' + infoProps.get('MSGID');\n }\n return false;\n}\nconst nodemailer = {\n createTransport,\n createTestAccount,\n getTestMessageUrl\n};\nexport default nodemailer;\n","import nodemailer, { type Transporter } from \"nodemailer\";\nimport { decrypt } from \"./crypto\";\nimport { renderEmailHtml, renderEmailText, type EmailContentType } from \"./email-template\";\nimport { classifySendResult, type SendClassification } from \"./send-result\";\nimport { inlineImagesToAttachments, type CidAttachment } from \"./email-cid\";\nimport { hostInlineImages } from \"./supabase-storage\";\nimport { prepareTrackedHtml } from \"./tracking-store\";\n\nexport interface SenderLike {\n email: string;\n fromName: string;\n passwordEnc: string;\n}\n\nconst cache = new Map<string, Transporter>();\n\nfunction getTransport(sender: SenderLike): Transporter {\n const existing = cache.get(sender.email);\n if (existing) return existing;\n\n const password = decrypt(sender.passwordEnc);\n const transport = nodemailer.createTransport({\n service: \"gmail\",\n auth: {\n user: sender.email,\n pass: password,\n },\n // Gmail SMTP: smtp.gmail.com:465 (SSL) / 587 (STARTTLS)\n pool: true,\n maxConnections: 1,\n rateLimit: 4, // stay well under Gmail limits (~20/s hard ceiling)\n });\n\n transport.on(\"error\", (err) => {\n console.error(`[mail] SMTP transport error for ${sender.email}:`, err);\n });\n\n cache.set(sender.email, transport);\n return transport;\n}\n\n/** Verify the Gmail credentials work. Throws on failure. */\nexport async function verifySender(sender: SenderLike): Promise<void> {\n const transport = getTransport(sender);\n await transport.verify();\n}\n\nexport type SendResult = SendClassification;\n\ninterface PersonalizationContext {\n email: string;\n name?: string | null;\n}\n\nfunction applyMerge(text: string, ctx: PersonalizationContext): string {\n const firstName = (ctx.name || \"\").split(\" \")[0] || ctx.email.split(\"@\")[0];\n return text\n .replaceAll(\"{{email}}\", ctx.email)\n .replaceAll(\"{{name}}\", ctx.name || ctx.email.split(\"@\")[0])\n .replaceAll(\"{{first_name}}\", firstName)\n .replaceAll(\"{{Email}}\", ctx.email)\n .replaceAll(\"{{Name}}\", ctx.name || ctx.email.split(\"@\")[0]);\n}\n\nexport interface SendContext {\n /** Public origin for hosted images and tracking links. */\n baseUrl: string;\n campaignId?: string;\n recipientId?: string;\n trackOpens?: boolean;\n trackClicks?: boolean;\n}\n\nexport interface SendCampaignArgs {\n context?: SendContext;\n sender: SenderLike;\n to: string;\n name?: string | null;\n subject: string;\n /** Markdown body (contentType=markdown) or raw HTML body (contentType=html) */\n content: string;\n contentType?: EmailContentType;\n preheader?: string | null;\n fontFamily?: string;\n unsubscribeUrl?: string;\n}\n\n/** Send a single campaign email to one recipient with merge tags applied. */\nexport async function sendCampaignEmail(args: SendCampaignArgs): Promise<SendResult> {\n const contentType: EmailContentType = args.contentType ?? \"markdown\";\n const ctx: PersonalizationContext = { email: args.to, name: args.name };\n const subject = applyMerge(args.subject, ctx);\n const body = applyMerge(args.content, ctx);\n const preheader = args.preheader ? applyMerge(args.preheader, ctx) : undefined;\n\n const html = renderEmailHtml(body, {\n contentType,\n preheader,\n unsubscribeEmail: args.sender.email,\n unsubscribeUrl: args.unsubscribeUrl,\n fontFamily: args.fontFamily,\n });\n const text = renderEmailText(body, contentType);\n\n // Host inline images on Supabase Storage so emails stay small (a data: URI\n // inflates the message by ~33%). If hosting is unavailable, fall back to CID\n // attachments so the email still renders.\n let finalHtml = html;\n let attachments: CidAttachment[] = [];\n try {\n finalHtml = await hostInlineImages(html);\n } catch (err) {\n console.error(\"[media] Supabase hosting failed, using CID fallback:\", err);\n const cid = inlineImagesToAttachments(html);\n finalHtml = cid.html;\n attachments = cid.attachments;\n }\n\n const context = args.context;\n if (\n context?.baseUrl &&\n context.campaignId &&\n context.recipientId &&\n (context.trackOpens || context.trackClicks)\n ) {\n finalHtml = await prepareTrackedHtml(finalHtml, {\n baseUrl: context.baseUrl,\n campaignId: context.campaignId,\n recipientId: context.recipientId,\n trackOpens: context.trackOpens,\n trackClicks: context.trackClicks,\n });\n }\n\n try {\n const transport = getTransport(args.sender);\n const info = await transport.sendMail({\n from: `\"${args.sender.fromName}\" <${args.sender.email}>`,\n to: args.to,\n subject,\n text,\n html: finalHtml,\n attachments,\n // Encourage interactive clients to render the HTML version\n headers: {\n \"List-Unsubscribe\": args.unsubscribeUrl\n ? `<${args.unsubscribeUrl}>, <mailto:${args.sender.email}?subject=Unsubscribe>`\n : `<mailto:${args.sender.email}?subject=Unsubscribe>`,\n \"List-Unsubscribe-Post\": \"List-Unsubscribe=One-Click\",\n \"X-Mailer\": \"MailCast\",\n },\n });\n return classifySendResult(info);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n // Drop the cached transport on auth errors so a re-added password is used.\n if (/auth|credentials|535/i.test(message)) {\n cache.delete(args.sender.email);\n }\n return { ok: false, accepted: [], rejected: [], pending: [], error: message };\n }\n}\n\n/** Send a one-off test email to validate the sender setup. */\nexport async function sendTestEmail(sender: SenderLike, to: string): Promise<SendResult> {\n const html = renderEmailHtml(\n \"## It works!\\n\\nThis is a test broadcast from **MailCast**. Your Gmail sender is connected and ready to send newsletters.\",\n { preheader: \"Your MailCast test email\", unsubscribeEmail: sender.email }\n );\n try {\n const transport = getTransport(sender);\n const info = await transport.sendMail({\n from: `\"${sender.fromName}\" <${sender.email}>`,\n to,\n subject: \"MailCast test email\",\n html,\n text: \"It works! This is a test broadcast from MailCast.\",\n });\n return classifySendResult(info);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n if (/auth|credentials|535/i.test(message)) cache.delete(sender.email);\n return { ok: false, accepted: [], rejected: [], pending: [], error: message };\n }\n}\n","/** Normalize nodemailer's sendMail result into an explicit success/failure. */\n\nexport interface SmtpInfo {\n messageId?: string;\n accepted?: unknown;\n rejected?: unknown;\n pending?: unknown;\n}\n\nexport interface SendClassification {\n ok: boolean;\n accepted: string[];\n rejected: string[];\n pending: string[];\n messageId?: string;\n error?: string;\n}\n\nfunction toAddresses(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n return value\n .map((entry) => {\n if (typeof entry === \"string\") return entry;\n if (entry && typeof entry === \"object\" && \"address\" in entry) {\n return String((entry as { address: unknown }).address);\n }\n return \"\";\n })\n .filter(Boolean);\n}\n\nexport function countRecipientStatuses(\n rows: { status: string }[]\n): { sentCount: number; failedCount: number } {\n return {\n sentCount: rows.filter((row) => row.status === \"sent\").length,\n failedCount: rows.filter((row) => row.status === \"failed\").length,\n };\n}\n\nexport function classifySendResult(info: SmtpInfo): SendClassification {\n const accepted = toAddresses(info.accepted);\n const rejected = toAddresses(info.rejected);\n const pending = toAddresses(info.pending);\n const ok = accepted.length > 0 && rejected.length === 0 && pending.length === 0;\n\n let error: string | undefined;\n if (!ok) {\n const parts: string[] = [];\n if (rejected.length) parts.push(`rejected: ${rejected.join(\", \")}`);\n if (pending.length) parts.push(`pending: ${pending.join(\", \")}`);\n if (!parts.length && !accepted.length) parts.push(\"SMTP accepted no recipients\");\n if (!parts.length) parts.push(\"SMTP did not accept the message\");\n error = parts.join(\"; \");\n }\n\n return {\n ok,\n accepted,\n rejected,\n pending,\n ...(info.messageId ? { messageId: info.messageId } : {}),\n ...(error ? { error } : {}),\n };\n}\n","/**\n * Convert inline data: images to CID attachments for email.\n * Also strips blob: URLs (not supported in email).\n * Returns rewritten HTML and an array of nodemailer-compatible attachments.\n */\n\nexport interface CidAttachment {\n cid: string;\n filename: string;\n content: Buffer;\n contentType: string;\n}\n\nconst DATA_URI_REGEX = /src\\s*=\\s*([\"'])data:([^;]+);base64,([^\"']+)\\1/gi;\nconst BLOB_URI_REGEX = /src\\s*=\\s*([\"'])blob:[^\"']+\\1/gi;\n\n/**\n * Convert data: URI images in HTML to cid: references.\n * Also removes blob: URIs.\n * @param html - HTML string with potential data: or blob: URIs\n * @returns { html: rewritten HTML, attachments: nodemailer attachments }\n */\nexport function inlineImagesToAttachments(html: string): { html: string; attachments: CidAttachment[] } {\n const attachments: CidAttachment[] = [];\n let cidCounter = 0;\n\n // First, convert data: URIs to cid:\n let rewrittenHtml = html.replace(DATA_URI_REGEX, (match, quote, mimeType, base64Data) => {\n cidCounter++;\n const cid = `img-${cidCounter}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;\n \n // Decode base64\n const buffer = Buffer.from(base64Data, \"base64\");\n \n // Determine filename from mime type\n const ext = mimeType.split(\"/\")[1] || \"png\";\n const filename = `image-${cidCounter}.${ext}`;\n \n attachments.push({\n cid,\n filename,\n content: buffer,\n contentType: mimeType,\n });\n \n return `src=${quote}cid:${cid}${quote}`;\n });\n\n // Then strip blob: URIs (replace with empty src to remove the image)\n rewrittenHtml = rewrittenHtml.replace(BLOB_URI_REGEX, 'src=\"\"');\n\n return { html: rewrittenHtml, attachments };\n}\n","/** Create tracking tokens and rewrite a rendered email for one recipient. */\n\nimport { randomUUID } from \"node:crypto\";\nimport { db } from \"./db\";\nimport { buildTrackedHtml } from \"./tracking-html\";\nimport { decodeHtmlEntities, withUtm } from \"./tracking\";\n\nexport interface TrackingContext {\n baseUrl: string;\n campaignId: string;\n recipientId: string;\n trackOpens?: boolean;\n trackClicks?: boolean;\n}\n\nexport async function prepareTrackedHtml(\n html: string,\n ctx: TrackingContext\n): Promise<string> {\n let openToken: string | undefined;\n if (ctx.trackOpens) {\n openToken = randomUUID();\n await db.trackingToken.create({\n data: {\n token: openToken,\n campaignId: ctx.campaignId,\n recipientId: ctx.recipientId,\n kind: \"open\",\n },\n });\n }\n\n let tokenForUrl: ((url: string) => string) | undefined;\n if (ctx.trackClicks) {\n const urls = [\n ...new Set(\n [...html.matchAll(/\\bhref\\s*=\\s*([\"'])(https?:\\/\\/[^\"']+)\\1/gi)]\n .map((match) => match[2])\n .filter((url): url is string => !!url)\n ),\n ];\n const tokens = new Map<string, string>();\n for (const rawUrl of urls) {\n const url = decodeHtmlEntities(rawUrl);\n const token = randomUUID();\n tokens.set(rawUrl, token);\n await db.trackingToken.create({\n data: {\n token,\n campaignId: ctx.campaignId,\n recipientId: ctx.recipientId,\n kind: \"click\",\n url: withUtm(url, ctx.campaignId),\n },\n });\n }\n tokenForUrl = (url) => tokens.get(url) ?? \"\";\n }\n\n return buildTrackedHtml(html, {\n baseUrl: ctx.baseUrl,\n openToken,\n tokenForUrl,\n });\n}\n","/** Rewrite an email's HTML with first-party tracking links and an open pixel. */\n\ninterface TrackOptions {\n baseUrl: string;\n /** Omit when open tracking is disabled. */\n openToken?: string;\n /** Omit when click tracking is disabled. */\n tokenForUrl?: (url: string) => string;\n}\n\nexport function buildTrackedHtml(html: string, opts: TrackOptions): string {\n const tracked = opts.tokenForUrl\n ? html.replace(\n /\\bhref\\s*=\\s*([\"'])(https?:\\/\\/[^\"']+)\\1/gi,\n (_match, quote: string, url: string) => {\n const token = opts.tokenForUrl?.(url) ?? \"\";\n return `href=${quote}${opts.baseUrl}/api/t/${token}${quote}`;\n }\n )\n : html;\n\n if (!opts.openToken) return tracked;\n\n const pixel = `<img src=\"${opts.baseUrl}/api/t/${opts.openToken}\" width=\"1\" height=\"1\" alt=\"\" style=\"display:none\">`;\n if (/<\\/body\\s*>/i.test(tracked)) {\n return tracked.replace(/<\\/body\\s*>/i, `${pixel}</body>`);\n }\n return `${tracked}${pixel}`;\n}\n","/** Pure tracking helpers shared by the send path and the tracking endpoint. */\n\ninterface EventLike {\n recipientId: string;\n campaignId: string;\n kind: string;\n}\n\nexport function hasOpenEvent(\n events: EventLike[],\n recipientId: string,\n campaignId: string\n): boolean {\n return events.some(\n (event) =>\n event.kind === \"open\" &&\n event.recipientId === recipientId &&\n event.campaignId === campaignId\n );\n}\n\n/** Decode the HTML entities email clients put into href attributes. */\nexport function decodeHtmlEntities(value: string): string {\n return value\n .replace(/&amp;/gi, \"&\")\n .replace(/&lt;/gi, \"<\")\n .replace(/&gt;/gi, \">\")\n .replace(/&quot;/gi, '\"')\n .replace(/&#39;|&apos;/gi, \"'\")\n .replace(/&#(\\d+);/g, (_match, code: string) =>\n String.fromCharCode(Number(code))\n );\n}\n\n/** Append UTM parameters to a click destination without dropping its query. */\nexport function withUtm(url: string, campaignId: string): string {\n try {\n const parsed = new URL(url);\n parsed.searchParams.set(\"utm_source\", \"mailcast\");\n parsed.searchParams.set(\"utm_medium\", \"email\");\n parsed.searchParams.set(\"utm_campaign\", campaignId);\n return parsed.toString();\n } catch {\n return url;\n }\n}\n"],"names":["maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","errors","overflow","baseMinusTMin","floor","Math","stringFromCharCode","String","fromCharCode","error","type","RangeError","map","array","callback","result","length","mapDomain","domain","parts","split","replace","labels","encoded","join","ucs2decode","string","output","counter","value","charCodeAt","extra","push","ucs2encode","codePoints","fromCodePoint","basicToDigit","codePoint","digitToBasic","digit","flag","Number","adapt","delta","numPoints","firstTime","k","decode","input","inputLength","i","n","bias","basic","lastIndexOf","j","index","oldi","w","t","baseMinusT","out","splice","encode","currentValue","basicLength","handledCPCount","m","handledCPCountPlusOne","q","qMinusT","toUnicode","test","slice","toLowerCase","toASC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