@geekmidas/constructs 10.0.0-alpha.99 → 10.0.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 (533) hide show
  1. package/CHANGELOG.md +437 -0
  2. package/README.md +193 -285
  3. package/dist/AWSScheduledFunction-BzGCUbkk.d.mts +117 -0
  4. package/dist/AWSScheduledFunction-BzGCUbkk.d.mts.map +1 -0
  5. package/dist/AWSScheduledFunction-C42adp8A.cjs +266 -0
  6. package/dist/AWSScheduledFunction-C42adp8A.cjs.map +1 -0
  7. package/dist/AWSScheduledFunction-CsNJhXQj.d.cts +117 -0
  8. package/dist/AWSScheduledFunction-CsNJhXQj.d.cts.map +1 -0
  9. package/dist/AWSScheduledFunction-KP6lqbsW.mjs +254 -0
  10. package/dist/AWSScheduledFunction-KP6lqbsW.mjs.map +1 -0
  11. package/dist/{Construct-B1vGBPme.mjs → Construct-BWF5HxaM.mjs} +37 -47
  12. package/dist/Construct-BWF5HxaM.mjs.map +1 -0
  13. package/dist/Construct-JlyQkBkv.d.cts +117 -0
  14. package/dist/Construct-JlyQkBkv.d.cts.map +1 -0
  15. package/dist/{Construct-DUSXuTHP.cjs → Construct-TGIM_E4o.cjs} +88 -67
  16. package/dist/Construct-TGIM_E4o.cjs.map +1 -0
  17. package/dist/Construct-pxwC6fDD.d.mts +117 -0
  18. package/dist/Construct-pxwC6fDD.d.mts.map +1 -0
  19. package/dist/{Endpoint-Du-NwPX2.d.mts → Endpoint-B0P_pEMr.d.mts} +85 -126
  20. package/dist/Endpoint-B0P_pEMr.d.mts.map +1 -0
  21. package/dist/{Endpoint-aCvBMPoH.d.cts → Endpoint-BLZ7r67m.d.cts} +84 -125
  22. package/dist/Endpoint-BLZ7r67m.d.cts.map +1 -0
  23. package/dist/{HonoEndpointAdaptor-PtPlbeKY.mjs → HonoEndpointAdaptor-BMVwx2cz.mjs} +69 -81
  24. package/dist/HonoEndpointAdaptor-BMVwx2cz.mjs.map +1 -0
  25. package/dist/{HonoEndpointAdaptor-zVzVLJEO.cjs → HonoEndpointAdaptor-DPDsDi-D.cjs} +77 -92
  26. package/dist/HonoEndpointAdaptor-DPDsDi-D.cjs.map +1 -0
  27. package/dist/Queue-BL68oDJ-.d.mts +66 -0
  28. package/dist/Queue-BL68oDJ-.d.mts.map +1 -0
  29. package/dist/Queue-DxJ6btRE.d.cts +66 -0
  30. package/dist/Queue-DxJ6btRE.d.cts.map +1 -0
  31. package/dist/Subscriber-BpVhcGhX.d.cts +47 -0
  32. package/dist/Subscriber-BpVhcGhX.d.cts.map +1 -0
  33. package/dist/Subscriber-DF6xsBAJ.d.mts +47 -0
  34. package/dist/Subscriber-DF6xsBAJ.d.mts.map +1 -0
  35. package/dist/Topic-DJXoDeMP.d.cts +60 -0
  36. package/dist/Topic-DJXoDeMP.d.cts.map +1 -0
  37. package/dist/Topic-DxWQBgMN.d.mts +60 -0
  38. package/dist/Topic-DxWQBgMN.d.mts.map +1 -0
  39. package/dist/adaptors/aws.cjs +205 -355
  40. package/dist/adaptors/aws.cjs.map +1 -1
  41. package/dist/adaptors/aws.d.cts +48 -126
  42. package/dist/adaptors/aws.d.cts.map +1 -1
  43. package/dist/adaptors/aws.d.mts +49 -127
  44. package/dist/adaptors/aws.d.mts.map +1 -1
  45. package/dist/adaptors/aws.mjs +178 -325
  46. package/dist/adaptors/aws.mjs.map +1 -1
  47. package/dist/adaptors/hono.cjs +9 -3
  48. package/dist/adaptors/hono.d.cts +15 -7
  49. package/dist/adaptors/hono.d.cts.map +1 -1
  50. package/dist/adaptors/hono.d.mts +17 -9
  51. package/dist/adaptors/hono.d.mts.map +1 -1
  52. package/dist/adaptors/hono.mjs +9 -2
  53. package/dist/adaptors/testing.cjs +209 -831
  54. package/dist/adaptors/testing.cjs.map +1 -1
  55. package/dist/adaptors/testing.d.cts +55 -351
  56. package/dist/adaptors/testing.d.cts.map +1 -1
  57. package/dist/adaptors/testing.d.mts +53 -349
  58. package/dist/adaptors/testing.d.mts.map +1 -1
  59. package/dist/adaptors/testing.mjs +195 -798
  60. package/dist/adaptors/testing.mjs.map +1 -1
  61. package/dist/{clone-UGJpvQnL.cjs → clone-I_WIpiFf.cjs} +8 -7
  62. package/dist/clone-I_WIpiFf.cjs.map +1 -0
  63. package/dist/{clone-EKNovYHu.mjs → clone-pdXxc0t3.mjs} +3 -3
  64. package/dist/clone-pdXxc0t3.mjs.map +1 -0
  65. package/dist/crons/index.cjs +66 -190
  66. package/dist/crons/index.cjs.map +1 -1
  67. package/dist/crons/index.d.cts +35 -70
  68. package/dist/crons/index.d.cts.map +1 -1
  69. package/dist/crons/index.d.mts +32 -70
  70. package/dist/crons/index.d.mts.map +1 -1
  71. package/dist/crons/index.mjs +63 -184
  72. package/dist/crons/index.mjs.map +1 -1
  73. package/dist/endpoints/index.cjs +761 -19
  74. package/dist/endpoints/index.cjs.map +1 -0
  75. package/dist/endpoints/index.d.cts +322 -22
  76. package/dist/endpoints/index.d.cts.map +1 -1
  77. package/dist/endpoints/index.d.mts +321 -22
  78. package/dist/endpoints/index.d.mts.map +1 -1
  79. package/dist/endpoints/index.mjs +751 -6
  80. package/dist/endpoints/index.mjs.map +1 -0
  81. package/dist/functions/index.cjs +5 -2
  82. package/dist/functions/index.d.cts +3 -3
  83. package/dist/functions/index.d.mts +3 -3
  84. package/dist/functions/index.mjs +5 -2
  85. package/dist/{functions-BFizikJU.mjs → functions-EqTloHjo.mjs} +331 -425
  86. package/dist/functions-EqTloHjo.mjs.map +1 -0
  87. package/dist/{functions-CfzJG9hK.cjs → functions-SqtCDc9c.cjs} +370 -459
  88. package/dist/functions-SqtCDc9c.cjs.map +1 -0
  89. package/dist/index-C7iynzLI.d.mts +139 -0
  90. package/dist/index-C7iynzLI.d.mts.map +1 -0
  91. package/dist/index-D4dM_WDY.d.cts +142 -0
  92. package/dist/index-D4dM_WDY.d.cts.map +1 -0
  93. package/dist/index.cjs +3 -6
  94. package/dist/index.d.cts +4 -27
  95. package/dist/index.d.mts +4 -27
  96. package/dist/index.mjs +3 -3
  97. package/dist/{Endpoint-BG4UJ9oA.mjs → lazyAccessors-CCTK19xj.mjs} +1040 -914
  98. package/dist/lazyAccessors-CCTK19xj.mjs.map +1 -0
  99. package/dist/{Endpoint-BoUg8ocM.cjs → lazyAccessors-D04oftGw.cjs} +1127 -960
  100. package/dist/lazyAccessors-D04oftGw.cjs.map +1 -0
  101. package/dist/monitors/index.cjs +49 -0
  102. package/dist/monitors/index.cjs.map +1 -0
  103. package/dist/monitors/index.d.cts +45 -0
  104. package/dist/monitors/index.d.cts.map +1 -0
  105. package/dist/monitors/index.d.mts +45 -0
  106. package/dist/monitors/index.d.mts.map +1 -0
  107. package/dist/monitors/index.mjs +48 -0
  108. package/dist/monitors/index.mjs.map +1 -0
  109. package/dist/processAudits-BJZT5gmy.cjs +92 -0
  110. package/dist/processAudits-BJZT5gmy.cjs.map +1 -0
  111. package/dist/processAudits-CwyaaSQc.mjs +80 -0
  112. package/dist/processAudits-CwyaaSQc.mjs.map +1 -0
  113. package/dist/publisher-BZgcrVPy.cjs +53 -0
  114. package/dist/publisher-BZgcrVPy.cjs.map +1 -0
  115. package/dist/publisher-CnpeMv-r.mjs +41 -0
  116. package/dist/publisher-CnpeMv-r.mjs.map +1 -0
  117. package/dist/queue/index.cjs +114 -6
  118. package/dist/queue/index.cjs.map +1 -0
  119. package/dist/queue/index.d.cts +45 -3
  120. package/dist/queue/index.d.cts.map +1 -0
  121. package/dist/queue/index.d.mts +44 -3
  122. package/dist/queue/index.d.mts.map +1 -0
  123. package/dist/queue/index.mjs +112 -3
  124. package/dist/queue/index.mjs.map +1 -0
  125. package/dist/subscribers/index.cjs +80 -111
  126. package/dist/subscribers/index.cjs.map +1 -1
  127. package/dist/subscribers/index.d.cts +43 -46
  128. package/dist/subscribers/index.d.cts.map +1 -1
  129. package/dist/subscribers/index.d.mts +42 -46
  130. package/dist/subscribers/index.d.mts.map +1 -1
  131. package/dist/subscribers/index.mjs +78 -108
  132. package/dist/subscribers/index.mjs.map +1 -1
  133. package/dist/{lambdaTelemetry-8vnmVZQ5.d.cts → telemetry-C--EgYVr.d.mts} +7 -4
  134. package/dist/telemetry-C--EgYVr.d.mts.map +1 -0
  135. package/dist/{lambdaTelemetry-8vnmVZQ5.d.mts → telemetry-Dqx-D3F7.d.cts} +7 -4
  136. package/dist/telemetry-Dqx-D3F7.d.cts.map +1 -0
  137. package/dist/topic/index.cjs +91 -3
  138. package/dist/topic/index.cjs.map +1 -0
  139. package/dist/topic/index.d.cts +32 -2
  140. package/dist/topic/index.d.cts.map +1 -0
  141. package/dist/topic/index.d.mts +32 -2
  142. package/dist/topic/index.d.mts.map +1 -0
  143. package/dist/topic/index.mjs +89 -2
  144. package/dist/topic/index.mjs.map +1 -0
  145. package/dist/{types-DMuSQeLL.d.cts → types-BdAaYDvd.d.cts} +5 -3
  146. package/dist/types-BdAaYDvd.d.cts.map +1 -0
  147. package/dist/{types-DMuSQeLL.d.mts → types-DNngH0fX.d.mts} +5 -3
  148. package/dist/types-DNngH0fX.d.mts.map +1 -0
  149. package/dist/types.d.cts +1 -1
  150. package/dist/types.d.mts +1 -1
  151. package/dist/types.mjs +0 -1
  152. package/package.json +55 -223
  153. package/src/Construct.ts +209 -0
  154. package/src/__benchmarks__/build-time-optimization.bench.ts +274 -0
  155. package/src/__benchmarks__/endpoint.bench.ts +494 -0
  156. package/src/__benchmarks__/fixtures.ts +241 -0
  157. package/src/__benchmarks__/hono-adaptor.bench.ts +533 -0
  158. package/src/__benchmarks__/hono-server.bench.ts +249 -0
  159. package/src/__benchmarks__/response-builder.bench.ts +428 -0
  160. package/src/__benchmarks__/strategies/strategy-a-lazy-services.ts +319 -0
  161. package/src/__benchmarks__/strategies/strategy-c-middleware.ts +530 -0
  162. package/src/__benchmarks__/strategies/strategy-d-opt-in-events.ts +567 -0
  163. package/src/__tests__/Construct.environment.spec.ts +704 -0
  164. package/src/__tests__/builder-reuse.spec.ts +587 -0
  165. package/src/__tests__/monitor.spec.ts +636 -0
  166. package/src/__tests__/publisher.setting.spec.ts +508 -0
  167. package/src/__tests__/publisher.spec.ts +452 -0
  168. package/src/adaptors/aws.ts +6 -0
  169. package/src/adaptors/hono.ts +1 -0
  170. package/src/adaptors/testing.ts +11 -0
  171. package/src/clone.ts +38 -0
  172. package/src/crons/AWSScheduledFunction.ts +73 -0
  173. package/src/crons/Cron.ts +149 -0
  174. package/src/crons/CronBuilder.ts +261 -0
  175. package/src/crons/__tests__/AWSScheduledFunction.spec.ts +152 -0
  176. package/src/crons/__tests__/Cron.spec.ts +472 -0
  177. package/src/crons/__tests__/CronBuilder.state-isolation.spec.ts +273 -0
  178. package/src/crons/index.ts +12 -0
  179. package/src/endpoints/AmazonApiGatewayEndpointAdaptor.ts +698 -0
  180. package/src/endpoints/AmazonApiGatewayV1EndpointAdaptor.ts +105 -0
  181. package/src/endpoints/AmazonApiGatewayV2EndpointAdaptor.ts +97 -0
  182. package/src/endpoints/Authorizer.ts +152 -0
  183. package/src/endpoints/Endpoint.ts +1287 -0
  184. package/src/endpoints/EndpointBuilder.ts +749 -0
  185. package/src/endpoints/EndpointFactory.ts +1179 -0
  186. package/src/endpoints/HonoEndpointAdaptor.ts +692 -0
  187. package/src/endpoints/MswEndpointAdaptor.ts +226 -0
  188. package/src/endpoints/TestEndpointAdaptor.ts +466 -0
  189. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.audits.spec.ts +499 -0
  190. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.events.spec.ts +560 -0
  191. package/src/endpoints/__tests__/AmazonApiGatewayV1EndpointAdaptor.spec.ts +1304 -0
  192. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.audits.spec.ts +626 -0
  193. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.events.spec.ts +732 -0
  194. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.factory-publisher.spec.ts +296 -0
  195. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.kysely-audit.integration.spec.ts +951 -0
  196. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.responseType.spec.ts +111 -0
  197. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.rls.spec.ts +307 -0
  198. package/src/endpoints/__tests__/AmazonApiGatewayV2EndpointAdaptor.spec.ts +629 -0
  199. package/src/endpoints/__tests__/Authorizer.spec.ts +286 -0
  200. package/src/endpoints/__tests__/Endpoint.cookies.spec.ts +207 -0
  201. package/src/endpoints/__tests__/Endpoint.headers.spec.ts +187 -0
  202. package/src/endpoints/__tests__/Endpoint.manifest.spec.ts +175 -0
  203. package/src/endpoints/__tests__/Endpoint.spec.ts +857 -0
  204. package/src/endpoints/__tests__/EndpointBuilder.audit.spec.ts +451 -0
  205. package/src/endpoints/__tests__/EndpointBuilder.responseType.spec.ts +50 -0
  206. package/src/endpoints/__tests__/EndpointBuilder.spec.ts +531 -0
  207. package/src/endpoints/__tests__/EndpointFactory.authorizers.spec.ts +492 -0
  208. package/src/endpoints/__tests__/EndpointFactory.database-auditor.spec.ts +509 -0
  209. package/src/endpoints/__tests__/EndpointFactory.reference-audit.spec.ts +190 -0
  210. package/src/endpoints/__tests__/EndpointFactory.spec.ts +479 -0
  211. package/src/endpoints/__tests__/EndpointFactory.state-isolation.spec.ts +155 -0
  212. package/src/endpoints/__tests__/HonoEndpointAdaptor.audit-transactions.spec.ts +703 -0
  213. package/src/endpoints/__tests__/HonoEndpointAdaptor.audits.spec.ts +632 -0
  214. package/src/endpoints/__tests__/HonoEndpointAdaptor.events.spec.ts +577 -0
  215. package/src/endpoints/__tests__/HonoEndpointAdaptor.kysely-audit.integration.spec.ts +1067 -0
  216. package/src/endpoints/__tests__/HonoEndpointAdaptor.openapi.spec.ts +317 -0
  217. package/src/endpoints/__tests__/HonoEndpointAdaptor.pgboss-publisher.spec.ts +289 -0
  218. package/src/endpoints/__tests__/HonoEndpointAdaptor.responseType.spec.ts +128 -0
  219. package/src/endpoints/__tests__/HonoEndpointAdaptor.spec.ts +1207 -0
  220. package/src/endpoints/__tests__/MswEndpointAdaptor.spec.ts +211 -0
  221. package/src/endpoints/__tests__/ResponseBuilder.spec.ts +235 -0
  222. package/src/endpoints/__tests__/TestEndpointAdaptor.audits.spec.ts +602 -0
  223. package/src/endpoints/__tests__/TestEndpointAdaptor.spec.ts +1044 -0
  224. package/src/endpoints/__tests__/__snapshots__/HonoEndpointAdaptor.spec.ts.snap +54 -0
  225. package/src/endpoints/__tests__/endpoint-types.test.ts +88 -0
  226. package/src/endpoints/__tests__/helpers.spec.ts +37 -0
  227. package/src/endpoints/__tests__/lazyAccessors.spec.ts +330 -0
  228. package/src/endpoints/__tests__/processAudits.spec.ts +631 -0
  229. package/src/endpoints/audit.ts +87 -0
  230. package/src/endpoints/helpers.ts +98 -0
  231. package/src/endpoints/index.ts +42 -0
  232. package/src/endpoints/lazyAccessors.ts +241 -0
  233. package/src/endpoints/parseHonoQuery.ts +16 -0
  234. package/src/endpoints/parseQueryParams.ts +32 -0
  235. package/src/endpoints/processAudits.ts +371 -0
  236. package/src/endpoints/rls.ts +67 -0
  237. package/src/functions/AWSLambdaFunction.ts +374 -0
  238. package/src/functions/BaseFunctionBuilder.ts +212 -0
  239. package/src/functions/Function.ts +238 -0
  240. package/src/functions/FunctionBuilder.ts +381 -0
  241. package/src/functions/FunctionExecutionWrapper.ts +216 -0
  242. package/src/functions/TestFunctionAdaptor.ts +252 -0
  243. package/src/functions/__tests__/AWSLambdaFunctionAdaptor.spec.ts +513 -0
  244. package/src/functions/__tests__/Function.audits.spec.ts +393 -0
  245. package/src/functions/__tests__/Function.spec.ts +477 -0
  246. package/src/functions/__tests__/FunctionBuilder.state-isolation.spec.ts +250 -0
  247. package/src/functions/__tests__/TestFunctionAdaptor.spec.ts +480 -0
  248. package/src/functions/index.ts +12 -0
  249. package/src/index.ts +29 -0
  250. package/src/monitor.ts +145 -0
  251. package/src/monitors/heartbeat.ts +86 -0
  252. package/src/monitors/index.ts +6 -0
  253. package/src/publisher.ts +93 -0
  254. package/src/queue/AWSLambdaQueueAdaptor.ts +162 -0
  255. package/src/queue/Queue.ts +128 -0
  256. package/src/queue/QueueBuilder.ts +115 -0
  257. package/src/queue/TestQueueAdaptor.ts +63 -0
  258. package/src/queue/__tests__/QueueBuilder.spec.ts +137 -0
  259. package/src/queue/index.ts +12 -0
  260. package/src/subscribers/AWSLambdaSubscriberAdaptor.ts +342 -0
  261. package/src/subscribers/Subscriber.ts +117 -0
  262. package/src/subscribers/SubscriberBuilder.ts +183 -0
  263. package/src/subscribers/TestSubscriberAdaptor.ts +133 -0
  264. package/src/subscribers/__tests__/AWSLambdaSubscriberAdaptor.spec.ts +1018 -0
  265. package/src/subscribers/__tests__/Subscriber.spec.ts +430 -0
  266. package/src/subscribers/__tests__/TestSubscriberAdaptor.spec.ts +652 -0
  267. package/src/subscribers/index.ts +6 -0
  268. package/src/telemetry.ts +103 -0
  269. package/src/topic/Topic.ts +103 -0
  270. package/src/topic/TopicBuilder.ts +53 -0
  271. package/src/topic/__tests__/TopicBuilder.spec.ts +82 -0
  272. package/src/topic/index.ts +11 -0
  273. package/src/types.ts +13 -0
  274. package/test.ts +91 -0
  275. package/tsconfig.json +9 -0
  276. package/tsdown.config.ts +35 -0
  277. package/dist/Construct-B1vGBPme.mjs.map +0 -1
  278. package/dist/Construct-BQALFCh2.d.cts +0 -230
  279. package/dist/Construct-BQALFCh2.d.cts.map +0 -1
  280. package/dist/Construct-DUSXuTHP.cjs.map +0 -1
  281. package/dist/Construct-QXnl3VqT.d.mts +0 -230
  282. package/dist/Construct-QXnl3VqT.d.mts.map +0 -1
  283. package/dist/Cron-DI3nKoic.d.cts +0 -45
  284. package/dist/Cron-DI3nKoic.d.cts.map +0 -1
  285. package/dist/Cron-uYAHPnp7.d.mts +0 -45
  286. package/dist/Cron-uYAHPnp7.d.mts.map +0 -1
  287. package/dist/CronBuilder-C0Ek1-RA.cjs +0 -121
  288. package/dist/CronBuilder-C0Ek1-RA.cjs.map +0 -1
  289. package/dist/CronBuilder-DaSUm2Na.d.mts +0 -47
  290. package/dist/CronBuilder-DaSUm2Na.d.mts.map +0 -1
  291. package/dist/CronBuilder-Dmix_Pen.mjs +0 -109
  292. package/dist/CronBuilder-Dmix_Pen.mjs.map +0 -1
  293. package/dist/CronBuilder-g1lZLWyG.d.cts +0 -47
  294. package/dist/CronBuilder-g1lZLWyG.d.cts.map +0 -1
  295. package/dist/Endpoint-BG4UJ9oA.mjs.map +0 -1
  296. package/dist/Endpoint-BoUg8ocM.cjs.map +0 -1
  297. package/dist/Endpoint-Du-NwPX2.d.mts.map +0 -1
  298. package/dist/Endpoint-aCvBMPoH.d.cts.map +0 -1
  299. package/dist/EndpointFactory-BDtsrEvJ.mjs +0 -791
  300. package/dist/EndpointFactory-BDtsrEvJ.mjs.map +0 -1
  301. package/dist/EndpointFactory-DJ7gXLpR.cjs +0 -833
  302. package/dist/EndpointFactory-DJ7gXLpR.cjs.map +0 -1
  303. package/dist/EndpointFactory-DMYdJCOj.d.mts +0 -363
  304. package/dist/EndpointFactory-DMYdJCOj.d.mts.map +0 -1
  305. package/dist/EndpointFactory-I7s1co3Y.d.cts +0 -363
  306. package/dist/EndpointFactory-I7s1co3Y.d.cts.map +0 -1
  307. package/dist/Function-DuqGcbOI.d.mts +0 -76
  308. package/dist/Function-DuqGcbOI.d.mts.map +0 -1
  309. package/dist/Function-Pu-1kKZz.d.cts +0 -76
  310. package/dist/Function-Pu-1kKZz.d.cts.map +0 -1
  311. package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +0 -1
  312. package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +0 -1
  313. package/dist/Queue-A3wfD0it.cjs +0 -109
  314. package/dist/Queue-A3wfD0it.cjs.map +0 -1
  315. package/dist/Queue-D6USGS4q.mjs +0 -104
  316. package/dist/Queue-D6USGS4q.mjs.map +0 -1
  317. package/dist/Queue-DlsHRzUp.d.mts +0 -105
  318. package/dist/Queue-DlsHRzUp.d.mts.map +0 -1
  319. package/dist/Queue-HPyi0e1i.d.cts +0 -105
  320. package/dist/Queue-HPyi0e1i.d.cts.map +0 -1
  321. package/dist/QueueBuilder-BjuF0UBl.cjs +0 -135
  322. package/dist/QueueBuilder-BjuF0UBl.cjs.map +0 -1
  323. package/dist/QueueBuilder-Cue73M4t.mjs +0 -118
  324. package/dist/QueueBuilder-Cue73M4t.mjs.map +0 -1
  325. package/dist/QueueBuilder-OSi6LkV9.d.cts +0 -75
  326. package/dist/QueueBuilder-OSi6LkV9.d.cts.map +0 -1
  327. package/dist/QueueBuilder-QHsnVt1P.d.mts +0 -75
  328. package/dist/QueueBuilder-QHsnVt1P.d.mts.map +0 -1
  329. package/dist/Subscriber-Bpp02cGr.d.cts +0 -61
  330. package/dist/Subscriber-Bpp02cGr.d.cts.map +0 -1
  331. package/dist/Subscriber-CtN9R48-.d.mts +0 -61
  332. package/dist/Subscriber-CtN9R48-.d.mts.map +0 -1
  333. package/dist/SubscriberBuilder-CDy4nHCz.mjs +0 -134
  334. package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +0 -1
  335. package/dist/SubscriberBuilder-CuCMFpYW.d.mts +0 -67
  336. package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +0 -1
  337. package/dist/SubscriberBuilder-D_owVoHo.cjs +0 -145
  338. package/dist/SubscriberBuilder-D_owVoHo.cjs.map +0 -1
  339. package/dist/SubscriberBuilder-g3fAVWgs.d.cts +0 -67
  340. package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +0 -1
  341. package/dist/Topic-D74b5cgs.mjs +0 -99
  342. package/dist/Topic-D74b5cgs.mjs.map +0 -1
  343. package/dist/Topic-GHxcU8AG.cjs +0 -104
  344. package/dist/Topic-GHxcU8AG.cjs.map +0 -1
  345. package/dist/auth-BMCJN30Y.d.cts +0 -268
  346. package/dist/auth-BMCJN30Y.d.cts.map +0 -1
  347. package/dist/auth-CcuceLYo.d.mts +0 -268
  348. package/dist/auth-CcuceLYo.d.mts.map +0 -1
  349. package/dist/auth.cjs +0 -433
  350. package/dist/auth.cjs.map +0 -1
  351. package/dist/auth.d.cts +0 -2
  352. package/dist/auth.d.mts +0 -2
  353. package/dist/auth.mjs +0 -426
  354. package/dist/auth.mjs.map +0 -1
  355. package/dist/cache-CXh6GIgb.d.mts +0 -44
  356. package/dist/cache-CXh6GIgb.d.mts.map +0 -1
  357. package/dist/cache-DnGDGly3.d.cts +0 -44
  358. package/dist/cache-DnGDGly3.d.cts.map +0 -1
  359. package/dist/cache.cjs +0 -69
  360. package/dist/cache.cjs.map +0 -1
  361. package/dist/cache.d.cts +0 -2
  362. package/dist/cache.d.mts +0 -2
  363. package/dist/cache.mjs +0 -68
  364. package/dist/cache.mjs.map +0 -1
  365. package/dist/cipher-C1lEFX63.mjs +0 -225
  366. package/dist/cipher-C1lEFX63.mjs.map +0 -1
  367. package/dist/cipher-CVxfwLjk.cjs +0 -332
  368. package/dist/cipher-CVxfwLjk.cjs.map +0 -1
  369. package/dist/clone-EKNovYHu.mjs.map +0 -1
  370. package/dist/clone-UGJpvQnL.cjs.map +0 -1
  371. package/dist/construct-interface-B1AfqRl4.d.cts +0 -162
  372. package/dist/construct-interface-B1AfqRl4.d.cts.map +0 -1
  373. package/dist/construct-interface-DluK3_da.d.mts +0 -162
  374. package/dist/construct-interface-DluK3_da.d.mts.map +0 -1
  375. package/dist/construct-interface.cjs +0 -114
  376. package/dist/construct-interface.cjs.map +0 -1
  377. package/dist/construct-interface.d.cts +0 -2
  378. package/dist/construct-interface.d.mts +0 -2
  379. package/dist/construct-interface.mjs +0 -107
  380. package/dist/construct-interface.mjs.map +0 -1
  381. package/dist/credential.cjs +0 -156
  382. package/dist/credential.cjs.map +0 -1
  383. package/dist/credential.d.cts +0 -86
  384. package/dist/credential.d.cts.map +0 -1
  385. package/dist/credential.d.mts +0 -86
  386. package/dist/credential.d.mts.map +0 -1
  387. package/dist/credential.mjs +0 -152
  388. package/dist/credential.mjs.map +0 -1
  389. package/dist/database/kysely.cjs +0 -4
  390. package/dist/database/kysely.d.cts +0 -2
  391. package/dist/database/kysely.d.mts +0 -2
  392. package/dist/database/kysely.mjs +0 -2
  393. package/dist/email.cjs +0 -72
  394. package/dist/email.cjs.map +0 -1
  395. package/dist/email.d.cts +0 -46
  396. package/dist/email.d.cts.map +0 -1
  397. package/dist/email.d.mts +0 -46
  398. package/dist/email.d.mts.map +0 -1
  399. package/dist/email.mjs +0 -71
  400. package/dist/email.mjs.map +0 -1
  401. package/dist/encryption.cjs +0 -96
  402. package/dist/encryption.cjs.map +0 -1
  403. package/dist/encryption.d.cts +0 -117
  404. package/dist/encryption.d.cts.map +0 -1
  405. package/dist/encryption.d.mts +0 -117
  406. package/dist/encryption.d.mts.map +0 -1
  407. package/dist/encryption.mjs +0 -83
  408. package/dist/encryption.mjs.map +0 -1
  409. package/dist/external-api-MJ8id87V.d.mts +0 -105
  410. package/dist/external-api-MJ8id87V.d.mts.map +0 -1
  411. package/dist/external-api-O107yzZJ.d.cts +0 -105
  412. package/dist/external-api-O107yzZJ.d.cts.map +0 -1
  413. package/dist/external-api.cjs +0 -142
  414. package/dist/external-api.cjs.map +0 -1
  415. package/dist/external-api.d.cts +0 -2
  416. package/dist/external-api.d.mts +0 -2
  417. package/dist/external-api.mjs +0 -139
  418. package/dist/external-api.mjs.map +0 -1
  419. package/dist/file-server.cjs +0 -186
  420. package/dist/file-server.cjs.map +0 -1
  421. package/dist/file-server.d.cts +0 -152
  422. package/dist/file-server.d.cts.map +0 -1
  423. package/dist/file-server.d.mts +0 -152
  424. package/dist/file-server.d.mts.map +0 -1
  425. package/dist/file-server.mjs +0 -184
  426. package/dist/file-server.mjs.map +0 -1
  427. package/dist/functions-BFizikJU.mjs.map +0 -1
  428. package/dist/functions-CfzJG9hK.cjs.map +0 -1
  429. package/dist/index-BuzRvKOQ.d.cts +0 -115
  430. package/dist/index-BuzRvKOQ.d.cts.map +0 -1
  431. package/dist/index-CTkKOer4.d.mts +0 -115
  432. package/dist/index-CTkKOer4.d.mts.map +0 -1
  433. package/dist/index-CeEtxDmK.d.cts +0 -79
  434. package/dist/index-CeEtxDmK.d.cts.map +0 -1
  435. package/dist/index-CeEtxDmK.d.mts +0 -79
  436. package/dist/index-CeEtxDmK.d.mts.map +0 -1
  437. package/dist/index.d.cts.map +0 -1
  438. package/dist/index.d.mts.map +0 -1
  439. package/dist/kms-B-Hm3d5r.cjs +0 -85
  440. package/dist/kms-B-Hm3d5r.cjs.map +0 -1
  441. package/dist/kms-BdUlMJEZ.mjs +0 -85
  442. package/dist/kms-BdUlMJEZ.mjs.map +0 -1
  443. package/dist/kysely-Bii4l6eP.mjs +0 -370
  444. package/dist/kysely-Bii4l6eP.mjs.map +0 -1
  445. package/dist/kysely-CO_Dk43W.cjs +0 -383
  446. package/dist/kysely-CO_Dk43W.cjs.map +0 -1
  447. package/dist/kysely-D0bpzgPs.d.cts +0 -175
  448. package/dist/kysely-D0bpzgPs.d.cts.map +0 -1
  449. package/dist/kysely-DUqC3Ie0.d.mts +0 -175
  450. package/dist/kysely-DUqC3Ie0.d.mts.map +0 -1
  451. package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +0 -1
  452. package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +0 -1
  453. package/dist/lazyAccessors-CFanua0O.mjs +0 -174
  454. package/dist/lazyAccessors-CFanua0O.mjs.map +0 -1
  455. package/dist/lazyAccessors-hJKGv8Ay.cjs +0 -221
  456. package/dist/lazyAccessors-hJKGv8Ay.cjs.map +0 -1
  457. package/dist/mobile-app.cjs +0 -73
  458. package/dist/mobile-app.cjs.map +0 -1
  459. package/dist/mobile-app.d.cts +0 -61
  460. package/dist/mobile-app.d.cts.map +0 -1
  461. package/dist/mobile-app.d.mts +0 -61
  462. package/dist/mobile-app.d.mts.map +0 -1
  463. package/dist/mobile-app.mjs +0 -72
  464. package/dist/mobile-app.mjs.map +0 -1
  465. package/dist/object-storage.cjs +0 -56
  466. package/dist/object-storage.cjs.map +0 -1
  467. package/dist/object-storage.d.cts +0 -32
  468. package/dist/object-storage.d.cts.map +0 -1
  469. package/dist/object-storage.d.mts +0 -32
  470. package/dist/object-storage.d.mts.map +0 -1
  471. package/dist/object-storage.mjs +0 -55
  472. package/dist/object-storage.mjs.map +0 -1
  473. package/dist/processAudits-BRRVVHUB.mjs +0 -131
  474. package/dist/processAudits-BRRVVHUB.mjs.map +0 -1
  475. package/dist/processAudits-DasOZjPl.cjs +0 -154
  476. package/dist/processAudits-DasOZjPl.cjs.map +0 -1
  477. package/dist/rest-api.cjs +0 -216
  478. package/dist/rest-api.cjs.map +0 -1
  479. package/dist/rest-api.d.cts +0 -241
  480. package/dist/rest-api.d.cts.map +0 -1
  481. package/dist/rest-api.d.mts +0 -241
  482. package/dist/rest-api.d.mts.map +0 -1
  483. package/dist/rest-api.mjs +0 -215
  484. package/dist/rest-api.mjs.map +0 -1
  485. package/dist/rolldown-runtime-y5ARvAq5.cjs +0 -35
  486. package/dist/runSubscriber-BHvJ8POr.mjs +0 -109
  487. package/dist/runSubscriber-BHvJ8POr.mjs.map +0 -1
  488. package/dist/runSubscriber-D8nLXIv1.cjs +0 -126
  489. package/dist/runSubscriber-D8nLXIv1.cjs.map +0 -1
  490. package/dist/shutdown-BMJmAhSt.cjs +0 -38
  491. package/dist/shutdown-BMJmAhSt.cjs.map +0 -1
  492. package/dist/shutdown-C7xa8x9S.mjs +0 -27
  493. package/dist/shutdown-C7xa8x9S.mjs.map +0 -1
  494. package/dist/site.cjs +0 -74
  495. package/dist/site.cjs.map +0 -1
  496. package/dist/site.d.cts +0 -104
  497. package/dist/site.d.cts.map +0 -1
  498. package/dist/site.d.mts +0 -104
  499. package/dist/site.d.mts.map +0 -1
  500. package/dist/site.mjs +0 -73
  501. package/dist/site.mjs.map +0 -1
  502. package/dist/stages-BSCF19o2.d.cts +0 -56
  503. package/dist/stages-BSCF19o2.d.cts.map +0 -1
  504. package/dist/stages-BSCF19o2.d.mts +0 -56
  505. package/dist/stages-BSCF19o2.d.mts.map +0 -1
  506. package/dist/surfaceEnv-CNimK76p.cjs +0 -56
  507. package/dist/surfaceEnv-CNimK76p.cjs.map +0 -1
  508. package/dist/surfaceEnv-wMT5QzgZ.mjs +0 -45
  509. package/dist/surfaceEnv-wMT5QzgZ.mjs.map +0 -1
  510. package/dist/telemetry-B48RLjyk.d.cts +0 -40
  511. package/dist/telemetry-B48RLjyk.d.cts.map +0 -1
  512. package/dist/telemetry-DRtT1_0A.d.mts +0 -40
  513. package/dist/telemetry-DRtT1_0A.d.mts.map +0 -1
  514. package/dist/telemetry.cjs +0 -56
  515. package/dist/telemetry.cjs.map +0 -1
  516. package/dist/telemetry.d.cts +0 -2
  517. package/dist/telemetry.d.mts +0 -2
  518. package/dist/telemetry.mjs +0 -55
  519. package/dist/telemetry.mjs.map +0 -1
  520. package/dist/tracing-CxaZ98IB.mjs +0 -110
  521. package/dist/tracing-CxaZ98IB.mjs.map +0 -1
  522. package/dist/tracing-DPMidF_r.cjs +0 -127
  523. package/dist/tracing-DPMidF_r.cjs.map +0 -1
  524. package/dist/types-DMuSQeLL.d.cts.map +0 -1
  525. package/dist/types-DMuSQeLL.d.mts.map +0 -1
  526. package/dist/worker.cjs +0 -191
  527. package/dist/worker.cjs.map +0 -1
  528. package/dist/worker.d.cts +0 -171
  529. package/dist/worker.d.cts.map +0 -1
  530. package/dist/worker.d.mts +0 -171
  531. package/dist/worker.d.mts.map +0 -1
  532. package/dist/worker.mjs +0 -190
  533. package/dist/worker.mjs.map +0 -1
