saafe-redirection-flow 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/.github/workflows/build-and-deploy.yml +41 -0
  2. package/.gitlab-ci.yml +108 -0
  3. package/.releaserc.json +18 -0
  4. package/.storybook/main.ts +28 -0
  5. package/.storybook/preview.ts +16 -0
  6. package/.storybook/vitest.setup.ts +9 -0
  7. package/.vite/deps/@radix-ui_react-avatar.js +230 -0
  8. package/.vite/deps/@radix-ui_react-avatar.js.map +7 -0
  9. package/.vite/deps/@radix-ui_react-slot.js +12 -0
  10. package/.vite/deps/@radix-ui_react-slot.js.map +7 -0
  11. package/.vite/deps/_metadata.json +79 -0
  12. package/.vite/deps/chunk-5VGQBUCU.js +597 -0
  13. package/.vite/deps/chunk-5VGQBUCU.js.map +7 -0
  14. package/.vite/deps/chunk-DC5AMYBS.js +38 -0
  15. package/.vite/deps/chunk-DC5AMYBS.js.map +7 -0
  16. package/.vite/deps/chunk-HUIEPYH7.js +11265 -0
  17. package/.vite/deps/chunk-HUIEPYH7.js.map +7 -0
  18. package/.vite/deps/chunk-TKHB4QMX.js +281 -0
  19. package/.vite/deps/chunk-TKHB4QMX.js.map +7 -0
  20. package/.vite/deps/chunk-YLDSBLSF.js +1139 -0
  21. package/.vite/deps/chunk-YLDSBLSF.js.map +7 -0
  22. package/.vite/deps/class-variance-authority.js +63 -0
  23. package/.vite/deps/class-variance-authority.js.map +7 -0
  24. package/.vite/deps/lucide-react.js +36984 -0
  25. package/.vite/deps/lucide-react.js.map +7 -0
  26. package/.vite/deps/package.json +3 -0
  27. package/.vite/deps/react-dom_client.js +17917 -0
  28. package/.vite/deps/react-dom_client.js.map +7 -0
  29. package/.vite/deps/react-router-dom.js +452 -0
  30. package/.vite/deps/react-router-dom.js.map +7 -0
  31. package/.vite/deps/react-router.js +234 -0
  32. package/.vite/deps/react-router.js.map +7 -0
  33. package/.vite/deps/react.js +5 -0
  34. package/.vite/deps/react.js.map +7 -0
  35. package/.vite/deps/react_jsx-dev-runtime.js +470 -0
  36. package/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
  37. package/CHANGELOG.md +420 -0
  38. package/LICENSE +21 -0
  39. package/README.md +129 -0
  40. package/RELEASE_CHEATSHEET.md +93 -0
  41. package/RELEASE_NOTES.md +120 -0
  42. package/components.json +21 -0
  43. package/docs/DEPLOYMENT_WORKFLOW.md +262 -0
  44. package/docs/RELEASE_GUIDE.md +591 -0
  45. package/docs/architecture.md +432 -0
  46. package/docs/components.md +199 -0
  47. package/docs/index.md +69 -0
  48. package/docs/local-release-workflow.md +234 -0
  49. package/docs/routes.md +118 -0
  50. package/docs/sdk-integration.md +325 -0
  51. package/docs/semantic-release.md +124 -0
  52. package/docs/user-flow.md +206 -0
  53. package/eslint.config.js +28 -0
  54. package/index.html +19 -0
  55. package/install.sh +198 -0
  56. package/package.json +115 -0
  57. package/public/images/bank-logo.png +0 -0
  58. package/public/saafe-icon.svg +9 -0
  59. package/src/App.tsx +171 -0
  60. package/src/__tests__/url-parameters.test.ts +82 -0
  61. package/src/assets/brand/applestore.svg +13 -0
  62. package/src/assets/brand/playstore.svg +23 -0
  63. package/src/assets/brand/saafe-color-white-logo.svg +14 -0
  64. package/src/assets/brand/saafe-icon.svg +9 -0
  65. package/src/assets/brand/saafe-logo.svg +18 -0
  66. package/src/assets/icons/check-icon-dark.svg +27 -0
  67. package/src/assets/icons/check-icon.svg +23 -0
  68. package/src/components/ErrorBoundary.tsx +132 -0
  69. package/src/components/alert/alert.tsx +27 -0
  70. package/src/components/auth/AuthGuard.tsx +76 -0
  71. package/src/components/cards/BankCard.stories.tsx +69 -0
  72. package/src/components/cards/BankCard.tsx +227 -0
  73. package/src/components/cards/OuterCard.tsx +109 -0
  74. package/src/components/cards/WrapperCard.tsx +64 -0
  75. package/src/components/documents/PrivacyContent.tsx +1 -0
  76. package/src/components/dummyFooter.tsx +29 -0
  77. package/src/components/icons/github.tsx +12 -0
  78. package/src/components/language/LanguageSwitcher.tsx +44 -0
  79. package/src/components/layouts/FrostedLayout.stories.tsx +42 -0
  80. package/src/components/layouts/FrostedLayout.tsx +333 -0
  81. package/src/components/layouts/MobileLayout.tsx +403 -0
  82. package/src/components/mobile-background.tsx +136 -0
  83. package/src/components/mobileAppDownload.tsx +30 -0
  84. package/src/components/modal/ModalComp.tsx +27 -0
  85. package/src/components/mode-toggle.tsx +36 -0
  86. package/src/components/page-header.tsx +50 -0
  87. package/src/components/session/SessionTimeoutScreen.tsx +134 -0
  88. package/src/components/session/SessionTimer.tsx +173 -0
  89. package/src/components/step-navigation.tsx +87 -0
  90. package/src/components/title/AppBar.stories.tsx +50 -0
  91. package/src/components/title/AppBar.tsx +150 -0
  92. package/src/components/title/SectionTitle.tsx +31 -0
  93. package/src/components/ui/AnimatedButton.module.css +13 -0
  94. package/src/components/ui/alert.tsx +66 -0
  95. package/src/components/ui/animatedButton.tsx +111 -0
  96. package/src/components/ui/avatar.tsx +51 -0
  97. package/src/components/ui/badge.tsx +36 -0
  98. package/src/components/ui/bottom-sheet.tsx +122 -0
  99. package/src/components/ui/button.tsx +59 -0
  100. package/src/components/ui/calendar.tsx +86 -0
  101. package/src/components/ui/card.tsx +92 -0
  102. package/src/components/ui/checkbox.stories.tsx +49 -0
  103. package/src/components/ui/checkbox.tsx +67 -0
  104. package/src/components/ui/collapsible.tsx +45 -0
  105. package/src/components/ui/dialog.tsx +134 -0
  106. package/src/components/ui/document-link.tsx +26 -0
  107. package/src/components/ui/dot-stepper.tsx +57 -0
  108. package/src/components/ui/dropdown-menu.tsx +255 -0
  109. package/src/components/ui/form.tsx +165 -0
  110. package/src/components/ui/frosted-panel.stories.tsx +86 -0
  111. package/src/components/ui/frosted-panel.tsx +276 -0
  112. package/src/components/ui/input.tsx +39 -0
  113. package/src/components/ui/label.stories.tsx +67 -0
  114. package/src/components/ui/label.tsx +23 -0
  115. package/src/components/ui/mobile-footer.tsx +54 -0
  116. package/src/components/ui/modal.tsx +90 -0
  117. package/src/components/ui/otp-input.stories.tsx +62 -0
  118. package/src/components/ui/otp-input.tsx +221 -0
  119. package/src/components/ui/platform-specific-behavior.tsx +28 -0
  120. package/src/components/ui/popover.tsx +46 -0
  121. package/src/components/ui/progress.tsx +103 -0
  122. package/src/components/ui/radio-group.tsx +45 -0
  123. package/src/components/ui/scroll-area.tsx +56 -0
  124. package/src/components/ui/sdk-params-docs.tsx +53 -0
  125. package/src/components/ui/select.tsx +159 -0
  126. package/src/components/ui/separator.tsx +28 -0
  127. package/src/components/ui/sheet.tsx +137 -0
  128. package/src/components/ui/sidebar.tsx +724 -0
  129. package/src/components/ui/skeleton.stories.tsx +50 -0
  130. package/src/components/ui/skeleton.tsx +15 -0
  131. package/src/components/ui/sonner.tsx +23 -0
  132. package/src/components/ui/step.stories.tsx +132 -0
  133. package/src/components/ui/step.tsx +234 -0
  134. package/src/components/ui/stepper-progress.tsx +136 -0
  135. package/src/components/ui/stepper.tsx +259 -0
  136. package/src/components/ui/tabs.tsx +55 -0
  137. package/src/components/ui/tooltip.tsx +61 -0
  138. package/src/components/ui/url-decode-loader.tsx +36 -0
  139. package/src/components/ui/version-display.tsx +104 -0
  140. package/src/components/ui/web-footer.tsx +36 -0
  141. package/src/config/environments.ts +99 -0
  142. package/src/config/urls.ts +53 -0
  143. package/src/const/fiTypeCategoryMap.ts +19 -0
  144. package/src/contexts/LanguageContext.tsx +41 -0
  145. package/src/contexts/RTLContext.tsx +42 -0
  146. package/src/contexts/ThemeContext.tsx +93 -0
  147. package/src/hooks/use-account-discovery.ts +205 -0
  148. package/src/hooks/use-auth-query.ts +141 -0
  149. package/src/hooks/use-fip-query.ts +72 -0
  150. package/src/hooks/use-media-query.ts +32 -0
  151. package/src/hooks/use-mobile.ts +24 -0
  152. package/src/hooks/use-page-title.tsx +48 -0
  153. package/src/hooks/use-platform.ts +52 -0
  154. package/src/hooks/use-trusted-count.ts +21 -0
  155. package/src/hooks/use-url-decode.ts +90 -0
  156. package/src/hooks/useStep.ts +170 -0
  157. package/src/index.css +154 -0
  158. package/src/interfaces/app.interfaces.ts +39 -0
  159. package/src/interfaces/services.interfaces.ts +65 -0
  160. package/src/lib/i18n.ts +68 -0
  161. package/src/lib/utils.ts +6 -0
  162. package/src/locales/en/common.json +167 -0
  163. package/src/locales/hi/common.json +137 -0
  164. package/src/locales/kn/common.json +137 -0
  165. package/src/locales/ml/common.json +137 -0
  166. package/src/locales/ta/common.json +137 -0
  167. package/src/locales/te/common.json +137 -0
  168. package/src/locales/ur/common.json +138 -0
  169. package/src/main.tsx +46 -0
  170. package/src/pages/Login.tsx +363 -0
  171. package/src/pages/accounts/AccountsToProceed.tsx +396 -0
  172. package/src/pages/accounts/Discover.tsx +76 -0
  173. package/src/pages/accounts/DiscoverAccount.tsx +751 -0
  174. package/src/pages/accounts/LinkSelectedAccounts.tsx +638 -0
  175. package/src/pages/accounts/OldUser.tsx +329 -0
  176. package/src/pages/accounts/link-accounts.tsx +913 -0
  177. package/src/pages/consent/ReviewConsent.tsx +836 -0
  178. package/src/pages/consent/rejected.tsx +253 -0
  179. package/src/pages/consent/success.tsx +220 -0
  180. package/src/providers/query-provider.tsx +24 -0
  181. package/src/providers/toast-provider.tsx +26 -0
  182. package/src/services/api/account.service.ts +296 -0
  183. package/src/services/api/auth.service.ts +206 -0
  184. package/src/services/api/axios.ts +138 -0
  185. package/src/services/api/consent.service.ts +142 -0
  186. package/src/services/api/decode.service.ts +53 -0
  187. package/src/services/api/feedback.service.ts +34 -0
  188. package/src/services/api/fip.service.ts +187 -0
  189. package/src/services/api/index.ts +9 -0
  190. package/src/services/api/public.service.ts +18 -0
  191. package/src/services/api.ts +2 -0
  192. package/src/services/postMessage.service.ts +179 -0
  193. package/src/store/NavigationBlockContext.tsx +34 -0
  194. package/src/store/auth.store.ts +79 -0
  195. package/src/store/fip.store.ts +396 -0
  196. package/src/store/mandatoryConsent.store.ts +24 -0
  197. package/src/store/redirect.store.ts +73 -0
  198. package/src/store/step.store.ts +124 -0
  199. package/src/stories/Button.stories.ts +53 -0
  200. package/src/stories/Button.tsx +37 -0
  201. package/src/stories/Configure.mdx +364 -0
  202. package/src/stories/Header.stories.ts +33 -0
  203. package/src/stories/Header.tsx +56 -0
  204. package/src/stories/Page.stories.ts +32 -0
  205. package/src/stories/Page.tsx +73 -0
  206. package/src/stories/button.css +30 -0
  207. package/src/stories/header.css +32 -0
  208. package/src/stories/page.css +68 -0
  209. package/src/styles/rtl-utils.css +90 -0
  210. package/src/styles/rtl.css +105 -0
  211. package/src/utils/api-error.ts +26 -0
  212. package/src/utils/cn.ts +10 -0
  213. package/src/utils/error-callback.ts +116 -0
  214. package/src/utils/formatAccountNumber.ts +9 -0
  215. package/src/utils/handleIdentifiers.ts +90 -0
  216. package/src/utils/posthog.ts +67 -0
  217. package/src/utils/toast-helpers.ts +61 -0
  218. package/src/vite-env.d.ts +1 -0
  219. package/stage-aa-2506251021.zip +0 -0
  220. package/tsconfig.app.json +33 -0
  221. package/tsconfig.json +13 -0
  222. package/tsconfig.node.json +24 -0
  223. package/vite.config.ts +45 -0
  224. package/vitest.shims.d.ts +1 -0
  225. package/vitest.workspace.ts +46 -0
