@kumix/ui 0.4.3 → 0.5.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 (296) hide show
  1. package/README.md +15 -13
  2. package/dist/components/agents/agent-activity/index.js +1 -1
  3. package/dist/components/agents/approval-card/index.js +2 -3
  4. package/dist/components/agents/approval-card/index.js.map +1 -1
  5. package/dist/components/agents/prompt-input.js +1 -2
  6. package/dist/components/agents/prompt-input.js.map +1 -1
  7. package/dist/components/agents/todo-list.js +1 -1
  8. package/dist/components/agents/tool-result.js +1 -1
  9. package/dist/components/charts/bar-chart/context.d.ts +114 -0
  10. package/dist/components/charts/bar-chart/context.d.ts.map +1 -0
  11. package/dist/components/charts/bar-chart/context.js +60 -0
  12. package/dist/components/charts/bar-chart/context.js.map +1 -0
  13. package/dist/components/charts/bar-chart/legend.d.ts +6 -0
  14. package/dist/components/charts/bar-chart/legend.d.ts.map +1 -0
  15. package/dist/components/charts/bar-chart/legend.js +21 -0
  16. package/dist/components/charts/bar-chart/legend.js.map +1 -0
  17. package/dist/components/charts/bar-chart/plot.d.ts +10 -0
  18. package/dist/components/charts/bar-chart/plot.d.ts.map +1 -0
  19. package/dist/components/charts/bar-chart/plot.js +290 -0
  20. package/dist/components/charts/bar-chart/plot.js.map +1 -0
  21. package/dist/components/charts/bar-chart/tooltip.d.ts +20 -0
  22. package/dist/components/charts/bar-chart/tooltip.d.ts.map +1 -0
  23. package/dist/components/charts/bar-chart/tooltip.js +57 -0
  24. package/dist/components/charts/bar-chart/tooltip.js.map +1 -0
  25. package/dist/components/charts/bar-chart.d.ts +9 -0
  26. package/dist/components/charts/bar-chart.d.ts.map +1 -0
  27. package/dist/components/charts/bar-chart.js +51 -0
  28. package/dist/components/charts/bar-chart.js.map +1 -0
  29. package/dist/components/charts/bump-chart/plot.js +1 -1
  30. package/dist/components/charts/bump-chart/point.js +1 -1
  31. package/dist/components/charts/bump-chart.js +1 -1
  32. package/dist/components/charts/composition-chart/plot.js +5 -1
  33. package/dist/components/charts/composition-chart/plot.js.map +1 -1
  34. package/dist/components/charts/composition-chart/tooltip-content.js +1 -1
  35. package/dist/components/charts/donut-chart.d.ts +1 -1
  36. package/dist/components/charts/donut-chart.js +1 -1
  37. package/dist/components/charts/funnel-chart.js +1 -1
  38. package/dist/components/charts/heat-calendar/tooltip.js +1 -1
  39. package/dist/components/charts/line-chart/context.d.ts +154 -0
  40. package/dist/components/charts/line-chart/context.d.ts.map +1 -0
  41. package/dist/components/charts/line-chart/context.js +67 -0
  42. package/dist/components/charts/line-chart/context.js.map +1 -0
  43. package/dist/components/charts/line-chart/legend.d.ts +6 -0
  44. package/dist/components/charts/line-chart/legend.d.ts.map +1 -0
  45. package/dist/components/charts/line-chart/legend.js +21 -0
  46. package/dist/components/charts/line-chart/legend.js.map +1 -0
  47. package/dist/components/charts/line-chart/plot.d.ts +12 -0
  48. package/dist/components/charts/line-chart/plot.d.ts.map +1 -0
  49. package/dist/components/charts/line-chart/plot.js +604 -0
  50. package/dist/components/charts/line-chart/plot.js.map +1 -0
  51. package/dist/components/charts/line-chart/tooltip.d.ts +22 -0
  52. package/dist/components/charts/line-chart/tooltip.d.ts.map +1 -0
  53. package/dist/components/charts/line-chart/tooltip.js +108 -0
  54. package/dist/components/charts/line-chart/tooltip.js.map +1 -0
  55. package/dist/components/charts/line-chart.d.ts +10 -0
  56. package/dist/components/charts/line-chart.d.ts.map +1 -0
  57. package/dist/components/charts/line-chart.js +53 -0
  58. package/dist/components/charts/line-chart.js.map +1 -0
  59. package/dist/components/charts/liquidity-heatmap.js +1 -1
  60. package/dist/components/charts/price-target-fan.js +1 -1
  61. package/dist/components/charts/returns-calendar/tooltip.js +1 -1
  62. package/dist/components/charts/returns-calendar.d.ts.map +1 -1
  63. package/dist/components/charts/sankey-chart/context.d.ts +2 -0
  64. package/dist/components/charts/sankey-chart/context.js +2 -0
  65. package/dist/components/charts/sankey-chart/plot.d.ts +8 -0
  66. package/dist/components/charts/sankey-chart/plot.d.ts.map +1 -0
  67. package/dist/components/charts/sankey-chart/plot.js +342 -0
  68. package/dist/components/charts/sankey-chart/plot.js.map +1 -0
  69. package/dist/components/charts/sankey-chart/tooltip.d.ts +10 -0
  70. package/dist/components/charts/sankey-chart/tooltip.d.ts.map +1 -0
  71. package/dist/components/charts/sankey-chart/tooltip.js +147 -0
  72. package/dist/components/charts/sankey-chart/tooltip.js.map +1 -0
  73. package/dist/components/charts/sankey-chart.d.ts +17 -0
  74. package/dist/components/charts/sankey-chart.d.ts.map +1 -0
  75. package/dist/components/charts/sankey-chart.js +76 -0
  76. package/dist/components/charts/sankey-chart.js.map +1 -0
  77. package/dist/components/charts/sparkline.d.ts +26 -0
  78. package/dist/components/charts/sparkline.d.ts.map +1 -0
  79. package/dist/components/charts/sparkline.js +197 -0
  80. package/dist/components/charts/sparkline.js.map +1 -0
  81. package/dist/components/charts/treemap/tooltip.js +1 -1
  82. package/dist/components/charts/treemap.d.ts.map +1 -1
  83. package/dist/components/charts/volume-profile/tooltip.js +1 -1
  84. package/dist/components/charts/xy/axis.d.ts +24 -0
  85. package/dist/components/charts/xy/axis.d.ts.map +1 -0
  86. package/dist/components/charts/xy/axis.js +90 -0
  87. package/dist/components/charts/xy/axis.js.map +1 -0
  88. package/dist/components/charts/xy/data-table.d.ts +9 -0
  89. package/dist/components/charts/xy/data-table.d.ts.map +1 -0
  90. package/dist/components/charts/xy/data-table.js +29 -0
  91. package/dist/components/charts/xy/data-table.js.map +1 -0
  92. package/dist/components/charts/xy/inspector.d.ts +27 -0
  93. package/dist/components/charts/xy/inspector.d.ts.map +1 -0
  94. package/dist/components/charts/xy/inspector.js +110 -0
  95. package/dist/components/charts/xy/inspector.js.map +1 -0
  96. package/dist/components/charts/xy/legend.d.ts +13 -0
  97. package/dist/components/charts/xy/legend.d.ts.map +1 -0
  98. package/dist/components/charts/xy/legend.js +42 -0
  99. package/dist/components/charts/xy/legend.js.map +1 -0
  100. package/dist/components/charts/xy/tooltip-content.d.ts +2 -0
  101. package/dist/components/charts/xy/tooltip-content.js +66 -0
  102. package/dist/components/charts/xy/tooltip-content.js.map +1 -0
  103. package/dist/components/motion/attachment-upload.js +1 -1
  104. package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
  105. package/dist/components/motion/availability-scheduler/day-row.js +2 -2
  106. package/dist/components/motion/availability-scheduler/index.js +1 -1
  107. package/dist/components/motion/avatar-group.d.ts +48 -0
  108. package/dist/components/motion/avatar-group.d.ts.map +1 -0
  109. package/dist/components/motion/avatar-group.js +196 -0
  110. package/dist/components/motion/avatar-group.js.map +1 -0
  111. package/dist/components/motion/bottom-sheet.js +1 -1
  112. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  113. package/dist/components/motion/bouncy-accordion.js +20 -34
  114. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  115. package/dist/components/motion/breadcrumb.js +0 -3
  116. package/dist/components/motion/breadcrumb.js.map +1 -1
  117. package/dist/components/motion/button/magnetic.js +1 -1
  118. package/dist/components/motion/card-dealer.d.ts +36 -0
  119. package/dist/components/motion/card-dealer.d.ts.map +1 -0
  120. package/dist/components/motion/card-dealer.js +232 -0
  121. package/dist/components/motion/card-dealer.js.map +1 -0
  122. package/dist/components/motion/color-picker.js +1 -1
  123. package/dist/components/motion/combobox.js +1 -1
  124. package/dist/components/motion/context-menu.js +1 -1
  125. package/dist/components/motion/crash/crash-balloon.d.ts +9 -0
  126. package/dist/components/motion/crash/crash-balloon.d.ts.map +1 -0
  127. package/dist/components/motion/crash/crash-balloon.js +829 -0
  128. package/dist/components/motion/crash/crash-balloon.js.map +1 -0
  129. package/dist/components/motion/crash/crash-parts.d.ts +59 -0
  130. package/dist/components/motion/crash/crash-parts.d.ts.map +1 -0
  131. package/dist/components/motion/crash/crash-parts.js +2 -0
  132. package/dist/components/motion/crash/crash-tower.d.ts +9 -0
  133. package/dist/components/motion/crash/crash-tower.d.ts.map +1 -0
  134. package/dist/components/motion/crash/crash-tower.js +370 -0
  135. package/dist/components/motion/crash/crash-tower.js.map +1 -0
  136. package/dist/components/motion/crash.d.ts +9 -0
  137. package/dist/components/motion/crash.d.ts.map +1 -0
  138. package/dist/components/motion/crash.js +590 -0
  139. package/dist/components/motion/crash.js.map +1 -0
  140. package/dist/components/motion/date-range-picker.js +1 -1
  141. package/dist/components/motion/feedback-widget.js +0 -1
  142. package/dist/components/motion/feedback-widget.js.map +1 -1
  143. package/dist/components/motion/hold-action-button.js +1 -1
  144. package/dist/components/motion/liquid.js +2 -2
  145. package/dist/components/motion/liquid.js.map +1 -1
  146. package/dist/components/motion/loader.js +5 -4
  147. package/dist/components/motion/loader.js.map +1 -1
  148. package/dist/components/motion/mines.d.ts +41 -0
  149. package/dist/components/motion/mines.d.ts.map +1 -0
  150. package/dist/components/motion/mines.js +762 -0
  151. package/dist/components/motion/mines.js.map +1 -0
  152. package/dist/components/motion/morphing-modal.js +6 -4
  153. package/dist/components/motion/morphing-modal.js.map +1 -1
  154. package/dist/components/motion/morphing-tabs.js +1 -1
  155. package/dist/components/motion/multi-select/index.js +1 -1
  156. package/dist/components/motion/pagination.d.ts +31 -0
  157. package/dist/components/motion/pagination.d.ts.map +1 -0
  158. package/dist/components/motion/pagination.js +193 -0
  159. package/dist/components/motion/pagination.js.map +1 -0
  160. package/dist/components/motion/plinko.d.ts +59 -0
  161. package/dist/components/motion/plinko.d.ts.map +1 -0
  162. package/dist/components/motion/plinko.js +385 -0
  163. package/dist/components/motion/plinko.js.map +1 -0
  164. package/dist/components/motion/popover-morph.d.ts +11 -2
  165. package/dist/components/motion/popover-morph.d.ts.map +1 -1
  166. package/dist/components/motion/popover-morph.js +98 -4
  167. package/dist/components/motion/popover-morph.js.map +1 -1
  168. package/dist/components/motion/pull-to-refresh.js +1 -1
  169. package/dist/components/motion/range-slider-bubble.js +1 -1
  170. package/dist/components/motion/range-slider-fluid.js +1 -1
  171. package/dist/components/motion/range-slider-inline.js +1 -1
  172. package/dist/components/motion/range-slider-ruler.js +1 -1
  173. package/dist/components/motion/range-slider-wave.js +1 -1
  174. package/dist/components/motion/range-slider.js +1 -1
  175. package/dist/components/motion/signup-form.js +0 -1
  176. package/dist/components/motion/signup-form.js.map +1 -1
  177. package/dist/components/motion/slide-action-button.js +1 -1
  178. package/dist/components/motion/swap/field.js +1 -1
  179. package/dist/components/motion/swap/token-picker.js +1 -1
  180. package/dist/components/motion/swap.d.ts +1 -1
  181. package/dist/components/motion/swap.js +2 -2
  182. package/dist/components/motion/table/index.js +2 -2
  183. package/dist/components/motion/table/table-header.js +1 -1
  184. package/dist/components/motion/tooltip.d.ts +2 -2
  185. package/dist/components/motion/tooltip.d.ts.map +1 -1
  186. package/dist/components/motion/wallet-card/index.js +1 -2
  187. package/dist/components/motion/wallet-card/index.js.map +1 -1
  188. package/dist/components/motion/wheel-picker.js +1 -1
  189. package/dist/components/reui/badge.d.ts +1 -1
  190. package/dist/components/reui/cascader/cascader-columns.js +1 -1
  191. package/dist/components/reui/cascader/cascader-footer.js +1 -1
  192. package/dist/components/reui/cascader/cascader-nav.js +1 -1
  193. package/dist/components/reui/cascader/cascader-virtual.js +1 -1
  194. package/dist/components/reui/cascader/cascader.d.ts +1 -1
  195. package/dist/components/reui/cascader/cascader.js +2 -2
  196. package/dist/components/reui/code-block/code-block.d.ts +2 -1
  197. package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
  198. package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
  199. package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
  200. package/dist/components/reui/data-grid/data-grid-table.d.ts +1 -1
  201. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  202. package/dist/components/reui/data-grid/data-grid-table.js +1 -1
  203. package/dist/components/reui/date-selector.js +2 -2
  204. package/dist/components/reui/emoji-picker.js +2 -2
  205. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
  206. package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
  207. package/dist/components/reui/event-calendar/event-calendar-dnd.js +1 -1
  208. package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
  209. package/dist/components/reui/event-calendar/event-calendar-month-view.js +2 -2
  210. package/dist/components/reui/event-calendar/event-calendar-nav.js +2 -2
  211. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
  212. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
  213. package/dist/components/reui/event-calendar/event-calendar.d.ts +1 -1
  214. package/dist/components/reui/filters/filters-advanced.js +4 -4
  215. package/dist/components/reui/filters/filters-builder.js +1 -1
  216. package/dist/components/reui/filters/filters-chip.js +2 -2
  217. package/dist/components/reui/filters/filters-context.d.ts +1 -1
  218. package/dist/components/reui/filters/filters-editors.js +3 -3
  219. package/dist/components/reui/filters/filters.d.ts +3 -3
  220. package/dist/components/reui/filters/filters.js +6 -6
  221. package/dist/components/reui/gantt/gantt-bar.js +1 -1
  222. package/dist/components/reui/gantt/gantt-dnd.js +1 -1
  223. package/dist/components/reui/gantt/gantt-nav.js +2 -2
  224. package/dist/components/reui/gantt/gantt-view.js +3 -3
  225. package/dist/components/reui/gantt/gantt.d.ts +1 -1
  226. package/dist/components/reui/icon-tile.d.ts +1 -1
  227. package/dist/components/reui/phone-input.js +2 -2
  228. package/dist/components/reui/tree.d.ts +1 -0
  229. package/dist/components/reui/tree.d.ts.map +1 -1
  230. package/dist/components/ui/attachment.d.ts +1 -1
  231. package/dist/components/ui/badge.d.ts +1 -1
  232. package/dist/components/ui/bubble.d.ts +1 -1
  233. package/dist/components/ui/button-group.d.ts +1 -1
  234. package/dist/components/ui/button.d.ts +2 -2
  235. package/dist/components/ui/command.js +1 -1
  236. package/dist/components/ui/field.d.ts +1 -1
  237. package/dist/components/ui/field.js +1 -1
  238. package/dist/components/ui/item.d.ts +1 -1
  239. package/dist/components/ui/marker.d.ts +1 -1
  240. package/dist/components/ui/sidebar.d.ts +1 -1
  241. package/dist/components/ui/sidebar.js +1 -1
  242. package/dist/components/ui/tabs.d.ts +1 -1
  243. package/dist/context-CQbvWVnM.js +393 -0
  244. package/dist/context-CQbvWVnM.js.map +1 -0
  245. package/dist/context-tv-kneJV.d.ts +204 -0
  246. package/dist/context-tv-kneJV.d.ts.map +1 -0
  247. package/dist/{copy-menu-CKW3jM1J.js → copy-menu-LU54Aruj.js} +2 -2
  248. package/dist/{copy-menu-CKW3jM1J.js.map → copy-menu-LU54Aruj.js.map} +1 -1
  249. package/dist/crash-parts-CUv5gFYQ.js +1053 -0
  250. package/dist/crash-parts-CUv5gFYQ.js.map +1 -0
  251. package/dist/{ease-CHhXKlG3.d.ts → ease-DjhlGGZO.d.ts} +4 -2
  252. package/dist/ease-DjhlGGZO.d.ts.map +1 -0
  253. package/dist/hooks/use-highlighted-code.d.ts +1 -1
  254. package/dist/hooks/use-highlighted-code.d.ts.map +1 -1
  255. package/dist/hooks/use-modal-scope.js +2 -2
  256. package/dist/hooks/use-modal-scope.js.map +1 -1
  257. package/dist/lib/audio-context.d.ts +11 -0
  258. package/dist/lib/audio-context.d.ts.map +1 -0
  259. package/dist/lib/audio-context.js +37 -0
  260. package/dist/lib/audio-context.js.map +1 -0
  261. package/dist/lib/ease.d.ts +2 -2
  262. package/dist/lib/ease.js +8 -1
  263. package/dist/lib/ease.js.map +1 -1
  264. package/dist/lib/focusable.d.ts +2 -0
  265. package/dist/lib/focusable.d.ts.map +1 -0
  266. package/dist/lib/focusable.js +12 -0
  267. package/dist/lib/focusable.js.map +1 -0
  268. package/dist/lib/game-sounds.d.ts +18 -0
  269. package/dist/lib/game-sounds.d.ts.map +1 -0
  270. package/dist/lib/game-sounds.js +142 -0
  271. package/dist/lib/game-sounds.js.map +1 -0
  272. package/dist/lib/tick-sound.d.ts +4 -3
  273. package/dist/lib/tick-sound.d.ts.map +1 -1
  274. package/dist/lib/tick-sound.js +30 -37
  275. package/dist/lib/tick-sound.js.map +1 -1
  276. package/dist/model-CvWolJdo.d.ts +14 -0
  277. package/dist/model-CvWolJdo.d.ts.map +1 -0
  278. package/dist/path-VEfFUowr.d.ts +3 -0
  279. package/dist/path-VEfFUowr.d.ts.map +1 -0
  280. package/dist/{plot-DAKl-Lu1.js → plot-CTQFrQKi.js} +2 -2
  281. package/dist/{plot-DAKl-Lu1.js.map → plot-CTQFrQKi.js.map} +1 -1
  282. package/dist/scale-DSsaupNc.d.ts +7 -0
  283. package/dist/scale-DSsaupNc.d.ts.map +1 -0
  284. package/dist/tooltip-CNEYdIX3.d.ts.map +1 -1
  285. package/dist/tooltip-content-K0vPsEtI.d.ts +17 -0
  286. package/dist/tooltip-content-K0vPsEtI.d.ts.map +1 -0
  287. package/dist/use-crash-game-B3RHxFkm.d.ts +108 -0
  288. package/dist/use-crash-game-B3RHxFkm.d.ts.map +1 -0
  289. package/dist/use-inspection-CZhdpH8J.js +127 -0
  290. package/dist/use-inspection-CZhdpH8J.js.map +1 -0
  291. package/dist/use-points-C2jpElHh.js +118 -0
  292. package/dist/use-points-C2jpElHh.js.map +1 -0
  293. package/dist/use-width-CkKCh1b3.js +23 -0
  294. package/dist/use-width-CkKCh1b3.js.map +1 -0
  295. package/package.json +7 -7
  296. package/dist/ease-CHhXKlG3.d.ts.map +0 -1
