gemi 0.143.0 → 0.145.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 (214) hide show
  1. package/dist/ai/AgentController.d.ts +2 -2
  2. package/dist/ai/AgentController.d.ts.map +1 -1
  3. package/dist/ai/index.d.ts +2 -2
  4. package/dist/ai/index.d.ts.map +1 -1
  5. package/dist/ai/index.js +11 -11
  6. package/dist/ai/index.js.map +3 -3
  7. package/dist/ai/store/Nonces.d.ts +68 -0
  8. package/dist/ai/store/Nonces.d.ts.map +1 -1
  9. package/dist/ai/store/index.d.ts +1 -1
  10. package/dist/ai/store/index.d.ts.map +1 -1
  11. package/dist/app/index.js +1 -1
  12. package/dist/bun/plugin.js +1 -1
  13. package/dist/bun/preload.js +1 -1
  14. package/dist/chunk-0k8fk96c.js +5 -0
  15. package/dist/{chunk-mnmr27wd.js.map → chunk-0k8fk96c.js.map} +3 -3
  16. package/dist/{chunk-y5yac6n1.js → chunk-0mt7kqwx.js} +2 -2
  17. package/dist/{chunk-y5yac6n1.js.map → chunk-0mt7kqwx.js.map} +1 -1
  18. package/dist/{chunk-1ed75a7b.js → chunk-1fyn63ka.js} +3 -3
  19. package/dist/{chunk-1ed75a7b.js.map → chunk-1fyn63ka.js.map} +1 -1
  20. package/dist/{chunk-tkvamktq.js → chunk-1ttd4rn9.js} +2 -2
  21. package/dist/{chunk-tkvamktq.js.map → chunk-1ttd4rn9.js.map} +1 -1
  22. package/dist/{chunk-m70hn4eg.js → chunk-1wz6kwjc.js} +2 -2
  23. package/dist/{chunk-m70hn4eg.js.map → chunk-1wz6kwjc.js.map} +1 -1
  24. package/dist/{chunk-fsem81ec.js → chunk-29jmaj16.js} +1 -1
  25. package/dist/{chunk-fpz9e3xx.js → chunk-2b3hh9xw.js} +3 -3
  26. package/dist/{chunk-fpz9e3xx.js.map → chunk-2b3hh9xw.js.map} +1 -1
  27. package/dist/{chunk-n9zycjm1.js → chunk-2djjs8f1.js} +3 -3
  28. package/dist/{chunk-n9zycjm1.js.map → chunk-2djjs8f1.js.map} +1 -1
  29. package/dist/{chunk-p81qeav5.js → chunk-2ery6a75.js} +3 -3
  30. package/dist/{chunk-p81qeav5.js.map → chunk-2ery6a75.js.map} +1 -1
  31. package/dist/{chunk-hyhbk12v.js → chunk-2k3935ke.js} +2 -2
  32. package/dist/{chunk-hyhbk12v.js.map → chunk-2k3935ke.js.map} +1 -1
  33. package/dist/{chunk-qt6x2r6a.js → chunk-2x6cv37t.js} +2 -2
  34. package/dist/{chunk-qt6x2r6a.js.map → chunk-2x6cv37t.js.map} +1 -1
  35. package/dist/{chunk-68f0jpje.js → chunk-313593t3.js} +2 -2
  36. package/dist/{chunk-68f0jpje.js.map → chunk-313593t3.js.map} +1 -1
  37. package/dist/{chunk-5qfzvnyp.js → chunk-3csz8pfk.js} +3 -3
  38. package/dist/{chunk-5qfzvnyp.js.map → chunk-3csz8pfk.js.map} +1 -1
  39. package/dist/{chunk-rezmtdyt.js → chunk-3x8zrsby.js} +2 -2
  40. package/dist/{chunk-rezmtdyt.js.map → chunk-3x8zrsby.js.map} +1 -1
  41. package/dist/{chunk-159c392q.js → chunk-43ws58db.js} +2 -2
  42. package/dist/{chunk-159c392q.js.map → chunk-43ws58db.js.map} +1 -1
  43. package/dist/chunk-49s8wwp2.js +5 -0
  44. package/dist/{chunk-b6mgrrk6.js.map → chunk-49s8wwp2.js.map} +1 -1
  45. package/dist/{chunk-ncb1qtae.js → chunk-4d4td4k9.js} +2 -2
  46. package/dist/{chunk-ncb1qtae.js.map → chunk-4d4td4k9.js.map} +1 -1
  47. package/dist/{chunk-v57ndv0h.js → chunk-4jd25v6d.js} +2 -2
  48. package/dist/{chunk-v57ndv0h.js.map → chunk-4jd25v6d.js.map} +1 -1
  49. package/dist/{chunk-78bfmwp0.js → chunk-4m0eqq80.js} +2 -2
  50. package/dist/{chunk-78bfmwp0.js.map → chunk-4m0eqq80.js.map} +1 -1
  51. package/dist/{chunk-ktrm6y5j.js → chunk-563ksar3.js} +3 -3
  52. package/dist/{chunk-ktrm6y5j.js.map → chunk-563ksar3.js.map} +1 -1
  53. package/dist/{chunk-z80v4z8y.js → chunk-5q2pmve9.js} +2 -2
  54. package/dist/{chunk-z80v4z8y.js.map → chunk-5q2pmve9.js.map} +1 -1
  55. package/dist/{chunk-20d0n391.js → chunk-5yz684rw.js} +2 -2
  56. package/dist/{chunk-20d0n391.js.map → chunk-5yz684rw.js.map} +1 -1
  57. package/dist/{chunk-236be97q.js → chunk-63xwah5k.js} +1 -1
  58. package/dist/{chunk-b4jx4fzq.js → chunk-65wy1r1a.js} +1 -1
  59. package/dist/{chunk-9tgcmx4h.js → chunk-70yz9e7f.js} +2 -2
  60. package/dist/{chunk-9tgcmx4h.js.map → chunk-70yz9e7f.js.map} +1 -1
  61. package/dist/{chunk-t03nda3s.js → chunk-73rzf7ys.js} +2 -2
  62. package/dist/{chunk-t03nda3s.js.map → chunk-73rzf7ys.js.map} +1 -1
  63. package/dist/{chunk-1cn7ets3.js → chunk-7txqv2qq.js} +3 -3
  64. package/dist/{chunk-1cn7ets3.js.map → chunk-7txqv2qq.js.map} +1 -1
  65. package/dist/{chunk-1skdsmjx.js → chunk-86zhngpg.js} +2 -2
  66. package/dist/{chunk-1skdsmjx.js.map → chunk-86zhngpg.js.map} +1 -1
  67. package/dist/{chunk-ce9wm3r9.js → chunk-877yc341.js} +3 -3
  68. package/dist/{chunk-ce9wm3r9.js.map → chunk-877yc341.js.map} +1 -1
  69. package/dist/{chunk-wffc5k3m.js → chunk-87y2nrjy.js} +2 -2
  70. package/dist/{chunk-wffc5k3m.js.map → chunk-87y2nrjy.js.map} +1 -1
  71. package/dist/{chunk-mfn94b95.js → chunk-8k346pjw.js} +14 -14
  72. package/dist/{chunk-mfn94b95.js.map → chunk-8k346pjw.js.map} +3 -3
  73. package/dist/{chunk-j2k408xc.js → chunk-8km4drvv.js} +3 -3
  74. package/dist/{chunk-j2k408xc.js.map → chunk-8km4drvv.js.map} +1 -1
  75. package/dist/{chunk-sa6a0wy1.js → chunk-94hcjdbe.js} +2 -2
  76. package/dist/{chunk-sa6a0wy1.js.map → chunk-94hcjdbe.js.map} +1 -1
  77. package/dist/{chunk-kaphqnpp.js → chunk-9z8zq4rx.js} +3 -3
  78. package/dist/{chunk-kaphqnpp.js.map → chunk-9z8zq4rx.js.map} +1 -1
  79. package/dist/{chunk-8ex0y47w.js → chunk-apga49vp.js} +2 -2
  80. package/dist/{chunk-8ex0y47w.js.map → chunk-apga49vp.js.map} +1 -1
  81. package/dist/{chunk-yjszzjyj.js → chunk-attr793y.js} +2 -2
  82. package/dist/{chunk-yjszzjyj.js.map → chunk-attr793y.js.map} +1 -1
  83. package/dist/{chunk-1x9ghjpt.js → chunk-bsa6b82q.js} +1 -1
  84. package/dist/{chunk-ceb4jcrm.js → chunk-bstn00nx.js} +2 -2
  85. package/dist/{chunk-ceb4jcrm.js.map → chunk-bstn00nx.js.map} +1 -1
  86. package/dist/{chunk-azd6da5h.js → chunk-bykkqvd8.js} +2 -2
  87. package/dist/{chunk-azd6da5h.js.map → chunk-bykkqvd8.js.map} +1 -1
  88. package/dist/{chunk-9k46m1vf.js → chunk-cee5gq7t.js} +2 -2
  89. package/dist/{chunk-9k46m1vf.js.map → chunk-cee5gq7t.js.map} +1 -1
  90. package/dist/{chunk-9dkpv8ev.js → chunk-dxh8njb4.js} +2 -2
  91. package/dist/{chunk-9dkpv8ev.js.map → chunk-dxh8njb4.js.map} +1 -1
  92. package/dist/{chunk-maqkrbsb.js → chunk-e06t0625.js} +2 -2
  93. package/dist/{chunk-maqkrbsb.js.map → chunk-e06t0625.js.map} +1 -1
  94. package/dist/{chunk-0839f72f.js → chunk-e9z8p2fy.js} +2 -2
  95. package/dist/{chunk-0839f72f.js.map → chunk-e9z8p2fy.js.map} +1 -1
  96. package/dist/{chunk-6hs102jh.js → chunk-eqv7yxk7.js} +2 -2
  97. package/dist/{chunk-6hs102jh.js.map → chunk-eqv7yxk7.js.map} +1 -1
  98. package/dist/{chunk-m6t5a0me.js → chunk-fqqbnp0z.js} +2 -2
  99. package/dist/{chunk-m6t5a0me.js.map → chunk-fqqbnp0z.js.map} +1 -1
  100. package/dist/{chunk-1w5dnkd1.js → chunk-g22kph4n.js} +2 -2
  101. package/dist/{chunk-1w5dnkd1.js.map → chunk-g22kph4n.js.map} +1 -1
  102. package/dist/{chunk-rvm5mkwm.js → chunk-g8sh9btf.js} +2 -2
  103. package/dist/{chunk-rvm5mkwm.js.map → chunk-g8sh9btf.js.map} +1 -1
  104. package/dist/{chunk-kkqw8bqg.js → chunk-gvdg52ew.js} +4 -4
  105. package/dist/{chunk-kkqw8bqg.js.map → chunk-gvdg52ew.js.map} +1 -1
  106. package/dist/{chunk-8ky8cmde.js → chunk-h8eawyhx.js} +2 -2
  107. package/dist/{chunk-8ky8cmde.js.map → chunk-h8eawyhx.js.map} +1 -1
  108. package/dist/{chunk-r567t83k.js → chunk-hcw671mg.js} +4 -4
  109. package/dist/{chunk-r567t83k.js.map → chunk-hcw671mg.js.map} +1 -1
  110. package/dist/{chunk-ej4kf7m5.js → chunk-hh5bs656.js} +3 -3
  111. package/dist/{chunk-ej4kf7m5.js.map → chunk-hh5bs656.js.map} +1 -1
  112. package/dist/{chunk-3q7sc68p.js → chunk-j6ygdvj8.js} +2 -2
  113. package/dist/{chunk-3q7sc68p.js.map → chunk-j6ygdvj8.js.map} +1 -1
  114. package/dist/{chunk-t2nsn0r2.js → chunk-jzpbwvbt.js} +2 -2
  115. package/dist/{chunk-t2nsn0r2.js.map → chunk-jzpbwvbt.js.map} +1 -1
  116. package/dist/{chunk-r0z27j6t.js → chunk-k79ajvtc.js} +2 -2
  117. package/dist/{chunk-r0z27j6t.js.map → chunk-k79ajvtc.js.map} +1 -1
  118. package/dist/{chunk-hnsrwr0p.js → chunk-k8pn2qvf.js} +2 -2
  119. package/dist/{chunk-hnsrwr0p.js.map → chunk-k8pn2qvf.js.map} +1 -1
  120. package/dist/{chunk-83cvkhzn.js → chunk-kmh402m4.js} +2 -2
  121. package/dist/{chunk-83cvkhzn.js.map → chunk-kmh402m4.js.map} +1 -1
  122. package/dist/{chunk-9qfd02h8.js → chunk-m9am5fqq.js} +5 -5
  123. package/dist/{chunk-9qfd02h8.js.map → chunk-m9am5fqq.js.map} +3 -3
  124. package/dist/{chunk-m8yd59gg.js → chunk-mr3szvr3.js} +2 -2
  125. package/dist/{chunk-m8yd59gg.js.map → chunk-mr3szvr3.js.map} +1 -1
  126. package/dist/{chunk-mkw35cz7.js → chunk-mtamgvf4.js} +2 -2
  127. package/dist/{chunk-mkw35cz7.js.map → chunk-mtamgvf4.js.map} +1 -1
  128. package/dist/{chunk-5xfpqda5.js → chunk-mv1rs9he.js} +1 -1
  129. package/dist/{chunk-s29tgy4y.js → chunk-mzkzgp2j.js} +2 -2
  130. package/dist/{chunk-s29tgy4y.js.map → chunk-mzkzgp2j.js.map} +1 -1
  131. package/dist/{chunk-9xzg05xg.js → chunk-n9n4qt20.js} +3 -3
  132. package/dist/{chunk-9xzg05xg.js.map → chunk-n9n4qt20.js.map} +1 -1
  133. package/dist/{chunk-2ra5skyk.js → chunk-p27y4xrw.js} +2 -2
  134. package/dist/{chunk-2ra5skyk.js.map → chunk-p27y4xrw.js.map} +1 -1
  135. package/dist/{chunk-sgwgj2q0.js → chunk-pq657qcp.js} +1 -1
  136. package/dist/{chunk-63q7ycwt.js → chunk-pwbm3x1y.js} +2 -2
  137. package/dist/{chunk-63q7ycwt.js.map → chunk-pwbm3x1y.js.map} +1 -1
  138. package/dist/{chunk-1rvnk7g8.js → chunk-q4qw629n.js} +2 -2
  139. package/dist/{chunk-1rvnk7g8.js.map → chunk-q4qw629n.js.map} +1 -1
  140. package/dist/{chunk-f2e7n064.js → chunk-q9na1syb.js} +2 -2
  141. package/dist/{chunk-f2e7n064.js.map → chunk-q9na1syb.js.map} +1 -1
  142. package/dist/{chunk-x0t3t7g3.js → chunk-rkbwb3v5.js} +2 -2
  143. package/dist/{chunk-x0t3t7g3.js.map → chunk-rkbwb3v5.js.map} +1 -1
  144. package/dist/{chunk-0t2ym9ap.js → chunk-rma7afjd.js} +3 -3
  145. package/dist/{chunk-0t2ym9ap.js.map → chunk-rma7afjd.js.map} +1 -1
  146. package/dist/{chunk-f5qdyw45.js → chunk-tr9ynv3w.js} +2 -2
  147. package/dist/{chunk-f5qdyw45.js.map → chunk-tr9ynv3w.js.map} +1 -1
  148. package/dist/{chunk-kzc6bn8n.js → chunk-twrf6d08.js} +2 -2
  149. package/dist/{chunk-kzc6bn8n.js.map → chunk-twrf6d08.js.map} +1 -1
  150. package/dist/{chunk-6jd0e1dz.js → chunk-v9z4x5j2.js} +2 -2
  151. package/dist/{chunk-6jd0e1dz.js.map → chunk-v9z4x5j2.js.map} +1 -1
  152. package/dist/{chunk-jmhrpfqn.js → chunk-vm5t0j24.js} +2 -2
  153. package/dist/{chunk-jmhrpfqn.js.map → chunk-vm5t0j24.js.map} +1 -1
  154. package/dist/{chunk-a37shxb1.js → chunk-xv58jnpb.js} +2 -2
  155. package/dist/{chunk-a37shxb1.js.map → chunk-xv58jnpb.js.map} +1 -1
  156. package/dist/{chunk-p57nt0pm.js → chunk-ydkv9e8w.js} +3 -3
  157. package/dist/{chunk-p57nt0pm.js.map → chunk-ydkv9e8w.js.map} +1 -1
  158. package/dist/{chunk-aw8gj99f.js → chunk-ymdpt00k.js} +2 -2
  159. package/dist/{chunk-aw8gj99f.js.map → chunk-ymdpt00k.js.map} +1 -1
  160. package/dist/{chunk-5g7m7g4a.js → chunk-z7tsh9qr.js} +3 -3
  161. package/dist/{chunk-5g7m7g4a.js.map → chunk-z7tsh9qr.js.map} +1 -1
  162. package/dist/client/Head.d.ts.map +1 -1
  163. package/dist/client/index.js +7 -6
  164. package/dist/client/index.js.map +1 -1
  165. package/dist/config/index.js +1 -1
  166. package/dist/console/run.js +2 -2
  167. package/dist/console/run.js.map +1 -1
  168. package/dist/container/index.js +2 -2
  169. package/dist/container/index.js.map +1 -1
  170. package/dist/database/index.js +2 -2
  171. package/dist/database/index.js.map +1 -1
  172. package/dist/email/index.js +2 -2
  173. package/dist/email/index.js.map +1 -1
  174. package/dist/facades/index.js +2 -2
  175. package/dist/facades/index.js.map +1 -1
  176. package/dist/foundation/index.js +2 -2
  177. package/dist/foundation/index.js.map +1 -1
  178. package/dist/http/Metadata.d.ts +8 -2
  179. package/dist/http/Metadata.d.ts.map +1 -1
  180. package/dist/http/index.js +2 -2
  181. package/dist/http/index.js.map +1 -1
  182. package/dist/i18n/dictionaryRuntime.js +2 -2
  183. package/dist/i18n/dictionaryRuntime.js.map +1 -1
  184. package/dist/i18n/index.js +2 -2
  185. package/dist/i18n/index.js.map +1 -1
  186. package/dist/kernel/index.js +2 -2
  187. package/dist/kernel/index.js.map +1 -1
  188. package/dist/orm/index.js +2 -2
  189. package/dist/orm/index.js.map +1 -1
  190. package/dist/server/index.js +2 -2
  191. package/dist/server/index.js.map +1 -1
  192. package/dist/services/index.d.ts +2 -1
  193. package/dist/services/index.d.ts.map +1 -1
  194. package/dist/services/index.js +9 -9
  195. package/dist/services/index.js.map +4 -3
  196. package/dist/services/mcp/http/McpHttpServer.d.ts +81 -1
  197. package/dist/services/mcp/http/McpHttpServer.d.ts.map +1 -1
  198. package/dist/services/mcp/http/oauth/prismaStore.d.ts +112 -0
  199. package/dist/services/mcp/http/oauth/prismaStore.d.ts.map +1 -0
  200. package/dist/services/queue/work.js +2 -2
  201. package/dist/services/queue/work.js.map +1 -1
  202. package/dist/stats/route-table.js +1 -1
  203. package/dist/support/index.js +2 -2
  204. package/dist/support/index.js.map +1 -1
  205. package/dist/vitest/index.js +1 -1
  206. package/package.json +1 -1
  207. package/dist/chunk-b6mgrrk6.js +0 -5
  208. package/dist/chunk-mnmr27wd.js +0 -5
  209. /package/dist/{chunk-fsem81ec.js.map → chunk-29jmaj16.js.map} +0 -0
  210. /package/dist/{chunk-236be97q.js.map → chunk-63xwah5k.js.map} +0 -0
  211. /package/dist/{chunk-b4jx4fzq.js.map → chunk-65wy1r1a.js.map} +0 -0
  212. /package/dist/{chunk-1x9ghjpt.js.map → chunk-bsa6b82q.js.map} +0 -0
  213. /package/dist/{chunk-5xfpqda5.js.map → chunk-mv1rs9he.js.map} +0 -0
  214. /package/dist/{chunk-sgwgj2q0.js.map → chunk-pq657qcp.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{lk as Y,sk as K,vk as y}from"./chunk-t03nda3s.js";import{AsyncLocalStorage as U}from"async_hooks";var z=new U;function O(){return z.getStore()?.tx}function _(){return z.getStore()?.connection??K}function h(j,q){let v=z.getStore();if(_()===j)return q();return F(j),z.run({...v,depth:v?.depth??0,connection:j===K?void 0:j},q)}function F(j){let q=z.getStore();if(q?.tx===void 0)return;let v=q.connection??K;if(v===j)return;throw new y(v,j)}function A(j){let q=z.getStore();if(q?.tx===void 0||q.afterCommit===void 0)return!1;let v=Z.get(q.afterCommit);if(v==="committed")return!1;if(v==="rolled_back")return!0;return q.afterCommit.push(j),!0}var Z=new WeakMap;function k(j){if(A(j))return Promise.resolve();let q=(v)=>{console.error("An after-commit callback threw. No transaction was open, so it ran immediately.",v)};try{return Promise.resolve(j()).catch(q)}catch(v){return q(v),Promise.resolve()}}function N(j){let q=z.getStore();if(q?.tx===void 0||q.commitDependsOn===void 0)return!1;return q.commitDependsOn.push(j),!0}class I extends Error{constructor(j){super(`A statement this transaction depended on failed after being issued on it, so the transaction rolled back instead of committing: ${j instanceof Error?j.message:String(j)}`,{cause:j});this.name="TransactionDependencyError"}}async function W(j,q){if(j.length===q)return;let B=(await Promise.allSettled(j.slice(q))).find((J)=>J.status==="rejected");if(B)throw new I(B.reason)}function T(){let j=z.getStore();return j?.tx===void 0?null:j.depth}function x(){return z.getStore()?.system===!0}function p(j){let q=z.getStore();return z.run({...q,depth:q?.depth??0,system:!0},j)}function f(j){return z.getStore()?.trashed?.get(j)}function C(j,q,v){let B=z.getStore(),J=new Map(B?.trashed);return J.set(j,q),z.run({...B,depth:B?.depth??0,trashed:J},v)}function l(){return z.getStore()?.actor}function u(j,q){let v=z.getStore();return z.run({...v,depth:v?.depth??0,system:!1,actor:{user:j??null}},q)}function D(j){if(Bun.env.NODE_ENV!=="development")return null;if(j===!1)return null;if(j===void 0)return Y;if(!Number.isFinite(j)||j<=0)return Y;return j}function w(j){let q=D(j);if(q===null)return()=>{};let v=Error("transaction opened here"),B=setTimeout(()=>{let J=v.stack?.split(`
2
+ import{mk as Y,tk as K,wk as y}from"./chunk-73rzf7ys.js";import{AsyncLocalStorage as U}from"async_hooks";var z=new U;function O(){return z.getStore()?.tx}function _(){return z.getStore()?.connection??K}function h(j,q){let v=z.getStore();if(_()===j)return q();return F(j),z.run({...v,depth:v?.depth??0,connection:j===K?void 0:j},q)}function F(j){let q=z.getStore();if(q?.tx===void 0)return;let v=q.connection??K;if(v===j)return;throw new y(v,j)}function A(j){let q=z.getStore();if(q?.tx===void 0||q.afterCommit===void 0)return!1;let v=Z.get(q.afterCommit);if(v==="committed")return!1;if(v==="rolled_back")return!0;return q.afterCommit.push(j),!0}var Z=new WeakMap;function k(j){if(A(j))return Promise.resolve();let q=(v)=>{console.error("An after-commit callback threw. No transaction was open, so it ran immediately.",v)};try{return Promise.resolve(j()).catch(q)}catch(v){return q(v),Promise.resolve()}}function N(j){let q=z.getStore();if(q?.tx===void 0||q.commitDependsOn===void 0)return!1;return q.commitDependsOn.push(j),!0}class I extends Error{constructor(j){super(`A statement this transaction depended on failed after being issued on it, so the transaction rolled back instead of committing: ${j instanceof Error?j.message:String(j)}`,{cause:j});this.name="TransactionDependencyError"}}async function W(j,q){if(j.length===q)return;let B=(await Promise.allSettled(j.slice(q))).find((J)=>J.status==="rejected");if(B)throw new I(B.reason)}function T(){let j=z.getStore();return j?.tx===void 0?null:j.depth}function x(){return z.getStore()?.system===!0}function p(j){let q=z.getStore();return z.run({...q,depth:q?.depth??0,system:!0},j)}function f(j){return z.getStore()?.trashed?.get(j)}function C(j,q,v){let B=z.getStore(),J=new Map(B?.trashed);return J.set(j,q),z.run({...B,depth:B?.depth??0,trashed:J},v)}function l(){return z.getStore()?.actor}function u(j,q){let v=z.getStore();return z.run({...v,depth:v?.depth??0,system:!1,actor:{user:j??null}},q)}function D(j){if(Bun.env.NODE_ENV!=="development")return null;if(j===!1)return null;if(j===void 0)return Y;if(!Number.isFinite(j)||j<=0)return Y;return j}function w(j){let q=D(j);if(q===null)return()=>{};let v=Error("transaction opened here"),B=setTimeout(()=>{let J=v.stack?.split(`
3
3
  `).slice(1).join(`
4
4
  `)??"";console.warn(`[gemi] A database transaction has not settled after ${q}ms. It `+"reserves a pooled connection until it does \u2014 check for network or "+`filesystem I/O inside the callback, and move it outside the transaction if you find any.
5
5
  ${J}
6
6
  (development only; set database.slowTransactionThreshold to change the threshold, or false to switch this off)`)},q);return B.unref?.(),()=>clearTimeout(B)}async function L(j,q){if(j.length===0)return;await z.run({...q,tx:void 0,afterCommit:void 0,commitDependsOn:void 0,depth:q?.depth??0},async()=>{for(let v of j)try{await v()}catch(B){console.error("An after-commit callback threw. The transaction it was waiting on had already committed and stays committed, and the callbacks after it still ran.",B)}})}function m(j,q,v){let B=z.getStore(),J=v?.connection??K;if(F(J),B?.tx){let G=B.afterCommit,V=G?.length??0,P=B.commitDependsOn,H=P?.length??0;return B.tx.savepoint((X)=>{let R=X;return z.run({...B,tx:R,depth:B.depth+1},async()=>{let S=await q(R);if(P)await W(P,H);return S})}).catch((X)=>{if(G)G.length=V;if(P)P.length=H;throw X})}let $=w(v?.slowTransactionThreshold),Q=[],M=[];try{return j.begin((G)=>z.run({...B,tx:G,depth:0,connection:J===K?void 0:J,afterCommit:Q,commitDependsOn:M},async()=>{let V=await q(G);return await W(M,0),V})).finally($).then(async(G)=>{return Z.set(Q,"committed"),await L(Q,B),G},(G)=>{throw Z.set(Q,"rolled_back"),G})}catch(G){throw $(),G}}
7
- export{z as Uj,O as Vj,_ as Wj,h as Xj,F as Yj,A as Zj,k as _j,N as $j,I as ak,T as bk,x as ck,p as dk,f as ek,C as fk,l as gk,u as hk,m as ik};
7
+ export{z as Vj,O as Wj,_ as Xj,h as Yj,F as Zj,A as _j,k as $j,N as ak,I as bk,T as ck,x as dk,p as ek,f as fk,C as gk,l as hk,u as ik,m as jk};
8
8
 
9
- //# debugId=AF40A91DAD61AA1C64756E2164756E21
9
+ //# debugId=C663842DF0DACA4264756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import type { SQL, TransactionSQL } from \"bun\";\nimport { AsyncLocalStorage } from \"node:async_hooks\";\nimport { SLOW_TRANSACTION_THRESHOLD } from \"../database/config\";\nimport {\n CrossConnectionTransactionError,\n DEFAULT_CONNECTION,\n} from \"../database/Connection\";\n\n/**\n * The ambient transaction: the ORM's own `AsyncLocalStorage`, holding nothing\n * but the open handle and how deep the nesting is.\n *\n * One store per scope with one owner, which is the pattern the framework\n * already follows — `kernel/context.ts` holds the Application,\n * `http/requestContext.ts` the request and its user. The reasoning for\n * not folding this into the kernel's is written up beside it, and the short\n * version is that a transaction scope has to *nest inside* an Application scope\n * without replacing it, and `foundation/app.ts` must keep reading exactly one\n * shape out of the kernel store or resolving a service becomes a transaction\n * concern.\n *\n * What makes an ALS the right home rather than a field somewhere: two concurrent\n * requests each in their own transaction must never see each other's handle.\n * Anything reachable from the Application — which is one object shared by every\n * in-flight request — fails that by construction, and fails it as silently\n * written data, not as an error. \"two concurrent transactions never see each\n * other's handle\" in `context.test.ts` is the test that would catch it.\n */\nexport interface OrmScope {\n /**\n * Bun's transaction handle. Every ORM statement in scope runs on it, which\n * means they all run on one reserved connection — so nothing here may issue\n * two statements concurrently. `Model.$exec` already runs its nested writes\n * and its relation reads sequentially, for exactly this reason.\n */\n tx?: TransactionSQL;\n /** 0 for the outermost transaction, 1+ for each savepoint inside it. */\n depth: number;\n /**\n * Which named connection this subtree's queries run on, and — when `tx` is\n * set — which connection the open transaction belongs to.\n *\n * Ambient rather than an argument threaded through `$exec`, for the same\n * reason the handle above is: a relation read resolves its target through the\n * registry and calls that class's `$exec`, so an argument would have to be\n * carried by every intermediate that has no interest in it, and the one that\n * forgot would silently read a nested `include` off the *other* pool. There\n * is no error that shape produces; there are just rows from the wrong place.\n *\n * `undefined` means the default connection. Kept as absent-rather-than-\n * `\"default\"` so that entering a scope on the default connection is\n * indistinguishable from not entering one, which is what makes the\n * cross-connection check below cost a comparison of two `undefined`s on every\n * application that never declares a second connection.\n */\n connection?: string;\n /**\n * Whether policies are suspended for this scope. Set only by\n * `Model.asSystem`, and never by anything ambient — the whole point is that\n * unscoped access is a decision visible at the call site, not the accidental\n * result of a missing user.\n */\n system?: boolean;\n /**\n * The user policies should scope to, when there is no request to read one\n * from. Set only by `Model.asUser`.\n *\n * A sentinel wrapper rather than the bare value, so that \"a scope was entered\n * with `null`\" stays distinguishable from \"no scope was entered\" — the two\n * mean different things under deny-by-default.\n */\n actor?: { user: unknown };\n /**\n * Work that must not happen unless this transaction commits — an event whose\n * `static afterCommit` is set, today, and nothing else.\n *\n * **Created by the outermost `withTransaction` and never by a savepoint.** A\n * savepoint's scope is a spread of its parent's (`{ ...current, tx: nested }`),\n * so the array arrives here already shared by reference with the transaction\n * that opened it — which is the behaviour wanted rather than a leak. A\n * dispatch made inside a savepoint that commits, in a transaction that then\n * rolls back, must not run: rolling back the outermost transaction discards\n * the list whole, savepoint entries included, because nothing ever drains it.\n *\n * The inverse — a savepoint that rolls back under a transaction that commits\n * — is the case sharing gets wrong on its own, and `withTransaction`'s\n * savepoint branch is where it is put right.\n *\n * Absent, rather than an empty array, on every scope that is not a\n * transaction: `runAsSystem`, `runAsUser` and `runOnConnection` spread\n * whatever they are given, so \"there is a list here\" and \"there is an open\n * transaction here\" have to stay the same question. `deferUntilCommit`\n * answers `false` when either half is missing and the caller runs the work\n * now, which is what keeps a hand-built scope carrying a `tx` — the shape\n * tests write — from swallowing a dispatch into a list nothing drains.\n */\n afterCommit?: AfterCommitCallback[];\n /**\n * Statements written on `tx` that the commit must wait for and must not\n * outlive — today, a job row the database queue driver wrote on the\n * transaction (#563), and nothing else. See `commitDependsOn`.\n *\n * Created and shared exactly as `afterCommit` is, and truncated with it\n * when a savepoint rolls back.\n */\n commitDependsOn?: Promise<unknown>[];\n /**\n * Models whose soft-delete scope (`static $softDeletes`) is lifted or\n * inverted for this async subtree, by name — set only by\n * `Model.withTrashed(fn)` / `Model.onlyTrashed(fn)`.\n *\n * Keyed by model name rather than class because a nested relation read\n * resolves its target through the registry by name, and the block has to\n * reach those reads too. A fresh map per block, never mutated, so an inner\n * block cannot leak its entry back into the enclosing one.\n */\n trashed?: ReadonlyMap<string, TrashedMode>;\n}\n\n/**\n * How a soft-deleted model's trashed rows are treated: `\"with\"` includes them,\n * `\"only\"` reads nothing else. Absent means the default — they are hidden.\n */\nexport type TrashedMode = \"with\" | \"only\";\n\n/**\n * Work deferred to a transaction's commit.\n *\n * Awaited when it is drained, and its rejection is caught there: a callback is\n * a side effect that the transaction is not waiting on and cannot be told\n * about, so the only thing left to do with a failure is report it.\n *\n * Not exported: a caller passes a lambda and never names this, and an export\n * nothing outside this file uses is what `orm/architecture.test.ts` is pointed\n * at. The declaration emit carries it along regardless, so `OrmScope` stays\n * readable from a `.d.ts`.\n */\ntype AfterCommitCallback = () => void | Promise<void>;\n\n/**\n * One ambient scope for the ORM, not one per feature.\n *\n * Transactions (iteration 5) and system access (iteration 6) are both\n * \"something is true for this async subtree and every query in it\", so they\n * share a store rather than minting a second `AsyncLocalStorage` each. The\n * inventory note in `kernel/context.ts` sets the bar for adding one; two\n * booleans-worth of ORM state does not clear it.\n */\nexport const ormContext = new AsyncLocalStorage<OrmScope>();\n\n/**\n * The open transaction, or `undefined` outside one. This is what `Model.$exec`\n * consults to decide which connection a statement runs on.\n *\n * Exported as the escape hatch for code that genuinely needs the handle — a raw\n * query that must join the surrounding transaction, say. **Do not store what it\n * returns.** Bun's handle stays callable after its `begin` resolves: queries on\n * it then run on the pooled connection, outside any transaction, and succeed.\n * Verified against both dialects, and it is the reason `Model.transaction`'s\n * callback takes no argument.\n */\nexport function currentTransaction(): TransactionSQL | undefined {\n return ormContext.getStore()?.tx;\n}\n\n/**\n * The connection every query in this scope runs on unless it names another.\n *\n * `\"default\"` outside any scope, so callers get a name rather than a\n * `string | undefined` to normalise themselves — the store keeps it absent,\n * which is not the same distinction and is nobody else's business.\n */\nexport function currentConnectionName(): string {\n return ormContext.getStore()?.connection ?? DEFAULT_CONNECTION;\n}\n\n/**\n * Run `fn` with `name` as the ambient connection.\n *\n * Merged into the current scope rather than replacing it, exactly as\n * `runAsSystem` and `runAsUser` are: naming a connection must not drop an open\n * transaction handle or re-enable policies underneath it.\n *\n * Deliberately absent from `orm/index.ts`, so it is not part of what an\n * application can reach — `Model.on(name)` and `DB.connection(name)` are the\n * two doors, and both funnel through here so that a nested relation read,\n * which resolves its own class out of the registry and calls its `$exec`,\n * inherits the connection without anything having to pass it along.\n */\nexport function runOnConnection<T>(\n name: string,\n fn: () => Promise<T>,\n): Promise<T> {\n const current = ormContext.getStore();\n if (currentConnectionName() === name) return fn();\n\n // ENTERING A CONNECTION IS WHERE THE CROSS-CONNECTION CHECK BELONGS, not at\n // each door — and it has to be *here*, before the scope is entered, because\n // entering it is what makes the check impossible afterwards.\n //\n // The scope carries `tx` and `connection` together, so overwriting the name\n // while an open handle stays in place produces a store that says \"a\n // transaction on analytics\" while holding the *default* connection's handle.\n // Every check downstream then agrees with itself and the statement runs on\n // the wrong connection's transaction. `Model.save` found this: it routes to\n // the row's own connection, so it is the one caller that switches connections\n // with a transaction already open.\n assertConnectionUsable(name);\n\n return ormContext.run(\n {\n ...current,\n depth: current?.depth ?? 0,\n connection: name === DEFAULT_CONNECTION ? undefined : name,\n },\n fn,\n );\n}\n\n/**\n * Refuse a statement that names one connection while a transaction is open on\n * another.\n *\n * The check `withTransaction`'s single-connection note asked for, and the\n * reasoning for refusing rather than routing is on\n * `CrossConnectionTransactionError`. Both doors call it — `Model.$exec` for\n * every model operation, `DB` for a raw fragment — because either one alone\n * leaves the other free to straddle the two connections, and a raw `DB.execute`\n * escaping a transaction is the more damaging of the two.\n *\n * Only ever fires on a query that *names* a connection: an unqualified one\n * resolves to the ambient name, which is the transaction's own.\n */\nexport function assertConnectionUsable(name: string): void {\n const store = ormContext.getStore();\n if (store?.tx === undefined) return;\n\n const open = store.connection ?? DEFAULT_CONNECTION;\n if (open === name) return;\n\n throw new CrossConnectionTransactionError(open, name);\n}\n\n/**\n * Hold `callback` until the open transaction commits, and say whether that\n * happened.\n *\n * `false` means there was nothing to wait for — no transaction is open, or the\n * scope was entered by hand rather than by `withTransaction` — and the caller\n * must run the work itself, now. That return value is the whole contract: a\n * caller that ignores it turns \"no transaction here\" into a side effect queued\n * on a list nothing will ever drain, which is a dispatch that silently never\n * happens.\n *\n * `true` means the callback is on the outermost scope's list and will run after\n * `begin` resolves, outside the transaction, whatever the caller does next. It\n * will not run at all if the transaction rolls back, or if a savepoint it was\n * registered inside rolls back — both of which are the point.\n *\n * Nothing here is ordered against anything but the other deferred callbacks:\n * they run in registration order, one at a time, after the commit round-trip.\n */\nexport function deferUntilCommit(callback: AfterCommitCallback): boolean {\n const store = ormContext.getStore();\n if (store?.tx === undefined || store.afterCommit === undefined) return false;\n\n // Async work started inside a transaction and not awaited by it — a sync\n // listener still awaiting, an un-awaited emit — can reach here after the\n // transaction settled, through a scope that still carries its handle and its\n // list. Pushing then would queue onto a list already drained (or discarded),\n // and the work would silently never run. A committed list answers \"run it\n // now\"; a rolled-back one keeps the promise that nothing runs.\n const settled = settledLists.get(store.afterCommit);\n if (settled === \"committed\") return false;\n if (settled === \"rolled_back\") return true;\n\n store.afterCommit.push(callback);\n return true;\n}\n\n/**\n * How each outermost transaction's after-commit list ended, once it has. Keyed\n * by the list itself, which every savepoint and every lingering async scope of\n * that transaction shares by reference.\n */\nconst settledLists = new WeakMap<AfterCommitCallback[], \"committed\" | \"rolled_back\">();\n\n/**\n * Run `callback` once the open transaction commits, or now when none is open.\n * Never when the transaction rolls back, nor when a savepoint it was\n * registered inside rolls back.\n *\n * The application-facing form of `deferUntilCommit`, exported from `gemi/orm`\n * (#786). The difference is the `false` branch: `deferUntilCommit` hands the\n * \"no transaction\" case back to the caller, who must remember to run the work\n * itself, and this runs it. A caller that wants a side effect only once its\n * writes are durable — waking a long-poll, notifying another process — has\n * nothing left to get wrong.\n *\n * Inside a transaction the callback joins the same list `static afterCommit`\n * events use, so it is drained after `begin` resolves, outside the\n * transaction, in registration order with them.\n *\n * The returned promise resolves once the callback has run (no transaction) or\n * been queued (inside one). It never rejects: a callback that throws is\n * reported on stderr, as a deferred one is at the drain, so a caller that does\n * not await — the usual case — cannot leave an unhandled rejection behind, and\n * the two branches fail the same way. A sync callback outside a transaction\n * runs before this returns.\n */\nexport function afterCommit(\n callback: () => void | Promise<void>,\n): Promise<void> {\n if (deferUntilCommit(callback)) return Promise.resolve();\n\n const report = (error: unknown) => {\n console.error(\n `An after-commit callback threw. No transaction was open, so it ran ` +\n `immediately.`,\n error,\n );\n };\n try {\n return Promise.resolve(callback()).catch(report);\n } catch (error) {\n report(error);\n return Promise.resolve();\n }\n}\n\n/**\n * Make the open transaction's commit depend on `write`, a statement issued on\n * its handle: the transaction does not commit until `write` settles, and\n * rolls back — rejecting with `TransactionDependencyError` — if it rejected.\n *\n * For a write the caller may not await. A queued listener's dispatch never is\n * (`EventManager` pushes it and moves on), and on Postgres a statement that\n * fails aborts the whole transaction: every statement after it is refused and\n * Bun's `COMMIT` quietly becomes a rollback. Without this, the callback's\n * promise resolved, `begin` resolved, and the rows the caller wrote were gone\n * with nothing to say so. MySQL does not abort on a failed statement, and is\n * failed here anyway, so that a joined write means the same thing on both:\n * it commits with the transaction or the transaction does not commit.\n *\n * `false` when there is no transaction to depend on, as for\n * `deferUntilCommit`.\n */\nexport function commitDependsOn(write: Promise<unknown>): boolean {\n const store = ormContext.getStore();\n if (store?.tx === undefined || store.commitDependsOn === undefined) {\n return false;\n }\n store.commitDependsOn.push(write);\n return true;\n}\n\n/**\n * A write the transaction's commit depended on failed, so the transaction —\n * or the savepoint the write was made in — rolled back. `cause` is the write's\n * own error.\n */\nexport class TransactionDependencyError extends Error {\n constructor(cause: unknown) {\n super(\n `A statement this transaction depended on failed after being issued on ` +\n `it, so the transaction rolled back instead of committing: ` +\n `${cause instanceof Error ? cause.message : String(cause)}`,\n { cause },\n );\n this.name = \"TransactionDependencyError\";\n }\n}\n\n/**\n * Wait for the writes registered from `mark` on, and throw if one failed.\n *\n * Called at the end of a transaction's or savepoint's callback, *inside*\n * `begin`/`savepoint`, so a throw is what makes Bun roll back rather than\n * commit — after `begin` has resolved it is too late to do anything but\n * report. Every write is settled before throwing, so none is still running on\n * the handle when the rollback is issued.\n */\nasync function awaitDependencies(\n writes: Promise<unknown>[],\n mark: number,\n): Promise<void> {\n if (writes.length === mark) return;\n const settled = await Promise.allSettled(writes.slice(mark));\n const failed = settled.find(\n (outcome): outcome is PromiseRejectedResult => outcome.status === \"rejected\",\n );\n if (failed) throw new TransactionDependencyError(failed.reason);\n}\n\n/** How deeply nested the current transaction is; `null` outside one. */\nexport function transactionDepth(): number | null {\n const store = ormContext.getStore();\n return store?.tx === undefined ? null : store.depth;\n}\n\n/** Whether policies are suspended for the current async scope. */\nexport function isSystemScope(): boolean {\n return ormContext.getStore()?.system === true;\n}\n\n/**\n * Run `fn` with policies suspended.\n *\n * The escape hatch the deny-by-default rule needs to be usable: a cron tick, a\n * queue worker or a seed script has no user, and under deny-by-default every\n * policied model would refuse it. This makes that intent explicit *at the call\n * site*, which is the property that matters — unscoped access must never be\n * what happens when a user simply fails to turn up.\n *\n * It nests inside a transaction and a transaction nests inside it: the scope is\n * merged rather than replaced, so `asSystem` does not silently drop an open\n * handle.\n */\nexport function runAsSystem<T>(fn: () => Promise<T>): Promise<T> {\n const current = ormContext.getStore();\n return ormContext.run({ ...current, depth: current?.depth ?? 0, system: true }, fn);\n}\n\n/**\n * How `model`'s trashed rows are treated in this async scope, or `undefined`\n * for the default (hidden). See `OrmScope.trashed`.\n */\nexport function trashedMode(model: string): TrashedMode | undefined {\n return ormContext.getStore()?.trashed?.get(model);\n}\n\n/**\n * Run `fn` with `model`'s soft-delete scope lifted (`\"with\"`) or inverted\n * (`\"only\"`). Merged into the current scope like `runAsSystem`, so it keeps an\n * open transaction, the system flag and the actor — and every other policy.\n */\nexport function runWithTrashed<T>(\n model: string,\n mode: TrashedMode,\n fn: () => Promise<T>,\n): Promise<T> {\n const current = ormContext.getStore();\n const trashed = new Map(current?.trashed);\n trashed.set(model, mode);\n return ormContext.run(\n { ...current, depth: current?.depth ?? 0, trashed },\n fn,\n );\n}\n\n/** The explicitly-set actor, or `undefined` when none was. */\nexport function currentActor(): { user: unknown } | undefined {\n return ormContext.getStore()?.actor;\n}\n\n/**\n * Run `fn` with policies scoped to `user`, for code with no request to read one\n * from.\n *\n * The counterpart to `runAsSystem`, and the reason that one is not the only\n * escape hatch. A queue worker processing \"send the invoice for organisation 7\"\n * genuinely acts *as somebody*; giving it `asSystem` would suspend policies\n * entirely and leave it hand-scoping every query — which is precisely the\n * unscoped-by-accident failure the deny-by-default rule exists to prevent. The\n * narrow tool should be the easy one.\n *\n * It is also what makes policies testable without reaching into\n * `RequestContext`'s internals.\n *\n * Takes precedence over the request store, so a job that says who it is acting\n * as is not quietly overridden by an ambient request that happens to enclose it.\n *\n * It also **clears `system`**, which is the more surprising half. Acting as a\n * user is strictly narrower than acting as the system, so naming one inside an\n * `asSystem` block has to narrow back — and the spread would otherwise carry\n * `system: true` forward, leaving `$exec` to skip policies entirely while\n * `currentUser()` cheerfully returned the actor. Silently unscoped, from the\n * realistic shape: a worker enters `asSystem` to read its job queue, then\n * narrows to the job's owner for the work itself. The reverse nesting —\n * `asSystem` inside `asUser` — suspends policies, which is what it should do.\n */\nexport function runAsUser<T>(user: unknown, fn: () => Promise<T>): Promise<T> {\n const current = ormContext.getStore();\n return ormContext.run(\n {\n ...current,\n depth: current?.depth ?? 0,\n system: false,\n actor: { user: user ?? null },\n },\n fn,\n );\n}\n\n/**\n * The warning threshold in milliseconds, or `null` when the warning is off.\n *\n * `configured` is `database.slowTransactionThreshold` — see `DatabaseConfig`.\n * It arrives as a value rather than being read from here so that this file\n * keeps knowing nothing about the container: `withTransaction` is reachable\n * with a bare pool, and its tests use one.\n *\n * Exported for its own tests. The behaviour worth pinning is the fallback —\n * that a malformed threshold lands on the default rather than disabling — and\n * that cannot be observed through `withTransaction`: \"no warning fired\" is what\n * a disabled warning looks like too, so a behavioural test of it passes just as\n * happily when the fallback is gone. Asserting the number directly is the only\n * form of that test that can fail.\n */\nexport function slowTransactionThreshold(\n configured?: number | false,\n): number | null {\n // Read per call, never cached at module scope. `scripts/build.ts` rewrites\n // `process.env.NODE_ENV` to `Bun.env.NODE_ENV` precisely so mode stays a\n // runtime question in the built framework; caching it here would undo that.\n if (process.env.NODE_ENV !== \"development\") return null;\n\n // The one way to switch it off, and it has to be spelled. Everything else\n // falls back, so the warning is never lost to a mistyped value — only to an\n // explicit `false`.\n if (configured === false) return null;\n\n if (configured === undefined) return SLOW_TRANSACTION_THRESHOLD;\n if (!Number.isFinite(configured) || configured <= 0) {\n return SLOW_TRANSACTION_THRESHOLD;\n }\n return configured;\n}\n\n/**\n * Warn, in development only, about a transaction that has been open too long.\n *\n * The risk is structural rather than occasional: an open transaction holds one\n * reserved connection for as long as its callback runs, and nothing about\n * `Model.transaction(async () => { ... })` stops that callback from awaiting a\n * `fetch`, an S3 upload or a slow queue push. Under concurrency that drains the\n * pool, and the symptom — every unrelated query in the process blocking on\n * connection acquisition — names neither the callback nor the I/O in it.\n *\n * A timer rather than measuring elapsed time on the way out, for one reason:\n * the worst case is the transaction that *never* settles (a hung request, a\n * lock wait, a deadlock). After-the-fact measurement is silent for exactly that\n * case; a timer fires while it is still open and still holding the connection.\n *\n * The `Error` is constructed up front and read only if the timer fires — V8\n * formats `.stack` lazily on first access, so an ordinary fast transaction pays\n * for an object allocation and nothing else.\n *\n * The clock starts at the `begin` call, not at the moment a connection is\n * acquired, and stops when `begin` settles rather than when the callback\n * returns — so it spans the pool wait and the commit round-trip as well as the\n * callback. That is deliberate: all three are time this transaction is in\n * flight, and a warning that only covered the callback would stay silent for a\n * transaction stuck waiting on an exhausted pool, which is the exact situation\n * a long transaction elsewhere creates. Hence \"not settled\" rather than \"open\n * for\" — the message must not claim a connection was held for the whole span.\n */\nfunction watchForSlowTransaction(configured?: number | false): () => void {\n const threshold = slowTransactionThreshold(configured);\n if (threshold === null) return () => {};\n\n const site = new Error(\"transaction opened here\");\n\n const timer = setTimeout(() => {\n const stack = site.stack?.split(\"\\n\").slice(1).join(\"\\n\") ?? \"\";\n console.warn(\n `[gemi] A database transaction has not settled after ${threshold}ms. It ` +\n `reserves a pooled connection until it does — check for network or ` +\n `filesystem I/O inside the callback, and move it outside the ` +\n `transaction if you find any.\\n${stack}\\n` +\n `(development only; set database.slowTransactionThreshold to change ` +\n `the threshold, or false to switch this off)`,\n );\n }, threshold);\n\n // Otherwise the warning timer is itself a reason the process stays alive,\n // which would turn a diagnostic into a hang in short-lived commands and\n // scripts.\n timer.unref?.();\n\n return () => clearTimeout(timer);\n}\n\n/**\n * Runs what a committed transaction deferred, outside the transaction it was\n * deferred by.\n *\n * `outside` is the scope that was ambient before `begin` — an `asSystem` block,\n * a named connection, or nothing at all — and re-entering it explicitly is the\n * guarantee rather than a tidy-up. The alternative is relying on where a `.then`\n * happens to have captured its context, and the failure that produces is the\n * one the whole feature is about: a listener that runs \"after commit\" while\n * still holding the closed transaction's handle joins nothing, because Bun's\n * handle stays callable and simply runs on the pool. So the scope is rebuilt\n * with `tx` and the drained list cleared, and a listener that opens its own\n * transaction gets a real one.\n *\n * Errors are caught per callback and the next one still runs, for the reason\n * the event subsystem catches per listener: these are independent side effects\n * whose order came from a filesystem walk. And the transaction is not failed by\n * one — it committed, the database kept the rows, and reporting a rejection to\n * the caller would have it roll back or retry work that is already durable.\n * stderr is all that is left, and it is enough: the caller has no decision to\n * make here.\n *\n * The transaction's own promise does not resolve until this has finished, which\n * is the one thing about `afterCommit` that a caller can feel. Deliberate: the\n * alternative is a floating promise whose rejection nobody sees and whose work\n * a short-lived process — a command, a seed — exits out from under.\n */\nasync function drainAfterCommit(\n callbacks: AfterCommitCallback[],\n outside: OrmScope | undefined,\n): Promise<void> {\n if (callbacks.length === 0) return;\n\n await ormContext.run(\n {\n ...outside,\n tx: undefined,\n afterCommit: undefined,\n commitDependsOn: undefined,\n depth: outside?.depth ?? 0,\n },\n async () => {\n for (const callback of callbacks) {\n try {\n await callback();\n } catch (error) {\n console.error(\n `An after-commit callback threw. The transaction it was waiting ` +\n `on had already committed and stays committed, and the ` +\n `callbacks after it still ran.`,\n error,\n );\n }\n }\n },\n );\n}\n\n/**\n * Run `fn` inside a transaction, entering the ambient scope for its whole async\n * subtree.\n *\n * The single implementation behind both `Model.transaction` and\n * `DB.transaction`, so the two cannot become transaction systems that ignore\n * each other: a `Model.create` inside a `DB.transaction` joins it, and a raw\n * `DB.sql` inside a `Model.transaction` can join it through\n * `currentTransaction()`.\n *\n * Nesting becomes a savepoint. Not a preference — Bun refuses the alternative\n * outright (`cannot call begin inside a transaction use savepoint() instead`),\n * and a savepoint is the semantics worth having anyway: an inner failure rolls\n * back to it and leaves the outer transaction usable, which a caller that\n * catches can rely on. Verified on SQLite and Postgres.\n *\n * Note Bun hands the savepoint callback the *same* handle object as the outer\n * transaction (`sp === tx`), so the depth counter is the only thing that\n * actually changes on the way in. The callback's argument is still what gets\n * stored, so this keeps working if that ever stops being true. The cast is\n * because Bun types a savepoint handle as plain `SQL` — without `savepoint` on\n * it — while the runtime object does carry the method, which is what makes\n * three levels of nesting work.\n *\n * Anything `deferUntilCommit` queued is drained once `begin` resolves, outside\n * the transaction and only on the outermost call — a savepoint has committed\n * nothing durable, so draining there would run work that a later rollback of\n * the enclosing transaction was meant to have prevented. See `drainAfterCommit`\n * for what that costs the caller.\n *\n * In development, an outermost transaction that stays open past\n * `options.slowTransactionThreshold` (2s by default, `false` to disable) warns\n * — see `watchForSlowTransaction`. Nothing here *prevents* a long transaction;\n * the warning exists because the cost of one is paid by unrelated queries\n * elsewhere in the process, which makes it hard to trace back.\n *\n * The threshold is passed in rather than read from `app(DatabaseManager)` here.\n * Every caller already holds the manager — it is where `pool` came from — and\n * taking it as an argument keeps this file free of the container, so a bare\n * `SQL` is still enough to call it. Its tests rely on that.\n *\n * `options.connection` is the name `pool` belongs to, and follows the same rule\n * for the same reason: the pool cannot be asked what it is called. Passing it\n * is what lets a nested `withTransaction` tell \"the same connection, so take a\n * savepoint\" from \"a different one, so refuse\" — omitting it means the default\n * connection, which is what a two-argument call always meant.\n *\n * The return type is asserted rather than inferred for one reason worth\n * knowing: Bun's `begin` unwraps a callback that resolves to an *array of\n * promises*, awaiting each. So `Model.transaction(async () => [a, b])` where\n * `a` and `b` are promises resolves to their values, not to the promises. That\n * is Bun's behaviour and is left alone; it is only surprising if unmentioned.\n */\nexport function withTransaction<T>(\n pool: SQL,\n fn: (tx: TransactionSQL) => Promise<T>,\n options?: { slowTransactionThreshold?: number | false; connection?: string },\n): Promise<T> {\n const current = ormContext.getStore();\n\n // THE SINGLE-CONNECTION ASSUMPTION, WHICH IS NOW CHECKED RATHER THAN PINNED.\n //\n // The savepoint branch below ignores `pool` entirely. That was correct while\n // there was one `DatabaseManager` and one `SQL` — the ambient handle and\n // whatever pool the caller passed were necessarily the same database — and\n // the note that stood here said what would happen when a second connection\n // became configurable (#327): a `DB.transaction` on B inside a\n // `Model.transaction` on A would savepoint on **A** and hand the callback A's\n // handle, so statements landed in the wrong database with no error at all.\n //\n // So the name is compared before the branch is taken, and a mismatch raises.\n // Refusing is the whole answer rather than half of one — there is no way to\n // make one transaction span two pools, and the alternatives are covered on\n // `CrossConnectionTransactionError`.\n //\n // A caller that passes no `connection` is treated as naming the default,\n // which is what `withTransaction(pool, fn)` meant before this argument\n // existed.\n const name = options?.connection ?? DEFAULT_CONNECTION;\n assertConnectionUsable(name);\n\n // `current?.tx` rather than `current`: since iteration 6 a scope can exist\n // with no open transaction — `Model.asSystem` enters one — and a savepoint\n // needs an actual handle, not merely a store.\n if (current?.tx) {\n // WHERE THE SHARED AFTER-COMMIT LIST IS PUT RIGHT.\n //\n // The savepoint's scope is a spread of this one, so it appends to the\n // transaction's list rather than to a list of its own — which is what makes\n // \"the outer transaction rolled back, so nothing runs\" free. The case that\n // is not free is this one: the savepoint rolls back and the transaction\n // goes on to commit. Its entries have to go, or a dispatch made inside a\n // block the database threw away runs anyway, which is the same wrong answer\n // as before with an extra step.\n //\n // A mark on the way in and a truncate on the way out, rather than tagging\n // each entry with its depth and dropping everything at or below the failing\n // one. Depth cannot tell two *siblings* apart: a savepoint that committed\n // and one that rolled back both left entries at the same depth, adjacent in\n // the list, and dropping by depth would discard the committed sibling's\n // work as well. The index is exact because the ORM issues one statement at\n // a time on a transaction handle — see `OrmScope.tx` — so nothing appends\n // between the mark and the failure but this savepoint's own subtree.\n const deferred = current.afterCommit;\n const mark = deferred?.length ?? 0;\n // The same mark for the writes the commit depends on. The savepoint waits\n // for its own before it releases, so one that failed rolls back only the\n // savepoint — which a caller that catches can survive, exactly as it\n // survives a statement that threw inside it — and is then forgotten\n // rather than failing the transaction a second time.\n const dependencies = current.commitDependsOn;\n const dependencyMark = dependencies?.length ?? 0;\n\n return current.tx\n .savepoint((sp) => {\n const nested = sp as TransactionSQL;\n return ormContext.run(\n { ...current, tx: nested, depth: current.depth + 1 },\n async () => {\n const result = await fn(nested);\n if (dependencies) {\n await awaitDependencies(dependencies, dependencyMark);\n }\n return result;\n },\n );\n })\n .catch((error: unknown) => {\n if (deferred) deferred.length = mark;\n if (dependencies) dependencies.length = dependencyMark;\n throw error;\n }) as Promise<T>;\n }\n\n // Only the outermost scope is watched. A savepoint reserves no connection of\n // its own — its lifetime is bounded by the transaction it sits in, which is\n // already being timed — so warning per depth would report one slow block as\n // several warnings and point at the innermost frame rather than the one\n // holding the connection.\n const stopWatching = watchForSlowTransaction(\n options?.slowTransactionThreshold,\n );\n\n // Built out here rather than inside the `begin` callback, because the drain\n // below needs it *after* that callback's scope is gone, and reading it off\n // the store then is exactly what is no longer possible.\n const deferred: AfterCommitCallback[] = [];\n const dependencies: Promise<unknown>[] = [];\n\n // The `try` covers a *synchronous* throw from `begin` — a closed pool, say.\n // `.finally` alone would not: it is only attached once `begin` has returned a\n // promise, so a synchronous throw escapes with the timer still armed and\n // eventually warns about a transaction that never opened. `unref` keeps that\n // from holding the process, which makes it cosmetic rather than a leak, but\n // it is the same gap the `.finally` below exists to close.\n try {\n // Spread rather than replace: a `Model.transaction` inside a\n // `Model.asSystem` must not silently re-enable policies for its subtree.\n //\n // The connection goes into the scope alongside the handle, and the pair is\n // what makes the check at the top of this function possible: \"which\n // connection is this transaction on\" has to be answerable from the store,\n // because the handle itself does not say. It is also what makes an\n // unqualified query inside `DB.connection(\"analytics\").transaction(...)`\n // *join* the transaction instead of being refused by it — the query\n // inherits the name rather than defaulting to the hot path.\n return (\n pool\n .begin((tx) =>\n ormContext.run(\n {\n ...current,\n tx,\n depth: 0,\n connection: name === DEFAULT_CONNECTION ? undefined : name,\n // A fresh list per outermost transaction, assigned rather than\n // left to the spread. `current` holds no list today — the drain\n // clears the field before it runs anything — and assigning is\n // what keeps that from being load-bearing: a transaction opened\n // by a callback during a drain gets its own list either way,\n // rather than appending to the array it is being run out of.\n afterCommit: deferred,\n commitDependsOn: dependencies,\n },\n async () => {\n const result = await fn(tx);\n await awaitDependencies(dependencies, 0);\n return result;\n },\n ),\n )\n // `finally` and not a `then`/`catch` pair: the connection is released on\n // rollback exactly as it is on commit, so a throwing callback must clear\n // the timer too or every failed transaction leaves a warning armed\n // against a connection that has already gone back to the pool.\n //\n // Before the drain, so that a slow after-commit listener is not\n // reported as a transaction that will not settle. The connection went\n // back to the pool at the commit; the warning is about holding it.\n .finally(stopWatching)\n // Only here, on the fulfilled path. A rejected `begin` rolled back, so\n // the scope and everything queued on it are discarded unread — which is\n // the whole of what `afterCommit` promises.\n .then(\n async (result) => {\n settledLists.set(deferred, \"committed\");\n await drainAfterCommit(deferred, current);\n return result;\n },\n (error: unknown) => {\n settledLists.set(deferred, \"rolled_back\");\n throw error;\n },\n ) as Promise<T>\n );\n } catch (error) {\n stopWatching();\n throw error;\n }\n}\n"
6
6
  ],
7
7
  "mappings": ";yDACA,4BAAS,oBAmJF,IAAM,EAAa,IAAI,EAavB,SAAS,CAAkB,EAA+B,CAC/D,OAAO,EAAW,SAAS,GAAG,GAUzB,SAAS,CAAqB,EAAW,CAC9C,OAAO,EAAW,SAAS,GAAG,YAAc,EAgBvC,SAAS,CAAkB,CAChC,EACA,EACY,CACZ,IAAM,EAAU,EAAW,SAAS,EACpC,GAAI,EAAsB,IAAM,EAAM,OAAO,EAAG,EAehD,OAFA,EAAuB,CAAI,EAEpB,EAAW,IAChB,IACK,EACH,MAAO,GAAS,OAAS,EACzB,WAAY,IAAS,EAAqB,OAAY,CACxD,EACA,CACF,EAiBK,SAAS,CAAsB,CAAC,EAAoB,CACzD,IAAM,EAAQ,EAAW,SAAS,EAClC,GAAI,GAAO,KAAO,OAAW,OAE7B,IAAM,EAAO,EAAM,YAAc,EACjC,GAAI,IAAS,EAAM,OAEnB,MAAM,IAAI,EAAgC,EAAM,CAAI,EAsB/C,SAAS,CAAgB,CAAC,EAAwC,CACvE,IAAM,EAAQ,EAAW,SAAS,EAClC,GAAI,GAAO,KAAO,QAAa,EAAM,cAAgB,OAAW,MAAO,GAQvE,IAAM,EAAU,EAAa,IAAI,EAAM,WAAW,EAClD,GAAI,IAAY,YAAa,MAAO,GACpC,GAAI,IAAY,cAAe,MAAO,GAGtC,OADA,EAAM,YAAY,KAAK,CAAQ,EACxB,GAQT,IAAM,EAAe,IAAI,QAyBlB,SAAS,CAAW,CACzB,EACe,CACf,GAAI,EAAiB,CAAQ,EAAG,OAAO,QAAQ,QAAQ,EAEvD,IAAM,EAAS,CAAC,IAAmB,CACjC,QAAQ,MACN,kFAEA,CACF,GAEF,GAAI,CACF,OAAO,QAAQ,QAAQ,EAAS,CAAC,EAAE,MAA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AI,CAmBf,IAAM,EAAW,EAAQ,YACnB,EAAO,GAAU,QAAU,EAM3B,EAAe,EAAQ,gBACvB,EAAiB,GAAc,QAAU,EAE/C,OAAO,EAAQ,GACZ,UAAU,CAAC,IAAO,CACjB,IAAM,EAAS,EACf,OAAO,EAAW,IAChB,IAAK,EAAS,GAAI,EAAQ,MAAO,EAAQ,MAAQ,CAAE,EACnD,SAAY,CACV,IAAM,EAAS,MAAM,EAAG,CAAM,EAC9B,GAAI,EACF,MAAM,EAAkB,EAAc,CAAc,EAEtD,OAAO,EAEX,EACD,EACA,MAAM,CAAC,IAAmB,CACzB,GAAI,EAAU,EAAS,OAAS,EAChC,GAAI,EAAc,EAAa,OAAS,EACxC,MAAM,EACP,EAQL,IAAM,EAAe,EACnB,GAAS,wBACX,EAKM,EAAkC,CAAC,EACnC,EAAmC,CAAC,EAQ1C,GAAI,CAWF,OACE,EACG,MAAM,CAAC,IACN,EAAW,IACT,IACK,EACH,KACA,MAAO,EACP,WAAY,IAAS,EAAqB,OAAY,EAOtD,YAAa,EACb,gBAAiB,CACnB,EACA,SAAY,CACV,IAAM,EAAS,MAAM,EAAG,CAAE,EAE1B,OADA,MAAM,EAAkB,EAAc,CAAC,EAChC,EAEX,CACF,EASC,QAAQ,CAAY,EAIpB,KACC,MAAO,IAAW,CAGhB,OAFA,EAAa,IAAI,EAAU,WAAW,EACtC,MAAM,EAAiB,EAAU,CAAO,EACjC,GAET,CAAC,IAAmB,CAElB,MADA,EAAa,IAAI,EAAU,aAAa,EAClC,EAEV,EAEJ,MAAO,EAAO,CAEd,MADA,EAAa,EACP",
8
- "debugId": "AF40A91DAD61AA1C64756E2164756E21",
8
+ "debugId": "C663842DF0DACA4264756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{sl as LC}from"./chunk-t2nsn0r2.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
2
+ import{tl as LC}from"./chunk-jzpbwvbt.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
3
3
  export{OC as la};
4
4
 
5
- //# debugId=574FD800DD7662C764756E2164756E21
5
+ //# debugId=045ABC90FA3C32F464756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\nvar __rewriteRelativeImportExtension;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n var ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n __rewriteRelativeImportExtension = function (path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n exporter(\"__rewriteRelativeImportExtension\", __rewriteRelativeImportExtension);\r\n});\r\n\r\n0 && (module.exports = {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __exportStar: __exportStar,\r\n __createBinding: __createBinding,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n});\r\n"
6
6
  ],
7
7
  "mappings": ";6DAeA,IAAI,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,IACH,QAAS,CAAC,EAAS,CAChB,IAAI,EAAO,OAAO,SAAW,SAAW,OAAS,OAAO,OAAS,SAAW,KAAO,OAAO,OAAS,SAAW,KAAO,CAAC,EACtH,GAAI,OAAO,SAAW,YAAc,OAAO,IACvC,OAAO,QAAS,CAAC,SAAS,EAAG,QAAS,CAAC,EAAS,CAAE,EAAQ,EAAe,EAAM,EAAe,CAAO,CAAC,CAAC,EAAI,EAE1G,QAAI,OAAO,IAAW,UAAY,OAAc,KAAY,SAC7D,EAAQ,EAAe,EAAM,EAAsB,EAAO,CAAC,CAAC,EAG5D,OAAQ,EAAe,CAAI,CAAC,EAEhC,SAAS,CAAc,CAAC,EAAS,EAAU,CACvC,GAAI,IAAY,EACZ,GAAI,OAAO,OAAO,SAAW,WACzB,OAAO,eAAe,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAG5D,OAAQ,WAAa,GAG7B,OAAO,QAAS,CAAC,EAAI,EAAG,CAAE,OAAO,EAAQ,GAAM,EAAW,EAAS,EAAI,CAAC,EAAI,MAGnF,QAAS,CAAC,EAAU,CACjB,IAAI,EAAgB,OAAO,gBACtB,CAAE,UAAW,CAAC,CAAE,YAAa,OAAS,QAAS,CAAC,EAAG,EAAG,CAAE,EAAE,UAAY,IACvE,QAAS,CAAC,EAAG,EAAG,CAAE,QAAS,KAAK,EAAG,GAAI,OAAO,UAAU,eAAe,KAAK,EAAG,CAAC,EAAG,EAAE,GAAK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EAC7B,EAAS,SAAU,CAAM,EACzB,EAAS,aAAc,CAAU,EACjC,EAAS,UAAW,CAAO,EAC3B,EAAS,eAAgB,CAAY,EACrC,EAAS,oBAAqB,CAAiB,EAC/C,EAAS,YAAa,CAAS,EAC/B,EAAS,oBAAqB,CAAiB,EAC/C,EAAS,aAAc,CAAU,EACjC,EAAS,YAAa,CAAS,EAC/B,EAAS,cAAe,CAAW,EACnC,EAAS,eAAgB,CAAY,EACrC,EAAS,kBAAmB,CAAe,EAC3C,EAAS,WAAY,CAAQ,EAC7B,EAAS,SAAU,CAAM,EACzB,EAAS,WAAY,CAAQ,EAC7B,EAAS,iBAAkB,CAAc,EACzC,EAAS,gBAAiB,CAAa,EACvC,EAAS,UAAW,CAAO,EAC3B,EAAS,mBAAoB,CAAgB,EAC7C,EAAS,mBAAoB,CAAgB,EAC7C,EAAS,gBAAiB,CAAa,EACvC,EAAS,uBAAwB,CAAoB,EACrD,EAAS,eAAgB,CAAY,EACrC,EAAS,kBAAmB,CAAe,EAC3C,EAAS,yBAA0B,CAAsB,EACzD,EAAS,yBAA0B,CAAsB,EACzD,EAAS,wBAAyB,CAAqB,EACvD,EAAS,0BAA2B,CAAuB,EAC3D,EAAS,qBAAsB,EAAkB,EACjD,EAAS,mCAAoC,EAAgC,EAChF",
8
- "debugId": "574FD800DD7662C764756E2164756E21",
8
+ "debugId": "045ABC90FA3C32F464756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
2
  var j=globalThis.__GEMI_DICTIONARY_REGISTRY__??={registry:new Map,resolved:new Map,inFlight:new Map,renderThenables:new Map,order:[],warmed:new Map,activeLocale:null},{registry:W,resolved:Z,inFlight:V,renderThenables:I,order:E,warmed:X}=j;function N(q,x){return`${q}\x00${x}`}function D(q){if(W.has(q.id))return;W.set(q.id,q),E.push(q.id)}function H(){return E.length}function P(q,x){return Z.get(q)?.get(x)}function $(q,x,A){let z=Z.get(q);if(!z)z=new Map,Z.set(q,z);z.set(x,A)}function U(q,x){let A=P(q,x);if(A)return A;let z=N(q,x),C=V.get(z);if(C)return C;let B=W.get(q);if(!B)throw Error(`Unknown dictionary "${q}". A dictionary must be created with defineDictionary() and its module must have been evaluated before it is read.`);let J=B.load(x);if(!(J instanceof Promise))return $(q,x,J),J;let O=J.then((Q)=>{return $(q,x,Q),V.delete(z),Q},(Q)=>{throw V.delete(z),Q});return V.set(z,O),O}function K(q,x){let A=N(q,x),z=P(q,x),C=I.get(A);if(C&&!(C.degraded&&z))return C;if(z)return G(A,M(z,!C));let B=U(q,x);if(!(B instanceof Promise))return G(A,M(B,!0));let J=B.then((O)=>O,(O)=>{return console.error(`Failed to load dictionary ${q} for locale ${x}; rendering keys instead.`,O),J.degraded=!0,Y});return G(A,J)}function G(q,x){return I.set(q,x),x}function M(q,x){return Object.assign(Promise.resolve(q),{status:"fulfilled",value:q,inHand:x?q:void 0})}var Y={};async function S(q,x){let A=x??X.get(q)??0,z=E.slice(A);if(z.length===0)return;let C=await Promise.all(z.map(async(B)=>{try{return await U(B,_(B,q)),!0}catch{return!1}}));if(x===void 0){let B=C.indexOf(!1),J=B===-1?z.length:B;X.set(q,Math.max(X.get(q)??0,A+J))}}function _(q,x){if(x)return x;return W.get(q)?.locales[0]??x}function L(q,x){if(!q)return;for(let[A,z]of Object.entries(q))$(A,x,z)}function R(q){if(q)j.activeLocale=q}function w(){return j.activeLocale}if(typeof window<"u"){let q=window,x=([z,C,B])=>{$(z,C,B)},A=Array.isArray(q.__GEMI_DICT__)?q.__GEMI_DICT__:[];q.__GEMI_DICT__={push:x};for(let z of A)x(z)}function F(){W.clear(),Z.clear(),V.clear(),I.clear(),X.clear(),E.length=0,j.activeLocale=null}function f(){let q=new Set,x=[],A=[];return{use(z,C,B){let J=`${z} ${C}`;if(q.has(J))return;q.add(J);let O={id:z,locale:C,strings:B};if(x.length===0){A.push(O);return}for(let Q of x)Q(O)},onUse(z){x.push(z);while(A.length>0)z(A.shift())}}}
3
- export{D as yk,H as zk,U as Ak,K as Bk,S as Ck,L as Dk,R as Ek,w as Fk,F as Gk,f as Hk};
3
+ export{D as zk,H as Ak,U as Bk,K as Ck,S as Dk,L as Ek,R as Fk,w as Gk,F as Hk,f as Ik};
4
4
 
5
- //# debugId=E963D478636DBEBF64756E2164756E21
5
+ //# debugId=D8E6C7BBB84E72F164756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "import type { LocaleStrings } from \"./dictionaryShape\";\n\n/**\n * Collects the dictionaries one SSR render actually read.\n *\n * Scoped per request by living in React context rather than in module state: a\n * streaming server has several renders in flight at once, so a module-level\n * collector would mix one page's dictionaries into another's payload. Context\n * is per render tree, which is exactly the boundary wanted, and it needs no\n * async-local storage to survive React's internal scheduling.\n *\n * Why stream these rather than put them in `__GEMI_DATA__`: that snapshot is\n * serialized before `renderToReadableStream` is even called, and which\n * dictionaries a page reads is only known once it has rendered. A suspended\n * segment reveals later still, long after the shell has flushed.\n *\n * The sink deliberately emits data, not markup — `streamQueryInjection` owns\n * script formatting and the `</script>`-safe encoding that goes with it.\n */\nexport interface DictionaryUse {\n id: string;\n locale: string;\n strings: LocaleStrings;\n}\n\nexport interface DictionarySink {\n /** Called during render, the first time a dictionary is read. */\n use(id: string, locale: string, strings: LocaleStrings): void;\n /** The response injector subscribes to receive uses as they happen. */\n onUse(cb: (use: DictionaryUse) => void): void;\n}\n\nexport function createDictionarySink(): DictionarySink {\n const seen = new Set<string>();\n const listeners: Array<(use: DictionaryUse) => void> = [];\n // Uses recorded before the injector subscribed — the render begins before the\n // response stream is wrapped.\n const pending: DictionaryUse[] = [];\n\n return {\n use(id, locale, strings) {\n const key = `${id} ${locale}`;\n if (seen.has(key)) return;\n seen.add(key);\n const entry: DictionaryUse = { id, locale, strings };\n if (listeners.length === 0) {\n pending.push(entry);\n return;\n }\n for (const listener of listeners) listener(entry);\n },\n onUse(cb) {\n listeners.push(cb);\n while (pending.length > 0) {\n cb(pending.shift()!);\n }\n },\n };\n}\n"
7
7
  ],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CAC1B,EAAQ,KAAK,CAAK,EAClB,OAEF,QAAW,KAAY,EAAW,EAAS,CAAK,GAElD,KAAK,CAAC,EAAI,CACR,EAAU,KAAK,CAAE,EACjB,MAAO,EAAQ,OAAS,EACtB,EAAG,EAAQ,MAAM,CAAE,EAGzB",
9
- "debugId": "E963D478636DBEBF64756E2164756E21",
9
+ "debugId": "D8E6C7BBB84E72F164756E2164756E21",
10
10
  "names": []
11
11
  }
@@ -1,5 +1,5 @@
1
1
  // @bun
2
2
  class j{deliver=null;hooks;get started(){return this.deliver!==null}publish(b,g){this.deliver?.(b,g)}start(b,g){this.deliver=b,this.hooks=g}revoke(b){this.hooks?.onRevoke?.(b)}close(){this.deliver=null,this.hooks=void 0}}
3
- export{j as Oj};
3
+ export{j as Pj};
4
4
 
5
- //# debugId=5FEB5AF29968E55364756E2164756E21
5
+ //# debugId=F313DAFAA1FEC7C064756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import type {\n BroadcastDeliver,\n BroadcastDriver,\n BroadcastDriverHooks,\n BroadcastRevocation,\n} from \"./BroadcastDriver\";\n\n/**\n * The default driver: an emit reaches the sockets of **this process only**.\n *\n * Right for one instance whose web processes also run the jobs and cron that\n * emit. Wrong as soon as there are two replicas, or a `gemi queue:work`\n * worker that emits: those frames reach nobody, with nothing to say so. Use\n * the Redis driver there.\n *\n * Before the HTTP server starts the transport, there is nobody to deliver to,\n * and `publish` drops the frame.\n */\nexport class MemoryBroadcastDriver implements BroadcastDriver {\n private deliver: BroadcastDeliver | null = null;\n private hooks: BroadcastDriverHooks | undefined;\n\n /** Whether the transport has started this driver. */\n get started(): boolean {\n return this.deliver !== null;\n }\n\n publish(topic: string, frame: string): void {\n this.deliver?.(topic, frame);\n }\n\n start(deliver: BroadcastDeliver, hooks?: BroadcastDriverHooks): void {\n this.deliver = deliver;\n this.hooks = hooks;\n }\n\n revoke(revocation: BroadcastRevocation): void {\n this.hooks?.onRevoke?.(revocation);\n }\n\n close(): void {\n this.deliver = null;\n this.hooks = undefined;\n }\n}\n"
6
6
  ],