@@ -1,12 +1,87 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-y5ARvAq5.cjs");
2
- const require_Construct = require("./Construct-DUSXuTHP.cjs");
3
- const require_construct_interface = require("./construct-interface.cjs");
4
- const require_clone = require("./clone-UGJpvQnL.cjs");
5
- let _geekmidas_schema_parser = require("@geekmidas/schema/parser");
6
- let _geekmidas_logger_console = require("@geekmidas/logger/console");
7
- let _geekmidas_errors = require("@geekmidas/errors");
1
+ const require_Construct = require('./Construct-TGIM_E4o.cjs');
2
+ const require_clone = require('./clone-I_WIpiFf.cjs');
3
+ const __geekmidas_errors = require_Construct.__toESM(require("@geekmidas/errors"));
4
+ const __geekmidas_logger_console = require_Construct.__toESM(require("@geekmidas/logger/console"));
5
+ const __geekmidas_schema_parser = require_Construct.__toESM(require("@geekmidas/schema/parser"));
6
+
7
+ //#region src/monitor.ts
8
+ /**
9
+ * Add a monitor to a construct's list, refusing one that is already there.
10
+ *
11
+ * Services are cached by name, so two monitors with one name would silently
12
+ * share an instance: two heartbeats reading `HEARTBEAT_URL` would both ping
13
+ * whichever was registered first, and the other provider would never hear
14
+ * from the construct.
15
+ */
16
+ function addMonitor(monitors, monitor) {
17
+ if (monitors.some((m) => m.serviceName === monitor.serviceName)) throw new Error(`Monitor "${monitor.serviceName}" is already set on this construct. Two heartbeats reading the same env var would share one URL; give one its own, e.g. heartbeat.healthchecks('HEALTHCHECKS_HEARTBEAT_URL').`);
18
+ return [...monitors, monitor];
19
+ }
20
+ const NOOP_RUN = {
21
+ async success() {},
22
+ async failure() {},
23
+ async settle() {}
24
+ };
25
+ /**
26
+ * Start a construct's monitors for one run.
27
+ *
28
+ * Never throws: a monitor that fails to register, start or report is logged,
29
+ * and the run goes on without it.
30
+ */
31
+ async function startMonitors(construct, serviceDiscovery, logger) {
32
+ if (!construct.monitors.length) return NOOP_RUN;
33
+ const ctx = {
34
+ type: construct.type,
35
+ logger
36
+ };
37
+ let started;
38
+ try {
39
+ const registered = await serviceDiscovery.register([...construct.monitors]);
40
+ started = await Promise.all(construct.monitors.map(async ({ serviceName }) => {
41
+ const monitor = registered[serviceName];
42
+ let run$1;
43
+ try {
44
+ run$1 = await monitor.start?.(ctx);
45
+ } catch (error) {
46
+ logger.warn({
47
+ error,
48
+ monitor: serviceName
49
+ }, "Monitor failed to start");
50
+ }
51
+ return {
52
+ monitor,
53
+ run: run$1
54
+ };
55
+ }));
56
+ } catch (error) {
57
+ logger.warn({ error }, "Monitors could not be registered");
58
+ return NOOP_RUN;
59
+ }
60
+ const report = async (call) => {
61
+ const results = await Promise.allSettled(started.map(({ monitor, run: run$1 }) => call(monitor, run$1)));
62
+ for (const result of results) if (result.status === "rejected") logger.warn({ error: result.reason }, "Monitor failed to report");
63
+ };
64
+ const run = {
65
+ success: (output, status) => report((monitor, r) => monitor.success({
66
+ ...ctx,
67
+ run: r,
68
+ output,
69
+ status
70
+ })),
71
+ failure: (error, status) => report((monitor, r) => monitor.failure({
72
+ ...ctx,
73
+ run: r,
74
+ error,
75
+ status
76
+ })),
77
+ settle: (status, error) => status >= 500 ? run.failure(error ?? new Error(`Responded with ${status}`), status) : run.success(void 0, status)
78
+ };
79
+ return run;
80
+ }
81
+
82
+ //#endregion
8
83
  //#region ../../node_modules/.pnpm/lodash.uniqby@4.7.0/node_modules/lodash.uniqby/index.js