@@ -0,0 +1,597 @@
1
+ import {
2
+ require_react
3
+ } from "./chunk-YLDSBLSF.js";
4
+ import {
5
+ __commonJS,
6
+ __toESM
7
+ } from "./chunk-DC5AMYBS.js";
8
+
9
+ // node_modules/react/cjs/react-jsx-runtime.development.js
10
+ var require_react_jsx_runtime_development = __commonJS({
11
+ "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
12
+ "use strict";
13
+ (function() {
14
+ function getComponentNameFromType(type) {
15
+ if (null == type) return null;
16
+ if ("function" === typeof type)
17
+ return type.$$typeof === REACT_CLIENT_REFERENCE$2 ? null : type.displayName || type.name || null;
18
+ if ("string" === typeof type) return type;
19
+ switch (type) {
20
+ case REACT_FRAGMENT_TYPE:
21
+ return "Fragment";
22
+ case REACT_PORTAL_TYPE:
23
+ return "Portal";
24
+ case REACT_PROFILER_TYPE:
25
+ return "Profiler";
26
+ case REACT_STRICT_MODE_TYPE:
27
+ return "StrictMode";
28
+ case REACT_SUSPENSE_TYPE:
29
+ return "Suspense";
30
+ case REACT_SUSPENSE_LIST_TYPE:
31
+ return "SuspenseList";
32
+ }
33
+ if ("object" === typeof type)
34
+ switch ("number" === typeof type.tag && console.error(
35
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
36
+ ), type.$$typeof) {
37
+ case REACT_CONTEXT_TYPE:
38
+ return (type.displayName || "Context") + ".Provider";
39
+ case REACT_CONSUMER_TYPE:
40
+ return (type._context.displayName || "Context") + ".Consumer";
41
+ case REACT_FORWARD_REF_TYPE:
42
+ var innerType = type.render;
43
+ type = type.displayName;
44
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
45
+ return type;
46
+ case REACT_MEMO_TYPE:
47
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
48
+ case REACT_LAZY_TYPE:
49
+ innerType = type._payload;
50
+ type = type._init;
51
+ try {
52
+ return getComponentNameFromType(type(innerType));
53
+ } catch (x) {
54
+ }
55
+ }
56
+ return null;
57
+ }
58
+ function testStringCoercion(value) {
59
+ return "" + value;
60
+ }
61
+ function checkKeyStringCoercion(value) {
62
+ try {
63
+ testStringCoercion(value);
64
+ var JSCompiler_inline_result = false;
65
+ } catch (e) {
66
+ JSCompiler_inline_result = true;
67
+ }
68
+ if (JSCompiler_inline_result) {
69
+ JSCompiler_inline_result = console;
70
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
71
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
72
+ JSCompiler_temp_const.call(
73
+ JSCompiler_inline_result,
74
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
75
+ JSCompiler_inline_result$jscomp$0
76
+ );
77
+ return testStringCoercion(value);
78
+ }
79
+ }
80
+ function disabledLog() {
81
+ }
82
+ function disableLogs() {
83
+ if (0 === disabledDepth) {
84
+ prevLog = console.log;
85
+ prevInfo = console.info;
86
+ prevWarn = console.warn;
87
+ prevError = console.error;
88
+ prevGroup = console.group;
89
+ prevGroupCollapsed = console.groupCollapsed;
90
+ prevGroupEnd = console.groupEnd;
91
+ var props = {
92
+ configurable: true,
93
+ enumerable: true,
94
+ value: disabledLog,
95
+ writable: true
96
+ };
97
+ Object.defineProperties(console, {
98
+ info: props,
99
+ log: props,
100
+ warn: props,
101
+ error: props,
102
+ group: props,
103
+ groupCollapsed: props,
104
+ groupEnd: props
105
+ });
106
+ }
107
+ disabledDepth++;
108
+ }
109
+ function reenableLogs() {
110
+ disabledDepth--;
111
+ if (0 === disabledDepth) {
112
+ var props = { configurable: true, enumerable: true, writable: true };
113
+ Object.defineProperties(console, {
114
+ log: assign({}, props, { value: prevLog }),
115
+ info: assign({}, props, { value: prevInfo }),
116
+ warn: assign({}, props, { value: prevWarn }),
117
+ error: assign({}, props, { value: prevError }),
118
+ group: assign({}, props, { value: prevGroup }),
119
+ groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
120
+ groupEnd: assign({}, props, { value: prevGroupEnd })
121
+ });
122
+ }
123
+ 0 > disabledDepth && console.error(
124
+ "disabledDepth fell below zero. This is a bug in React. Please file an issue."
125
+ );
126
+ }
127
+ function describeBuiltInComponentFrame(name) {
128
+ if (void 0 === prefix)
129
+ try {
130
+ throw Error();
131
+ } catch (x) {
132
+ var match = x.stack.trim().match(/\n( *(at )?)/);
133
+ prefix = match && match[1] || "";
134
+ suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
135
+ }
136
+ return "\n" + prefix + name + suffix;
137
+ }
138
+ function describeNativeComponentFrame(fn, construct) {
139
+ if (!fn || reentry) return "";
140
+ var frame = componentFrameCache.get(fn);
141
+ if (void 0 !== frame) return frame;
142
+ reentry = true;
143
+ frame = Error.prepareStackTrace;
144
+ Error.prepareStackTrace = void 0;
145
+ var previousDispatcher = null;
146
+ previousDispatcher = ReactSharedInternals.H;
147
+ ReactSharedInternals.H = null;
148
+ disableLogs();
149
+ try {
150
+ var RunInRootFrame = {
151
+ DetermineComponentFrameRoot: function() {
152
+ try {
153
+ if (construct) {
154
+ var Fake = function() {
155
+ throw Error();
156
+ };
157
+ Object.defineProperty(Fake.prototype, "props", {
158
+ set: function() {
159
+ throw Error();
160
+ }
161
+ });
162
+ if ("object" === typeof Reflect && Reflect.construct) {
163
+ try {
164
+ Reflect.construct(Fake, []);
165
+ } catch (x) {
166
+ var control = x;
167
+ }
168
+ Reflect.construct(fn, [], Fake);
169
+ } else {
170
+ try {
171
+ Fake.call();
172
+ } catch (x$0) {
173
+ control = x$0;
174
+ }
175
+ fn.call(Fake.prototype);
176
+ }
177
+ } else {
178
+ try {
179
+ throw Error();
180
+ } catch (x$1) {
181
+ control = x$1;
182
+ }
183
+ (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
184
+ });
185
+ }
186
+ } catch (sample) {
187
+ if (sample && control && "string" === typeof sample.stack)
188
+ return [sample.stack, control.stack];
189
+ }
190
+ return [null, null];
191
+ }
192
+ };
193
+ RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
194
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
195
+ RunInRootFrame.DetermineComponentFrameRoot,
196
+ "name"
197
+ );
198
+ namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
199
+ RunInRootFrame.DetermineComponentFrameRoot,
200
+ "name",
201
+ { value: "DetermineComponentFrameRoot" }
202
+ );
203
+ var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
204
+ if (sampleStack && controlStack) {
205
+ var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
206
+ for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
207
+ "DetermineComponentFrameRoot"
208
+ ); )
209
+ namePropDescriptor++;
210
+ for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
211
+ "DetermineComponentFrameRoot"
212
+ ); )
213
+ _RunInRootFrame$Deter++;
214
+ if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
215
+ for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
216
+ _RunInRootFrame$Deter--;
217
+ for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
218
+ if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
219
+ if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
220
+ do
221
+ if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
222
+ var _frame = "\n" + sampleLines[namePropDescriptor].replace(
223
+ " at new ",
224
+ " at "
225
+ );
226
+ fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
227
+ "function" === typeof fn && componentFrameCache.set(fn, _frame);
228
+ return _frame;
229
+ }
230
+ while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
231
+ }
232
+ break;
233
+ }
234
+ }
235
+ } finally {
236
+ reentry = false, ReactSharedInternals.H = previousDispatcher, reenableLogs(), Error.prepareStackTrace = frame;
237
+ }
238
+ sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
239
+ "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
240
+ return sampleLines;
241
+ }
242
+ function describeUnknownElementTypeFrameInDEV(type) {
243
+ if (null == type) return "";
244
+ if ("function" === typeof type) {
245
+ var prototype = type.prototype;
246
+ return describeNativeComponentFrame(
247
+ type,
248
+ !(!prototype || !prototype.isReactComponent)
249
+ );
250
+ }
251
+ if ("string" === typeof type) return describeBuiltInComponentFrame(type);
252
+ switch (type) {
253
+ case REACT_SUSPENSE_TYPE:
254
+ return describeBuiltInComponentFrame("Suspense");
255
+ case REACT_SUSPENSE_LIST_TYPE:
256
+ return describeBuiltInComponentFrame("SuspenseList");
257
+ }
258
+ if ("object" === typeof type)
259
+ switch (type.$$typeof) {
260
+ case REACT_FORWARD_REF_TYPE:
261
+ return type = describeNativeComponentFrame(type.render, false), type;
262
+ case REACT_MEMO_TYPE:
263
+ return describeUnknownElementTypeFrameInDEV(type.type);
264
+ case REACT_LAZY_TYPE:
265
+ prototype = type._payload;
266
+ type = type._init;
267
+ try {
268
+ return describeUnknownElementTypeFrameInDEV(type(prototype));
269
+ } catch (x) {
270
+ }
271
+ }
272
+ return "";
273
+ }
274
+ function getOwner() {
275
+ var dispatcher = ReactSharedInternals.A;
276
+ return null === dispatcher ? null : dispatcher.getOwner();
277
+ }
278
+ function hasValidKey(config) {
279
+ if (hasOwnProperty.call(config, "key")) {
280
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
281
+ if (getter && getter.isReactWarning) return false;
282
+ }
283
+ return void 0 !== config.key;
284
+ }
285
+ function defineKeyPropWarningGetter(props, displayName) {
286
+ function warnAboutAccessingKey() {
287
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
288
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
289
+ displayName
290
+ ));
291
+ }
292
+ warnAboutAccessingKey.isReactWarning = true;
293
+ Object.defineProperty(props, "key", {
294
+ get: warnAboutAccessingKey,
295
+ configurable: true
296
+ });
297
+ }
298
+ function elementRefGetterWithDeprecationWarning() {
299
+ var componentName = getComponentNameFromType(this.type);
300
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
301
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
302
+ ));
303
+ componentName = this.props.ref;
304
+ return void 0 !== componentName ? componentName : null;
305
+ }
306
+ function ReactElement(type, key, self, source, owner, props) {
307
+ self = props.ref;
308
+ type = {
309
+ $$typeof: REACT_ELEMENT_TYPE,
310
+ type,
311
+ key,
312
+ props,
313
+ _owner: owner
314
+ };
315
+ null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
316
+ enumerable: false,
317
+ get: elementRefGetterWithDeprecationWarning
318
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
319
+ type._store = {};
320
+ Object.defineProperty(type._store, "validated", {
321
+ configurable: false,
322
+ enumerable: false,
323
+ writable: true,
324
+ value: 0
325
+ });
326
+ Object.defineProperty(type, "_debugInfo", {
327
+ configurable: false,
328
+ enumerable: false,
329
+ writable: true,
330
+ value: null
331
+ });
332
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
333
+ return type;
334
+ }
335
+ function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self) {
336
+ if ("string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE$1 || void 0 !== type.getModuleId)) {
337
+ var children = config.children;
338
+ if (void 0 !== children)
339
+ if (isStaticChildren)
340
+ if (isArrayImpl(children)) {
341
+ for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
342
+ validateChildKeys(children[isStaticChildren], type);
343
+ Object.freeze && Object.freeze(children);
344
+ } else
345
+ console.error(
346
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
347
+ );
348
+ else validateChildKeys(children, type);
349
+ } else {
350
+ children = "";
351
+ if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
352
+ children += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
353
+ null === type ? isStaticChildren = "null" : isArrayImpl(type) ? isStaticChildren = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (isStaticChildren = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", children = " Did you accidentally export a JSX literal instead of a component?") : isStaticChildren = typeof type;
354
+ console.error(
355
+ "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
356
+ isStaticChildren,
357
+ children
358
+ );
359
+ }
360
+ if (hasOwnProperty.call(config, "key")) {
361
+ children = getComponentNameFromType(type);
362
+ var keys = Object.keys(config).filter(function(k) {
363
+ return "key" !== k;
364
+ });
365
+ isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
366
+ didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
367
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
368
+ isStaticChildren,
369
+ children,
370
+ keys,
371
+ children
372
+ ), didWarnAboutKeySpread[children + isStaticChildren] = true);
373
+ }
374
+ children = null;
375
+ void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
376
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
377
+ if ("key" in config) {
378
+ maybeKey = {};
379
+ for (var propName in config)
380
+ "key" !== propName && (maybeKey[propName] = config[propName]);
381
+ } else maybeKey = config;
382
+ children && defineKeyPropWarningGetter(
383
+ maybeKey,
384
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
385
+ );
386
+ return ReactElement(type, children, self, source, getOwner(), maybeKey);
387
+ }
388
+ function validateChildKeys(node, parentType) {
389
+ if ("object" === typeof node && node && node.$$typeof !== REACT_CLIENT_REFERENCE) {
390
+ if (isArrayImpl(node))
391
+ for (var i = 0; i < node.length; i++) {
392
+ var child = node[i];
393
+ isValidElement2(child) && validateExplicitKey(child, parentType);
394
+ }
395
+ else if (isValidElement2(node))
396
+ node._store && (node._store.validated = 1);
397
+ else if (null === node || "object" !== typeof node ? i = null : (i = MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL] || node["@@iterator"], i = "function" === typeof i ? i : null), "function" === typeof i && i !== node.entries && (i = i.call(node), i !== node))
398
+ for (; !(node = i.next()).done; )
399
+ isValidElement2(node.value) && validateExplicitKey(node.value, parentType);
400
+ }
401
+ }
402
+ function isValidElement2(object) {
403
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
404
+ }
405
+ function validateExplicitKey(element, parentType) {
406
+ if (element._store && !element._store.validated && null == element.key && (element._store.validated = 1, parentType = getCurrentComponentErrorInfo(parentType), !ownerHasKeyUseWarning[parentType])) {
407
+ ownerHasKeyUseWarning[parentType] = true;
408
+ var childOwner = "";
409
+ element && null != element._owner && element._owner !== getOwner() && (childOwner = null, "number" === typeof element._owner.tag ? childOwner = getComponentNameFromType(element._owner.type) : "string" === typeof element._owner.name && (childOwner = element._owner.name), childOwner = " It was passed a child from " + childOwner + ".");
410
+ var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
411
+ ReactSharedInternals.getCurrentStack = function() {
412
+ var stack = describeUnknownElementTypeFrameInDEV(element.type);
413
+ prevGetCurrentStack && (stack += prevGetCurrentStack() || "");
414
+ return stack;
415
+ };
416
+ console.error(
417
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
418
+ parentType,
419
+ childOwner
420
+ );
421
+ ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
422
+ }
423
+ }
424
+ function getCurrentComponentErrorInfo(parentType) {
425
+ var info = "", owner = getOwner();
426
+ owner && (owner = getComponentNameFromType(owner.type)) && (info = "\n\nCheck the render method of `" + owner + "`.");
427
+ info || (parentType = getComponentNameFromType(parentType)) && (info = "\n\nCheck the top-level render call using <" + parentType + ">.");
428
+ return info;
429
+ }
430
+ var React3 = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
431
+ Symbol.for("react.provider");
432
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), ReactSharedInternals = React3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, assign = Object.assign, REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
433
+ disabledLog.__reactDisabledLog = true;
434
+ var prefix, suffix, reentry = false;
435
+ var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
436
+ var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), specialPropKeyWarningShown;
437
+ var didWarnAboutElementRef = {};
438
+ var didWarnAboutKeySpread = {}, ownerHasKeyUseWarning = {};
439
+ exports.Fragment = REACT_FRAGMENT_TYPE;
440
+ exports.jsx = function(type, config, maybeKey, source, self) {
441
+ return jsxDEVImpl(type, config, maybeKey, false, source, self);
442
+ };
443
+ exports.jsxs = function(type, config, maybeKey, source, self) {
444
+ return jsxDEVImpl(type, config, maybeKey, true, source, self);
445
+ };
446
+ })();
447
+ }
448
+ });
449
+
450
+ // node_modules/react/jsx-runtime.js
451
+ var require_jsx_runtime = __commonJS({
452
+ "node_modules/react/jsx-runtime.js"(exports, module) {
453
+ "use strict";
454
+ if (false) {
455
+ module.exports = null;
456
+ } else {
457
+ module.exports = require_react_jsx_runtime_development();
458
+ }
459
+ }
460
+ });
461
+
462
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
463
+ var React2 = __toESM(require_react(), 1);
464
+
465
+ // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
466
+ var React = __toESM(require_react(), 1);
467
+ function setRef(ref, value) {
468
+ if (typeof ref === "function") {
469
+ return ref(value);
470
+ } else if (ref !== null && ref !== void 0) {
471
+ ref.current = value;
472
+ }
473
+ }
474
+ function composeRefs(...refs) {
475
+ return (node) => {
476
+ let hasCleanup = false;
477
+ const cleanups = refs.map((ref) => {
478
+ const cleanup = setRef(ref, node);
479
+ if (!hasCleanup && typeof cleanup == "function") {
480
+ hasCleanup = true;
481
+ }
482
+ return cleanup;
483
+ });
484
+ if (hasCleanup) {
485
+ return () => {
486
+ for (let i = 0; i < cleanups.length; i++) {
487
+ const cleanup = cleanups[i];
488
+ if (typeof cleanup == "function") {
489
+ cleanup();
490
+ } else {
491
+ setRef(refs[i], null);
492
+ }
493
+ }
494
+ };
495
+ }
496
+ };
497
+ }
498
+
499
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
500
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
501
+ var Slot = React2.forwardRef((props, forwardedRef) => {
502
+ const { children, ...slotProps } = props;
503
+ const childrenArray = React2.Children.toArray(children);
504
+ const slottable = childrenArray.find(isSlottable);
505
+ if (slottable) {
506
+ const newElement = slottable.props.children;
507
+ const newChildren = childrenArray.map((child) => {
508
+ if (child === slottable) {
509
+ if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
510
+ return React2.isValidElement(newElement) ? newElement.props.children : null;
511
+ } else {
512
+ return child;
513
+ }
514
+ });
515
+ return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
516
+ }
517
+ return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
518
+ });
519
+ Slot.displayName = "Slot";
520
+ var SlotClone = React2.forwardRef((props, forwardedRef) => {
521
+ const { children, ...slotProps } = props;
522
+ if (React2.isValidElement(children)) {
523
+ const childrenRef = getElementRef(children);
524
+ const props2 = mergeProps(slotProps, children.props);
525
+ if (children.type !== React2.Fragment) {
526
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
527
+ }
528
+ return React2.cloneElement(children, props2);
529
+ }
530
+ return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
531
+ });
532
+ SlotClone.displayName = "SlotClone";
533
+ var Slottable = ({ children }) => {
534
+ return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
535
+ };
536
+ function isSlottable(child) {
537
+ return React2.isValidElement(child) && child.type === Slottable;
538
+ }
539
+ function mergeProps(slotProps, childProps) {
540
+ const overrideProps = { ...childProps };
541
+ for (const propName in childProps) {
542
+ const slotPropValue = slotProps[propName];
543
+ const childPropValue = childProps[propName];
544
+ const isHandler = /^on[A-Z]/.test(propName);
545
+ if (isHandler) {
546
+ if (slotPropValue && childPropValue) {
547
+ overrideProps[propName] = (...args) => {
548
+ childPropValue(...args);
549
+ slotPropValue(...args);
550
+ };
551
+ } else if (slotPropValue) {
552
+ overrideProps[propName] = slotPropValue;
553
+ }
554
+ } else if (propName === "style") {
555
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
556
+ } else if (propName === "className") {
557
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
558
+ }
559
+ }
560
+ return { ...slotProps, ...overrideProps };
561
+ }
562
+ function getElementRef(element) {
563
+ var _a, _b;
564
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
565
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
566
+ if (mayWarn) {
567
+ return element.ref;
568
+ }
569
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
570
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
571
+ if (mayWarn) {
572
+ return element.props.ref;
573
+ }
574
+ return element.props.ref || element.ref;
575
+ }
576
+ var Root = Slot;
577
+
578
+ export {
579
+ require_jsx_runtime,
580
+ Slot,
581
+ Slottable,
582
+ Root
583
+ };
584
+ /*! Bundled license information:
585
+
586
+ react/cjs/react-jsx-runtime.development.js:
587
+ (**
588
+ * @license React
589
+ * react-jsx-runtime.development.js
590
+ *
591
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
592
+ *
593
+ * This source code is licensed under the MIT license found in the
594
+ * LICENSE file in the root directory of this source tree.
595
+ *)
596
+ */
597
+ //# sourceMappingURL=chunk-5VGQBUCU.js.map