7
7
  "mappings": ";AAkBO,MAAM,CAAiD,CACpD,QAAmC,KACnC,SAGJ,QAAO,EAAY,CACrB,OAAO,KAAK,UAAY,KAG1B,OAAO,CAAC,EAAe,EAAqB,CAC1C,KAAK,UAAU,EAAO,CAAK,EAG7B,KAAK,CAAC,EAA2B,EAAoC,CACnE,KAAK,QAAU,EACf,KAAK,MAAQ,EAGf,MAAM,CAAC,EAAuC,CAC5C,KAAK,OAAO,WAAW,CAAU,EAGnC,KAAK,EAAS,CACZ,KAAK,QAAU,KACf,KAAK,MAAQ,OAEjB",
8
- "debugId": "5FEB5AF29968E55364756E2164756E21",
8
+ "debugId": "F313DAFAA1FEC7C064756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Fj as P,tj as X}from"./chunk-a37shxb1.js";function f(){return{now:new Date,resolved:{}}}var b={now:new Date(0),resolved:{}};function x(z){return(G,H=b)=>{let V=[];for(let Z=0;Z<z.length;Z++)V.push(z[Z](G,H));return V}}var j="\x00";function W(z){return{text:z,binders:[]}}function Q(z,G=""){return{text:j+G,binders:[z]}}function p(z){return z.text.split(j)}function m(z,G){return{text:z.join(j),binders:G}}function $(...z){return I(z,"")}function I(z,G){let H="",V=[];for(let Z=0;Z<z.length;Z++){if(Z>0)H+=G;H+=z[Z].text;for(let Y of z[Z].binders)V.push(Y)}return{text:H,binders:V}}function c(z,G,H){let V=z.text.split(j),Z=V.length-1;if(Z!==z.binders.length)throw Error(`Compiled ${Z} parameter placeholders but collected ${z.binders.length} binders.`);if(Z>G.maxBoundParameters)throw new P(H.model,H.operation,Z,G.maxBoundParameters,G.name,G.bindsListAsOneParameter?"That is one parameter per value in the statement.":`That is one parameter per value, and on ${G.name} each element of an 'in' list counts separately.`);let Y=V[0];for(let B=0;B<Z;B++)Y+=G.placeholder(B)+V[B+1];return{text:Y,binders:z.binders}}class K{name="postgres";supportsInsensitiveMode=!0;bindsListAsOneParameter=!0;supportsReturning=!0;maxBoundParameters=65535;typesParametersFromStatement=!0;quoteIdent(z){if(z.includes("\x00"))throw Error(`Refusing to quote the identifier ${JSON.stringify(z)}: it contains a NUL byte, which is reserved as the parameter marker.`);return`"${z.replace(/"/g,'""')}"`}placeholder(z){return`$${z+1}`}inList(z,G,H,V){return $(W(`${z} ${G?"<> all":"= any"} (`),Q((Y,B)=>C(V(Y,B))),W(")"))}static COMPOSITE_IN_TYPES={Int:"int",BigInt:"bigint",String:"text",Boolean:"boolean"};canBindCompositeIn(z){return z.length>0&&z.every((G)=>K.COMPOSITE_IN_TYPES[G])}compositeIn(z,G,H){let V=z.map((Z,Y)=>$(Q((B,J)=>C(H(B,J).map((F)=>F[Y]))),W(`::${K.COMPOSITE_IN_TYPES[G[Y]]}[]`)));return $(W(`(${z.join(", ")}) in (select * from unnest(`),...V.flatMap((Z,Y)=>Y===0?[Z]:[W(", "),Z]),W("))"))}listFilters=new Set(["equals","has","hasEvery","hasSome","isEmpty"]);listHas(z,G){return $(G,W(` = any(${z})`))}listHasEvery(z,G){return $(W(`${z} @> `),G)}listHasSome(z,G){return $(W(`${z} && `),G)}listIsEmpty(z,G){return $(W(`${z} ${G?"=":"<>"} `),Q(()=>C([])))}listPush(z,G){return $(W(`array_cat(${z}, `),G,W(")"))}jsonPathSyntax="array";jsonFilters=new Set(["equals","not","string_contains","string_starts_with","string_ends_with","array_contains","lt","lte","gt","gte"]);jsonComparesAsText=!0;jsonExtract(z,G,H){return $(W(`${z} ${H?"#>>":"#>"} `),Q((V,Z)=>C(G(V,Z))))}jsonValueAt(z,G){return $(W("("),this.jsonExtract(z,G,!1),W(")::jsonb"))}jsonHasKeys(z,G,H,V){let Z=()=>G===void 0?W(`(${z})::jsonb`):$(W("("),this.jsonExtract(z,G,!1),W(")::jsonb")),Y=V==="one"?$(Q(H),W("::text")):$(Q((J,F)=>C(H(J,F)??[])),W("::text[]")),B=V==="one"?"?":V==="some"?"?|":"?&";return $(W("(jsonb_typeof("),Z(),W(") = 'object' and "),Z(),W(` ${B} `),Y,W(")"))}distinctFrom(z,G,H){let V=H.type==="Json"&&!H.isList;return $(W(V?`(${z})::jsonb is distinct from `:`${z} is distinct from `),G)}jsonArrayContains(z,G,H){return $(W("("),this.jsonExtract(z,G,!1),W(") @> "),Q((V,Z)=>{let Y=H(V,Z);if(Y===null||Y===void 0)return null;return typeof Y==="string"||typeof Y==="object"?Y:JSON.stringify(Y)}),W("::jsonb"))}like(z,G,H){return $(W(`${z} ${G?"ilike":"like"} `),Q(H))}ignoreConflicts(){return W(" on conflict do nothing")}rowLock(z,G){let H=z.onLocked==="skipLocked"?" skip locked":z.onLocked==="noWait"?" nowait":"";return W(` for ${z.mode==="share"?"share":"update"} of ${this.quoteIdent(G)}${H}`)}paginate(z,G){let H=[];if(z)H.push($(W(" limit "),Q(z)));if(G)H.push($(W(" offset "),Q(G)));return $(...H)}constraintViolation(z){let G=z;if(!G)return null;if(String(G.errno??G.code??"")!=="23505")return null;let V=typeof G.constraint==="string"&&G.constraint!==""?G.constraint:void 0,Z=typeof G.detail==="string"?G.detail:"",Y=/\((.+?)\)=/.exec(Z);return{kind:"unique",columns:Y?(Y[1].match(/"(?:[^"]|"")*"|[^,]+/g)??[]).map((J)=>J.trim()).filter((J)=>J!=="").map((J)=>/^".*"$/s.test(J)?J.slice(1,-1).replace(/""/g,'"'):J):[],constraint:V}}castParameter(z){if(z.isList)return"";return z.type==="Json"?"::text::jsonb":""}encode(z,G){if(z===null||z===void 0)return null;if(G.isList){if(!Array.isArray(z))throw Error(`gemi ORM bug: a non-array reached the parameter binder for the scalar list '${G.column}' (received ${typeof z}). Every path that binds a list is supposed to have checked its operand.`);return C(G.type==="Json"?z.map((H)=>H===null||H===void 0?null:JSON.stringify(H)):z)}return z}encodeUntyped(z){return z}needsDecode(z){return z.isList===!0||z.type==="BigInt"||z.type==="Bytes"}decode(z,G){if(z===null||z===void 0)return null;if(G.isList)return this.decodeList(z,G);return this.decodeScalar(z,G)}decodeList(z,G){let H=Array.isArray(z)?z:typeof z==="string"?E(z,G):ArrayBuffer.isView(z)?Array.from(z):null;if(H===null)throw new X(G,z);return H.map((V)=>V===null||V===void 0?null:this.decodeScalar(V,G))}decodeScalar(z,G){switch(G.type){case"BigInt":if(typeof z==="bigint")return z;try{return BigInt(z)}catch{throw new X(G,z)}case"Json":return z;case"Bytes":return Buffer.isBuffer(z)?new Uint8Array(z.buffer,z.byteOffset,z.byteLength):z;default:return z}}}function C(z){let G="{";for(let H=0;H<z.length;H++){if(H>0)G+=",";G+=D(z[H])}return G+"}"}function D(z){if(z===null||z===void 0)return"NULL";if(z instanceof Date)return`"${z.toISOString()}"`;if(ArrayBuffer.isView(z)){let H="";for(let V of new Uint8Array(z.buffer,z.byteOffset,z.byteLength))H+=V.toString(16).padStart(2,"0");return`"\\\\x${H}"`}return`"${(typeof z==="string"?z:String(z)).replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`}function E(z,G){if(!z.startsWith("{")||!z.endsWith("}"))throw new X(G,z);if(z==="{}")return[];let H=[],V=1,Z=z.length-1;while(V<=Z){let Y="",B=!1;if(z[V]==='"'){B=!0,V++;while(V<Z&&z[V]!=='"')Y+=z[V]==="\\"?z[++V]:z[V],V++;V++}else while(V<Z&&z[V]!==","){if(z[V]==="{")throw new X(G,z);Y+=z[V],V++}if(H.push(!B&&Y.toUpperCase()==="NULL"?null:Y),V<Z&&z[V]!==",")throw new X(G,z);V++}if(G.type!=="Json")return H;return H.map((Y)=>{if(Y===null)return null;try{return JSON.parse(Y)}catch{throw new X(G,Y)}})}var k={"Prisma.DbNull":"db","Prisma.JsonNull":"json","Prisma.AnyNull":"any"};function _(z){return new class{toString(){return z}}}var s=_("Prisma.DbNull"),y=_("Prisma.JsonNull"),u=_("Prisma.AnyNull"),r=y;function A(z){if(typeof z!=="object"||z===null)return null;for(let H in z)return null;if(Object.getOwnPropertyNames(z).length>0)return null;let G;try{G=String(z)}catch{return null}return k[G]??null}var h=/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(\.\d+)?$/;function q(z,G){if(z instanceof Date)return z;let H;if(typeof z==="number")H=new Date(z);else if(typeof z==="bigint")H=new Date(Number(z));else if(typeof z==="string")H=new Date(h.test(z)?`${z.replace(" ","T")}Z`:z);else throw new X(G,z);if(Number.isNaN(H.getTime()))throw new X(G,z);return H}class S{name="sqlite";supportsInsensitiveMode=!1;bindsListAsOneParameter=!1;supportsReturning=!0;maxBoundParameters=32766;typesParametersFromStatement=!1;quoteIdent(z){if(z.includes("\x00"))throw Error(`Refusing to quote the identifier ${JSON.stringify(z)}: it contains a NUL byte, which is reserved as the parameter marker.`);return`"${z.replace(/"/g,'""')}"`}placeholder(z){return"?"}inList(z,G,H,V){let Z=G?"not in":"in",Y=[];for(let B=0;B<H;B++)Y.push(Q((J,F)=>V(J,F)[B]));return $(W(`${z} ${Z} (`),I(Y,", "),W(")"))}canBindCompositeIn(){return!1}compositeIn(){throw Error("SQLite cannot bind a composite `in`; `canBindCompositeIn` is the guard.")}listFilters=new Set;listHas(){throw Error(N("has"))}listHasEvery(){throw Error(N("hasEvery"))}listHasSome(){throw Error(N("hasSome"))}listIsEmpty(){throw Error(N("isEmpty"))}listPush(){throw Error(N("push"))}jsonPathSyntax="jsonpath";jsonFilters=new Set(["equals","not","string_contains","string_starts_with","string_ends_with"]);jsonComparesAsText=!1;jsonExtract(z,G,H){return $(W(`json_extract(${z}, `),Q(G),W(")"))}jsonValueAt(z,G){return $(W(`(${z} -> `),Q(G),W(")"))}jsonHasKeys(z,G,H,V,Z){let Y=(O,U)=>G===void 0?"$":G(O,U),B=(O)=>$(W(`json_type(${z}, `),Q((U,M)=>{let w=H(U,M),L=O===void 0?w:w[O];return`${Y(U,M)}.${JSON.stringify(String(L))}`}),W(") is not null")),J=V==="one"?[B(void 0)]:Array.from({length:Z},(O,U)=>B(U)),F=J.length===0?W(V==="some"?"0":"1"):I(J,V==="every"?" and ":" or ");return $(W(`(json_type(${z}, `),Q(Y),W(") = 'object' and ("),F,W("))"))}distinctFrom(z,G,H){if(H.type==="Json"&&!H.isList)return $(W(`json(${z}) is not json(`),G,W(")"));return $(W(`${z} is not `),G)}jsonArrayContains(){throw Error("SQLite cannot express array_contains; `jsonFilters` is the guard.")}like(z,G,H){return $(W(`${z} like `),Q(H))}ignoreConflicts(){return null}rowLock(z,G){return W("")}paginate(z,G){if(!z&&!G)return W("");if(!G)return $(W(" limit "),Q(z));return $(W(" limit "),Q(z??(()=>-1)),W(" offset "),Q(G))}constraintViolation(z){let G=z?.code;if(G!=="SQLITE_CONSTRAINT_UNIQUE"&&G!=="SQLITE_CONSTRAINT_PRIMARYKEY")return null;let H=String(z.message??""),V=/constraint failed:\s*(.+)$/.exec(H);if(!V)return{kind:"unique",columns:[]};return{kind:"unique",columns:V[1].split(",").map((Y)=>Y.trim()).map((Y)=>{let B=Y.indexOf(".");return B===-1?Y:Y.slice(B+1)}).filter((Y)=>Y!=="")}}castParameter(z){return""}encode(z,G){if(z===null||z===void 0)return null;switch(G.type){case"DateTime":return z instanceof Date?z.getTime():z;case"Boolean":return typeof z==="boolean"?z?1:0:z;case"Json":{let H=A(z);if(H==="db")return null;if(H==="json")return"null";if(H==="any")throw Error("gemi ORM bug: Prisma.AnyNull reached the SQLite encoder. It is a filter operand only, and both the filter and write paths are supposed to have handled it before this point.")}return JSON.stringify(z);default:return z}}encodeUntyped(z){if(z instanceof Date)return z.getTime();if(typeof z==="boolean")return z?1:0;return z}needsDecode(z){switch(z.type){case"DateTime":case"Boolean":case"BigInt":case"Json":return!0;default:return!1}}decode(z,G){if(z===null||z===void 0)return null;switch(G.type){case"DateTime":return q(z,G);case"Boolean":if(typeof z==="boolean")return z;return Number(z)!==0;case"BigInt":if(typeof z==="bigint")return z;try{return BigInt(z)}catch{throw new X(G,z)}case"Json":try{return typeof z==="string"?JSON.parse(z):z}catch{throw new X(G,z)}default:return z}}}function N(z){return`SQLite has no array type, so it cannot express '${z}' on a scalar list; \`listFilters\` is the guard.`}class R extends Error{constructor(z){super(`The gemi ORM does not support the '${z}' dialect. Only sqlite `+"and postgres are implemented \u2014 see the supported matrix in "+`docs/orm.md.
2
+ import{Gj as P,uj as X}from"./chunk-xv58jnpb.js";function f(){return{now:new Date,resolved:{}}}var b={now:new Date(0),resolved:{}};function x(z){return(G,H=b)=>{let V=[];for(let Z=0;Z<z.length;Z++)V.push(z[Z](G,H));return V}}var j="\x00";function W(z){return{text:z,binders:[]}}function Q(z,G=""){return{text:j+G,binders:[z]}}function p(z){return z.text.split(j)}function m(z,G){return{text:z.join(j),binders:G}}function $(...z){return I(z,"")}function I(z,G){let H="",V=[];for(let Z=0;Z<z.length;Z++){if(Z>0)H+=G;H+=z[Z].text;for(let Y of z[Z].binders)V.push(Y)}return{text:H,binders:V}}function c(z,G,H){let V=z.text.split(j),Z=V.length-1;if(Z!==z.binders.length)throw Error(`Compiled ${Z} parameter placeholders but collected ${z.binders.length} binders.`);if(Z>G.maxBoundParameters)throw new P(H.model,H.operation,Z,G.maxBoundParameters,G.name,G.bindsListAsOneParameter?"That is one parameter per value in the statement.":`That is one parameter per value, and on ${G.name} each element of an 'in' list counts separately.`);let Y=V[0];for(let B=0;B<Z;B++)Y+=G.placeholder(B)+V[B+1];return{text:Y,binders:z.binders}}class K{name="postgres";supportsInsensitiveMode=!0;bindsListAsOneParameter=!0;supportsReturning=!0;maxBoundParameters=65535;typesParametersFromStatement=!0;quoteIdent(z){if(z.includes("\x00"))throw Error(`Refusing to quote the identifier ${JSON.stringify(z)}: it contains a NUL byte, which is reserved as the parameter marker.`);return`"${z.replace(/"/g,'""')}"`}placeholder(z){return`$${z+1}`}inList(z,G,H,V){return $(W(`${z} ${G?"<> all":"= any"} (`),Q((Y,B)=>C(V(Y,B))),W(")"))}static COMPOSITE_IN_TYPES={Int:"int",BigInt:"bigint",String:"text",Boolean:"boolean"};canBindCompositeIn(z){return z.length>0&&z.every((G)=>K.COMPOSITE_IN_TYPES[G])}compositeIn(z,G,H){let V=z.map((Z,Y)=>$(Q((B,J)=>C(H(B,J).map((F)=>F[Y]))),W(`::${K.COMPOSITE_IN_TYPES[G[Y]]}[]`)));return $(W(`(${z.join(", ")}) in (select * from unnest(`),...V.flatMap((Z,Y)=>Y===0?[Z]:[W(", "),Z]),W("))"))}listFilters=new Set(["equals","has","hasEvery","hasSome","isEmpty"]);listHas(z,G){return $(G,W(` = any(${z})`))}listHasEvery(z,G){return $(W(`${z} @> `),G)}listHasSome(z,G){return $(W(`${z} && `),G)}listIsEmpty(z,G){return $(W(`${z} ${G?"=":"<>"} `),Q(()=>C([])))}listPush(z,G){return $(W(`array_cat(${z}, `),G,W(")"))}jsonPathSyntax="array";jsonFilters=new Set(["equals","not","string_contains","string_starts_with","string_ends_with","array_contains","lt","lte","gt","gte"]);jsonComparesAsText=!0;jsonExtract(z,G,H){return $(W(`${z} ${H?"#>>":"#>"} `),Q((V,Z)=>C(G(V,Z))))}jsonValueAt(z,G){return $(W("("),this.jsonExtract(z,G,!1),W(")::jsonb"))}jsonHasKeys(z,G,H,V){let Z=()=>G===void 0?W(`(${z})::jsonb`):$(W("("),this.jsonExtract(z,G,!1),W(")::jsonb")),Y=V==="one"?$(Q(H),W("::text")):$(Q((J,F)=>C(H(J,F)??[])),W("::text[]")),B=V==="one"?"?":V==="some"?"?|":"?&";return $(W("(jsonb_typeof("),Z(),W(") = 'object' and "),Z(),W(` ${B} `),Y,W(")"))}distinctFrom(z,G,H){let V=H.type==="Json"&&!H.isList;return $(W(V?`(${z})::jsonb is distinct from `:`${z} is distinct from `),G)}jsonArrayContains(z,G,H){return $(W("("),this.jsonExtract(z,G,!1),W(") @> "),Q((V,Z)=>{let Y=H(V,Z);if(Y===null||Y===void 0)return null;return typeof Y==="string"||typeof Y==="object"?Y:JSON.stringify(Y)}),W("::jsonb"))}like(z,G,H){return $(W(`${z} ${G?"ilike":"like"} `),Q(H))}ignoreConflicts(){return W(" on conflict do nothing")}rowLock(z,G){let H=z.onLocked==="skipLocked"?" skip locked":z.onLocked==="noWait"?" nowait":"";return W(` for ${z.mode==="share"?"share":"update"} of ${this.quoteIdent(G)}${H}`)}paginate(z,G){let H=[];if(z)H.push($(W(" limit "),Q(z)));if(G)H.push($(W(" offset "),Q(G)));return $(...H)}constraintViolation(z){let G=z;if(!G)return null;if(String(G.errno??G.code??"")!=="23505")return null;let V=typeof G.constraint==="string"&&G.constraint!==""?G.constraint:void 0,Z=typeof G.detail==="string"?G.detail:"",Y=/\((.+?)\)=/.exec(Z);return{kind:"unique",columns:Y?(Y[1].match(/"(?:[^"]|"")*"|[^,]+/g)??[]).map((J)=>J.trim()).filter((J)=>J!=="").map((J)=>/^".*"$/s.test(J)?J.slice(1,-1).replace(/""/g,'"'):J):[],constraint:V}}castParameter(z){if(z.isList)return"";return z.type==="Json"?"::text::jsonb":""}encode(z,G){if(z===null||z===void 0)return null;if(G.isList){if(!Array.isArray(z))throw Error(`gemi ORM bug: a non-array reached the parameter binder for the scalar list '${G.column}' (received ${typeof z}). Every path that binds a list is supposed to have checked its operand.`);return C(G.type==="Json"?z.map((H)=>H===null||H===void 0?null:JSON.stringify(H)):z)}return z}encodeUntyped(z){return z}needsDecode(z){return z.isList===!0||z.type==="BigInt"||z.type==="Bytes"}decode(z,G){if(z===null||z===void 0)return null;if(G.isList)return this.decodeList(z,G);return this.decodeScalar(z,G)}decodeList(z,G){let H=Array.isArray(z)?z:typeof z==="string"?E(z,G):ArrayBuffer.isView(z)?Array.from(z):null;if(H===null)throw new X(G,z);return H.map((V)=>V===null||V===void 0?null:this.decodeScalar(V,G))}decodeScalar(z,G){switch(G.type){case"BigInt":if(typeof z==="bigint")return z;try{return BigInt(z)}catch{throw new X(G,z)}case"Json":return z;case"Bytes":return Buffer.isBuffer(z)?new Uint8Array(z.buffer,z.byteOffset,z.byteLength):z;default:return z}}}function C(z){let G="{";for(let H=0;H<z.length;H++){if(H>0)G+=",";G+=D(z[H])}return G+"}"}function D(z){if(z===null||z===void 0)return"NULL";if(z instanceof Date)return`"${z.toISOString()}"`;if(ArrayBuffer.isView(z)){let H="";for(let V of new Uint8Array(z.buffer,z.byteOffset,z.byteLength))H+=V.toString(16).padStart(2,"0");return`"\\\\x${H}"`}return`"${(typeof z==="string"?z:String(z)).replace(/\\/g,"\\\\").replace(/"/g,"\\\"")}"`}function E(z,G){if(!z.startsWith("{")||!z.endsWith("}"))throw new X(G,z);if(z==="{}")return[];let H=[],V=1,Z=z.length-1;while(V<=Z){let Y="",B=!1;if(z[V]==='"'){B=!0,V++;while(V<Z&&z[V]!=='"')Y+=z[V]==="\\"?z[++V]:z[V],V++;V++}else while(V<Z&&z[V]!==","){if(z[V]==="{")throw new X(G,z);Y+=z[V],V++}if(H.push(!B&&Y.toUpperCase()==="NULL"?null:Y),V<Z&&z[V]!==",")throw new X(G,z);V++}if(G.type!=="Json")return H;return H.map((Y)=>{if(Y===null)return null;try{return JSON.parse(Y)}catch{throw new X(G,Y)}})}var k={"Prisma.DbNull":"db","Prisma.JsonNull":"json","Prisma.AnyNull":"any"};function _(z){return new class{toString(){return z}}}var s=_("Prisma.DbNull"),y=_("Prisma.JsonNull"),u=_("Prisma.AnyNull"),r=y;function A(z){if(typeof z!=="object"||z===null)return null;for(let H in z)return null;if(Object.getOwnPropertyNames(z).length>0)return null;let G;try{G=String(z)}catch{return null}return k[G]??null}var h=/^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(\.\d+)?$/;function q(z,G){if(z instanceof Date)return z;let H;if(typeof z==="number")H=new Date(z);else if(typeof z==="bigint")H=new Date(Number(z));else if(typeof z==="string")H=new Date(h.test(z)?`${z.replace(" ","T")}Z`:z);else throw new X(G,z);if(Number.isNaN(H.getTime()))throw new X(G,z);return H}class S{name="sqlite";supportsInsensitiveMode=!1;bindsListAsOneParameter=!1;supportsReturning=!0;maxBoundParameters=32766;typesParametersFromStatement=!1;quoteIdent(z){if(z.includes("\x00"))throw Error(`Refusing to quote the identifier ${JSON.stringify(z)}: it contains a NUL byte, which is reserved as the parameter marker.`);return`"${z.replace(/"/g,'""')}"`}placeholder(z){return"?"}inList(z,G,H,V){let Z=G?"not in":"in",Y=[];for(let B=0;B<H;B++)Y.push(Q((J,F)=>V(J,F)[B]));return $(W(`${z} ${Z} (`),I(Y,", "),W(")"))}canBindCompositeIn(){return!1}compositeIn(){throw Error("SQLite cannot bind a composite `in`; `canBindCompositeIn` is the guard.")}listFilters=new Set;listHas(){throw Error(N("has"))}listHasEvery(){throw Error(N("hasEvery"))}listHasSome(){throw Error(N("hasSome"))}listIsEmpty(){throw Error(N("isEmpty"))}listPush(){throw Error(N("push"))}jsonPathSyntax="jsonpath";jsonFilters=new Set(["equals","not","string_contains","string_starts_with","string_ends_with"]);jsonComparesAsText=!1;jsonExtract(z,G,H){return $(W(`json_extract(${z}, `),Q(G),W(")"))}jsonValueAt(z,G){return $(W(`(${z} -> `),Q(G),W(")"))}jsonHasKeys(z,G,H,V,Z){let Y=(O,U)=>G===void 0?"$":G(O,U),B=(O)=>$(W(`json_type(${z}, `),Q((U,M)=>{let w=H(U,M),L=O===void 0?w:w[O];return`${Y(U,M)}.${JSON.stringify(String(L))}`}),W(") is not null")),J=V==="one"?[B(void 0)]:Array.from({length:Z},(O,U)=>B(U)),F=J.length===0?W(V==="some"?"0":"1"):I(J,V==="every"?" and ":" or ");return $(W(`(json_type(${z}, `),Q(Y),W(") = 'object' and ("),F,W("))"))}distinctFrom(z,G,H){if(H.type==="Json"&&!H.isList)return $(W(`json(${z}) is not json(`),G,W(")"));return $(W(`${z} is not `),G)}jsonArrayContains(){throw Error("SQLite cannot express array_contains; `jsonFilters` is the guard.")}like(z,G,H){return $(W(`${z} like `),Q(H))}ignoreConflicts(){return null}rowLock(z,G){return W("")}paginate(z,G){if(!z&&!G)return W("");if(!G)return $(W(" limit "),Q(z));return $(W(" limit "),Q(z??(()=>-1)),W(" offset "),Q(G))}constraintViolation(z){let G=z?.code;if(G!=="SQLITE_CONSTRAINT_UNIQUE"&&G!=="SQLITE_CONSTRAINT_PRIMARYKEY")return null;let H=String(z.message??""),V=/constraint failed:\s*(.+)$/.exec(H);if(!V)return{kind:"unique",columns:[]};return{kind:"unique",columns:V[1].split(",").map((Y)=>Y.trim()).map((Y)=>{let B=Y.indexOf(".");return B===-1?Y:Y.slice(B+1)}).filter((Y)=>Y!=="")}}castParameter(z){return""}encode(z,G){if(z===null||z===void 0)return null;switch(G.type){case"DateTime":return z instanceof Date?z.getTime():z;case"Boolean":return typeof z==="boolean"?z?1:0:z;case"Json":{let H=A(z);if(H==="db")return null;if(H==="json")return"null";if(H==="any")throw Error("gemi ORM bug: Prisma.AnyNull reached the SQLite encoder. It is a filter operand only, and both the filter and write paths are supposed to have handled it before this point.")}return JSON.stringify(z);default:return z}}encodeUntyped(z){if(z instanceof Date)return z.getTime();if(typeof z==="boolean")return z?1:0;return z}needsDecode(z){switch(z.type){case"DateTime":case"Boolean":case"BigInt":case"Json":return!0;default:return!1}}decode(z,G){if(z===null||z===void 0)return null;switch(G.type){case"DateTime":return q(z,G);case"Boolean":if(typeof z==="boolean")return z;return Number(z)!==0;case"BigInt":if(typeof z==="bigint")return z;try{return BigInt(z)}catch{throw new X(G,z)}case"Json":try{return typeof z==="string"?JSON.parse(z):z}catch{throw new X(G,z)}default:return z}}}function N(z){return`SQLite has no array type, so it cannot express '${z}' on a scalar list; \`listFilters\` is the guard.`}class R extends Error{constructor(z){super(`The gemi ORM does not support the '${z}' dialect. Only sqlite `+"and postgres are implemented \u2014 see the supported matrix in "+`docs/orm.md.
3
3
 
4
4
  The *connection* is fine: Bun's client speaks ${z}, so raw SQL through DB.query / DB.sql and transactions all work. It is the query compiler that has no ${z} dialect, so every model operation raises this.
5
5
 
6
6
  Point DATABASE_URL at Postgres or SQLite to use the ORM, or keep using Prisma's own client for this database.`);this.name="UnsupportedDialectError"}}function Vz(z){return T[z]!==null}function Wz(){return Object.keys(T)}var T={sqlite:new S,postgres:new K,mysql:null,mariadb:null};function Yz(z){let G=T[z];if(G===null)throw new R(z);return G}
7
- export{f as dh,x as eh,W as fh,Q as gh,p as hh,m as ih,$ as jh,I as kh,c as lh,K as mh,s as nh,y as oh,u as ph,r as qh,A as rh,S as sh,R as th,Vz as uh,Wz as vh,Yz as wh};
7
+ export{f as eh,x as fh,W as gh,Q as hh,p as ih,m as jh,$ as kh,I as lh,c as mh,K as nh,s as oh,y as ph,u as qh,r as rh,A as sh,S as th,R as uh,Vz as vh,Wz as wh,Yz as xh};
8
8
 
9
- //# debugId=21F789B029EB072B64756E2164756E21
9
+ //# debugId=23E96E16249C01A764756E2164756E21
@@ -9,6 +9,6 @@
9
9
  "import type { Dialect } from \"../../database/dialect\";\nimport type { Binder, Fragment } from \"../compile/fragment\";\nimport type { RowLockClause } from \"../compile/lock\";\nimport type { FieldSchema, ScalarType } from \"../schema\";\nimport { PostgresDialect } from \"./postgres\";\nimport { SqliteDialect } from \"./sqlite\";\n\n/**\n * The per-database strategy.\n *\n * The rule this interface exists to enforce: no `if (dialect === \"postgres\")`\n * ever appears inside the compiler. When something genuinely cannot be\n * expressed through the interface, the interface widens — which is why\n * `inList`, `like` and `paginate` return `Fragment`s rather than strings. Each\n * of the three is a place where SQLite and Postgres disagree about *structure*,\n * not just spelling:\n *\n * - `inList` — SQLite expands one placeholder per element, so `in: [1,2]` and\n * `in: [1,2,3]` are different SQL and different plans. Postgres binds the\n * whole array to one parameter with `= any($1)`, so every length shares a\n * single plan and a single prepared statement.\n * - `like` — Postgres has `ilike` for `mode: \"insensitive\"`; SQLite has no\n * equivalent, and Prisma rejects the argument there outright.\n * - `paginate` — SQLite cannot parse `offset` without a preceding `limit`.\n */\nexport interface SqlDialect {\n readonly name: Dialect;\n\n /**\n * Whether `mode: \"insensitive\"` can be expressed at all. False on SQLite,\n * where Prisma rejects the argument rather than emulating it.\n */\n readonly supportsInsensitiveMode: boolean;\n\n /**\n * Whether an `in` list binds as a single parameter however long it is.\n *\n * True on Postgres (`= any($1)`), false on SQLite (`in (?, ?, ?)`). It is the\n * plan *cache* that needs to know: where the length does not change the SQL\n * text, it must not change the cache key either, or every distinct list\n * length mints another entry holding SQL identical to its neighbours'. That\n * matters most for relations, where the list length is the parent row count\n * and so varies with the data rather than with the code.\n */\n readonly bindsListAsOneParameter: boolean;\n\n /**\n * Whether `insert`/`update`/`delete` can return the rows they touched.\n *\n * True on both implemented dialects — Postgres has had `RETURNING` forever,\n * and SQLite since 3.35 (Bun 1.3.14 bundles 3.51.0, verified by querying\n * `sqlite_version()` rather than by reading a changelog).\n *\n * It is a capability rather than an assumption because MySQL and MariaDB have\n * no `RETURNING` at all. Their fallback — `lastInsertRowid` plus a re-select,\n * and no way to identify the rows an `updateMany` touched — is a different\n * statement shape, not a different spelling. Iteration 4 does not build it,\n * but it must stay expressible, so the write compiler asks rather than\n * assumes and raises a clear error when the answer is no.\n */\n readonly supportsReturning: boolean;\n\n /**\n * How many parameters one statement may bind.\n *\n * A hard protocol/driver limit, not a tuning knob: Postgres sends the\n * parameter count as an int16 in the Bind message, and SQLite compiles\n * `SQLITE_MAX_VARIABLE_NUMBER` in.\n *\n * Three shapes can approach it, all of them scaling with the caller's *data*\n * rather than with the query's shape:\n *\n * - `createMany`, at `rows × columns`.\n * - An `in` list on SQLite, which binds one placeholder per element — and\n * such a list is routinely request-derived (`?ids=…`).\n * - A to-many `include` on SQLite, which batches an `in` over the parent\n * keys, so a large enough `findMany` reaches it with no big list in sight.\n *\n * Postgres escapes the last two: `= any($1)` is one parameter however long\n * the array. The check itself lives in `compile/fragment.ts`'s `render`,\n * because that is the one place that sees a statement's final count.\n *\n * It lives *here* rather than as a constant in the compiler for the usual\n * reason: the number differs per dialect, and the compiler is not allowed to\n * know which dialect it is compiling for.\n */\n readonly maxBoundParameters: number;\n\n /**\n * Whether the **statement** decides a parameter's type, so a cast the caller\n * wrote onto their own placeholder changes how the driver encodes the value.\n *\n * True on Postgres: the server describes the statement, the client is told\n * the parameter is `jsonb`, and Bun then JSON-*encodes* whatever JS value it\n * was handed. That is the whole of #376 — the reason `json-param.ts` retypes\n * such a parameter through `text` and serialises it to match.\n *\n * False on SQLite, and not merely because the correction is unnecessary\n * there: it would be **wrong**, and it would not parse. A parameter's type is\n * the bound value's, and `cast(x as json)` is not a JSON cast at all — SQLite\n * takes any type name and applies affinity rules, and a name containing none\n * of INT/CHAR/CLOB/TEXT/BLOB/REAL/FLOA/DOUB gets NUMERIC affinity, so\n * `cast('{\"a\":1}' as json)` is `0`. Measured through `bun:sqlite` (Bun\n * 1.3.14):\n *\n * select cast(? as jsonb) -> 0 (runs)\n * select json_set('{\"a\":1}','$.b', cast(? as json)) -> {\"a\":1,\"b\":2}\n * select cast(? as text)::json -> ERROR unrecognized token: \":\"\n *\n * So the retyping's rewrite — `cast(? as text)::json` — turns a statement\n * that runs on SQLite today into a syntax error. `::` genuinely cannot fire\n * there (it does not parse), but `cast(… as …)` is not Postgres-only syntax,\n * and \"SQLite has no jsonb type\" is a claim about semantics rather than about\n * what the parser accepts. Asking here rather than matching on `name` is what\n * makes that a fact `tsc` and a test can hold.\n */\n readonly typesParametersFromStatement: boolean;\n\n /** Quote a table or column name. Only ever called with names from the schema. */\n quoteIdent(name: string): string;\n\n /**\n * The parameter marker for the `index`-th (0-based) parameter in a statement.\n * SQLite ignores the index and returns `?`; Postgres returns `$1`, `$2`, ...\n */\n placeholder(index: number): string;\n\n /**\n * Prisma-shaped value -> the value the driver must be handed for this field.\n * The mirror of `decode`, and just as load-bearing: Bun's SQLite driver binds\n * a `Date` to `NULL`, so an unencoded `where: { createdAt: date }` would\n * return no rows rather than failing.\n *\n * Applied at bind time, not compile time — it is a function of the value.\n * Which encoder runs is still decided from the schema, so compile stays pure.\n */\n encode(value: unknown, field: FieldSchema): unknown;\n\n /**\n * SQL appended to this field's placeholder, or `\"\"` for none.\n *\n * The one string a dialect contributes to the statement that is not a\n * parameter, so it must be a constant — never derived from a value, and never\n * from anything an application supplies. `fieldParam` is the only caller, and\n * a non-empty cast also means it serialises the value; the two travel\n * together and neither is correct alone (#209).\n */\n castParameter(field: FieldSchema): string;\n\n /**\n * The same, for a value with **no declared column type** — a parameter\n * interpolated into a composed raw fragment, where there is no schema to ask.\n *\n * It exists because \"raw\" cannot mean \"unportable\". Bun's SQLite driver\n * rejects a `Date` outright (`Binding expected string, TypedArray, boolean,\n * number, bigint or null`) while Postgres takes one, so\n * ``sql`where \"createdAt\" > ${date}` `` would work on one dialect and throw on\n * the other — and the caller has no dialect-independent value to reach for\n * instead, because milliseconds are only correct if that is what the ORM\n * stored. Which it is: this converts to exactly what `encode` writes for a\n * `DateTime`, so a raw statement compares against ORM-written rows correctly.\n *\n * Deliberately narrow. It normalises the JavaScript types whose SQL form the\n * ORM has already decided — a `Date`, a boolean — and touches nothing else. A\n * plain object is *not* JSON-encoded here: the compiler only knows to do that\n * because a field says `Json`, and guessing from the value would turn a\n * mistyped parameter into a successfully-written string.\n *\n * The exception is a parameter the *caller* cast to `json`/`jsonb`, which is\n * a declared type by another route and does not reach this at all — see\n * `json-param.ts`. It is still not a guess from the value: the statement says\n * so.\n */\n encodeUntyped(value: unknown): unknown;\n\n /** Driver value -> the value Prisma would have returned for this field. */\n decode(value: unknown, field: FieldSchema): unknown;\n\n /**\n * False when the driver already returns exactly what Prisma would for this\n * field, letting the shaper skip the call entirely on the hot path.\n */\n needsDecode(field: FieldSchema): boolean;\n\n /**\n * `<lhs> in (...)` / `<lhs> not in (...)`.\n *\n * `length` is the element count, which is shape information and is already\n * part of the plan key. `values` returns the whole array at bind time; how it\n * is spread across parameters is the dialect's business.\n */\n inList(\n lhs: string,\n negated: boolean,\n length: number,\n values: Binder,\n ): Fragment;\n\n /** `<lhs> like <pattern>`, case-insensitively when the dialect can. */\n like(lhs: string, insensitive: boolean, pattern: Binder): Fragment;\n\n /**\n * Whether this dialect can match a **tuple** of columns against a list of\n * tuples in a statement whose text does not grow with the list.\n *\n * The single-column case is `inList`, and on Postgres `= any($1)` already\n * gives one SQL text for every length — which is what lets `collapsedList`\n * keep a batched relation query to one plan entry however many parents it\n * has. A relation joining on *more than one* field cannot use it, so the\n * loader falls back to an `OR` of `AND`s whose text does grow, and the plan\n * cache churns with the parent count (#97).\n *\n * `unnest` closes that on Postgres — one array parameter per *column*, so the\n * text is fixed — but it needs each column's SQL type for the cast, and the\n * types are asked about here rather than assumed: a dialect that cannot spell\n * one of them says so and the caller keeps the portable `OR`.\n */\n canBindCompositeIn(types: readonly ScalarType[]): boolean;\n\n /**\n * `(a, b) in (select * from unnest($1::t[], $2::u[]))`.\n *\n * `values` yields one tuple per parent at bind time; the dialect decides how\n * they are transposed into per-column arrays. Only called when\n * {@link canBindCompositeIn} returned true for these types.\n */\n compositeIn(\n columns: readonly string[],\n types: readonly ScalarType[],\n values: Binder,\n ): Fragment;\n\n /**\n * The filters this dialect can apply to a **scalar list** — `tags String[]`.\n *\n * **Empty is the whole of SQLite's answer**, and it is a capability rather\n * than a gap in this ORM: SQLite has no array type, and Prisma refuses the\n * declaration there at validation time — *\"Field `tags` in model `User` can't\n * be a list. The current connector does not support lists of primitive\n * types.\"* So a SQLite database cannot hold such a column to begin with.\n *\n * The refusal lives here rather than in the generator, which is where it used\n * to live (#300). The generated artifact is dialect-agnostic on purpose —\n * `DATABASE_URL` can name a different database than `prisma generate` saw —\n * so a generator that refused a scalar list refused it for Postgres too, and\n * one `String[]` anywhere meant no artifact for *any* model. Asking the\n * dialect at compile time refuses exactly the combination that cannot work,\n * and names it, which is the shape {@link UnsupportedDialectError} already\n * has for the dialects with no compiler at all.\n */\n readonly listFilters: ReadonlySet<string>;\n\n /**\n * `<value> = any(<column>)` — is this element in the list?\n *\n * The mirror of {@link inList} rather than a variant of it, and the two are\n * easy to confuse: there, one column is matched against a caller's list;\n * here, one caller value is matched against a column that *is* a list.\n *\n * **These four take a `Fragment` where every other member here takes a\n * `Binder`**, which is a deliberate exception. A list operand may need a cast\n * on its placeholder — a single element of a `Json[]` needs #209's\n * `::text::jsonb`, and the serialisation that must travel with it — so the\n * parameter is built by `fieldParam` before it arrives and the dialect\n * chooses only the operator. Handing over a `Binder` instead would oblige\n * each dialect to restate `fieldParam`'s rule, and restating it slightly\n * wrong is silent: `$1::jsonb = any(col)` answers *false* where\n * `$1::text::jsonb = any(col)` answers true, with no error on either.\n */\n listHas(column: string, value: Fragment): Fragment;\n\n /** `hasEvery` — every element of the operand is present in the column. */\n listHasEvery(column: string, values: Fragment): Fragment;\n\n /** `hasSome` — the column and the operand share at least one element. */\n listHasSome(column: string, values: Fragment): Fragment;\n\n /**\n * `isEmpty: true`, or its negation when `empty` is false.\n *\n * The odd one out with no operand at all: the value being compared against is\n * the empty list, which is the compiler's own constant rather than the\n * caller's. It stays a bound parameter regardless — see `jsonNullComparison`,\n * which declines the same exception for the same reason.\n */\n listIsEmpty(column: string, empty: boolean): Fragment;\n\n /**\n * The right-hand side of a `push`: the column's current value with the\n * operand appended. An expression rather than a statement, because it is\n * assigned by the write compiler like any other `set` value.\n */\n listPush(column: string, values: Fragment): Fragment;\n\n /**\n * How this dialect spells a JSON path, and which filters it can apply to one.\n *\n * The **path grammar itself differs**, which is unusual enough to be worth\n * stating rather than hiding: Prisma takes `path: [\"a\", \"b\"]` on Postgres and\n * `path: \"$.a.b\"` on SQLite, and refuses the other form on each. That is not\n * a gemi choice — it is the shape the generated client accepts, measured on\n * both — so reproducing it is what \"Prisma-compatible\" means here.\n *\n * `jsonFilters` is the set of scalar filters the dialect can apply to an\n * extracted value. Prisma refuses `array_contains` and the numeric\n * comparisons on SQLite with *\"Unknown argument\"*, so refusing them here is\n * matching it rather than falling short of it.\n */\n readonly jsonPathSyntax: \"array\" | \"jsonpath\";\n readonly jsonFilters: ReadonlySet<string>;\n\n /**\n * Whether an extracted value compares as **text**.\n *\n * Postgres's `#>>` yields `text`, so `equals: 3` has to bind `\"3\"` — comparing\n * text to an integer parameter is a type error there. SQLite's `json_extract`\n * yields a native value, so the same filter has to bind `3`: bind `\"3\"` and\n * SQLite compares an INTEGER to a TEXT, which is silently *false* rather than\n * an error. One filter, two encodings, and the wrong one is a returned-no-rows\n * bug on one dialect and a raised error on the other.\n */\n readonly jsonComparesAsText: boolean;\n\n /**\n * The extracted value, as a fragment whose path is **bound**.\n *\n * A JSON path is the one place a caller's *value* decides part of an\n * expression's meaning, which makes it the obvious place to interpolate by\n * accident and break invariant 2. Both dialects can take it as a parameter —\n * Postgres's `#>` accepts a `text[]`, SQLite's `json_extract` a string — so\n * nothing has to be bent to keep it out of the SQL text.\n *\n * `asText` picks the extraction that yields SQL text rather than JSON. Every\n * comparison in `jsonComparison` passes `true` — the string filters compare\n * against text, and `equals` / `not` / the numeric operators compare an\n * extracted *scalar*, which is what the text form gives them. The JSON form\n * has exactly one caller, `jsonArrayContains`, because containment is the one\n * operator whose right-hand side is a document.\n *\n * SQLite ignores the flag: `json_extract` already yields a SQL value rather\n * than a JSON document for a scalar at the path. That is why the null\n * sentinels need {@link jsonValueAt} instead of this — see there.\n */\n jsonExtract(column: string, path: Binder, asText: boolean): Fragment;\n\n /** `<extracted> @> <value>` — Postgres only; see `jsonFilters`. */\n jsonArrayContains(column: string, path: Binder, value: Binder): Fragment;\n\n /**\n * The value at `path` **as JSON**, in the form two JSON values compare in.\n *\n * The difference from {@link jsonExtract} is the whole of #407, and it is the\n * distinction the null sentinels are made of. Both dialects have an\n * extraction that collapses \"the key is absent\" into \"the key holds the JSON\n * value `null`\", and both have one that does not:\n *\n * | | collapses | keeps the distinction |\n * | --- | --- | --- |\n * | postgres | `#>>` (text) | `#>` (jsonb) |\n * | sqlite | `json_extract` | `->` (JSON text) |\n *\n * `jsonExtract` is the left column at `asText: true`, which is what every\n * scalar comparison wants — a value to compare, not a document. This is the\n * right column, and it is what lets `equals: DbNull` compile to\n * `<value at path> is null` while `equals: JsonNull` compiles to\n * `<value at path> = <the JSON null>`. Refusing them because `#>>` cannot\n * tell the two apart was true of `#>>` and not of the dialect.\n *\n * **Postgres casts and SQLite does not**, and the cast is not decoration:\n * `#>` on a `json` column (a `@db.Json` field) yields `json`, which has no\n * equality operator at all — *\"operator does not exist: json = jsonb\"*, a\n * raised error rather than a wrong answer, but still one Prisma does not\n * raise. Prisma emits `(…#>…)::jsonb` for exactly this reason and so does\n * this. SQLite's `->` already yields the JSON text form.\n *\n * Bound, never interpolated, for the same reason `jsonExtract` is.\n */\n jsonValueAt(column: string, path: Binder): Fragment;\n\n /**\n * Whether the JSON value at `path` — the column itself when `path` is\n * `undefined` — is an **object** holding the key, any of the keys, or all of\n * them: `has_key`, `has_some_keys`, `has_every_key` (#664).\n *\n * `keys` binds a string for `\"one\"` and a string array for the other two;\n * `count` is that array's length, which SQLite needs because it tests one\n * key per term. Postgres binds the array whole, so its text does not depend\n * on `count` and the plan key collapses the list (`LIST_KEYS` in `plan.ts`).\n *\n * **Objects only, on both dialects.** Postgres's `?` also matches a string\n * *element* of a top-level array; SQLite's path lookup does not. Both forms\n * are guarded with \"the value is an object\" so the two answer the same rows:\n * `has_every_key: []` is \"is an object\", and `has_some_keys: []` is false.\n * A key holding the JSON value `null` exists.\n */\n jsonHasKeys(\n column: string,\n path: Binder | undefined,\n keys: Binder,\n mode: \"one\" | \"some\" | \"every\",\n count: number,\n ): Fragment;\n\n /**\n * `lhs` differs from `rhs`, treating NULL as equal to NULL — the guard\n * `skipIfUnchanged` adds to an update's `where` (#664).\n *\n * `rhs` is the same parameter the `set` binds, so the comparison is against\n * the stored encoding of the value. A `Json` column compares as JSON rather\n * than as text: `jsonb` equality on Postgres (key order and whitespace do not\n * matter), and `json()`-normalised text on SQLite (whitespace does not\n * matter; key order does).\n */\n distinctFrom(lhs: string, rhs: Fragment, field: FieldSchema): Fragment;\n\n /**\n * `limit`/`offset`. Both are values and therefore parameters — this is the\n * single most tempting place in the compiler to inline a number.\n */\n paginate(take: Binder | null, skip: Binder | null): Fragment;\n\n /**\n * The clause that makes an insert skip rows violating a unique constraint —\n * `createMany({ skipDuplicates: true })` — or `null` where it is not offered.\n *\n * **`null` is a parity decision, not a missing feature**, and that is worth\n * knowing before someone \"fixes\" SQLite by returning `insert or ignore`.\n * SQLite has `on conflict do nothing` and has since 3.24; Prisma nonetheless\n * rejects the *argument* on SQLite — `Unknown argument 'skipDuplicates'`,\n * whatever its value, verified against a generated 6.19 client. Offering it\n * here would make gemi a silent superset of Prisma on the one dialect the\n * differential harness could then no longer compare, which is the trade this\n * project has declined every other time it came up.\n *\n * A method rather than a boolean because the SQL differs where it exists, and\n * a `Fragment` because everything the compiler emits is one.\n */\n ignoreConflicts(): Fragment | null;\n\n /**\n * The clause a locking read ends with — `lock: \"update\"` on a `findMany` —\n * naming `table` as the only table whose rows are locked.\n *\n * Scoped to the root table (`for update of \"User\"`) rather than left bare,\n * because a folded `include` puts a lateral subquery in the `from` clause and\n * Postgres refuses to lock through one (`FOR UPDATE is not allowed with\n * aggregate functions`). Scoping it also matches the documented contract on\n * both strategies: the root rows are locked, related rows never are.\n *\n * **Empty on SQLite, and that is a decision.** SQLite has no row locks, and\n * does not need them for what a locking read is for: its transactions are\n * serializable, with one writer at a time on the whole database, so the lost\n * update a row lock prevents cannot happen there. Two transactions that race\n * wait on (or fail with `SQLITE_BUSY` on) the database lock instead of the\n * row's, and `skipLocked` / `noWait` have no row lock to react to. Refusing\n * would stop code that runs on Postgres in production from running against\n * SQLite in development and tests, for no gain. The one misuse that matters\n * on both — a lock outside a transaction — is refused in `Model.$execute`\n * on every dialect.\n */\n rowLock(lock: RowLockClause, table: string): Fragment;\n\n /**\n * Recognise a driver error as a constraint violation, and say which columns\n * it names.\n *\n * Returns `null` for anything else, including the *other* constraint kinds:\n * SQLite reports NOT NULL and FOREIGN KEY failures through the same exception\n * type, and reporting one of those as a duplicate-key error would send a\n * caller looking for a row that does not exist.\n *\n * Columns, not fields — the driver only knows the database's names. The\n * caller maps them back through the schema, where `@map` is in scope.\n */\n constraintViolation(error: unknown): ConstraintViolation | null;\n}\n\n/** A driver error identified as a constraint failure, in dialect-neutral terms. */\nexport interface ConstraintViolation {\n /** Only `unique` is translated today; the rest surface as the raw error. */\n kind: \"unique\";\n /** Database column names, in the order the driver reported them. */\n columns: string[];\n /** The constraint's own name, when the driver gives one. Postgres does. */\n constraint?: string;\n}\n\n/**\n * The ORM was asked to compile against a dialect it does not implement.\n *\n * **The split this message has to convey**, because it is the surprising part:\n * `DatabaseManager` connects to MySQL and MariaDB perfectly well — Bun's client\n * speaks all four — so raw SQL through `DB.query` / `DB.sql` works, and\n * transactions work. What does not exist is a `SqlDialect` for them, so\n * everything that *compiles* a statement stops here.\n *\n * A caller who reads only \"not supported\" reasonably concludes the connection\n * is unusable, which is wrong and is the more expensive misreading: it is the\n * ORM that is unavailable, not the database.\n */\nexport class UnsupportedDialectError extends Error {\n constructor(dialect: Dialect) {\n super(\n `The gemi ORM does not support the '${dialect}' dialect. Only sqlite ` +\n `and postgres are implemented — see the supported matrix in ` +\n `docs/orm.md.\\n\\n` +\n `The *connection* is fine: Bun's client speaks ${dialect}, so raw SQL ` +\n `through DB.query / DB.sql and transactions all work. It is the query ` +\n `compiler that has no ${dialect} dialect, so every model operation ` +\n `raises this.\\n\\n` +\n `Point DATABASE_URL at Postgres or SQLite to use the ORM, or keep ` +\n `using Prisma's own client for this database.`,\n );\n this.name = \"UnsupportedDialectError\";\n }\n}\n\n/**\n * Whether the ORM can compile for this dialect at all.\n *\n * Exported so an application can find out at **boot** rather than on its first\n * query. That is the whole gap this closes: `DatabaseManager` constructs\n * happily against MySQL, so a deploy pointed at one starts, passes a health\n * check, serves traffic, and fails on the first model read — which is the\n * latest and most expensive moment to learn it.\n */\nexport function ormSupports(dialect: Dialect): boolean {\n return COMPILERS[dialect] !== null;\n}\n\n/** Every dialect `Dialect` names, for anything that has to walk them all. */\nexport function everyDialect(): Dialect[] {\n return Object.keys(COMPILERS) as Dialect[];\n}\n\n/**\n * The compiler for each dialect, or `null` where the ORM has none.\n *\n * **One map rather than two lists, and `satisfies` rather than a lookup.** The\n * supported set used to be written three times — `ormSupports`' `||` chain,\n * `dialectFor`'s `if` chain, and a test enumerating a hand-written copy of the\n * `Dialect` union — so adding a fifth member to that union changed nothing\n * anywhere: `tsc` clean, tests green, the new dialect silently reported as\n * unsupported by one function and unknown to the other.\n *\n * That moment is exactly what the guard exists for. Adding a dialect to the\n * union is the *first step of implementing one*, and it is the step where a\n * half-added dialect would disagree with itself.\n *\n * `satisfies Record<Dialect, …>` makes it a compile error in a file the build\n * actually checks. It has to live here rather than in a test: `tsconfig.json`\n * excludes test files and vitest transpiles without type-checking, so an\n * exhaustiveness check written there is a type error nothing ever evaluates.\n *\n * The sixth thing in this codebase made `tsc`'s job rather than a convention's\n * — see the note on `resolveLink`'s `operation`.\n */\nconst COMPILERS = {\n sqlite: new SqliteDialect(),\n postgres: new PostgresDialect(),\n // Bun's client speaks both; the ORM has no compiler for either. See\n // `UnsupportedDialectError`, which is careful to say that the *connection*\n // still works.\n mysql: null,\n mariadb: null,\n} satisfies Record<Dialect, SqlDialect | null>;\n\n/**\n * Resolved per call from `DatabaseManager.dialect`, never baked into a\n * generated artifact — `DATABASE_URL` can point at a different database than\n * the one `prisma generate` saw.\n */\nexport function dialectFor(dialect: Dialect): SqlDialect {\n const compiler = COMPILERS[dialect];\n if (compiler === null) throw new UnsupportedDialectError(dialect);\n return compiler;\n}\n\nexport { PostgresDialect, SqliteDialect };\n"
10
10
  ],
11
11
  "mappings": ";iDAoCO,SAAS,CAAiB,EAAgB,CAC/C,MAAO,CAAE,IAAK,IAAI,KAAQ,SAAU,CAAC,CAAE,EAOzC,IAAM,EAA4B,CAAE,IAAK,IAAI,KAAK,CAAC,EAAG,SAAU,CAAC,CAAE,EAG5D,SAAS,CAAU,CACxB,EACiD,CACjD,MAAO,CAAC,EAAW,EAAuB,IAAiB,CACzD,IAAM,EAAoB,CAAC,EAC3B,QAAS,EAAI,EAAG,EAAI,EAAQ,OAAQ,IAClC,EAAO,KAAK,EAAQ,GAAG,EAAM,CAAO,CAAC,EAEvC,OAAO,GAeX,IAAM,EAAe,OAQd,SAAS,CAAG,CAAC,EAAwB,CAC1C,MAAO,CAAE,OAAM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ACN,MAAM,IAAI,EAAY,EAAO,CAAK,UAGpC,OAAO,GAGf,CAEA,SAAS,CAAe,CAAC,EAA0B,CACjD,MACE,mDAAmD,qDC/ChD,MAAM,UAAgC,KAAM,CACjD,WAAW,CAAC,EAAkB,CAC5B,MACE,sCAAsC,2BACpC,mEACA;AAAA;AAAA,gDACiD,2GAEzB;AAAA;AAAA,8GAI5B,EACA,KAAK,KAAO,0BAEhB,CAWO,SAAS,EAAW,CAAC,EAA2B,CACrD,OAAO,EAAU,KAAa,KAIzB,SAAS,EAAY,EAAc,CACxC,OAAO,OAAO,KAAK,CAAS,EAyB9B,IAAM,EAAY,CAChB,OAAQ,IAAI,EACZ,SAAU,IAAI,EAId,MAAO,KACP,QAAS,IACX,EAOO,SAAS,EAAU,CAAC,EAA8B,CACvD,IAAM,EAAW,EAAU,GAC3B,GAAI,IAAa,KAAM,MAAM,IAAI,EAAwB,CAAO,EAChE,OAAO",
12
- "debugId": "21F789B029EB072B64756E2164756E21",
12
+ "debugId": "23E96E16249C01A764756E2164756E21",
13
13
  "names": []
14
14
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Q as I}from"./chunk-m70hn4eg.js";import{_ as A}from"./chunk-9dkpv8ev.js";import"./chunk-8ky8cmde.js";import{aa as f}from"./chunk-mkw35cz7.js";import{rl as t,vl as T}from"./chunk-t2nsn0r2.js";var N=t(I(),1),a=t(f(),1),d=t(A(),1);import{readFileSync as g}from"fs";var c=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:i,providerId:n,policyArns:m,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:E}=e;if(!E){let{getDefaultRoleAssumerWithWebIdentity:p}=await import("./chunk-83cvkhzn.js").then((m)=>t(m.default,1));E=p({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return E({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:n,PolicyArns:m,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",O="AWS_ROLE_ARN",k="AWS_ROLE_SESSION_NAME",L=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[O],i=e?.roleSessionName??process.env[k];if(!o||!r)throw new a.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await c({...e,webIdentityToken:d.externalDataInterceptor?.getTokenRecord?.()[o]??g(o,{encoding:"ascii"}),roleArn:r,roleSessionName:i})(s);if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{c as fromWebToken,L as fromTokenFile};
2
+ import{Q as I}from"./chunk-1wz6kwjc.js";import{_ as A}from"./chunk-dxh8njb4.js";import"./chunk-h8eawyhx.js";import{aa as f}from"./chunk-mtamgvf4.js";import{sl as t,wl as T}from"./chunk-jzpbwvbt.js";var N=t(I(),1),a=t(f(),1),d=t(A(),1);import{readFileSync as g}from"fs";var c=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:i,providerId:n,policyArns:m,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:E}=e;if(!E){let{getDefaultRoleAssumerWithWebIdentity:p}=await import("./chunk-kmh402m4.js").then((m)=>t(m.default,1));E=p({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return E({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:n,PolicyArns:m,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",O="AWS_ROLE_ARN",k="AWS_ROLE_SESSION_NAME",L=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[O],i=e?.roleSessionName??process.env[k];if(!o||!r)throw new a.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await c({...e,webIdentityToken:d.externalDataInterceptor?.getTokenRecord?.()[o]??g(o,{encoding:"ascii"}),roleArn:r,roleSessionName:i})(s);if(o===process.env[_])N.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{c as fromWebToken,L as fromTokenFile};
3
3
 
4
- //# debugId=95331251389438F064756E2164756E21
4
+ //# debugId=591B38BE0936B01664756E2164756E21
@@ -6,6 +6,6 @@
6
6
  "export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"
7
7
  ],
8
8
  "mappings": ";8NAAA,SACA,KACA,KACA,iBAAS,WCHF,IAAM,EAAe,CAAC,IAAS,MAAO,IAA0B,CACnE,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,IAAQ,UAAS,kBAAiB,mB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