9
- var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
84
+ var require_lodash$1 = require_Construct.__commonJS({ "../../node_modules/.pnpm/lodash.uniqby@4.7.0/node_modules/lodash.uniqby/index.js"(exports, module) {
10
85
  /**
11
86
  * lodash (Custom Build) <https://lodash.com/>
12
87
  * Build: `lodash modularize exports="npm" -o ./`
@@ -18,75 +93,47 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
18
93
  /** Used as the size to enable large array optimizations. */
19
94
  var LARGE_ARRAY_SIZE = 200;
20
95
  /** Used as the `TypeError` message for "Functions" methods. */
21
- var FUNC_ERROR_TEXT = "Expected a function";
96
+ var FUNC_ERROR_TEXT$1 = "Expected a function";
22
97
  /** Used to stand-in for `undefined` hash values. */
23
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
98
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
24
99
  /** Used to compose bitmasks for comparison styles. */
25
- var UNORDERED_COMPARE_FLAG = 1;
26
- var PARTIAL_COMPARE_FLAG = 2;
100
+ var UNORDERED_COMPARE_FLAG = 1, PARTIAL_COMPARE_FLAG = 2;
27
101
  /** Used as references for various `Number` constants. */
28
- var INFINITY = 1 / 0;
29
- var MAX_SAFE_INTEGER = 9007199254740991;
102
+ var INFINITY$1 = Infinity, MAX_SAFE_INTEGER = 9007199254740991;
30
103
  /** `Object#toString` result references. */
31
- var argsTag = "[object Arguments]";
32
- var arrayTag = "[object Array]";
33
- var boolTag = "[object Boolean]";
34
- var dateTag = "[object Date]";
35
- var errorTag = "[object Error]";
36
- var funcTag = "[object Function]";
37
- var genTag = "[object GeneratorFunction]";
38
- var mapTag = "[object Map]";
39
- var numberTag = "[object Number]";
40
- var objectTag = "[object Object]";
41
- var promiseTag = "[object Promise]";
42
- var regexpTag = "[object RegExp]";
43
- var setTag = "[object Set]";
44
- var stringTag = "[object String]";
45
- var symbolTag = "[object Symbol]";
46
- var weakMapTag = "[object WeakMap]";
47
- var arrayBufferTag = "[object ArrayBuffer]";
48
- var dataViewTag = "[object DataView]";
49
- var float32Tag = "[object Float32Array]";
50
- var float64Tag = "[object Float64Array]";
51
- var int8Tag = "[object Int8Array]";
52
- var int16Tag = "[object Int16Array]";
53
- var int32Tag = "[object Int32Array]";
54
- var uint8Tag = "[object Uint8Array]";
55
- var uint8ClampedTag = "[object Uint8ClampedArray]";
56
- var uint16Tag = "[object Uint16Array]";
57
- var uint32Tag = "[object Uint32Array]";
104
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag$1 = "[object Function]", genTag$1 = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", promiseTag = "[object Promise]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
105
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
58
106
  /** Used to match property names within property paths. */
59
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
60
- var reIsPlainProp = /^\w*$/;
61
- var reLeadingDot = /^\./;
62
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
107
+ var reIsDeepProp$1 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp$1 = /^\w*$/, reLeadingDot$1 = /^\./, rePropName$1 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
63
108
  /**
64
109
  * Used to match `RegExp`
65
110
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
66
111
  */
67
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
112
+ var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g;
68
113
  /** Used to match backslashes in property paths. */
69
- var reEscapeChar = /\\(\\)?/g;
114
+ var reEscapeChar$1 = /\\(\\)?/g;
70
115
  /** Used to detect host constructors (Safari). */
71
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
116
+ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
72
117
  /** Used to detect unsigned integer values. */
73
118
  var reIsUint = /^(?:0|[1-9]\d*)$/;
74
119
  /** Used to identify `toStringTag` values of typed arrays. */
75
120
  var typedArrayTags = {};
76
121
  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
77
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
122
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
78
123
  /** Detect free variable `global` from Node.js. */
79
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
124
+ var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
80
125
  /** Detect free variable `self`. */
81
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
126
+ var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
82
127
  /** Used as a reference to the global object. */
83
- var root = freeGlobal || freeSelf || Function("return this")();
128
+ var root$1 = freeGlobal$1 || freeSelf$1 || Function("return this")();
84
129
  /** Detect free variable `exports`. */
85
130
  var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
86
131
  /** Detect free variable `module`. */
87
132
  var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
133
+ /** Detect the popular CommonJS extension `module.exports`. */
134
+ var moduleExports = freeModule && freeModule.exports === freeExports;
88
135
  /** Detect free variable `process` from Node.js. */
89
- var freeProcess = freeModule && freeModule.exports === freeExports && freeGlobal.process;
136
+ var freeProcess = moduleExports && freeGlobal$1.process;
90
137
  /** Used to access faster Node.js helpers. */
91
138
  var nodeUtil = function() {
92
139
  try {
@@ -104,7 +151,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
104
151
  * @returns {boolean} Returns `true` if `target` is found, else `false`.
105
152
  */
106
153
  function arrayIncludes(array, value) {
107
- return !!(array ? array.length : 0) && baseIndexOf(array, value, 0) > -1;
154
+ var length = array ? array.length : 0;
155
+ return !!length && baseIndexOf(array, value, 0) > -1;
108
156
  }
109
157
  /**
110
158
  * This function is like `arrayIncludes` except that it accepts a comparator.
@@ -233,7 +281,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
233
281
  * @param {string} key The key of the property to get.
234
282
  * @returns {*} Returns the property value.
235
283
  */
236
- function getValue(object, key) {
284
+ function getValue$1(object, key) {
237
285
  return object == null ? void 0 : object[key];
238
286
  }
239
287
  /**
@@ -243,7 +291,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
243
291
  * @param {*} value The value to check.
244
292
  * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
245
293
  */
246
- function isHostObject(value) {
294
+ function isHostObject$1(value) {
247
295
  var result = false;
248
296
  if (value != null && typeof value.toString != "function") try {
249
297
  result = !!(value + "");
@@ -292,50 +340,34 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
292
340
  return result;
293
341
  }
294
342
  /** Used for built-in method references. */
295
- var arrayProto = Array.prototype;
296
- var funcProto = Function.prototype;
297
- var objectProto = Object.prototype;
343
+ var arrayProto$1 = Array.prototype, funcProto$1 = Function.prototype, objectProto$1 = Object.prototype;
298
344
  /** Used to detect overreaching core-js shims. */
299
- var coreJsData = root["__core-js_shared__"];
345
+ var coreJsData$1 = root$1["__core-js_shared__"];
300
346
  /** Used to detect methods masquerading as native. */
301
- var maskSrcKey = function() {
302
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
347
+ var maskSrcKey$1 = function() {
348
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
303
349
  return uid ? "Symbol(src)_1." + uid : "";
304
350
  }();
305
351
  /** Used to resolve the decompiled source of functions. */
306
- var funcToString = funcProto.toString;
352
+ var funcToString$1 = funcProto$1.toString;
307
353
  /** Used to check objects for own properties. */
308
- var hasOwnProperty = objectProto.hasOwnProperty;
354
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
309
355
  /**
310
356
  * Used to resolve the
311
357
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
312
358
  * of values.
313
359
  */
314
- var objectToString = objectProto.toString;
360
+ var objectToString$1 = objectProto$1.toString;
315
361
  /** Used to detect if a method is native. */
316
- var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
362
+ var reIsNative$1 = RegExp("^" + funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar$1, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
317
363
  /** Built-in value references. */
318
- var Symbol = root.Symbol;
319
- var Uint8Array = root.Uint8Array;
320
- var propertyIsEnumerable = objectProto.propertyIsEnumerable;
321
- var splice = arrayProto.splice;
364
+ var Symbol$1 = root$1.Symbol, Uint8Array = root$1.Uint8Array, propertyIsEnumerable = objectProto$1.propertyIsEnumerable, splice$1 = arrayProto$1.splice;
322
365
  var nativeKeys = overArg(Object.keys, Object);
323
- var DataView = getNative(root, "DataView");
324
- var Map = getNative(root, "Map");
325
- var Promise = getNative(root, "Promise");
326
- var Set = getNative(root, "Set");
327
- var WeakMap = getNative(root, "WeakMap");
328
- var nativeCreate = getNative(Object, "create");
366
+ var DataView = getNative$1(root$1, "DataView"), Map$1 = getNative$1(root$1, "Map"), Promise$1 = getNative$1(root$1, "Promise"), Set = getNative$1(root$1, "Set"), WeakMap = getNative$1(root$1, "WeakMap"), nativeCreate$1 = getNative$1(Object, "create");
329
367
  /** Used to detect maps, sets, and weakmaps. */
330
- var dataViewCtorString = toSource(DataView);
331
- var mapCtorString = toSource(Map);
332
- var promiseCtorString = toSource(Promise);
333
- var setCtorString = toSource(Set);
334
- var weakMapCtorString = toSource(WeakMap);
368
+ var dataViewCtorString = toSource$1(DataView), mapCtorString = toSource$1(Map$1), promiseCtorString = toSource$1(Promise$1), setCtorString = toSource$1(Set), weakMapCtorString = toSource$1(WeakMap);
335
369
  /** Used to convert symbols to primitives and strings. */
336
- var symbolProto = Symbol ? Symbol.prototype : void 0;
337
- var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
338
- var symbolToString = symbolProto ? symbolProto.toString : void 0;
370
+ var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : void 0, symbolToString$1 = symbolProto$1 ? symbolProto$1.toString : void 0;
339
371
  /**
340
372
  * Creates a hash object.
341
373
  *
@@ -343,7 +375,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
343
375
  * @constructor
344
376
  * @param {Array} [entries] The key-value pairs to cache.
345
377
  */
346
- function Hash(entries) {
378
+ function Hash$1(entries) {
347
379
  var index = -1, length = entries ? entries.length : 0;
348
380
  this.clear();
349
381
  while (++index < length) {
@@ -358,8 +390,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
358
390
  * @name clear
359
391
  * @memberOf Hash
360
392
  */
361
- function hashClear() {
362
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
393
+ function hashClear$1() {
394
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
363
395
  }
364
396
  /**
365
397
  * Removes `key` and its value from the hash.
@@ -371,7 +403,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
371
403
  * @param {string} key The key of the value to remove.
372
404
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
373
405
  */
374
- function hashDelete(key) {
406
+ function hashDelete$1(key) {
375
407
  return this.has(key) && delete this.__data__[key];
376
408
  }
377
409
  /**
@@ -383,13 +415,13 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
383
415
  * @param {string} key The key of the value to get.
384
416
  * @returns {*} Returns the entry value.
385
417
  */
386
- function hashGet(key) {
418
+ function hashGet$1(key) {
387
419
  var data = this.__data__;
388
- if (nativeCreate) {
420
+ if (nativeCreate$1) {
389
421
  var result = data[key];
390
- return result === HASH_UNDEFINED ? void 0 : result;
422
+ return result === HASH_UNDEFINED$1 ? void 0 : result;
391
423
  }
392
- return hasOwnProperty.call(data, key) ? data[key] : void 0;
424
+ return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
393
425
  }
394
426
  /**
395
427
  * Checks if a hash value for `key` exists.
@@ -400,9 +432,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
400
432
  * @param {string} key The key of the entry to check.
401
433
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
402
434
  */
403
- function hashHas(key) {
435
+ function hashHas$1(key) {
404
436
  var data = this.__data__;
405
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
437
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$1.call(data, key);
406
438
  }
407
439
  /**
408
440
  * Sets the hash `key` to `value`.
@@ -414,16 +446,16 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
414
446
  * @param {*} value The value to set.
415
447
  * @returns {Object} Returns the hash instance.
416
448
  */
417
- function hashSet(key, value) {
449
+ function hashSet$1(key, value) {
418
450
  var data = this.__data__;
419
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
451
+ data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
420
452
  return this;
421
453
  }
422
- Hash.prototype.clear = hashClear;
423
- Hash.prototype["delete"] = hashDelete;
424
- Hash.prototype.get = hashGet;
425
- Hash.prototype.has = hashHas;
426
- Hash.prototype.set = hashSet;
454
+ Hash$1.prototype.clear = hashClear$1;
455
+ Hash$1.prototype["delete"] = hashDelete$1;
456
+ Hash$1.prototype.get = hashGet$1;
457
+ Hash$1.prototype.has = hashHas$1;
458
+ Hash$1.prototype.set = hashSet$1;
427
459
  /**
428
460
  * Creates an list cache object.
429
461
  *
@@ -431,7 +463,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
431
463
  * @constructor
432
464
  * @param {Array} [entries] The key-value pairs to cache.
433
465
  */
434
- function ListCache(entries) {
466
+ function ListCache$1(entries) {
435
467
  var index = -1, length = entries ? entries.length : 0;
436
468
  this.clear();
437
469
  while (++index < length) {
@@ -446,7 +478,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
446
478
  * @name clear
447
479
  * @memberOf ListCache
448
480
  */
449
- function listCacheClear() {
481
+ function listCacheClear$1() {
450
482
  this.__data__ = [];
451
483
  }
452
484
  /**
@@ -458,11 +490,12 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
458
490
  * @param {string} key The key of the value to remove.
459
491
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
460
492
  */
461
- function listCacheDelete(key) {
462
- var data = this.__data__, index = assocIndexOf(data, key);
493
+ function listCacheDelete$1(key) {
494
+ var data = this.__data__, index = assocIndexOf$1(data, key);
463
495
  if (index < 0) return false;
464
- if (index == data.length - 1) data.pop();
465
- else splice.call(data, index, 1);
496
+ var lastIndex = data.length - 1;
497
+ if (index == lastIndex) data.pop();
498
+ else splice$1.call(data, index, 1);
466
499
  return true;
467
500
  }
468
501
  /**
@@ -474,8 +507,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
474
507
  * @param {string} key The key of the value to get.
475
508
  * @returns {*} Returns the entry value.
476
509
  */
477
- function listCacheGet(key) {
478
- var data = this.__data__, index = assocIndexOf(data, key);
510
+ function listCacheGet$1(key) {
511
+ var data = this.__data__, index = assocIndexOf$1(data, key);
479
512
  return index < 0 ? void 0 : data[index][1];
480
513
  }
481
514
  /**
@@ -487,8 +520,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
487
520
  * @param {string} key The key of the entry to check.
488
521
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
489
522
  */
490
- function listCacheHas(key) {
491
- return assocIndexOf(this.__data__, key) > -1;
523
+ function listCacheHas$1(key) {
524
+ return assocIndexOf$1(this.__data__, key) > -1;
492
525
  }
493
526
  /**
494
527
  * Sets the list cache `key` to `value`.
@@ -500,17 +533,17 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
500
533
  * @param {*} value The value to set.
501
534
  * @returns {Object} Returns the list cache instance.
502
535
  */
503
- function listCacheSet(key, value) {
504
- var data = this.__data__, index = assocIndexOf(data, key);
536
+ function listCacheSet$1(key, value) {
537
+ var data = this.__data__, index = assocIndexOf$1(data, key);
505
538
  if (index < 0) data.push([key, value]);
506
539
  else data[index][1] = value;
507
540
  return this;
508
541
  }
509
- ListCache.prototype.clear = listCacheClear;
510
- ListCache.prototype["delete"] = listCacheDelete;
511
- ListCache.prototype.get = listCacheGet;
512
- ListCache.prototype.has = listCacheHas;
513
- ListCache.prototype.set = listCacheSet;
542
+ ListCache$1.prototype.clear = listCacheClear$1;
543
+ ListCache$1.prototype["delete"] = listCacheDelete$1;
544
+ ListCache$1.prototype.get = listCacheGet$1;
545
+ ListCache$1.prototype.has = listCacheHas$1;
546
+ ListCache$1.prototype.set = listCacheSet$1;
514
547
  /**
515
548
  * Creates a map cache object to store key-value pairs.
516
549
  *
@@ -518,7 +551,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
518
551
  * @constructor
519
552
  * @param {Array} [entries] The key-value pairs to cache.
520
553
  */
521
- function MapCache(entries) {
554
+ function MapCache$1(entries) {
522
555
  var index = -1, length = entries ? entries.length : 0;
523
556
  this.clear();
524
557
  while (++index < length) {
@@ -533,11 +566,11 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
533
566
  * @name clear
534
567
  * @memberOf MapCache
535
568
  */
536
- function mapCacheClear() {
569
+ function mapCacheClear$1() {
537
570
  this.__data__ = {
538
- "hash": new Hash(),
539
- "map": new (Map || ListCache)(),
540
- "string": new Hash()
571
+ "hash": new Hash$1(),
572
+ "map": new (Map$1 || ListCache$1)(),
573
+ "string": new Hash$1()
541
574
  };
542
575
  }
543
576
  /**
@@ -549,8 +582,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
549
582
  * @param {string} key The key of the value to remove.
550
583
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
551
584
  */
552
- function mapCacheDelete(key) {
553
- return getMapData(this, key)["delete"](key);
585
+ function mapCacheDelete$1(key) {
586
+ return getMapData$1(this, key)["delete"](key);
554
587
  }
555
588
  /**
556
589
  * Gets the map value for `key`.
@@ -561,8 +594,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
561
594
  * @param {string} key The key of the value to get.
562
595
  * @returns {*} Returns the entry value.
563
596
  */
564
- function mapCacheGet(key) {
565
- return getMapData(this, key).get(key);
597
+ function mapCacheGet$1(key) {
598
+ return getMapData$1(this, key).get(key);
566
599
  }
567
600
  /**
568
601
  * Checks if a map value for `key` exists.
@@ -573,8 +606,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
573
606
  * @param {string} key The key of the entry to check.
574
607
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
575
608
  */
576
- function mapCacheHas(key) {
577
- return getMapData(this, key).has(key);
609
+ function mapCacheHas$1(key) {
610
+ return getMapData$1(this, key).has(key);
578
611
  }
579
612
  /**
580
613
  * Sets the map `key` to `value`.
@@ -586,15 +619,15 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
586
619
  * @param {*} value The value to set.
587
620
  * @returns {Object} Returns the map cache instance.
588
621
  */
589
- function mapCacheSet(key, value) {
590
- getMapData(this, key).set(key, value);
622
+ function mapCacheSet$1(key, value) {
623
+ getMapData$1(this, key).set(key, value);
591
624
  return this;
592
625
  }
593
- MapCache.prototype.clear = mapCacheClear;
594
- MapCache.prototype["delete"] = mapCacheDelete;
595
- MapCache.prototype.get = mapCacheGet;
596
- MapCache.prototype.has = mapCacheHas;
597
- MapCache.prototype.set = mapCacheSet;
626
+ MapCache$1.prototype.clear = mapCacheClear$1;
627
+ MapCache$1.prototype["delete"] = mapCacheDelete$1;
628
+ MapCache$1.prototype.get = mapCacheGet$1;
629
+ MapCache$1.prototype.has = mapCacheHas$1;
630
+ MapCache$1.prototype.set = mapCacheSet$1;
598
631
  /**
599
632
  *
600
633
  * Creates an array cache object to store unique values.
@@ -605,7 +638,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
605
638
  */
606
639
  function SetCache(values) {
607
640
  var index = -1, length = values ? values.length : 0;
608
- this.__data__ = new MapCache();
641
+ this.__data__ = new MapCache$1();
609
642
  while (++index < length) this.add(values[index]);
610
643
  }
611
644
  /**
@@ -619,7 +652,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
619
652
  * @returns {Object} Returns the cache instance.
620
653
  */
621
654
  function setCacheAdd(value) {
622
- this.__data__.set(value, HASH_UNDEFINED);
655
+ this.__data__.set(value, HASH_UNDEFINED$1);
623
656
  return this;
624
657
  }
625
658
  /**
@@ -644,7 +677,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
644
677
  * @param {Array} [entries] The key-value pairs to cache.
645
678
  */
646
679
  function Stack(entries) {
647
- this.__data__ = new ListCache(entries);
680
+ this.__data__ = new ListCache$1(entries);
648
681
  }
649
682
  /**
650
683
  * Removes all key-value entries from the stack.
@@ -654,7 +687,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
654
687
  * @memberOf Stack
655
688
  */
656
689
  function stackClear() {
657
- this.__data__ = new ListCache();
690
+ this.__data__ = new ListCache$1();
658
691
  }
659
692
  /**
660
693
  * Removes `key` and its value from the stack.
@@ -704,13 +737,13 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
704
737
  */
705
738
  function stackSet(key, value) {
706
739
  var cache = this.__data__;
707
- if (cache instanceof ListCache) {
740
+ if (cache instanceof ListCache$1) {
708
741
  var pairs = cache.__data__;
709
- if (!Map || pairs.length < 199) {
742
+ if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
710
743
  pairs.push([key, value]);
711
744
  return this;
712
745
  }
713
- cache = this.__data__ = new MapCache(pairs);
746
+ cache = this.__data__ = new MapCache$1(pairs);
714
747
  }
715
748
  cache.set(key, value);
716
749
  return this;
@@ -729,9 +762,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
729
762
  * @returns {Array} Returns the array of property names.
730
763
  */
731
764
  function arrayLikeKeys(value, inherited) {
732
- var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
765
+ var result = isArray$1(value) || isArguments(value) ? baseTimes(value.length, String) : [];
733
766
  var length = result.length, skipIndexes = !!length;
734
- for (var key in value) if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) result.push(key);
767
+ for (var key in value) if ((inherited || hasOwnProperty$1.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) result.push(key);
735
768
  return result;
736
769
  }
737
770
  /**
@@ -742,9 +775,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
742
775
  * @param {*} key The key to search for.
743
776
  * @returns {number} Returns the index of the matched value, else `-1`.
744
777
  */
745
- function assocIndexOf(array, key) {
778
+ function assocIndexOf$1(array, key) {
746
779
  var length = array.length;
747
- while (length--) if (eq(array[length][0], key)) return length;
780
+ while (length--) if (eq$1(array[length][0], key)) return length;
748
781
  return -1;
749
782
  }
750
783
  /**
@@ -755,10 +788,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
755
788
  * @param {Array|string} path The path of the property to get.
756
789
  * @returns {*} Returns the resolved value.
757
790
  */
758
- function baseGet(object, path) {
759
- path = isKey(path, object) ? [path] : castPath(path);
791
+ function baseGet$1(object, path) {
792
+ path = isKey$1(path, object) ? [path] : castPath$1(path);
760
793
  var index = 0, length = path.length;
761
- while (object != null && index < length) object = object[toKey(path[index++])];
794
+ while (object != null && index < length) object = object[toKey$1(path[index++])];
762
795
  return index && index == length ? object : void 0;
763
796
  }
764
797
  /**
@@ -769,7 +802,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
769
802
  * @returns {string} Returns the `toStringTag`.
770
803
  */
771
804
  function baseGetTag(value) {
772
- return objectToString.call(value);
805
+ return objectToString$1.call(value);
773
806
  }
774
807
  /**
775
808
  * The base implementation of `_.hasIn` without support for deep paths.
@@ -799,7 +832,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
799
832
  */
800
833
  function baseIsEqual(value, other, customizer, bitmask, stack) {
801
834
  if (value === other) return true;
802
- if (value == null || other == null || !isObject(value) && !isObjectLike(other)) return value !== value && other !== other;
835
+ if (value == null || other == null || !isObject$1(value) && !isObjectLike$1(other)) return value !== value && other !== other;
803
836
  return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
804
837
  }
805
838
  /**
@@ -818,7 +851,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
818
851
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
819
852
  */
820
853
  function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
821
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
854
+ var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = arrayTag, othTag = arrayTag;
822
855
  if (!objIsArr) {
823
856
  objTag = getTag(object);
824
857
  objTag = objTag == argsTag ? objectTag : objTag;
@@ -827,13 +860,13 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
827
860
  othTag = getTag(other);
828
861
  othTag = othTag == argsTag ? objectTag : othTag;
829
862
  }
830
- var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag;
863
+ var objIsObj = objTag == objectTag && !isHostObject$1(object), othIsObj = othTag == objectTag && !isHostObject$1(other), isSameTag = objTag == othTag;
831
864
  if (isSameTag && !objIsObj) {
832
865
  stack || (stack = new Stack());
833
866
  return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
834
867
  }
835
868
  if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
836
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
869
+ var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
837
870
  if (objIsWrapped || othIsWrapped) {
838
871
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
839
872
  stack || (stack = new Stack());
@@ -870,7 +903,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
870
903
  } else {
871
904
  var stack = new Stack();
872
905
  if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
873
- if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, 3, stack) : result)) return false;
906
+ if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) return false;
874
907
  }
875
908
  }
876
909
  return true;
@@ -883,9 +916,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
883
916
  * @returns {boolean} Returns `true` if `value` is a native function,
884
917
  * else `false`.
885
918
  */
886
- function baseIsNative(value) {
887
- if (!isObject(value) || isMasked(value)) return false;
888
- return (isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor).test(toSource(value));
919
+ function baseIsNative$1(value) {
920
+ if (!isObject$1(value) || isMasked$1(value)) return false;
921
+ var pattern = isFunction$1(value) || isHostObject$1(value) ? reIsNative$1 : reIsHostCtor$1;
922
+ return pattern.test(toSource$1(value));
889
923
  }
890
924
  /**
891
925
  * The base implementation of `_.isTypedArray` without Node.js optimizations.
@@ -895,7 +929,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
895
929
  * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
896
930
  */
897
931
  function baseIsTypedArray(value) {
898
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
932
+ return isObjectLike$1(value) && isLength(value.length) && !!typedArrayTags[objectToString$1.call(value)];
899
933
  }
900
934
  /**
901
935
  * The base implementation of `_.iteratee`.
@@ -907,7 +941,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
907
941
  function baseIteratee(value) {
908
942
  if (typeof value == "function") return value;
909
943
  if (value == null) return identity;
910
- if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
944
+ if (typeof value == "object") return isArray$1(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
911
945
  return property(value);
912
946
  }
913
947
  /**
@@ -920,7 +954,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
920
954
  function baseKeys(object) {
921
955
  if (!isPrototype(object)) return nativeKeys(object);
922
956
  var result = [];
923
- for (var key in Object(object)) if (hasOwnProperty.call(object, key) && key != "constructor") result.push(key);
957
+ for (var key in Object(object)) if (hasOwnProperty$1.call(object, key) && key != "constructor") result.push(key);
924
958
  return result;
925
959
  }
926
960
  /**
@@ -946,10 +980,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
946
980
  * @returns {Function} Returns the new spec function.
947
981
  */
948
982
  function baseMatchesProperty(path, srcValue) {
949
- if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
983
+ if (isKey$1(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey$1(path), srcValue);
950
984
  return function(object) {
951
- var objValue = get(object, path);
952
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, 3);
985
+ var objValue = get$2(object, path);
986
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
953
987
  };
954
988
  }
955
989
  /**
@@ -961,7 +995,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
961
995
  */
962
996
  function basePropertyDeep(path) {
963
997
  return function(object) {
964
- return baseGet(object, path);
998
+ return baseGet$1(object, path);
965
999
  };
966
1000
  }
967
1001
  /**
@@ -972,11 +1006,11 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
972
1006
  * @param {*} value The value to process.
973
1007
  * @returns {string} Returns the string.
974
1008
  */
975
- function baseToString(value) {
1009
+ function baseToString$1(value) {
976
1010
  if (typeof value == "string") return value;
977
- if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
1011
+ if (isSymbol$1(value)) return symbolToString$1 ? symbolToString$1.call(value) : "";
978
1012
  var result = value + "";
979
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
1013
+ return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
980
1014
  }
981
1015
  /**
982
1016
  * The base implementation of `_.uniqBy` without support for iteratee shorthands.
@@ -1021,8 +1055,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1021
1055
  * @param {*} value The value to inspect.
1022
1056
  * @returns {Array} Returns the cast property path array.
1023
1057
  */
1024
- function castPath(value) {
1025
- return isArray(value) ? value : stringToPath(value);
1058
+ function castPath$1(value) {
1059
+ return isArray$1(value) ? value : stringToPath$1(value);
1026
1060
  }
1027
1061
  /**
1028
1062
  * Creates a set object of `values`.
@@ -1031,7 +1065,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1031
1065
  * @param {Array} values The values to add to the set.
1032
1066
  * @returns {Object} Returns the new set.
1033
1067
  */
1034
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values) {
1068
+ var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY$1) ? noop : function(values) {
1035
1069
  return new Set(values);
1036
1070
  };
1037
1071
  /**
@@ -1065,8 +1099,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1065
1099
  break;
1066
1100
  }
1067
1101
  if (seen) {
1068
- if (!arraySome(other, function(othValue, othIndex) {
1069
- if (!seen.has(othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) return seen.add(othIndex);
1102
+ if (!arraySome(other, function(othValue$1, othIndex) {
1103
+ if (!seen.has(othIndex) && (arrValue === othValue$1 || equalFunc(arrValue, othValue$1, customizer, bitmask, stack))) return seen.add(othIndex);
1070
1104
  })) {
1071
1105
  result = false;
1072
1106
  break;
@@ -1109,7 +1143,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1109
1143
  return true;
1110
1144
  case boolTag:
1111
1145
  case dateTag:
1112
- case numberTag: return eq(+object, +other);
1146
+ case numberTag: return eq$1(+object, +other);
1113
1147
  case errorTag: return object.name == other.name && object.message == other.message;
1114
1148
  case regexpTag:
1115
1149
  case stringTag: return object == other + "";
@@ -1125,7 +1159,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1125
1159
  var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
1126
1160
  stack["delete"](object);
1127
1161
  return result;
1128
- case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
1162
+ case symbolTag$1: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
1129
1163
  }
1130
1164
  return false;
1131
1165
  }
@@ -1144,12 +1178,12 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1144
1178
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1145
1179
  */
1146
1180
  function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
1147
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length;
1148
- if (objLength != keys(other).length && !isPartial) return false;
1181
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
1182
+ if (objLength != othLength && !isPartial) return false;
1149
1183
  var index = objLength;
1150
1184
  while (index--) {
1151
1185
  var key = objProps[index];
1152
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return false;
1186
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) return false;
1153
1187
  }
1154
1188
  var stacked = stack.get(object);
1155
1189
  if (stacked && stack.get(other)) return stacked == other;
@@ -1183,9 +1217,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1183
1217
  * @param {string} key The reference key.
1184
1218
  * @returns {*} Returns the map data.
1185
1219
  */
1186
- function getMapData(map, key) {
1220
+ function getMapData$1(map, key) {
1187
1221
  var data = map.__data__;
1188
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
1222
+ return isKeyable$1(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
1189
1223
  }
1190
1224
  /**
1191
1225
  * Gets the property names, values, and compare flags of `object`.
@@ -1214,9 +1248,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1214
1248
  * @param {string} key The key of the method to get.
1215
1249
  * @returns {*} Returns the function if it's native, else `undefined`.
1216
1250
  */
1217
- function getNative(object, key) {
1218
- var value = getValue(object, key);
1219
- return baseIsNative(value) ? value : void 0;
1251
+ function getNative$1(object, key) {
1252
+ var value = getValue$1(object, key);
1253
+ return baseIsNative$1(value) ? value : void 0;
1220
1254
  }
1221
1255
  /**
1222
1256
  * Gets the `toStringTag` of `value`.
@@ -1226,8 +1260,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1226
1260
  * @returns {string} Returns the `toStringTag`.
1227
1261
  */
1228
1262
  var getTag = baseGetTag;
1229
- if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) getTag = function(value) {
1230
- var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
1263
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag(new Map$1()) != mapTag || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) getTag = function(value) {
1264
+ var result = objectToString$1.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource$1(Ctor) : void 0;
1231
1265
  if (ctorString) switch (ctorString) {
1232
1266
  case dataViewCtorString: return dataViewTag;
1233
1267
  case mapCtorString: return mapTag;
@@ -1247,16 +1281,16 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1247
1281
  * @returns {boolean} Returns `true` if `path` exists, else `false`.
1248
1282
  */
1249
1283
  function hasPath(object, path, hasFunc) {
1250
- path = isKey(path, object) ? [path] : castPath(path);
1284
+ path = isKey$1(path, object) ? [path] : castPath$1(path);
1251
1285
  var result, index = -1, length = path.length;
1252
1286
  while (++index < length) {
1253
- var key = toKey(path[index]);
1287
+ var key = toKey$1(path[index]);
1254
1288
  if (!(result = object != null && hasFunc(object, key))) break;
1255
1289
  object = object[key];
1256
1290
  }
1257
1291
  if (result) return result;
1258
1292
  var length = object ? object.length : 0;
1259
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
1293
+ return !!length && isLength(length) && isIndex(key, length) && (isArray$1(object) || isArguments(object));
1260
1294
  }
1261
1295
  /**
1262
1296
  * Checks if `value` is a valid array-like index.
@@ -1278,11 +1312,11 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1278
1312
  * @param {Object} [object] The object to query keys on.
1279
1313
  * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1280
1314
  */
1281
- function isKey(value, object) {
1282
- if (isArray(value)) return false;
1315
+ function isKey$1(value, object) {
1316
+ if (isArray$1(value)) return false;
1283
1317
  var type = typeof value;
1284
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
1285
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
1318
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$1(value)) return true;
1319
+ return reIsPlainProp$1.test(value) || !reIsDeepProp$1.test(value) || object != null && value in Object(object);
1286
1320
  }
1287
1321
  /**
1288
1322
  * Checks if `value` is suitable for use as unique object key.
@@ -1291,7 +1325,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1291
1325
  * @param {*} value The value to check.
1292
1326
  * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1293
1327
  */
1294
- function isKeyable(value) {
1328
+ function isKeyable$1(value) {
1295
1329
  var type = typeof value;
1296
1330
  return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
1297
1331
  }
@@ -1302,8 +1336,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1302
1336
  * @param {Function} func The function to check.
1303
1337
  * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1304
1338
  */
1305
- function isMasked(func) {
1306
- return !!maskSrcKey && maskSrcKey in func;
1339
+ function isMasked$1(func) {
1340
+ return !!maskSrcKey$1 && maskSrcKey$1 in func;
1307
1341
  }
1308
1342
  /**
1309
1343
  * Checks if `value` is likely a prototype object.
@@ -1313,8 +1347,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1313
1347
  * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1314
1348
  */
1315
1349
  function isPrototype(value) {
1316
- var Ctor = value && value.constructor;
1317
- return value === (typeof Ctor == "function" && Ctor.prototype || objectProto);
1350
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$1;
1351
+ return value === proto;
1318
1352
  }
1319
1353
  /**
1320
1354
  * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
@@ -1325,7 +1359,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1325
1359
  * equality comparisons, else `false`.
1326
1360
  */
1327
1361
  function isStrictComparable(value) {
1328
- return value === value && !isObject(value);
1362
+ return value === value && !isObject$1(value);
1329
1363
  }
1330
1364
  /**
1331
1365
  * A specialized version of `matchesProperty` for source values suitable
@@ -1349,12 +1383,12 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1349
1383
  * @param {string} string The string to convert.
1350
1384
  * @returns {Array} Returns the property path array.
1351
1385
  */
1352
- var stringToPath = memoize(function(string) {
1353
- string = toString(string);
1386
+ var stringToPath$1 = memoize$1(function(string) {
1387
+ string = toString$1(string);
1354
1388
  var result = [];
1355
- if (reLeadingDot.test(string)) result.push("");
1356
- string.replace(rePropName, function(match, number, quote, string) {
1357
- result.push(quote ? string.replace(reEscapeChar, "$1") : number || match);
1389
+ if (reLeadingDot$1.test(string)) result.push("");
1390
+ string.replace(rePropName$1, function(match, number, quote, string$1) {
1391
+ result.push(quote ? string$1.replace(reEscapeChar$1, "$1") : number || match);
1358
1392
  });
1359
1393
  return result;
1360
1394
  });
@@ -1365,10 +1399,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1365
1399
  * @param {*} value The value to inspect.
1366
1400
  * @returns {string|symbol} Returns the key.
1367
1401
  */
1368
- function toKey(value) {
1369
- if (typeof value == "string" || isSymbol(value)) return value;
1402
+ function toKey$1(value) {
1403
+ if (typeof value == "string" || isSymbol$1(value)) return value;
1370
1404
  var result = value + "";
1371
- return result == "0" && 1 / value == -INFINITY ? "-0" : result;
1405
+ return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
1372
1406
  }
1373
1407
  /**
1374
1408
  * Converts `func` to its source code.
@@ -1377,10 +1411,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1377
1411
  * @param {Function} func The function to process.
1378
1412
  * @returns {string} Returns the source code.
1379
1413
  */
1380
- function toSource(func) {
1414
+ function toSource$1(func) {
1381
1415
  if (func != null) {
1382
1416
  try {
1383
- return funcToString.call(func);
1417
+ return funcToString$1.call(func);
1384
1418
  } catch (e) {}
1385
1419
  try {
1386
1420
  return func + "";
@@ -1410,7 +1444,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1410
1444
  * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
1411
1445
  * // => [{ 'x': 1 }, { 'x': 2 }]
1412
1446
  */
1413
- function uniqBy(array, iteratee) {
1447
+ function uniqBy$2(array, iteratee) {
1414
1448
  return array && array.length ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
1415
1449
  }
1416
1450
  /**
@@ -1457,8 +1491,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1457
1491
  * // Replace `_.memoize.Cache`.
1458
1492
  * _.memoize.Cache = WeakMap;
1459
1493
  */
1460
- function memoize(func, resolver) {
1461
- if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
1494
+ function memoize$1(func, resolver) {
1495
+ if (typeof func != "function" || resolver && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
1462
1496
  var memoized = function() {
1463
1497
  var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
1464
1498
  if (cache.has(key)) return cache.get(key);
@@ -1466,10 +1500,10 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1466
1500
  memoized.cache = cache.set(key, result);
1467
1501
  return result;
1468
1502
  };
1469
- memoized.cache = new (memoize.Cache || MapCache)();
1503
+ memoized.cache = new (memoize$1.Cache || MapCache$1)();
1470
1504
  return memoized;
1471
1505
  }
1472
- memoize.Cache = MapCache;
1506
+ memoize$1.Cache = MapCache$1;
1473
1507
  /**
1474
1508
  * Performs a
1475
1509
  * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@@ -1502,7 +1536,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1502
1536
  * _.eq(NaN, NaN);
1503
1537
  * // => true
1504
1538
  */
1505
- function eq(value, other) {
1539
+ function eq$1(value, other) {
1506
1540
  return value === other || value !== value && other !== other;
1507
1541
  }
1508
1542
  /**
@@ -1524,7 +1558,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1524
1558
  * // => false
1525
1559
  */
1526
1560
  function isArguments(value) {
1527
- return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
1561
+ return isArrayLikeObject(value) && hasOwnProperty$1.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString$1.call(value) == argsTag);
1528
1562
  }
1529
1563
  /**
1530
1564
  * Checks if `value` is classified as an `Array` object.
@@ -1549,7 +1583,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1549
1583
  * _.isArray(_.noop);
1550
1584
  * // => false
1551
1585
  */
1552
- var isArray = Array.isArray;
1586
+ var isArray$1 = Array.isArray;
1553
1587
  /**
1554
1588
  * Checks if `value` is array-like. A value is considered array-like if it's
1555
1589
  * not a function and has a `value.length` that's an integer greater than or
@@ -1576,7 +1610,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1576
1610
  * // => false
1577
1611
  */
1578
1612
  function isArrayLike(value) {
1579
- return value != null && isLength(value.length) && !isFunction(value);
1613
+ return value != null && isLength(value.length) && !isFunction$1(value);
1580
1614
  }
1581
1615
  /**
1582
1616
  * This method is like `_.isArrayLike` except that it also checks if `value`
@@ -1604,7 +1638,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1604
1638
  * // => false
1605
1639
  */
1606
1640
  function isArrayLikeObject(value) {
1607
- return isObjectLike(value) && isArrayLike(value);
1641
+ return isObjectLike$1(value) && isArrayLike(value);
1608
1642
  }
1609
1643
  /**
1610
1644
  * Checks if `value` is classified as a `Function` object.
@@ -1623,9 +1657,9 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1623
1657
  * _.isFunction(/abc/);
1624
1658
  * // => false
1625
1659
  */
1626
- function isFunction(value) {
1627
- var tag = isObject(value) ? objectToString.call(value) : "";
1628
- return tag == funcTag || tag == genTag;
1660
+ function isFunction$1(value) {
1661
+ var tag = isObject$1(value) ? objectToString$1.call(value) : "";
1662
+ return tag == funcTag$1 || tag == genTag$1;
1629
1663
  }
1630
1664
  /**
1631
1665
  * Checks if `value` is a valid array-like length.
@@ -1681,7 +1715,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1681
1715
  * _.isObject(null);
1682
1716
  * // => false
1683
1717
  */
1684
- function isObject(value) {
1718
+ function isObject$1(value) {
1685
1719
  var type = typeof value;
1686
1720
  return !!value && (type == "object" || type == "function");
1687
1721
  }
@@ -1709,7 +1743,7 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1709
1743
  * _.isObjectLike(null);
1710
1744
  * // => false
1711
1745
  */
1712
- function isObjectLike(value) {
1746
+ function isObjectLike$1(value) {
1713
1747
  return !!value && typeof value == "object";
1714
1748
  }
1715
1749
  /**
@@ -1729,8 +1763,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1729
1763
  * _.isSymbol('abc');
1730
1764
  * // => false
1731
1765
  */
1732
- function isSymbol(value) {
1733
- return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
1766
+ function isSymbol$1(value) {
1767
+ return typeof value == "symbol" || isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1;
1734
1768
  }
1735
1769
  /**
1736
1770
  * Checks if `value` is classified as a typed array.
@@ -1771,8 +1805,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1771
1805
  * _.toString([1, 2, 3]);
1772
1806
  * // => '1,2,3'
1773
1807
  */
1774
- function toString(value) {
1775
- return value == null ? "" : baseToString(value);
1808
+ function toString$1(value) {
1809
+ return value == null ? "" : baseToString$1(value);
1776
1810
  }
1777
1811
  /**
1778
1812
  * Gets the value at `path` of `object`. If the resolved value is
@@ -1799,8 +1833,8 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1799
1833
  * _.get(object, 'a.b.c', 'default');
1800
1834
  * // => 'default'
1801
1835
  */
1802
- function get(object, path, defaultValue) {
1803
- var result = object == null ? void 0 : baseGet(object, path);
1836
+ function get$2(object, path, defaultValue) {
1837
+ var result = object == null ? void 0 : baseGet$1(object, path);
1804
1838
  return result === void 0 ? defaultValue : result;
1805
1839
  }
1806
1840
  /**
@@ -1918,13 +1952,14 @@ var require_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__commonJSM
1918
1952
  * // => [1, 2]
1919
1953
  */
1920
1954
  function property(path) {
1921
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
1955
+ return isKey$1(path) ? baseProperty(toKey$1(path)) : basePropertyDeep(path);
1922
1956
  }
1923
- module.exports = uniqBy;
1924
- }));
1957
+ module.exports = uniqBy$2;
1958
+ } });
1959
+
1925
1960
  //#endregion
1926
1961
  //#region ../../node_modules/.pnpm/lodash.get@4.4.2/node_modules/lodash.get/index.js
1927
- var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
1962
+ var require_lodash = require_Construct.__commonJS({ "../../node_modules/.pnpm/lodash.get@4.4.2/node_modules/lodash.get/index.js"(exports, module) {
1928
1963
  /**
1929
1964
  * lodash (Custom Build) <https://lodash.com/>
1930
1965
  * Build: `lodash modularize exports="npm" -o ./`
@@ -1937,15 +1972,12 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
1937
1972
  var FUNC_ERROR_TEXT = "Expected a function";
1938
1973
  /** Used to stand-in for `undefined` hash values. */
1939
1974
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
1975
+ /** Used as references for various `Number` constants. */
1976
+ var INFINITY = Infinity;
1940
1977
  /** `Object#toString` result references. */
1941
- var funcTag = "[object Function]";
1942
- var genTag = "[object GeneratorFunction]";
1943
- var symbolTag = "[object Symbol]";
1978
+ var funcTag = "[object Function]", genTag = "[object GeneratorFunction]", symbolTag = "[object Symbol]";
1944
1979
  /** Used to match property names within property paths. */
1945
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1946
- var reIsPlainProp = /^\w*$/;
1947
- var reLeadingDot = /^\./;
1948
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1980
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1949
1981
  /**
1950
1982
  * Used to match `RegExp`
1951
1983
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
@@ -1987,9 +2019,7 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
1987
2019
  return result;
1988
2020
  }
1989
2021
  /** Used for built-in method references. */
1990
- var arrayProto = Array.prototype;
1991
- var funcProto = Function.prototype;
1992
- var objectProto = Object.prototype;
2022
+ var arrayProto = Array.prototype, funcProto = Function.prototype, objectProto = Object.prototype;
1993
2023
  /** Used to detect overreaching core-js shims. */
1994
2024
  var coreJsData = root["__core-js_shared__"];
1995
2025
  /** Used to detect methods masquerading as native. */
@@ -2010,13 +2040,10 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2010
2040
  /** Used to detect if a method is native. */
2011
2041
  var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
2012
2042
  /** Built-in value references. */
2013
- var Symbol = root.Symbol;
2014
- var splice = arrayProto.splice;
2015
- var Map = getNative(root, "Map");
2016
- var nativeCreate = getNative(Object, "create");
2043
+ var Symbol = root.Symbol, splice = arrayProto.splice;
2044
+ var Map = getNative(root, "Map"), nativeCreate = getNative(Object, "create");
2017
2045
  /** Used to convert symbols to primitives and strings. */
2018
- var symbolProto = Symbol ? Symbol.prototype : void 0;
2019
- var symbolToString = symbolProto ? symbolProto.toString : void 0;
2046
+ var symbolProto = Symbol ? Symbol.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
2020
2047
  /**
2021
2048
  * Creates a hash object.
2022
2049
  *
@@ -2142,7 +2169,8 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2142
2169
  function listCacheDelete(key) {
2143
2170
  var data = this.__data__, index = assocIndexOf(data, key);
2144
2171
  if (index < 0) return false;
2145
- if (index == data.length - 1) data.pop();
2172
+ var lastIndex = data.length - 1;
2173
+ if (index == lastIndex) data.pop();
2146
2174
  else splice.call(data, index, 1);
2147
2175
  return true;
2148
2176
  }
@@ -2313,7 +2341,8 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2313
2341
  */
2314
2342
  function baseIsNative(value) {
2315
2343
  if (!isObject(value) || isMasked(value)) return false;
2316
- return (isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor).test(toSource(value));
2344
+ var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
2345
+ return pattern.test(toSource(value));
2317
2346
  }
2318
2347
  /**
2319
2348
  * The base implementation of `_.toString` which doesn't convert nullish
@@ -2327,7 +2356,7 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2327
2356
  if (typeof value == "string") return value;
2328
2357
  if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
2329
2358
  var result = value + "";
2330
- return result == "0" && 1 / value == -Infinity ? "-0" : result;
2359
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2331
2360
  }
2332
2361
  /**
2333
2362
  * Casts `value` to a path array if it's not one.
@@ -2409,8 +2438,8 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2409
2438
  string = toString(string);
2410
2439
  var result = [];
2411
2440
  if (reLeadingDot.test(string)) result.push("");
2412
- string.replace(rePropName, function(match, number, quote, string) {
2413
- result.push(quote ? string.replace(reEscapeChar, "$1") : number || match);
2441
+ string.replace(rePropName, function(match, number, quote, string$1) {
2442
+ result.push(quote ? string$1.replace(reEscapeChar, "$1") : number || match);
2414
2443
  });
2415
2444
  return result;
2416
2445
  });
@@ -2424,7 +2453,7 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2424
2453
  function toKey(value) {
2425
2454
  if (typeof value == "string" || isSymbol(value)) return value;
2426
2455
  var result = value + "";
2427
- return result == "0" && 1 / value == -Infinity ? "-0" : result;
2456
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
2428
2457
  }
2429
2458
  /**
2430
2459
  * Converts `func` to its source code.
@@ -2706,114 +2735,28 @@ var require_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(
2706
2735
  * _.get(object, 'a.b.c', 'default');
2707
2736
  * // => 'default'
2708
2737
  */
2709
- function get(object, path, defaultValue) {
2738
+ function get$1(object, path, defaultValue) {
2710
2739
  var result = object == null ? void 0 : baseGet(object, path);
2711
2740
  return result === void 0 ? defaultValue : result;
2712
2741
  }
2713
- module.exports = get;
2714
- }));
2715
- //#endregion
2716
- //#region src/publisher.ts
2717
- var import_lodash_uniqby = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_lodash_uniqby(), 1);
2718
- var import_lodash_get = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_lodash_get(), 1);
2719
- /** A topic event, bound to its topic — what the builders store. */
2720
- function topicEvent(topic, event) {
2721
- return {
2722
- topic: topic.service,
2723
- type: event.type,
2724
- payload: event.payload,
2725
- ...event.when ? { when: event.when } : {}
2726
- };
2727
- }
2728
- /**
2729
- * Publish a construct's events for what its handler returned, each through
2730
- * its own topic's publisher.
2731
- *
2732
- * Failures are logged, never thrown: the handler has already succeeded, and an
2733
- * event that could not be delivered must not turn its response into an error.
2734
- */
2735
- async function publishEvents(logger, serviceDiscovery, events = [], response, provided = {}) {
2736
- try {
2737
- if (!events.length) {
2738
- logger.debug("No events to publish");
2739
- return;
2740
- }
2741
- const byTopic = /* @__PURE__ */ new Map();
2742
- for (const { topic, type, payload, when } of events) {
2743
- if (when && !when(response)) continue;
2744
- logger.debug({ event: type }, "Processing event");
2745
- const group = byTopic.get(topic.serviceName) ?? {
2746
- topic,
2747
- messages: []
2748
- };
2749
- group.messages.push({
2750
- type,
2751
- payload: await payload(response)
2752
- });
2753
- byTopic.set(topic.serviceName, group);
2754
- }
2755
- if (!byTopic.size) return;
2756
- const missing = [...byTopic.values()].map(({ topic }) => topic).filter((topic) => !(topic.serviceName in provided));
2757
- const services = {
2758
- ...missing.length ? await serviceDiscovery.register(missing) : {},
2759
- ...provided
2760
- };
2761
- await Promise.all([...byTopic.values()].map(async ({ topic, messages }) => {
2762
- logger.debug({
2763
- topic: topic.serviceName,
2764
- eventCount: messages.length
2765
- }, "Publishing events");
2766
- await services[topic.serviceName].publish(messages).catch((err) => {
2767
- logger.error(err, "Failed to publish events");
2768
- });
2769
- }));
2770
- } catch (error) {
2771
- logger.error(error, "Something went wrong publishing events");
2772
- }
2773
- }
2774
- /** Publish a construct's declared events for what its handler returned. */
2775
- async function publishConstructEvents(construct, response, serviceDiscovery, logger = construct.logger, provided = {}) {
2776
- return publishEvents(logger, serviceDiscovery, construct.events, response, provided);
2777
- }
2742
+ module.exports = get$1;
2743
+ } });
2744
+
2778
2745
  //#endregion
2779
2746
  //#region src/functions/BaseFunctionBuilder.ts
2747
+ var import_lodash$2 = require_Construct.__toESM(require_lodash(), 1);
2748
+ const DEFAULT_LOGGER$1 = new __geekmidas_logger_console.ConsoleLogger();
2780
2749
  var BaseFunctionBuilder = class BaseFunctionBuilder {
2781
- type;
2782
2750
  inputSchema;
2783
2751
  outputSchema;
2784
2752
  _timeout;
2785
2753
  _services = [];
2786
- /**
2787
- * The construct ids `.dependsOn()` was given.
2788
- *
2789
- * Beside the services rather than instead of them: a handler *runs* with
2790
- * clients and the manifest *records* which constructs it reaches, and
2791
- * dissolving one into the other is what lost the edges. Shared by every
2792
- * builder because every one of them can depend on something.
2793
- */
2794
- _constructs = [];
2795
- _logger = _geekmidas_logger_console.DEFAULT_LOGGER;
2796
- /**
2797
- * The deploy unit everything built from this builder belongs to.
2798
- *
2799
- * Seeded by the factory a `Worker` or `RestApi` hands out, so a cron knows
2800
- * which process runs it without a directory having to imply it.
2801
- */
2802
- _owner;
2803
- /**
2804
- * Where a cron built from this factory keeps its schedule.
2805
- *
2806
- * Set by the worker that handed the factory out, the same way the logger
2807
- * and the owner are — so a cron file names a schedule and nothing else.
2808
- * Only a server target reads it; on AWS the schedule is an EventBridge rule.
2809
- */
2810
- _scheduleStore;
2811
- /** What the built construct publishes, each event bound to its topic. */
2754
+ _logger = DEFAULT_LOGGER$1;
2812
2755
  _events = [];
2756
+ _publisher;
2813
2757
  _auditorStorage;
2814
2758
  _databaseService;
2815
- /** The edge `.database()` added, so the next one can replace it. */
2816
- _databaseEdge;
2759
+ _monitors = [];
2817
2760
  static isStandardSchemaV1(s) {
2818
2761
  const schema = s["~standard"];
2819
2762
  return schema && typeof schema.validate === "function";
@@ -2825,11 +2768,10 @@ var BaseFunctionBuilder = class BaseFunctionBuilder {
2825
2768
  return validated.value;
2826
2769
  }
2827
2770
  const result = {};
2828
- const fields = schema;
2829
- for (const key in fields) {
2830
- const item = fields[key];
2771
+ for (const key in schema) {
2772
+ const item = schema[key];
2831
2773
  if (BaseFunctionBuilder.isStandardSchemaV1(item)) {
2832
- const value = (0, import_lodash_get.default)(data, key);
2774
+ const value = (0, import_lodash$2.default)(data, key);
2833
2775
  const validated = await item["~standard"].validate(value);
2834
2776
  if (validated.issues) throw validated.issues;
2835
2777
  result[key] = validated.value;
@@ -2837,24 +2779,24 @@ var BaseFunctionBuilder = class BaseFunctionBuilder {
2837
2779
  }
2838
2780
  return result;
2839
2781
  }
2840
- constructor(type = "dev.geekmidas.function.function") {
2782
+ constructor(type = require_Construct.ConstructType.Function) {
2841
2783
  this.type = type;
2842
2784
  }
2843
2785
  timeout(timeout) {
2844
2786
  return require_clone.cloneWith(this, { _timeout: timeout });
2845
2787
  }
2846
2788
  /**
2847
- * A clone that publishes `event` to `topic` once the handler succeeds, and
2848
- * has the topic as a dependency the way `.dependsOn([topic])` would: in
2849
- * `services`, and an edge in the manifest. Each builder types it as its own
2850
- * `event()`, since only it knows how its services widen.
2789
+ * Report each run to a monitor — a heartbeat, an uptime check, an error
2790
+ * tracker. Can be called more than once; every monitor is told.
2851
2791
  */
2852
- withEvent(topic, event) {
2853
- return require_clone.cloneWith(this, {
2854
- _events: [...this._events, topicEvent(topic, event)],
2855
- _services: (0, import_lodash_uniqby.default)([...this._services, topic.service], (s) => s.serviceName),
2856
- _constructs: require_construct_interface.idsOf([topic], this._constructs)
2857
- });
2792
+ monitor(monitor) {
2793
+ return require_clone.cloneWith(this, { _monitors: addMonitor(this._monitors, monitor) });
2794
+ }
2795
+ event(event) {
2796
+ return require_clone.cloneWith(this, { _events: [...this._events, event] });
2797
+ }
2798
+ publisher(publisher) {
2799
+ return require_clone.cloneWith(this, { _publisher: publisher });
2858
2800
  }
2859
2801
  auditor(storage) {
2860
2802
  return require_clone.cloneWith(this, { _auditorStorage: storage });
@@ -2863,28 +2805,19 @@ var BaseFunctionBuilder = class BaseFunctionBuilder {
2863
2805
  * Set the database service for this function.
2864
2806
  * The database will be available in the handler context as `db`.
2865
2807
  */
2866
- database(source) {
2867
- const service = require_construct_interface.serviceOf(source);
2868
- return require_clone.cloneWith(this, {
2869
- _databaseService: service,
2870
- ...require_construct_interface.databaseEdges({
2871
- constructs: this._constructs,
2872
- edge: this._databaseEdge,
2873
- service: this._databaseService,
2874
- services: this._services
2875
- }, source)
2876
- });
2808
+ database(service) {
2809
+ return require_clone.cloneWith(this, { _databaseService: service });
2877
2810
  }
2878
2811
  };
2812
+
2879
2813
  //#endregion
2880
2814
  //#region src/functions/Function.ts
2815
+ var import_lodash$1 = require_Construct.__toESM(require_lodash$1(), 1);
2816
+ const DEFAULT_LOGGER = new __geekmidas_logger_console.ConsoleLogger();
2881
2817
  var Function$1 = class Function$1 extends require_Construct.Construct {
2882
- fn;
2883
- input;
2884
- databaseService;
2885
2818
  __IS_FUNCTION__ = true;
2886
2819
  static isFunction(obj) {
2887
- return Boolean(obj && obj.__IS_FUNCTION__ === true && obj.type === "dev.geekmidas.function.function");
2820
+ return Boolean(obj && obj.__IS_FUNCTION__ === true && obj.type === require_Construct.ConstructType.Function);
2888
2821
  }
2889
2822
  /**
2890
2823
  * Validates data against a StandardSchema.
@@ -2906,9 +2839,9 @@ var Function$1 = class Function$1 extends require_Construct.Construct {
2906
2839
  */
2907
2840
  static async parseSchema(schema, data) {
2908
2841
  try {
2909
- return await (0, _geekmidas_schema_parser.parseSchema)(schema, data);
2842
+ return await (0, __geekmidas_schema_parser.parseSchema)(schema, data);
2910
2843
  } catch (issues) {
2911
- throw new _geekmidas_errors.UnprocessableEntityError("Validation failed", issues);
2844
+ throw new __geekmidas_errors.UnprocessableEntityError("Validation failed", issues);
2912
2845
  }
2913
2846
  }
2914
2847
  /**
@@ -2921,19 +2854,20 @@ var Function$1 = class Function$1 extends require_Construct.Construct {
2921
2854
  async parseOutput(output) {
2922
2855
  return Function$1.parseSchema(this.outputSchema, output);
2923
2856
  }
2924
- constructor(fn, timeout = 3e4, type = "dev.geekmidas.function.function", input, outputSchema, services = [], logger = _geekmidas_logger_console.DEFAULT_LOGGER, events = [], memorySize, auditorStorageService, databaseService, constructs = []) {
2925
- super(type, logger, services, events, outputSchema, timeout, memorySize, auditorStorageService, constructs);
2857
+ constructor(fn, timeout = 3e4, type = require_Construct.ConstructType.Function, input, outputSchema, services = [], logger = DEFAULT_LOGGER, publisherService, events = [], memorySize, auditorStorageService, databaseService) {
2858
+ super(type, logger, services, events, publisherService, outputSchema, timeout, memorySize, auditorStorageService);
2926
2859
  this.fn = fn;
2927
2860
  this.input = input;
2928
2861
  this.databaseService = databaseService;
2929
2862
  }
2930
2863
  };
2864
+
2931
2865
  //#endregion
2932
2866
  //#region src/functions/FunctionBuilder.ts
2867
+ var import_lodash = require_Construct.__toESM(require_lodash$1(), 1);
2933
2868
  var FunctionBuilder = class extends BaseFunctionBuilder {
2934
- type;
2935
2869
  _memorySize;
2936
- constructor(type = "dev.geekmidas.function.function") {
2870
+ constructor(type = require_Construct.ConstructType.Function) {
2937
2871
  super(type);
2938
2872
  this.type = type;
2939
2873
  }
@@ -2949,38 +2883,14 @@ var FunctionBuilder = class extends BaseFunctionBuilder {
2949
2883
  input(schema) {
2950
2884
  return require_clone.cloneWith(this, { inputSchema: schema });
2951
2885
  }
2952
- /**
2953
- * Depend on constructs — a database, a bucket, a mail sender, a queue, a
2954
- * topic.
2955
- *
2956
- * It records the edge and dissolves each construct's client into the
2957
- * handler's service record under the construct's own id, so
2958
- * `.dependsOn([uploads])` is what makes `services.uploads` exist and type.
2959
- *
2960
- * Constructs only. A `Service` does not match the shape, which is what keeps
2961
- * env sniffing confined to `.services()` and the explicit lift.
2962
- */
2963
- dependsOn(constructs) {
2964
- const services = require_construct_interface.servicesOf(constructs);
2965
- return require_clone.cloneWith(this, {
2966
- _services: (0, import_lodash_uniqby.default)([...this._services, ...services], (s) => s.serviceName),
2967
- _constructs: require_construct_interface.idsOf(constructs, this._constructs)
2968
- });
2969
- }
2970
2886
  services(services) {
2971
- return require_clone.cloneWith(this, { _services: (0, import_lodash_uniqby.default)([...this._services, ...services], (s) => s.serviceName) });
2887
+ return require_clone.cloneWith(this, { _services: (0, import_lodash.default)([...this._services, ...services], (s) => s.serviceName) });
2972
2888
  }
2973
2889
  logger(logger) {
2974
2890
  return require_clone.cloneWith(this, { _logger: logger });
2975
2891
  }
2976
- /**
2977
- * Publish `event` to `topic` once the function has succeeded — repeatable,
2978
- * one call per event, to as many topics as it names. The topic becomes a
2979
- * dependency as with `.dependsOn([topic])`, so `services.<topic>` is there
2980
- * for events the handler decides on itself.
2981
- */
2982
- event(topic, event) {
2983
- return this.withEvent(topic, event);
2892
+ publisher(publisher) {
2893
+ return require_clone.cloneWith(this, { _publisher: publisher });
2984
2894
  }
2985
2895
  auditor(storage) {
2986
2896
  return require_clone.cloneWith(this, { _auditorStorage: storage });
@@ -2996,60 +2906,61 @@ var FunctionBuilder = class extends BaseFunctionBuilder {
2996
2906
  * Set the database service for this function.
2997
2907
  * The database will be available in the handler context as `db`.
2998
2908
  */
2999
- database(source) {
3000
- const service = require_construct_interface.serviceOf(source);
3001
- return require_clone.cloneWith(this, {
3002
- _databaseService: service,
3003
- ...require_construct_interface.databaseEdges({
3004
- constructs: this._constructs,
3005
- edge: this._databaseEdge,
3006
- service: this._databaseService,
3007
- services: this._services
3008
- }, source)
3009
- });
2909
+ database(service) {
2910
+ return require_clone.cloneWith(this, { _databaseService: service });
3010
2911
  }
3011
2912
  handle(fn) {
3012
- const func = new Function$1(fn, this._timeout, this.type, this.inputSchema, this.outputSchema, this._services, this._logger, this._events, this._memorySize, this._auditorStorage, this._databaseService, this._constructs);
3013
- func.owner = this._owner;
2913
+ const func = new Function$1(fn, this._timeout, this.type, this.inputSchema, this.outputSchema, this._services, this._logger, this._publisher, this._events, this._memorySize, this._auditorStorage, this._databaseService);
2914
+ func.monitors = this._monitors;
3014
2915
  return func;
3015
2916
  }
3016
2917
  };
2918
+
3017
2919
  //#endregion
3018
- Object.defineProperty(exports, "BaseFunctionBuilder", {
3019
- enumerable: true,
3020
- get: function() {
3021
- return BaseFunctionBuilder;
3022
- }
2920
+ //#region src/functions/index.ts
2921
+ const f = new FunctionBuilder();
2922
+
2923
+ //#endregion
2924
+ Object.defineProperty(exports, 'BaseFunctionBuilder', {
2925
+ enumerable: true,
2926
+ get: function () {
2927
+ return BaseFunctionBuilder;
2928
+ }
3023
2929
  });
3024
- Object.defineProperty(exports, "Function", {
3025
- enumerable: true,
3026
- get: function() {
3027
- return Function$1;
3028
- }
2930
+ Object.defineProperty(exports, 'Function', {
2931
+ enumerable: true,
2932
+ get: function () {
2933
+ return Function$1;
2934
+ }
3029
2935
  });
3030
- Object.defineProperty(exports, "FunctionBuilder", {
3031
- enumerable: true,
3032
- get: function() {
3033
- return FunctionBuilder;
3034
- }
2936
+ Object.defineProperty(exports, 'FunctionBuilder', {
2937
+ enumerable: true,
2938
+ get: function () {
2939
+ return FunctionBuilder;
2940
+ }
3035
2941
  });
3036
- Object.defineProperty(exports, "publishConstructEvents", {
3037
- enumerable: true,
3038
- get: function() {
3039
- return publishConstructEvents;
3040
- }
2942
+ Object.defineProperty(exports, 'addMonitor', {
2943
+ enumerable: true,
2944
+ get: function () {
2945
+ return addMonitor;
2946
+ }
3041
2947
  });
3042
- Object.defineProperty(exports, "publishEvents", {
3043
- enumerable: true,
3044
- get: function() {
3045
- return publishEvents;
3046
- }
2948
+ Object.defineProperty(exports, 'f', {
2949
+ enumerable: true,
2950
+ get: function () {
2951
+ return f;
2952
+ }
3047
2953
  });
3048
- Object.defineProperty(exports, "require_lodash_uniqby", {
3049
- enumerable: true,
3050
- get: function() {
3051
- return require_lodash_uniqby;
3052
- }
2954
+ Object.defineProperty(exports, 'require_lodash', {
2955
+ enumerable: true,
2956
+ get: function () {
2957
+ return require_lodash$1;
2958
+ }
3053
2959
  });
3054
-
3055
- //# sourceMappingURL=functions-CfzJG9hK.cjs.map
2960
+ Object.defineProperty(exports, 'startMonitors', {
2961
+ enumerable: true,
2962
+ get: function () {
2963
+ return startMonitors;
2964
+ }
2965
+ });
2966
+ //# sourceMappingURL=functions-SqtCDc9c.cjs.map