@cuemath/leap 3.2.31 → 3.2.32-m

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/assets/illustrations/illustrations.js +5 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -6
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +1 -2
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +16 -20
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/account-selector/account-selector.js +52 -54
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  13. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +1 -2
  14. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -1
  15. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +8 -8
  16. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
  17. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +60 -82
  18. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  19. package/dist/features/auth/comps/pill-button/pill-button.js +38 -41
  20. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  21. package/dist/features/auth/comps/resend-otp/resend-otp.js +14 -18
  22. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  23. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +26 -32
  24. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -1
  25. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +10 -2
  26. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  27. package/dist/features/auth/comps/user-list/user-item/user-item-styled.js +3 -9
  28. package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -1
  29. package/dist/features/auth/comps/user-list/user-item/user-item.js +15 -14
  30. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  31. package/dist/features/auth/pla-signup/signup-options/signup-options.js +35 -42
  32. package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
  33. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js +43 -43
  34. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js.map +1 -1
  35. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js +1 -1
  36. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js.map +1 -1
  37. package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
  38. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  39. package/dist/features/communication/pub-sub/constants.js +4 -7
  40. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  41. package/dist/features/homework/homework-card-view.js +97 -85
  42. package/dist/features/homework/homework-card-view.js.map +1 -1
  43. package/dist/features/homework/homework-card.js +42 -44
  44. package/dist/features/homework/homework-card.js.map +1 -1
  45. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  46. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  47. package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
  48. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  49. package/dist/features/homework/utils.js +27 -33
  50. package/dist/features/homework/utils.js.map +1 -1
  51. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  52. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  53. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  54. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  55. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  56. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  57. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +53 -68
  58. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
  59. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +46 -48
  60. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  61. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +38 -39
  62. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  63. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +41 -43
  64. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  65. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +59 -61
  66. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  67. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +89 -91
  68. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  69. package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
  70. package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
  71. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  72. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  73. package/dist/features/puzzles/comps/puzzle-card.js +30 -79
  74. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  75. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  76. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  77. package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
  78. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  79. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  80. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  81. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  82. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  83. package/dist/features/stickers/sticker-data.js +234 -0
  84. package/dist/features/stickers/sticker-data.js.map +1 -0
  85. package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +23 -31
  86. package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
  87. package/dist/features/stickers/sticker-selector/sticker-selector.js +39 -0
  88. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
  89. package/dist/features/stickers/sticker-selector/sticker.js +59 -0
  90. package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
  91. package/dist/features/stickers/stickers-effects/effects.js +82 -0
  92. package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
  93. package/dist/features/stickers/stickers-effects/stickers-cache.js +19 -0
  94. package/dist/features/stickers/stickers-effects/stickers-cache.js.map +1 -0
  95. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
  96. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
  97. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +36 -0
  98. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
  99. package/dist/features/stickers/stickers-effects/stickers-effects.js +55 -0
  100. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
  101. package/dist/features/trial-session/comps/learning-plan/index.js +18 -19
  102. package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
  103. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +8 -3
  104. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  105. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +40 -40
  106. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  107. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
  108. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
  109. package/dist/features/ui/lottie-animation/lottie-animation.js +45 -43
  110. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  111. package/dist/features/ui/modals/modal-styled.js +48 -15
  112. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  113. package/dist/features/ui/modals/modal.js +43 -35
  114. package/dist/features/ui/modals/modal.js.map +1 -1
  115. package/dist/features/ui/theme/layout.js +3 -3
  116. package/dist/features/ui/theme/layout.js.map +1 -1
  117. package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
  118. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  119. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
  120. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  121. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
  122. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  123. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +163 -166
  124. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  125. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  126. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  127. package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
  128. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  129. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  130. package/dist/features/worksheet/worksheet/worksheet.js +430 -375
  131. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  132. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  133. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  134. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  135. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  136. package/dist/index.d.ts +86 -151
  137. package/dist/index.js +418 -430
  138. package/dist/index.js.map +1 -1
  139. package/dist/static/animated-avatar.1ad58b1d.json +1 -0
  140. package/dist/static/animated-avatar.69b07505.json +1 -0
  141. package/dist/static/animated-avatar.9c560b46.json +1 -0
  142. package/dist/static/cuemath-app-qr-code.4beefe48.svg +1 -0
  143. package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
  144. package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
  145. package/dist/static/otp.2d08f874.json +1 -0
  146. package/dist/static/phone-number.84f55562.json +1 -0
  147. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
  148. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
  149. package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
  150. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
  151. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
  152. package/dist/static/target-achieved-text.053bd142.json +2830 -0
  153. package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
  154. package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
  155. package/package.json +3 -2
  156. package/dist/features/auth/pla-signup/pla-analytics-events.js +0 -23
  157. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +0 -1
  158. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  159. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  160. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  161. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  162. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  163. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  164. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  165. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  166. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  167. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  168. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  169. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  170. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  171. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  172. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  173. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  174. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  175. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  176. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  177. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  178. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  179. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  180. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  181. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  182. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  183. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  184. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -107
  185. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  186. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
  187. package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
  188. package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
  189. package/dist/features/ui/sticker-grid/sticker.js +0 -57
  190. package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
  191. package/dist/features/ui/stickers/constants.js +0 -6
  192. package/dist/features/ui/stickers/constants.js.map +0 -1
  193. package/dist/features/ui/stickers/stickers-effects.js +0 -64
  194. package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
  195. package/dist/features/ui/stickers/stickers-styled.js +0 -29
  196. package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
  197. package/dist/features/ui/stickers/stickers-utils.js +0 -91
  198. package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
  199. package/dist/features/ui/stickers/stickers.js +0 -40
  200. package/dist/features/ui/stickers/stickers.js.map +0 -1
  201. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  202. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  203. package/dist/static/animated-avatar.c3a0fa98.json +0 -1
  204. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  205. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  206. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  207. package/dist/static/puzzle-orange-lottie.0a105c42.json +0 -21206
  208. package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
  209. package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
  210. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
  211. package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
  212. package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
  213. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  214. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,80 +1,93 @@