@@ -0,0 +1,829 @@
1
+ "use client";
2
+ import { EASE_IN, EASE_IN_OUT, EASE_OUT } from "../../../lib/ease.js";
3
+ import { S as useCrashGame, _ as crashPoint, a as PRIMARY_TEXT, b as growth, d as wrap, f as BURST, g as SWAP, h as PULSE, i as MINI_REPLAY, l as clamp01, n as CrashShell, o as Parachute, p as EXIT, r as MINI, s as STAGE_LABEL, t as CHUTE, u as niceAtLeast, v as formatMultiplier, x as timeAt, y as formatShort } from "../../../crash-parts-CUv5gFYQ.js";
4
+ import { useId } from "react";
5
+ import { cn } from "@kumix/utils";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
+ import { AnimatePresence, cubicBezier, motion } from "motion/react";
8
+ // src/components/motion/crash/crash-balloon.tsx
9
+ const W = 400;
10
+ const H = 280;
11
+ const BX = 262;
12
+ const TAPE_X = 348;
13
+ const LEVEL = 112;
14
+ const TARGET_PIN = 14;
15
+ const GROUND_Y = 256;
16
+ const PARKED = 205;
17
+ const PX = 240;
18
+ const CLOUD_CAP = PX * Math.log(100);
19
+ const LIFT = 1.2;
20
+ const rise = cubicBezier(...EASE_IN_OUT);
21
+ /**
22
+ * Crash, drawn as a hot-air balloon on an altimeter: the multiplier is the
23
+ * altitude. The balloon lifts off and holds while the tape and clouds scroll
24
+ * past; cash out to bail before the envelope pops.
25
+ */
26
+ function CrashBalloon({ "aria-label": ariaLabel = "Crash", className, ...options }) {
27
+ const game = useCrashGame(options);
28
+ return /* @__PURE__ */ jsx(CrashShell, {
29
+ game,
30
+ "aria-label": ariaLabel,
31
+ className,
32
+ miniature: (props) => /* @__PURE__ */ jsx(MiniAltitude, { ...props }),
33
+ children: /* @__PURE__ */ jsx(Stage, {
34
+ t: game.t,
35
+ cashed: game.cashed,
36
+ crashed: game.crashed,
37
+ lost: game.lost,
38
+ round: game.round,
39
+ pulse: game.pulse,
40
+ target: game.target,
41
+ ghost: game.ghost,
42
+ reduce: game.reduce,
43
+ skipping: game.skipping
44
+ })
45
+ });
46
+ }
47
+ function Stage({ t, cashed, crashed, lost, round, pulse, target, ghost, reduce, skipping }) {
48
+ const id = `crash-balloon-${useId().replace(/:/g, "")}`;
49
+ const m = growth(t);
50
+ const climb = PX * Math.log(m);
51
+ const lift = t <= 0 ? 0 : reduce ? 1 : rise(Math.min(1, t / LIFT));
52
+ const by = PARKED + -93 * lift;
53
+ const sway = reduce ? 0 : lift;
54
+ const tilt = Math.sin(t * 1.6) * 2 * sway;
55
+ const drift = Math.sin(t * 1.1 + .6) * 2 * sway;
56
+ const eased = Math.min(climb, CLOUD_CAP);
57
+ const travel = reduce ? 0 : climb + eased ** 2 / 600 + eased / 300 * (climb - eased);
58
+ const tone = lost ? "text-rose-500" : cashed !== null ? "text-muted-foreground" : "text-primary";
59
+ const fall = (290 - (by + 42)) * lift;
60
+ const at = (value) => LEVEL - (Math.log(value) - Math.log(m)) * PX;
61
+ const flagY = cashed === null ? null : at(cashed);
62
+ return /* @__PURE__ */ jsxs("svg", {
63
+ "aria-hidden": "true",
64
+ viewBox: `0 0 ${W} ${H}`,
65
+ className: "block w-full",
66
+ children: [
67
+ /* @__PURE__ */ jsxs("defs", { children: [/* @__PURE__ */ jsxs("linearGradient", {
68
+ id: `${id}-fade`,
69
+ x1: "0",
70
+ y1: "0",
71
+ x2: "0",
72
+ y2: "1",
73
+ children: [
74
+ /* @__PURE__ */ jsx("stop", {
75
+ offset: "0",
76
+ stopColor: "white",
77
+ stopOpacity: 0
78
+ }),
79
+ /* @__PURE__ */ jsx("stop", {
80
+ offset: "0.18",
81
+ stopColor: "white",
82
+ stopOpacity: 1
83
+ }),
84
+ /* @__PURE__ */ jsx("stop", {
85
+ offset: "0.82",
86
+ stopColor: "white",
87
+ stopOpacity: 1
88
+ }),
89
+ /* @__PURE__ */ jsx("stop", {
90
+ offset: "1",
91
+ stopColor: "white",
92
+ stopOpacity: 0
93
+ })
94
+ ]
95
+ }), /* @__PURE__ */ jsx("mask", {
96
+ id: `${id}-tape`,
97
+ maskUnits: "userSpaceOnUse",
98
+ x: 0,
99
+ y: 0,
100
+ width: W,
101
+ height: H,
102
+ children: /* @__PURE__ */ jsx("rect", {
103
+ width: W,
104
+ height: H,
105
+ fill: `url(#${id}-fade)`
106
+ })
107
+ })] }),
108
+ /* @__PURE__ */ jsxs("g", {
109
+ className: cn("transition-opacity duration-200", skipping ? "opacity-0" : "opacity-100"),
110
+ children: [
111
+ CLOUDS.map((cloud) => /* @__PURE__ */ jsxs("g", {
112
+ transform: `translate(${cloud.x},${wrap(cloud.y + travel * cloud.speed, SPAN) - 20}) scale(${cloud.size})`,
113
+ opacity: cloud.opacity,
114
+ className: "fill-foreground",
115
+ children: [
116
+ /* @__PURE__ */ jsx("rect", {
117
+ x: -18,
118
+ y: -4,
119
+ width: 36,
120
+ height: 10,
121
+ rx: 5
122
+ }),
123
+ /* @__PURE__ */ jsx("circle", {
124
+ cx: -5,
125
+ cy: -4,
126
+ r: 8
127
+ }),
128
+ /* @__PURE__ */ jsx("circle", {
129
+ cx: 7,
130
+ cy: -2,
131
+ r: 6
132
+ })
133
+ ]
134
+ }, cloud.id)),
135
+ /* @__PURE__ */ jsxs("g", {
136
+ transform: `translate(0,${reduce ? 0 : climb.toFixed(2)})`,
137
+ className: cn("transition-opacity duration-200", reduce && t > 0 ? "opacity-0" : "opacity-100"),
138
+ children: [
139
+ /* @__PURE__ */ jsx("rect", {
140
+ y: GROUND_Y,
141
+ width: W,
142
+ height: 24,
143
+ className: "fill-foreground/[0.05]"
144
+ }),
145
+ /* @__PURE__ */ jsx("line", {
146
+ x1: 0,
147
+ x2: W,
148
+ y1: GROUND_Y,
149
+ y2: GROUND_Y,
150
+ className: "stroke-border"
151
+ }),
152
+ /* @__PURE__ */ jsx("ellipse", {
153
+ cx: BX,
154
+ cy: 259,
155
+ rx: 14,
156
+ ry: 2.5,
157
+ opacity: 1 - lift,
158
+ className: "fill-foreground/10"
159
+ })
160
+ ]
161
+ }),
162
+ reduce ? null : /* @__PURE__ */ jsx(Landmarks, {
163
+ t,
164
+ at
165
+ })
166
+ ]
167
+ }),
168
+ /* @__PURE__ */ jsx("line", {
169
+ x1: 296,
170
+ x2: 338,
171
+ y1: LEVEL,
172
+ y2: LEVEL,
173
+ strokeDasharray: "2 4",
174
+ opacity: lift,
175
+ className: "stroke-foreground/15"
176
+ }),
177
+ /* @__PURE__ */ jsx(Tape, {
178
+ m,
179
+ mask: `url(#${id}-tape)`
180
+ }),
181
+ ghost !== null ? /* @__PURE__ */ jsx("g", {
182
+ transform: `translate(${TAPE_X},${at(ghost).toFixed(2)})`,
183
+ className: "text-muted-foreground/60",
184
+ children: /* @__PURE__ */ jsxs(motion.g, {
185
+ initial: { opacity: 0 },
186
+ animate: { opacity: 1 },
187
+ transition: SWAP,
188
+ children: [
189
+ /* @__PURE__ */ jsx("line", {
190
+ x2: 12,
191
+ stroke: "currentColor",
192
+ strokeDasharray: "2 2"
193
+ }),
194
+ /* @__PURE__ */ jsx("path", {
195
+ d: "M-8.5,-2.5L-3.5,2.5M-3.5,-2.5L-8.5,2.5",
196
+ stroke: "currentColor",
197
+ strokeWidth: 1.25
198
+ }),
199
+ target !== null && Math.abs(at(ghost) - Math.max(at(target), TARGET_PIN)) < 12 ? null : /* @__PURE__ */ jsx("text", {
200
+ x: -12,
201
+ dy: "0.32em",
202
+ textAnchor: "end",
203
+ className: cn(STAGE_LABEL, "fill-muted-foreground tabular-nums"),
204
+ children: formatShort(ghost)
205
+ })
206
+ ]
207
+ }, ghost)
208
+ }) : null,
209
+ /* @__PURE__ */ jsx(AnimatePresence, {
210
+ initial: false,
211
+ children: target !== null ? /* @__PURE__ */ jsx(motion.g, {
212
+ initial: { opacity: 0 },
213
+ animate: { opacity: 1 },
214
+ exit: {
215
+ opacity: 0,
216
+ transition: EXIT
217
+ },
218
+ transition: SWAP,
219
+ className: "text-primary",
220
+ children: /* @__PURE__ */ jsxs("g", {
221
+ transform: `translate(${TAPE_X},${Math.max(at(target), TARGET_PIN).toFixed(2)})`,
222
+ children: [
223
+ at(target) < TARGET_PIN ? null : /* @__PURE__ */ jsx("line", {
224
+ x2: 52,
225
+ stroke: "currentColor",
226
+ strokeDasharray: "3 3",
227
+ strokeWidth: 1.25,
228
+ opacity: .7
229
+ }),
230
+ /* @__PURE__ */ jsx("path", {
231
+ d: "M0,0V-10L8,-7L0,-4",
232
+ fill: "none",
233
+ stroke: "currentColor",
234
+ strokeLinejoin: "round",
235
+ opacity: .7
236
+ }),
237
+ /* @__PURE__ */ jsx("text", {
238
+ x: -12,
239
+ dy: "0.32em",
240
+ textAnchor: "end",
241
+ className: cn("fill-current", STAGE_LABEL, PRIMARY_TEXT),
242
+ children: at(target) < TARGET_PIN ? `target ${formatShort(target)} ↑` : "target"
243
+ })
244
+ ]
245
+ })
246
+ }, "target") : null
247
+ }),
248
+ flagY !== null ? /* @__PURE__ */ jsx("g", {
249
+ transform: `translate(${TAPE_X},${flagY.toFixed(2)})`,
250
+ className: "text-primary",
251
+ children: /* @__PURE__ */ jsxs(motion.g, {
252
+ initial: reduce ? { opacity: 0 } : {
253
+ opacity: 0,
254
+ scale: .25
255
+ },
256
+ animate: {
257
+ opacity: 1,
258
+ scale: 1
259
+ },
260
+ transition: SWAP,
261
+ children: [/* @__PURE__ */ jsx("line", {
262
+ x1: 0,
263
+ x2: 14,
264
+ y1: 0,
265
+ y2: 0,
266
+ stroke: "currentColor",
267
+ strokeWidth: 1.5
268
+ }), /* @__PURE__ */ jsx("path", {
269
+ d: "M0,0V-10L8,-7L0,-4Z",
270
+ fill: "currentColor"
271
+ })]
272
+ }, round)
273
+ }) : null,
274
+ /* @__PURE__ */ jsxs("g", {
275
+ transform: `translate(${TAPE_X},${LEVEL})`,
276
+ className: cn("transition-colors duration-150", lost ? "text-rose-500" : "text-primary"),
277
+ children: [/* @__PURE__ */ jsx("line", {
278
+ x1: 0,
279
+ x2: 52,
280
+ opacity: .5,
281
+ stroke: "currentColor"
282
+ }), /* @__PURE__ */ jsx(motion.g, {
283
+ initial: pulse > 0 && !reduce ? { scale: 1.5 } : false,
284
+ animate: { scale: 1 },
285
+ transition: PULSE,
286
+ children: /* @__PURE__ */ jsx("path", {
287
+ d: "M-9,-4.5L-2,0L-9,4.5Z",
288
+ fill: "currentColor"
289
+ })
290
+ }, pulse)]
291
+ }),
292
+ cashed !== null && !reduce && timeAt(cashed) >= LIFT ? /* @__PURE__ */ jsx("g", {
293
+ transform: `translate(270,${(by + 48).toFixed(2)})`,
294
+ children: /* @__PURE__ */ jsx(motion.g, {
295
+ style: {
296
+ transformBox: "fill-box",
297
+ transformOrigin: "50% 0%"
298
+ },
299
+ initial: {
300
+ y: 0,
301
+ rotate: -10,
302
+ opacity: 0
303
+ },
304
+ animate: {
305
+ y: 96,
306
+ rotate: [
307
+ -10,
308
+ 8,
309
+ -5,
310
+ 3,
311
+ 0
312
+ ],
313
+ opacity: [
314
+ 0,
315
+ 1,
316
+ 1,
317
+ 0
318
+ ]
319
+ },
320
+ transition: CHUTE,
321
+ children: /* @__PURE__ */ jsx(motion.g, {
322
+ initial: { scale: .5 },
323
+ animate: { scale: 1 },
324
+ transition: SWAP,
325
+ children: /* @__PURE__ */ jsx(Parachute, {})
326
+ })
327
+ }, round)
328
+ }) : null,
329
+ /* @__PURE__ */ jsxs("g", {
330
+ transform: `translate(${BX},${by.toFixed(2)})`,
331
+ className: cn("transition-colors duration-150", tone),
332
+ children: [crashed && !reduce ? /* @__PURE__ */ jsxs("g", { children: [/* @__PURE__ */ jsx(motion.circle, {
333
+ fill: "none",
334
+ stroke: "currentColor",
335
+ strokeWidth: 2,
336
+ vectorEffect: "non-scaling-stroke",
337
+ r: 48,
338
+ initial: {
339
+ scale: 12 / 48,
340
+ opacity: .7
341
+ },
342
+ animate: {
343
+ scale: 1,
344
+ opacity: 0
345
+ },
346
+ transition: BURST
347
+ }), SHARDS.map((shard) => /* @__PURE__ */ jsx(motion.path, {
348
+ d: "M-3,-2Q0,-4 3,-2L2,2Q0,1 -2,2Z",
349
+ fill: "currentColor",
350
+ initial: {
351
+ x: shard.x0,
352
+ y: shard.y0,
353
+ rotate: 0,
354
+ opacity: 1
355
+ },
356
+ animate: {
357
+ x: shard.x,
358
+ y: shard.y,
359
+ rotate: shard.spin,
360
+ opacity: 0
361
+ },
362
+ transition: BURST
363
+ }, shard.id))] }, `burst-${round}`) : null, /* @__PURE__ */ jsx(motion.g, {
364
+ initial: round > 0 ? { opacity: 0 } : false,
365
+ animate: { opacity: crashed && reduce ? 0 : 1 },
366
+ transition: {
367
+ duration: .2,
368
+ ease: EASE_OUT
369
+ },
370
+ children: /* @__PURE__ */ jsxs("g", {
371
+ transform: `translate(${drift.toFixed(2)},0) rotate(${tilt.toFixed(2)})`,
372
+ children: [/* @__PURE__ */ jsxs(motion.g, {
373
+ initial: false,
374
+ animate: crashed && !reduce ? {
375
+ y: fall,
376
+ rotate: 14
377
+ } : {
378
+ y: 0,
379
+ rotate: 0
380
+ },
381
+ transition: crashed && !reduce ? DROP : { duration: 0 },
382
+ children: [
383
+ /* @__PURE__ */ jsx("path", {
384
+ d: "M-6,31L-5,42M6,31L5,42",
385
+ stroke: "currentColor",
386
+ strokeWidth: .75,
387
+ opacity: .6
388
+ }),
389
+ /* @__PURE__ */ jsx("rect", {
390
+ x: -6,
391
+ y: 42,
392
+ width: 12,
393
+ height: 9,
394
+ rx: 1.5,
395
+ className: "fill-foreground/60"
396
+ }),
397
+ /* @__PURE__ */ jsx("line", {
398
+ x1: -6.5,
399
+ x2: 6.5,
400
+ y1: 42.5,
401
+ y2: 42.5,
402
+ strokeWidth: 1.5,
403
+ className: "stroke-foreground/70"
404
+ })
405
+ ]
406
+ }), /* @__PURE__ */ jsx(motion.g, {
407
+ initial: false,
408
+ animate: crashed && !reduce ? {
409
+ scale: 1.15,
410
+ opacity: 0
411
+ } : {
412
+ scale: 1,
413
+ opacity: 1
414
+ },
415
+ transition: crashed && !reduce ? EXIT : { duration: 0 },
416
+ children: /* @__PURE__ */ jsx(Envelope, {})
417
+ })]
418
+ })
419
+ }, round)]
420
+ })
421
+ ]
422
+ });
423
+ }
424
+ /** The altimeter: ticks for the multipliers in view, scrolling down on a log scale as the balloon climbs. */
425
+ function Tape({ m, mask }) {
426
+ const top = m * Math.exp(LEVEL / PX);
427
+ const bottom = Math.max(1, m * Math.exp(-168 / PX));
428
+ const base = niceAtLeast(bottom * 8 / PX);
429
+ const ticks = [];
430
+ for (let k = Math.ceil(bottom / base - 1e-9); k * base <= top; k++) {
431
+ const value = Number((k * base).toPrecision(12));
432
+ let level = base;
433
+ for (let step = base; step <= value; step = nextStep(step)) if (Math.abs(value / step - Math.round(value / step)) < 1e-6) level = step;
434
+ const gap = PX * Math.log1p(level / value);
435
+ const tick = clamp01((gap - 8) / 10);
436
+ if (tick === 0) continue;
437
+ ticks.push({
438
+ value,
439
+ y: LEVEL - (Math.log(value) - Math.log(m)) * PX,
440
+ tick,
441
+ label: clamp01((gap - 56) / 16)
442
+ });
443
+ }
444
+ return /* @__PURE__ */ jsxs("g", {
445
+ mask,
446
+ className: cn(STAGE_LABEL, "text-muted-foreground tabular-nums"),
447
+ children: [
448
+ /* @__PURE__ */ jsx("rect", {
449
+ x: TAPE_X,
450
+ width: 52,
451
+ height: H,
452
+ className: "fill-foreground/[0.03]"
453
+ }),
454
+ /* @__PURE__ */ jsx("line", {
455
+ x1: TAPE_X,
456
+ x2: TAPE_X,
457
+ y1: 0,
458
+ y2: H,
459
+ className: "stroke-border"
460
+ }),
461
+ ticks.map(({ value, y, tick, label }) => /* @__PURE__ */ jsxs("g", {
462
+ transform: `translate(${TAPE_X},${y.toFixed(2)})`,
463
+ children: [/* @__PURE__ */ jsx("line", {
464
+ x2: 5 + 7 * label,
465
+ opacity: tick,
466
+ className: "stroke-foreground/30"
467
+ }), label > 0 ? /* @__PURE__ */ jsx("text", {
468
+ x: 50,
469
+ dy: "0.32em",
470
+ textAnchor: "end",
471
+ opacity: label,
472
+ className: "fill-current",
473
+ children: formatShort(value)
474
+ }) : null]
475
+ }, value))
476
+ ]
477
+ });
478
+ }
479
+ const JET_T = timeAt(10);
480
+ const FLOCK = [
481
+ {
482
+ id: 0,
483
+ x: 0,
484
+ y: 0,
485
+ phase: 0
486
+ },
487
+ {
488
+ id: 1,
489
+ x: -11,
490
+ y: 7,
491
+ phase: 1.3
492
+ },
493
+ {
494
+ id: 2,
495
+ x: 10,
496
+ y: 9,
497
+ phase: 2.6
498
+ }
499
+ ];
500
+ /** A flock at 3×, a jet at 10× and a satellite at 100×, each brightening as the balloon passes it. */
501
+ function Landmarks({ t, at }) {
502
+ const sights = [
503
+ {
504
+ value: 3,
505
+ x: 208
506
+ },
507
+ {
508
+ value: 10,
509
+ x: 204 - (t - JET_T) * 2.5
510
+ },
511
+ {
512
+ value: 100,
513
+ x: 210
514
+ }
515
+ ];
516
+ return /* @__PURE__ */ jsx("g", {
517
+ className: "text-foreground",
518
+ children: sights.map(({ value, x }) => {
519
+ const y = at(value);
520
+ if (y < -30 || y > 310) return null;
521
+ const near = Math.abs(y - LEVEL) < 40 ? .5 + .5 * Math.cos(Math.PI * (y - LEVEL) / 40) : 0;
522
+ return /* @__PURE__ */ jsx("g", {
523
+ transform: `translate(${x.toFixed(2)},${y.toFixed(2)})`,
524
+ opacity: .4 + .4 * near,
525
+ children: value === 3 ? FLOCK.map((bird) => {
526
+ const flap = Math.sin(t * 9 + bird.phase) * 2.5;
527
+ const tip = (bird.y - flap).toFixed(2);
528
+ return /* @__PURE__ */ jsx("path", {
529
+ d: `M${bird.x - 4},${tip}L${bird.x},${bird.y}L${bird.x + 4},${tip}`,
530
+ fill: "none",
531
+ stroke: "currentColor",
532
+ strokeWidth: 1.25,
533
+ strokeLinecap: "round",
534
+ strokeLinejoin: "round"
535
+ }, bird.id);
536
+ }) : value === 10 ? /* @__PURE__ */ jsxs("g", { children: [
537
+ /* @__PURE__ */ jsx("line", {
538
+ x1: 9,
539
+ x2: 30,
540
+ stroke: "currentColor",
541
+ strokeWidth: 1.5,
542
+ strokeLinecap: "round",
543
+ opacity: .35
544
+ }),
545
+ /* @__PURE__ */ jsx("path", {
546
+ d: "M-7,0L-4,-1.5H7L9,-4.5H10L9.5,0Z",
547
+ fill: "currentColor"
548
+ }),
549
+ /* @__PURE__ */ jsx("path", {
550
+ d: "M-1,-0.5L4,4.5H5.5L3.5,-0.5Z",
551
+ fill: "currentColor"
552
+ })
553
+ ] }) : /* @__PURE__ */ jsxs("g", { children: [
554
+ /* @__PURE__ */ jsx("rect", {
555
+ x: -3,
556
+ y: -2.5,
557
+ width: 6,
558
+ height: 5,
559
+ rx: 1,
560
+ fill: "currentColor"
561
+ }),
562
+ /* @__PURE__ */ jsx("rect", {
563
+ x: -13,
564
+ y: -2,
565
+ width: 8,
566
+ height: 4,
567
+ fill: "none",
568
+ stroke: "currentColor"
569
+ }),
570
+ /* @__PURE__ */ jsx("rect", {
571
+ x: 5,
572
+ y: -2,
573
+ width: 8,
574
+ height: 4,
575
+ fill: "none",
576
+ stroke: "currentColor"
577
+ }),
578
+ /* @__PURE__ */ jsx("path", {
579
+ d: "M-5,0H-3M3,0H5M0,-2.5V-6",
580
+ stroke: "currentColor"
581
+ }),
582
+ /* @__PURE__ */ jsx("circle", {
583
+ cy: -7,
584
+ r: 1.25,
585
+ opacity: Math.sin(t * 5) > .2 ? 1 : .15,
586
+ className: "fill-primary"
587
+ })
588
+ ] })
589
+ }, value);
590
+ })
591
+ });
592
+ }
593
+ const DROP = {
594
+ duration: .6,
595
+ ease: EASE_IN
596
+ };
597
+ const SHARDS = Array.from({ length: 8 }, (_, i) => {
598
+ const angle = (i * 45 + i % 2 * 12) * Math.PI / 180;
599
+ const reach = 30 + i % 3 * 9;
600
+ return {
601
+ id: i,
602
+ x0: Math.cos(angle) * 12,
603
+ y0: Math.sin(angle) * 12,
604
+ x: Math.cos(angle) * reach,
605
+ y: Math.sin(angle) * reach + 14,
606
+ spin: (i % 2 ? 1 : -1) * (120 + i * 25)
607
+ };
608
+ });
609
+ const CLOUDS = [
610
+ {
611
+ id: 0,
612
+ x: 60,
613
+ y: 40,
614
+ size: .7,
615
+ speed: .45,
616
+ opacity: .04
617
+ },
618
+ {
619
+ id: 1,
620
+ x: 200,
621
+ y: 150,
622
+ size: .6,
623
+ speed: .45,
624
+ opacity: .04
625
+ },
626
+ {
627
+ id: 2,
628
+ x: 310,
629
+ y: 250,
630
+ size: .75,
631
+ speed: .45,
632
+ opacity: .04
633
+ },
634
+ {
635
+ id: 3,
636
+ x: 150,
637
+ y: 90,
638
+ size: 1.1,
639
+ speed: 1.4,
640
+ opacity: .07
641
+ },
642
+ {
643
+ id: 4,
644
+ x: 290,
645
+ y: 20,
646
+ size: 1.2,
647
+ speed: 1.4,
648
+ opacity: .07
649
+ },
650
+ {
651
+ id: 5,
652
+ x: 90,
653
+ y: 220,
654
+ size: 1,
655
+ speed: 1.4,
656
+ opacity: .07
657
+ }
658
+ ];
659
+ const SPAN = 320;
660
+ /** The next step up the 1, 2, 5 ladder. */
661
+ function nextStep(step) {
662
+ const unit = Math.round(step / 10 ** Math.floor(Math.log10(step) + 1e-9));
663
+ return Number((step * (unit === 2 ? 2.5 : 2)).toPrecision(12));
664
+ }
665
+ /** The envelope, centred on the origin: a teardrop with a lighter middle gore and a throat. */
666
+ function Envelope() {
667
+ return /* @__PURE__ */ jsxs("g", { children: [
668
+ /* @__PURE__ */ jsx("path", {
669
+ d: "M0,-26C16,-26 26,-14 26,-2C26,12 12,20 7,28L-7,28C-12,20 -26,12 -26,-2C-26,-14 -16,-26 0,-26Z",
670
+ fill: "currentColor"
671
+ }),
672
+ /* @__PURE__ */ jsx("path", {
673
+ d: "M0,-26C10,-12 10,14 4,28L-4,28C-10,14 -10,-12 0,-26Z",
674
+ className: "fill-card/25"
675
+ }),
676
+ /* @__PURE__ */ jsx("rect", {
677
+ x: -6,
678
+ y: 28,
679
+ width: 12,
680
+ height: 3,
681
+ rx: 1,
682
+ fill: "currentColor",
683
+ opacity: .7
684
+ })
685
+ ] });
686
+ }
687
+ /**
688
+ * The round as a tiny altimeter, on its own log scale so a skip to a huge
689
+ * crash still reads: the climb rises up the tape, a parachute hangs where you
690
+ * bailed out, the balloon pops at the crash height, and a missed target is a
691
+ * dashed line above it.
692
+ */
693
+ function MiniAltitude({ crash, cashed, target, reduce }) {
694
+ const top = Math.max(crash, target ?? 1, 1.01);
695
+ const y = (value) => MINI.height - 4 - Math.log(value) / Math.log(top) * (MINI.height - 14);
696
+ const tape = 12;
697
+ const won = cashed !== null;
698
+ const reach = won ? cashed : crash;
699
+ const after = (extra) => reduce ? 0 : MINI_REPLAY.delay + extra;
700
+ const pop = {
701
+ initial: reduce ? { opacity: 0 } : {
702
+ opacity: 0,
703
+ scale: .25
704
+ },
705
+ animate: {
706
+ opacity: 1,
707
+ scale: 1
708
+ },
709
+ style: {
710
+ transformBox: "fill-box",
711
+ transformOrigin: "center"
712
+ }
713
+ };
714
+ return /* @__PURE__ */ jsxs("svg", {
715
+ "aria-hidden": "true",
716
+ viewBox: `0 0 ${MINI.width} ${MINI.height}`,
717
+ width: MINI.width,
718
+ height: MINI.height,
719
+ className: "shrink-0 overflow-visible",
720
+ children: [
721
+ /* @__PURE__ */ jsx("line", {
722
+ x1: tape,
723
+ x2: tape,
724
+ y1: 4,
725
+ y2: MINI.height - 4,
726
+ className: "stroke-border"
727
+ }),
728
+ /* @__PURE__ */ jsx("line", {
729
+ x1: 9,
730
+ x2: 15,
731
+ y1: MINI.height - 4,
732
+ y2: MINI.height - 4,
733
+ className: "stroke-border"
734
+ }),
735
+ target !== null ? /* @__PURE__ */ jsx("line", {
736
+ x1: tape,
737
+ x2: MINI.width - 4,
738
+ y1: y(target),
739
+ y2: y(target),
740
+ strokeDasharray: "2 3",
741
+ className: "stroke-muted-foreground/60"
742
+ }) : null,
743
+ /* @__PURE__ */ jsx(motion.line, {
744
+ x1: tape,
745
+ x2: tape,
746
+ y1: y(1),
747
+ y2: y(reach),
748
+ strokeWidth: 2.5,
749
+ strokeLinecap: "round",
750
+ className: won ? "stroke-primary" : "stroke-rose-500",
751
+ initial: { pathLength: reduce ? 1 : 0 },
752
+ animate: { pathLength: 1 },
753
+ transition: {
754
+ ...MINI_REPLAY,
755
+ delay: after(0)
756
+ }
757
+ }),
758
+ won ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
759
+ /* @__PURE__ */ jsx(motion.line, {
760
+ x1: tape,
761
+ x2: tape,
762
+ y1: y(cashed),
763
+ y2: y(crash),
764
+ strokeWidth: 1.5,
765
+ strokeDasharray: "2 3",
766
+ className: "stroke-muted-foreground/60",
767
+ initial: { opacity: 0 },
768
+ animate: { opacity: 1 },
769
+ transition: {
770
+ duration: .25,
771
+ ease: EASE_OUT,
772
+ delay: after(.5)
773
+ }
774
+ }),
775
+ /* @__PURE__ */ jsx("line", {
776
+ x1: tape,
777
+ x2: 34,
778
+ y1: y(cashed),
779
+ y2: y(cashed),
780
+ strokeDasharray: "1 2",
781
+ className: "stroke-primary/50"
782
+ }),
783
+ /* @__PURE__ */ jsx("g", {
784
+ transform: `translate(40,${(y(cashed) - 5).toFixed(2)}) scale(0.6)`,
785
+ children: /* @__PURE__ */ jsx(motion.g, {
786
+ ...pop,
787
+ transition: {
788
+ ...SWAP,
789
+ delay: after(.45)
790
+ },
791
+ children: /* @__PURE__ */ jsx(Parachute, {})
792
+ })
793
+ })
794
+ ] }) : null,
795
+ /* @__PURE__ */ jsx("line", {
796
+ x1: tape,
797
+ x2: 56,
798
+ y1: y(crash),
799
+ y2: y(crash),
800
+ strokeDasharray: "1 2",
801
+ className: "stroke-muted-foreground/50"
802
+ }),
803
+ /* @__PURE__ */ jsx("g", {
804
+ transform: `translate(64,${y(crash).toFixed(2)})`,
805
+ children: /* @__PURE__ */ jsxs(motion.g, {
806
+ ...pop,
807
+ transition: {
808
+ ...SWAP,
809
+ delay: after(.55)
810
+ },
811
+ children: [/* @__PURE__ */ jsx("g", {
812
+ transform: "scale(0.26)",
813
+ opacity: .45,
814
+ className: won ? "text-muted-foreground" : "text-rose-500",
815
+ children: /* @__PURE__ */ jsx(Envelope, {})
816
+ }), /* @__PURE__ */ jsx("path", {
817
+ d: "M-3,-3L3,3M3,-3L-3,3",
818
+ strokeWidth: 1.75,
819
+ strokeLinecap: "round",
820
+ className: "stroke-rose-500"
821
+ })]
822
+ })
823
+ })
824
+ ]
825
+ });
826
+ }
827
+ export { CrashBalloon, crashPoint, formatMultiplier };
828
+
829
+ //# sourceMappingURL=crash-balloon.js.map