1
- import { jsx as l } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { DotLottieWorker as v } from "../../../node_modules/@lottiefiles/dotlottie-web/dist/index.js";
3
- import { memo as w, forwardRef as x, useRef as p, useImperativeHandle as R, useEffect as h } from "react";
4
- import E from "../layout/flex-view.js";
5
- import { Canvas as H } from "./dot-lottie-animation-styled.js";
6
- const N = x((y, g) => {
7
- const {
8
- src: m,
9
- width: i = "100%",
10
- height: a = "100%",
11
- settings: f,
12
- eventListeners: r,
13
- onRender: u,
14
- onError: c
15
- } = y, s = p(null), t = p(null);
16
- return R(
17
- g,
18
- () => ({
19
- playSegments: (e) => {
20
- var n, o;
21
- (n = t.current) == null || n.setSegment(e[0], e[1]), (o = t.current) == null || o.play();
22
- },
23
- play: () => {
24
- var e;
25
- (e = t.current) == null || e.play();
26
- },
27
- pause: () => {
28
- var e;
29
- (e = t.current) == null || e.pause();
30
- }
31
- }),
32
- []
33
- ), h(() => {
34
- if (s.current)
35
- try {
36
- t.current = new v({
37
- src: m,
38
- canvas: s.current,
39
- autoplay: !0,
40
- loop: !1,
41
- renderConfig: {
42
- autoResize: !0,
43
- devicePixelRatio: window.devicePixelRatio,
44
- freezeOnOffscreen: !0
45
- },
46
- ...f
47
- }), requestAnimationFrame(() => {
48
- u == null || u();
49
- });
50
- } catch (e) {
51
- console.log(e), c == null || c();
3
+ import { memo as w, forwardRef as x, useRef as p, useImperativeHandle as A, useEffect as h } from "react";
4
+ import R from "../layout/flex-view.js";
5
+ import { Canvas as $ } from "./dot-lottie-animation-styled.js";
6
+ const E = x(
7
+ (y, g) => {
8
+ const {
9
+ src: s,
10
+ data: f,
11
+ width: i = "100%",
12
+ height: a = "100%",
13
+ settings: l,
14
+ eventListeners: o,
15
+ onRender: u,
16
+ onError: c
17
+ } = y, m = p(null), t = p(null);
18
+ return A(
19
+ g,
20
+ () => ({
21
+ play: () => {
22
+ var e;
23
+ (e = t.current) == null || e.play();
24
+ },
25
+ pause: () => {
26
+ var e;
27
+ (e = t.current) == null || e.pause();
28
+ },
29
+ playSegments: (e) => {
30
+ var r, n;
31
+ (r = t.current) == null || r.setSegment(e[0], e[1]), (n = t.current) == null || n.play();
32
+ },
33
+ setFrame: (e) => {
34
+ var r;
35
+ (r = t.current) == null || r.setFrame(e);
36
+ }
37
+ }),
38
+ []
39
+ ), h(() => {
40
+ if (!m.current) return;
41
+ let e = !1;
42
+ return (() => {
43
+ try {
44
+ t.current = new v({
45
+ src: s,
46
+ data: f,
47
+ canvas: m.current,
48
+ autoplay: !0,
49
+ loop: !1,
50
+ renderConfig: {
51
+ autoResize: !0,
52
+ devicePixelRatio: window.devicePixelRatio,
53
+ freezeOnOffscreen: !0
54
+ },
55
+ ...l
56
+ }), requestAnimationFrame(() => {
57
+ e || u == null || u();
58
+ });
59
+ } catch (n) {
60
+ console.log(n), c == null || c();
61
+ }
62
+ })(), () => {
63
+ e = !0, t.current && (t.current.destroy(), t.current = null);
64
+ };
65
+ }, [s, l, u, c, f]), h(() => (o == null || o.forEach(
66
+ ({ name: e, callback: r }) => {
67
+ var n;
68
+ return (n = t.current) == null ? void 0 : n.addEventListener(e, r);
52
69
  }
53
- }, [m, f, u, c]), h(() => (r == null || r.forEach(
54
- ({ name: e, callback: n }) => {
55
- var o;
56
- return (o = t.current) == null ? void 0 : o.addEventListener(e, n);
57
- }
58
- ), () => {
59
- var e;
60
- r == null || r.forEach(
61
- ({ name: n, callback: o }) => {
62
- var d;
63
- return (d = t.current) == null ? void 0 : d.removeEventListener(n, o);
64
- }
65
- ), (e = t.current) == null || e.destroy();
66
- }), [r]), /* @__PURE__ */ l(E, { $width: i, $height: a, children: /* @__PURE__ */ l(
67
- H,
68
- {
69
- ref: s,
70
- $renderWidth: i,
71
- $renderHeight: a,
72
- width: typeof i == "number" ? i : void 0,
73
- height: typeof a == "number" ? a : void 0
74
- }
75
- ) });
76
- }), F = w(N);
70
+ ), () => {
71
+ o == null || o.forEach(
72
+ ({ name: e, callback: r }) => {
73
+ var n;
74
+ return (n = t.current) == null ? void 0 : n.removeEventListener(e, r);
75
+ }
76
+ );
77
+ }), [o]), /* @__PURE__ */ d(R, { $width: i, $height: a, children: /* @__PURE__ */ d(
78
+ $,
79
+ {
80
+ ref: m,
81
+ $renderWidth: i,
82
+ $renderHeight: a,
83
+ width: typeof i == "number" ? i : void 0,
84
+ height: typeof a == "number" ? a : void 0
85
+ },
86
+ s
87
+ ) });
88
+ }
89
+ ), C = w(E);
77
90
  export {
78
- F as default
91
+ C as default
79
92
  };
80
93
  //# sourceMappingURL=dot-lottie-animation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dot-lottie-animation.js","sources":["../../../../src/features/ui/dot-lottie-animations/dot-lottie-animation.tsx"],"sourcesContent":["import type {\n AnimationSegment,\n ILottieAnimationProps,\n ILottieAnimationRef,\n} from './dot-lottie-types';\n\nimport { DotLottieWorker } from '@lottiefiles/dotlottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport * as Styled from './dot-lottie-animation-styled';\n\nconst DotLottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListeners,\n onRender,\n onError,\n } = props;\n\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const animationInstance = useRef<DotLottieWorker | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment) => {\n animationInstance.current?.setSegment(segments[0], segments[1]);\n animationInstance.current?.play();\n },\n play: () => {\n animationInstance.current?.play();\n },\n pause: () => {\n animationInstance.current?.pause();\n },\n }),\n [],\n );\n\n useEffect(() => {\n if (!canvasRef.current) return;\n\n try {\n animationInstance.current = new DotLottieWorker({\n src,\n canvas: canvasRef.current,\n autoplay: true,\n loop: false,\n renderConfig: {\n autoResize: true,\n devicePixelRatio: window.devicePixelRatio,\n freezeOnOffscreen: true,\n },\n ...settings,\n });\n\n requestAnimationFrame(() => {\n onRender?.();\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(err);\n onError?.();\n }\n }, [src, settings, onRender, onError]);\n\n useEffect(() => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.addEventListener(name, callback),\n );\n\n return () => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.removeEventListener(name, callback),\n );\n animationInstance.current?.destroy();\n };\n }, [eventListeners]);\n\n const isNumW = typeof width === 'number';\n const isNumH = typeof height === 'number';\n\n return (\n <FlexView $width={width} $height={height}>\n <Styled.Canvas\n ref={canvasRef}\n $renderWidth={width}\n $renderHeight={height}\n width={isNumW ? width : undefined}\n height={isNumH ? height : undefined}\n />\n </FlexView>\n );\n});\n\nexport default memo(DotLottieAnimation);\n"],"names":["DotLottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListeners","onRender","onError","canvasRef","useRef","animationInstance","useImperativeHandle","segments","_a","_b","useEffect","DotLottieWorker","err","name","callback","jsx","FlexView","Styled.Canvas","dotLottieAnimation","memo"],"mappings":";;;;;AAYA,MAAMA,IAAqBC,EAAuD,CAACC,GAAOC,MAAQ;AAC1F,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAA0B,IAAI,GAC1CC,IAAoBD,EAA+B,IAAI;AAE7D,SAAAE;AAAA,IACEX;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACY,MAA+B;;AAC5C,SAAAC,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B,WAAWD,EAAS,CAAC,GAAGA,EAAS,CAAC,KAC7DE,IAAAJ,EAAkB,YAAlB,QAAAI,EAA2B;AAAA,MAC7B;AAAA,MACA,MAAM,MAAM;;AACV,SAAAD,IAAAH,EAAkB,YAAlB,QAAAG,EAA2B;AAAA,MAC7B;AAAA,MACA,OAAO,MAAM;;AACX,SAAAA,IAA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AW,WASVA,IAAS;AAAA,IAAA;AAAA,EAE9B,EAAA,CAAA;AAEJ,CAAC,GAEcoB,IAAAC,EAAK3B,CAAkB;"}
1
+ {"version":3,"file":"dot-lottie-animation.js","sources":["../../../../src/features/ui/dot-lottie-animations/dot-lottie-animation.tsx"],"sourcesContent":["import type {\n AnimationSegment,\n IDotLottieAnimationProps,\n IDotLottieAnimationRef,\n} from './dot-lottie-types';\n\nimport { DotLottieWorker } from '@lottiefiles/dotlottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport * as Styled from './dot-lottie-animation-styled';\n\nconst DotLottieAnimation = forwardRef<IDotLottieAnimationRef, IDotLottieAnimationProps>(\n (props, ref) => {\n const {\n src,\n data,\n width = '100%',\n height = '100%',\n settings,\n eventListeners,\n onRender,\n onError,\n } = props;\n\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const animationInstance = useRef<DotLottieWorker | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n play: () => {\n animationInstance.current?.play();\n },\n pause: () => {\n animationInstance.current?.pause();\n },\n playSegments: (segments: AnimationSegment) => {\n animationInstance.current?.setSegment(segments[0], segments[1]);\n animationInstance.current?.play();\n },\n setFrame: (frame: number) => {\n animationInstance.current?.setFrame(frame);\n },\n }),\n [],\n );\n\n useEffect(() => {\n if (!canvasRef.current) return;\n\n let destroyed = false;\n\n const loadAnimation = () => {\n try {\n animationInstance.current = new DotLottieWorker({\n src,\n data,\n canvas: canvasRef.current!,\n autoplay: true,\n loop: false,\n renderConfig: {\n autoResize: true,\n devicePixelRatio: window.devicePixelRatio,\n freezeOnOffscreen: true,\n },\n ...settings,\n });\n\n requestAnimationFrame(() => {\n if (destroyed) return;\n onRender?.();\n });\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log(err);\n onError?.();\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n animationInstance.current.destroy();\n animationInstance.current = null;\n }\n };\n }, [src, settings, onRender, onError, data]);\n\n useEffect(() => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.addEventListener(name, callback),\n );\n\n return () => {\n eventListeners?.forEach(\n ({ name, callback }) => animationInstance.current?.removeEventListener(name, callback),\n );\n };\n }, [eventListeners]);\n\n const isNumW = typeof width === 'number';\n const isNumH = typeof height === 'number';\n\n return (\n <FlexView $width={width} $height={height}>\n <Styled.Canvas\n key={src}\n ref={canvasRef}\n $renderWidth={width}\n $renderHeight={height}\n width={isNumW ? width : undefined}\n height={isNumH ? height : undefined}\n />\n </FlexView>\n );\n },\n);\n\nexport default memo(DotLottieAnimation);\n"],"names":["DotLottieAnimation","forwardRef","props","ref","src","data","width","height","settings","eventListeners","onRender","onError","canvasRef","useRef","animationInstance","useImperativeHandle","_a","segments","_b","frame","useEffect","destroyed","DotLottieWorker","err","name","callback","jsx","FlexView","Styled.Canvas","DotLottieAnimation$1","memo"],"mappings":";;;;;AAYA,MAAMA,IAAqBC;AAAA,EACzB,CAACC,GAAOC,MAAQ;AACR,UAAA;AAAA,MACJ,KAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAC,IAAQ;AAAA,MACR,QAAAC,IAAS;AAAA,MACT,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,SAAAC;AAAA,IACE,IAAAT,GAEEU,IAAYC,EAA0B,IAAI,GAC1CC,IAAoBD,EAA+B,IAAI;AAE7D,WAAAE;AAAA,MACEZ;AAAA,MACA,OAAO;AAAA,QACL,MAAM,MAAM;;AACV,WAAAa,IAAAF,EAAkB,YAAlB,QAAAE,EAA2B;AAAA,QAC7B;AAAA,QACA,OAAO,MAAM;;AACX,WAAAA,IAAAF,EAAkB,YAAlB,QAAAE,EAA2B;AAAA,QAC7B;AAAA,QACA,cAAc,CAACC,MAA+B;;AAC5C,WAAAD,IAAAF,EAAkB,YAAlB,QAAAE,EAA2B,WAAWC,EAAS,CAAC,GAAGA,EAA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GAAMC;AAAA;AAAA;AAAA,IAC/E,IAED,CAAChB,CAAc,CAAC,GAMhB,gBAAAiB,EAAAC,GAAA,EAAS,QAAQrB,GAAO,SAASC,GAChC,UAAA,gBAAAmB;AAAA,MAACE;AAAAA,MAAA;AAAA,QAEC,KAAKhB;AAAA,QACL,cAAcN;AAAA,QACd,eAAeC;AAAA,QACf,OAVS,OAAOD,KAAU,WAUVA,IAAQ;AAAA,QACxB,QAVS,OAAOC,KAAW,WAUVA,IAAS;AAAA,MAAA;AAAA,MALrBH;AAAA,IAOT,EAAA,CAAA;AAAA,EAEJ;AACF,GAEeyB,IAAAC,EAAK9B,CAAkB;"}
@@ -1,74 +1,76 @@
1
- import { jsx as E } from "react/jsx-runtime";
2
- import g from "lottie-web";
3
- import { memo as w, forwardRef as A, useRef as u, useImperativeHandle as b, useEffect as I } from "react";
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import E from "lottie-web";
3
+ import { memo as w, forwardRef as b, useRef as m, useImperativeHandle as I, useEffect as S } from "react";
4
4
  import $ from "../layout/flex-view.js";
5
5
  import { fetchLottie as x } from "./helper.js";
6
- const O = A((v, L) => {
6
+ const O = b((L, h) => {
7
7
  const {
8
- src: m,
9
- width: h = "100%",
8
+ src: l,
9
+ width: g = "100%",
10
10
  height: y = "100%",
11
- settings: l,
12
- eventListener: n,
11
+ settings: d,
12
+ eventListener: o,
13
13
  onRender: i,
14
- animateOnIntersect: c
15
- } = v, a = u(null), r = u(null), s = u(null);
16
- return b(
17
- L,
14
+ onError: a,
15
+ animateOnIntersect: s
16
+ } = L, c = m(null), r = m(null), u = m(null);
17
+ return I(
18
+ h,
18
19
  () => ({
19
- playSegments: (e, o) => {
20
- var t;
21
- return (t = r.current) == null ? void 0 : t.playSegments(e, o);
20
+ playSegments: (t, n) => {
21
+ var e;
22
+ return (e = r.current) == null ? void 0 : e.playSegments(t, n);
22
23
  },
23
- addEventListener: (e, o) => {
24
- var t;
25
- return (t = r.current) == null ? void 0 : t.addEventListener(e, o);
24
+ addEventListener: (t, n) => {
25
+ var e;
26
+ return (e = r.current) == null ? void 0 : e.addEventListener(t, n);
26
27
  },
27
- removeEventListener: (e, o) => {
28
- var t;
29
- return (t = r.current) == null ? void 0 : t.removeEventListener(e, o);
28
+ removeEventListener: (t, n) => {
29
+ var e;
30
+ return (e = r.current) == null ? void 0 : e.removeEventListener(t, n);
30
31
  },
31
32
  play: () => {
32
- var e;
33
- return (e = r.current) == null ? void 0 : e.play();
33
+ var t;
34
+ return (t = r.current) == null ? void 0 : t.play();
34
35
  },
35
36
  stop: () => {
36
- var e;
37
- return (e = r.current) == null ? void 0 : e.stop();
37
+ var t;
38
+ return (t = r.current) == null ? void 0 : t.stop();
38
39
  },
39
- setLoop: (e) => {
40
- r.current && (r.current.loop = e);
40
+ goToAndStop: (t, n) => {
41
+ var e;
42
+ return (e = r.current) == null ? void 0 : e.goToAndStop(t, n);
41
43
  }
42
44
  }),
43
45
  []
44
- ), I(() => {
45
- let e = !1;
46
+ ), S(() => {
47
+ let t = !1;
46
48
  return (async () => {
47
49
  try {
48
- const t = await x(m);
50
+ const e = await x(l);
49
51
  requestAnimationFrame(() => {
50
- !a.current || e || (r.current = g.loadAnimation({
51
- container: a.current,
52
- animationData: t,
52
+ !c.current || t || (r.current = E.loadAnimation({
53
+ container: c.current,
54
+ animationData: e,
53
55
  loop: !0,
54
56
  autoplay: !0,
55
- ...l
56
- }), c && (s.current = new IntersectionObserver(
57
+ ...d
58
+ }), s && (u.current = new IntersectionObserver(
57
59
  ([f]) => {
58
- var d, p;
59
- f && f.isIntersecting ? (d = r.current) == null || d.play() : (p = r.current) == null || p.pause();
60
+ var p, v;
61
+ f && f.isIntersecting ? (p = r.current) == null || p.play() : (v = r.current) == null || v.pause();
60
62
  },
61
63
  { threshold: 0 }
62
- ), s.current.observe(a.current)), i == null || i(), n && r.current.addEventListener(n.name, n.callback));
64
+ ), u.current.observe(c.current)), i == null || i(), o && r.current.addEventListener(o.name, o.callback));
63
65
  });
64
- } catch (t) {
65
- throw Error(`Error loading Lottie animation: ${t}`);
66
+ } catch (e) {
67
+ throw a == null || a(), Error(`Error loading Lottie animation: ${e}`);
66
68
  }
67
69
  })(), () => {
68
- var t;
69
- e = !0, r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((t = s.current) == null || t.disconnect()), r.current.destroy());
70
+ var e;
71
+ t = !0, r.current && (o && r.current.removeEventListener(o.name, o.callback), s && ((e = u.current) == null || e.disconnect()), r.current.destroy());
70
72
  };
71
- }, [m, n, i, c, l]), /* @__PURE__ */ E($, { ref: a, $width: h, $height: y });
73
+ }, [l, o, i, s, d, a]), /* @__PURE__ */ A($, { ref: c, $width: g, $height: y });
72
74
  }), D = w(O);
73
75
  export {
74
76
  D as default
@@ -1 +1 @@
1
- {"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n setLoop: (loop: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.loop = loop;\n }\n },\n }),\n [],\n );\n\n useEffect(() => {\n let destroyed = false;\n\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n // Wait for layout\n // NOTE: Do not remove this as this is needed to fix canvas rendering on first layout.\n requestAnimationFrame(() => {\n if (!container.current || destroyed) return;\n\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n intersectionObserver.current.observe(container.current);\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n });\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","loop","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UA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,MAAM;;AACP,cAAAA,KAASA,EAAM,kBACjBT,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BU,IAAAf,EAAkB,YAAlB,QAAAe,EAA2B;AAAA,YAE/B;AAAA,YACA,EAAE,WAAW,EAAE;AAAA,UAAA,GAGId,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAG7CF,KAAA,QAAAA,KACPD,KACFK,EAAkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,QACvF,CACD;AAAA,eACMqB,GAAO;AACR,cAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,MACxD;AAAA,IAAA,MAKK,MAAM;;AACC,MAAAN,IAAA,IACRV,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,GACC,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDuB,GAAS,EAAA,KAAKnB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcyB,IAAAC,EAAKhC,CAAe;"}
1
+ {"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n onError,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n goToAndStop: (v, f) => animationInstance.current?.goToAndStop(v, f),\n }),\n [],\n );\n\n useEffect(() => {\n let destroyed = false;\n\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n // Wait for layout\n // NOTE: Do not remove this as this is needed to fix canvas rendering on first layout.\n requestAnimationFrame(() => {\n if (!container.current || destroyed) return;\n\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n intersectionObserver.current.observe(container.current);\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n });\n } catch (error) {\n onError?.();\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings, onError]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","onError","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","v","f","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAT,GAEEU,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEb;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACc,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,oBAAoBC,GAAiCC;AAAA;AAAA,MAClF,MAAM,MAAM;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,MACvC,MAAM,MAAM;;AAAA,gBAAAA,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,MACvC,aAAa,CAACG,GAAGC,MAAM;;AAAA,gBAAAJ,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,YAAYG,GAAGC;AAAA;AAAA,IAAC;AAAA,IAEpE,CAAC;AAAA,EAAA,GAGHC,EAAU,MAAM;AACd,QAAIC,IAAY;AA6CF,YA3C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.div(
3
+ ({ theme: { colors: t, zIndex: o }, $isClosing: e, $blocking: i }) => `
4
4
  position: fixed;
5
5
  top: 0;
6
6
  left: 0;
@@ -10,6 +10,7 @@ const p = a.div(
10
10
  backdrop-filter: blur(40px);
11
11
  display: flex;
12
12
  animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
13
+ pointer-events: ${i ? "auto" : "none"};
13
14
  z-index: ${o.MODAL};
14
15
 
15
16
  @keyframes backdropFadeIn {
@@ -30,7 +31,7 @@ const p = a.div(
30
31
  }
31
32
  }
32
33
  `
33
- ), l = a.div(
34
+ ), d = a.div(
34
35
  ({ theme: { colors: t }, $isClosing: o, $width: e }) => `
35
36
  position: relative;
36
37
  align-self: center;
@@ -100,19 +101,19 @@ const p = a.div(
100
101
  color: ${t.BLACK_1};
101
102
  }
102
103
  `
103
- ), d = a.div`
104
+ ), f = a.div`
104
105
  display: flex;
105
106
  align-items: center;
106
107
  justify-content: center;
107
108
  height: 100vh;
108
109
  width: 100%;
109
- `, i = 720, r = 800, n = 500, f = a.div(
110
+ `, r = 720, n = 800, s = 500, h = a.div(
110
111
  ({ $isClosing: t }) => `
111
112
  position: absolute;
112
- width: ${i}px;
113
+ width: ${r}px;
113
114
  height: 100%;
114
115
  left: 50%;
115
- margin-left: ${-(i / 2)}px;
116
+ margin-left: ${-(r / 2)}px;
116
117
  clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);
117
118
  background: linear-gradient(
118
119
  180deg,
@@ -120,13 +121,13 @@ const p = a.div(
120
121
  rgba(0, 0, 0, 0) 100%
121
122
  );
122
123
  animation: openSpotlight;
123
- animation-duration: ${r}ms;
124
+ animation-duration: ${n}ms;
124
125
  animation-timing-function: linear;
125
126
  animation-fill-mode: forwards;
126
127
  opacity: 0;
127
128
  ${t ? `
128
129
  animation: closeSpotlight;
129
- animation-duration: ${n}ms;
130
+ animation-duration: ${s}ms;
130
131
  animation-timing-function: linear;
131
132
  animation-fill-mode: forwards;
132
133
  opacity: 1;
@@ -150,7 +151,38 @@ const p = a.div(
150
151
  }
151
152
  }
152
153
  `
153
- ), h = a.div(
154
+ ), x = a.div(
155
+ ({ theme: { colors: t, zIndex: o }, $isClosing: e, $blocking: i }) => `
156
+ position: fixed;
157
+ top: 0;
158
+ left: 0;
159
+ right: 0;
160
+ bottom: 0;
161
+ background-color: ${t.TRANSPARENT};
162
+ display: flex;
163
+ pointer-events: ${i ? "auto" : "none"};
164
+ animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
165
+ z-index: ${o.MODAL};
166
+
167
+ @keyframes backdropFadeIn {
168
+ from {
169
+ opacity: 0;
170
+ }
171
+ to {
172
+ opacity: 1;
173
+ }
174
+ }
175
+
176
+ @keyframes backdropFadeOut {
177
+ from {
178
+ opacity: 1;
179
+ }
180
+ to {
181
+ opacity: 0;
182
+ }
183
+ }
184
+ `
185
+ ), g = a.div(
154
186
  ({ $isClosing: t }) => `
155
187
  width: 100%;
156
188
  height: max-content;
@@ -185,12 +217,13 @@ const p = a.div(
185
217
  `
186
218
  );
187
219
  export {
188
- l as BaseModal,
220
+ d as BaseModal,
189
221
  c as BaseModalContent,
190
- h as BottomSheetModal,
222
+ g as BottomSheetModal,
191
223
  m as CloseButtonContainer,
192
- p as ModalContainer,
193
- d as ModalLoaderWrapper,
194
- f as SpotlightModal
224
+ l as ModalContainer,
225
+ f as ModalLoaderWrapper,
226
+ h as SpotlightModal,
227
+ x as TransparentModalContainer
195
228
  };
196
229
  //# sourceMappingURL=modal-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AA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als/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean; $blocking?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing, $blocking }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n pointer-events: ${$blocking ? 'auto' : 'none'};\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst TransparentModalContainer = styled.div<{ $isClosing?: boolean; $blocking?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing, $blocking }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.TRANSPARENT};\n display: flex;\n pointer-events: ${$blocking ? 'auto' : 'none'};\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n TransparentModalContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","$blocking","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","TransparentModalContainer","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,GAAY,WAAAC,EAAA,MAAgB;AAAA;AAAA;AAAA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Bd,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXQ,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDT,IACI;AAAA;AAAA,4BAEoBU,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,GAEME,IAA4Bf,EAAO;AAAA,EACvC,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,GAAY,WAAAC,EAAA,MAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMtCH,EAAO,WAAW;AAAA;AAAA,oBAEpBG,IAAY,SAAS,MAAM;AAAA,eAChCD,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAEMc,IAAmBhB,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
@@ -1,55 +1,63 @@
1
- import { jsx as r, jsxs as f } from "react/jsx-runtime";
2
- import { captureException as u } from "@sentry/browser";
3
- import { memo as $, useCallback as g, Suspense as n } from "react";
4
- import { ErrorBoundary as a } from "react-error-boundary";
1
+ import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
+ import { captureException as C } from "@sentry/browser";
3
+ import { memo as M, useCallback as b, Suspense as h } from "react";
4
+ import { ErrorBoundary as c } from "react-error-boundary";
5
5
  import E from "../../../assets/line-icons/icons/cross.js";
6
- import h from "../error/error.js";
7
- import M from "../buttons/clickable/clickable.js";
8
- import x from "../layout/flex-view.js";
9
- import c from "../loader/app-loader/app-loader.js";
10
- import { ModalContainer as d, BottomSheetModal as v, ModalLoaderWrapper as C, SpotlightModal as B, BaseModal as S, CloseButtonContainer as W, BaseModalContent as w } from "./modal-styled.js";
11
- const q = $(({ modal: b, isClosing: o = !1, onClose: m }) => {
12
- const { renderAs: s, element: e, modalWidth: l, isDismissable: p } = b, i = g((t) => {
13
- u(t);
14
- }, []), k = g((t) => {
15
- t.stopPropagation();
6
+ import d from "../error/error.js";
7
+ import x from "../buttons/clickable/clickable.js";
8
+ import v from "../layout/flex-view.js";
9
+ import s from "../loader/app-loader/app-loader.js";
10
+ import { ModalContainer as m, BottomSheetModal as B, ModalLoaderWrapper as k, SpotlightModal as S, TransparentModalContainer as W, BaseModal as w, CloseButtonContainer as j, BaseModalContent as y } from "./modal-styled.js";
11
+ const G = M(({ modal: $, isClosing: o = !1, onClose: p }) => {
12
+ const { renderAs: i, element: e, modalWidth: t, isDismissable: f, blocking: l = !0 } = $, n = b((a) => {
13
+ C(a);
14
+ }, []), u = b((a) => {
15
+ a.stopPropagation();
16
16
  }, []);
17
- return s === "bottom-sheet" ? /* @__PURE__ */ r(d, { $isClosing: o, onClick: p ? m : () => null, children: /* @__PURE__ */ r(v, { $isClosing: o, onClick: k, children: /* @__PURE__ */ r(
18
- a,
17
+ return i === "bottom-sheet" ? /* @__PURE__ */ r(
18
+ m,
19
19
  {
20
- fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(h, { height: "100%" }) }),
21
- onError: i,
22
- children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
20
+ $isClosing: o,
21
+ $blocking: l,
22
+ onClick: f ? p : () => null,
23
+ children: /* @__PURE__ */ r(B, { $isClosing: o, onClick: u, children: /* @__PURE__ */ r(
24
+ c,
25
+ {
26
+ fallback: /* @__PURE__ */ r(v, { $gap: 24, children: /* @__PURE__ */ r(d, { height: "100%" }) }),
27
+ onError: n,
28
+ children: /* @__PURE__ */ r(h, { fallback: /* @__PURE__ */ r(s, { height: "50vh" }), children: e })
29
+ }
30
+ ) })
23
31
  }
24
- ) }) }) : s === "spotlight" ? /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ r(
25
- a,
32
+ ) : i === "spotlight" ? /* @__PURE__ */ r(m, { $isClosing: o, $blocking: l, children: /* @__PURE__ */ r(
33
+ c,
26
34
  {
27
- fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
28
- onError: i,
29
- children: /* @__PURE__ */ f(
30
- n,
35
+ fallback: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
36
+ onError: n,
37
+ children: /* @__PURE__ */ g(
38
+ h,
31
39
  {
32
- fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(c, { height: "100vh" }) }),
40
+ fallback: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(s, { height: "100vh" }) }),
33
41
  children: [
34
- /* @__PURE__ */ r(B, { $isClosing: o }),
42
+ /* @__PURE__ */ r(S, { $isClosing: o }),
35
43
  e
36
44
  ]
37
45
  }
38
46
  )
39
47
  }
40
- ) }) : /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ f(S, { $isClosing: o, $width: l, children: [
41
- p !== !1 && /* @__PURE__ */ r(W, { $modalWidth: l, children: /* @__PURE__ */ r(M, { label: "Close", onClick: m, children: /* @__PURE__ */ r(E, { width: 40, height: 40 }) }) }),
42
- /* @__PURE__ */ r(w, { $modalWidth: l, children: /* @__PURE__ */ r(
43
- a,
48
+ ) }) : i === "fullscreen-transparent" ? /* @__PURE__ */ r(W, { $isClosing: o, $blocking: l, children: e }) : /* @__PURE__ */ r(m, { $isClosing: o, $blocking: l, children: /* @__PURE__ */ g(w, { $isClosing: o, $width: t, children: [
49
+ f !== !1 && /* @__PURE__ */ r(j, { $modalWidth: t, children: /* @__PURE__ */ r(x, { label: "Close", onClick: p, children: /* @__PURE__ */ r(E, { width: 40, height: 40 }) }) }),
50
+ /* @__PURE__ */ r(y, { $modalWidth: t, children: /* @__PURE__ */ r(
51
+ c,
44
52
  {
45
- fallback: /* @__PURE__ */ r(h, { height: "50vh", size: "compact" }),
46
- onError: i,
47
- children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
53
+ fallback: /* @__PURE__ */ r(d, { height: "50vh", size: "compact" }),
54
+ onError: n,
55
+ children: /* @__PURE__ */ r(h, { fallback: /* @__PURE__ */ r(s, { height: "50vh" }), children: e })
48
56
  }
49
57
  ) })
50
58
  ] }) });
51
59
  });
52
60
  export {
53
- q as default
61
+ G as default
54
62
  };
55
63
  //# sourceMappingURL=modal.js.map