autumn-js 0.0.72 → 0.0.76

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 (202) hide show
  1. package/components.json +2 -2
  2. package/dist/libraries/backend/better-auth.d.mts +8 -0
  3. package/dist/libraries/backend/better-auth.d.ts +8 -0
  4. package/dist/libraries/backend/better-auth.js +20061 -0
  5. package/dist/libraries/backend/better-auth.mjs +19201 -0
  6. package/dist/libraries/backend/{chunk-6DZX6EAA.mjs → chunk-XGB3TDIC.mjs} +5 -0
  7. package/dist/libraries/backend/constants.mjs +1 -1
  8. package/dist/libraries/backend/express.d.mts +1 -1
  9. package/dist/libraries/backend/express.d.ts +1 -1
  10. package/dist/libraries/backend/express.mjs +1 -1
  11. package/dist/libraries/backend/fastify.mjs +1 -1
  12. package/dist/libraries/backend/hono.mjs +1 -1
  13. package/dist/libraries/backend/next.mjs +1 -1
  14. package/dist/libraries/backend/react-router.mjs +1 -1
  15. package/dist/libraries/backend/{referralTypes-qdpA4XBw.d.ts → referralTypes-CSbCGBim.d.ts} +2 -0
  16. package/dist/libraries/backend/{referralTypes-C-jpvu6u.d.mts → referralTypes-DiYwS4QY.d.mts} +2 -0
  17. package/dist/libraries/backend/remix_dep.mjs +1 -1
  18. package/dist/libraries/backend/routes/backendRouter.mjs +1 -1
  19. package/dist/libraries/backend/routes/entityRoutes.mjs +1 -1
  20. package/dist/libraries/backend/routes/genRoutes.mjs +1 -1
  21. package/dist/libraries/backend/routes/productRoutes.mjs +1 -1
  22. package/dist/libraries/backend/routes/referralRoutes.mjs +1 -1
  23. package/dist/libraries/backend/supabase.mjs +1 -1
  24. package/dist/libraries/backend/tanstack.mjs +1 -1
  25. package/dist/libraries/backend/utils/backendRes.mjs +1 -1
  26. package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -1
  27. package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -1
  28. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  29. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  30. package/dist/libraries/backend/utils/withAuth.mjs +1 -1
  31. package/dist/libraries/react/AutumnContext.d.mts +3 -3
  32. package/dist/libraries/react/AutumnContext.d.ts +3 -3
  33. package/dist/libraries/react/AutumnContext.js +11 -7
  34. package/dist/libraries/react/AutumnContext.mjs +6 -6
  35. package/dist/libraries/react/BaseAutumnProvider.d.mts +3 -3
  36. package/dist/libraries/react/BaseAutumnProvider.d.ts +3 -3
  37. package/dist/libraries/react/BaseAutumnProvider.js +5722 -179
  38. package/dist/libraries/react/BaseAutumnProvider.mjs +19 -10
  39. package/dist/libraries/react/{ReactAutumnClient-4e3t4WTF.d.mts → ReactAutumnClient-BT7tsOG0.d.mts} +2 -2
  40. package/dist/libraries/react/{ReactAutumnClient-B-lWmwRW.d.ts → ReactAutumnClient-DfDXFLBI.d.ts} +2 -2
  41. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
  42. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
  43. package/dist/libraries/react/ReactAutumnProvider.js +5729 -182
  44. package/dist/libraries/react/ReactAutumnProvider.mjs +19 -11
  45. package/dist/libraries/react/{checkTypes-BDNI_s2B.d.ts → checkTypes-ByzZ-KO2.d.ts} +2 -0
  46. package/dist/libraries/react/{checkTypes-CyKIOmeF.d.mts → checkTypes-h2Fyyuh0.d.mts} +2 -0
  47. package/dist/libraries/react/{chunk-4PX3AQKX.mjs → chunk-27OTS3Q5.mjs} +9 -9
  48. package/dist/libraries/react/chunk-2DPUKL2Q.mjs +988 -0
  49. package/dist/libraries/react/{chunk-TBCLSIC2.mjs → chunk-3EYF7OI5.mjs} +1 -1
  50. package/dist/libraries/react/{chunk-CE5BBB5H.mjs → chunk-4CRZJJPY.mjs} +4 -3
  51. package/dist/libraries/react/{chunk-4CGZZYLG.mjs → chunk-4J6OC4ZQ.mjs} +46 -1
  52. package/dist/libraries/react/chunk-5FZ7IV6P.mjs +2021 -0
  53. package/dist/libraries/react/{chunk-LS3NB4DU.mjs → chunk-77N4ARHR.mjs} +2 -2
  54. package/dist/libraries/react/chunk-CMO5LYYU.mjs +241 -0
  55. package/dist/libraries/react/chunk-FEFGYFXQ.mjs +134 -0
  56. package/dist/libraries/react/chunk-FPI3PLEL.mjs +218 -0
  57. package/dist/libraries/react/chunk-KQT5G3HT.mjs +27 -0
  58. package/dist/libraries/react/{chunk-O4HHXBGR.mjs → chunk-P2O4LZFD.mjs} +30 -30
  59. package/dist/libraries/react/{chunk-B7HGBQCO.mjs → chunk-UMZA5GHL.mjs} +1 -1
  60. package/dist/libraries/react/{chunk-4KKWHG2V.mjs → chunk-V5PKOA5A.mjs} +1 -1
  61. package/dist/libraries/react/{chunk-Q7CK32YT.mjs → chunk-WI6WFW54.mjs} +26 -8
  62. package/dist/libraries/react/{chunk-7PRD7RPD.mjs → chunk-XXMAVKQ4.mjs} +2 -2
  63. package/dist/libraries/react/client/ReactAutumnClient.d.mts +3 -3
  64. package/dist/libraries/react/client/ReactAutumnClient.d.ts +3 -3
  65. package/dist/libraries/react/client/ReactAutumnClient.js +11 -7
  66. package/dist/libraries/react/client/ReactAutumnClient.mjs +5 -5
  67. package/dist/libraries/react/client/clientCompMethods.d.mts +3 -3
  68. package/dist/libraries/react/client/clientCompMethods.d.ts +3 -3
  69. package/dist/libraries/react/client/clientCusMethods.d.mts +3 -3
  70. package/dist/libraries/react/client/clientCusMethods.d.ts +3 -3
  71. package/dist/libraries/react/client/clientEntityMethods.d.mts +3 -3
  72. package/dist/libraries/react/client/clientEntityMethods.d.ts +3 -3
  73. package/dist/libraries/react/client/clientEntityMethods.js +9 -6
  74. package/dist/libraries/react/client/clientEntityMethods.mjs +2 -2
  75. package/dist/libraries/react/client/clientGenMethods.d.mts +3 -3
  76. package/dist/libraries/react/client/clientGenMethods.d.ts +3 -3
  77. package/dist/libraries/react/client/clientGenMethods.js +10 -7
  78. package/dist/libraries/react/client/clientGenMethods.mjs +2 -2
  79. package/dist/libraries/react/client/clientProdMethods.d.mts +3 -3
  80. package/dist/libraries/react/client/clientProdMethods.d.ts +3 -3
  81. package/dist/libraries/react/client/clientReferralMethods.d.mts +3 -3
  82. package/dist/libraries/react/client/clientReferralMethods.d.ts +3 -3
  83. package/dist/libraries/react/client/clientReferralMethods.js +9 -6
  84. package/dist/libraries/react/client/clientReferralMethods.mjs +2 -2
  85. package/dist/libraries/react/client/types/clientGenTypes.d.mts +1 -0
  86. package/dist/libraries/react/client/types/clientGenTypes.d.ts +1 -0
  87. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
  88. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
  89. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +2594 -222
  90. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +16 -22
  91. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
  92. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
  93. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
  94. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
  95. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +2260 -127
  96. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +6 -4
  97. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
  98. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
  99. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -2
  100. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -2
  101. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +3083 -719
  102. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +16 -22
  103. package/dist/libraries/react/components/ui/button.d.mts +6 -6
  104. package/dist/libraries/react/components/ui/button.d.ts +6 -6
  105. package/dist/libraries/react/components/ui/button.js +206 -31
  106. package/dist/libraries/react/components/ui/button.mjs +3 -2
  107. package/dist/libraries/react/components/ui/dialog.d.mts +16 -12
  108. package/dist/libraries/react/components/ui/dialog.d.ts +16 -12
  109. package/dist/libraries/react/components/ui/dialog.js +2254 -148
  110. package/dist/libraries/react/components/ui/dialog.mjs +5 -2
  111. package/dist/libraries/react/components/ui/switch.d.mts +2 -3
  112. package/dist/libraries/react/components/ui/switch.d.ts +2 -3
  113. package/dist/libraries/react/components/ui/switch.js +575 -29
  114. package/dist/libraries/react/components/ui/switch.mjs +5 -2
  115. package/dist/libraries/react/hooks/useAutumn.d.mts +3 -3
  116. package/dist/libraries/react/hooks/useAutumn.d.ts +3 -3
  117. package/dist/libraries/react/hooks/useAutumn.js +5793 -134
  118. package/dist/libraries/react/hooks/useAutumn.mjs +21 -9
  119. package/dist/libraries/react/hooks/useAutumnBase.d.mts +3 -3
  120. package/dist/libraries/react/hooks/useAutumnBase.d.ts +3 -3
  121. package/dist/libraries/react/hooks/useAutumnBase.js +5789 -130
  122. package/dist/libraries/react/hooks/useAutumnBase.mjs +21 -8
  123. package/dist/libraries/react/hooks/useCustomer.d.mts +3 -3
  124. package/dist/libraries/react/hooks/useCustomer.d.ts +3 -3
  125. package/dist/libraries/react/hooks/useCustomer.js +5718 -174
  126. package/dist/libraries/react/hooks/useCustomer.mjs +20 -10
  127. package/dist/libraries/react/hooks/useCustomerBase.d.mts +3 -3
  128. package/dist/libraries/react/hooks/useCustomerBase.d.ts +3 -3
  129. package/dist/libraries/react/hooks/useCustomerBase.js +5726 -174
  130. package/dist/libraries/react/hooks/useCustomerBase.mjs +20 -9
  131. package/dist/libraries/react/hooks/useEntity.d.mts +8 -6
  132. package/dist/libraries/react/hooks/useEntity.d.ts +8 -6
  133. package/dist/libraries/react/hooks/useEntity.js +5986 -48
  134. package/dist/libraries/react/hooks/useEntity.mjs +20 -8
  135. package/dist/libraries/react/hooks/useEntityBase.d.mts +9 -11
  136. package/dist/libraries/react/hooks/useEntityBase.d.ts +9 -11
  137. package/dist/libraries/react/hooks/useEntityBase.js +6690 -37
  138. package/dist/libraries/react/hooks/useEntityBase.mjs +25 -1
  139. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  140. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  141. package/dist/libraries/react/hooks/usePricingTable.js +36 -14
  142. package/dist/libraries/react/hooks/usePricingTable.mjs +8 -8
  143. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +3 -3
  144. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +3 -3
  145. package/dist/libraries/react/hooks/usePricingTableBase.js +36 -14
  146. package/dist/libraries/react/hooks/usePricingTableBase.mjs +7 -7
  147. package/dist/libraries/react/hooks/useProductsBase.js +11 -7
  148. package/dist/libraries/react/hooks/useProductsBase.mjs +6 -6
  149. package/dist/libraries/react/index.d.ts +9 -7
  150. package/dist/libraries/react/index.js +3504 -1110
  151. package/dist/libraries/react/index.mjs +3502 -1108
  152. package/dist/libraries/react/lib/utils.js +46 -1
  153. package/dist/libraries/react/lib/utils.mjs +1 -1
  154. package/dist/libraries/react/{response-ChCmaLBk.d.mts → response-B37tbVeT.d.mts} +1 -1
  155. package/dist/libraries/react/{response-9K8DyGXf.d.ts → response-CREh0tw3.d.ts} +1 -1
  156. package/dist/libraries/react/utils/toSnakeCase.d.mts +1 -1
  157. package/dist/libraries/react/utils/toSnakeCase.d.ts +1 -1
  158. package/dist/libraries/react/utils/toSnakeCase.js +9 -6
  159. package/dist/libraries/react/utils/toSnakeCase.mjs +1 -1
  160. package/dist/next/client/NextAutumnClient.d.mts +2 -2
  161. package/dist/next/client/NextAutumnClient.d.ts +2 -2
  162. package/dist/next/client/{checkTypes-BHxu_xEV.d.ts → checkTypes-BVlLFoUT.d.ts} +2 -0
  163. package/dist/next/client/{checkTypes-CEaWu4S3.d.mts → checkTypes-CGZpuidI.d.mts} +2 -0
  164. package/dist/next/client/{clientGenTypes-i3cKamAv.d.ts → clientGenTypes-CXkGuJ6W.d.ts} +2 -1
  165. package/dist/next/client/{clientGenTypes-BRfigzSY.d.mts → clientGenTypes-Dh9BiE0s.d.mts} +2 -1
  166. package/dist/next/client/hooks/useAutumn.d.mts +3 -3
  167. package/dist/next/client/hooks/useAutumn.d.ts +3 -3
  168. package/dist/next/client/hooks/useCustomer.d.mts +2 -2
  169. package/dist/next/client/hooks/useCustomer.d.ts +2 -2
  170. package/dist/next/client/hooks/useEntity.d.mts +7 -7
  171. package/dist/next/client/hooks/useEntity.d.ts +7 -7
  172. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  173. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  174. package/dist/next/index.d.mts +7 -6
  175. package/dist/next/index.d.ts +7 -6
  176. package/dist/next/server/cusActions.d.mts +2 -0
  177. package/dist/next/server/cusActions.d.ts +2 -0
  178. package/dist/next/server/genActions.d.mts +1 -0
  179. package/dist/next/server/genActions.d.ts +1 -0
  180. package/dist/sdk/index.d.mts +2 -0
  181. package/dist/sdk/index.d.ts +2 -0
  182. package/dist/styles/global.css +1093 -1023
  183. package/package.json +14 -13
  184. package/postcss.config.js +19 -1
  185. package/scripts/post-build.js +25 -0
  186. package/scripts/sync-registry.ts +79 -191
  187. package/tailwind.config.ts +96 -0
  188. package/tsup.config.ts +3 -4
  189. package/tsup.dev.config.ts +3 -4
  190. package/dist/libraries/react/chunk-2XYYCR4J.mjs +0 -276
  191. package/dist/libraries/react/chunk-FHANCAHB.mjs +0 -17
  192. package/dist/libraries/react/chunk-GTF7A5TG.mjs +0 -76
  193. package/dist/libraries/react/chunk-NEV76K4V.mjs +0 -552
  194. package/dist/libraries/react/chunk-QMIIDFRP.mjs +0 -85
  195. package/dist/libraries/react/chunk-TFGQQAVB.mjs +0 -38
  196. package/dist/libraries/react/chunk-X3HJKZGO.mjs +0 -58
  197. package/dist/libraries/react/chunk-ZKHBOCMO.mjs +0 -17
  198. package/dist/libraries/react/chunk-ZNPQQ2WK.mjs +0 -24
  199. package/dist/libraries/react/chunk-ZQ6LDLK5.mjs +0 -149
  200. package/dist/libraries/react/chunk-ZWO4QYXI.mjs +0 -20
  201. package/dist/libraries/react/chunk-ZXE5MFKL.mjs +0 -45
  202. package/tailwind.config.js +0 -57
@@ -38,10 +38,2098 @@ __export(check_dialog_synced_exports, {
38
38
  module.exports = __toCommonJS(check_dialog_synced_exports);
39
39
 
40
40
  // src/libraries/react/components/ui/dialog.tsx
41
- var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
41
+ var React25 = __toESM(require("react"));
42
+
43
+ // ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3_osy3texbcyy7oe3sqigksqvg74/node_modules/@radix-ui/react-dialog/dist/index.mjs
44
+ var React24 = __toESM(require("react"), 1);
45
+
46
+ // ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
47
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
48
+ return function handleEvent(event) {
49
+ originalEventHandler?.(event);
50
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
51
+ return ourEventHandler?.(event);
52
+ }
53
+ };
54
+ }
55
+
56
+ // ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
57
+ var React = __toESM(require("react"), 1);
58
+ function setRef(ref, value) {
59
+ if (typeof ref === "function") {
60
+ return ref(value);
61
+ } else if (ref !== null && ref !== void 0) {
62
+ ref.current = value;
63
+ }
64
+ }
65
+ function composeRefs(...refs) {
66
+ return (node) => {
67
+ let hasCleanup = false;
68
+ const cleanups = refs.map((ref) => {
69
+ const cleanup = setRef(ref, node);
70
+ if (!hasCleanup && typeof cleanup == "function") {
71
+ hasCleanup = true;
72
+ }
73
+ return cleanup;
74
+ });
75
+ if (hasCleanup) {
76
+ return () => {
77
+ for (let i = 0; i < cleanups.length; i++) {
78
+ const cleanup = cleanups[i];
79
+ if (typeof cleanup == "function") {
80
+ cleanup();
81
+ } else {
82
+ setRef(refs[i], null);
83
+ }
84
+ }
85
+ };
86
+ }
87
+ };
88
+ }
89
+ function useComposedRefs(...refs) {
90
+ return React.useCallback(composeRefs(...refs), refs);
91
+ }
92
+
93
+ // ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
94
+ var React2 = __toESM(require("react"), 1);
95
+ var import_jsx_runtime = require("react/jsx-runtime");
96
+ function createContext2(rootComponentName, defaultContext) {
97
+ const Context = React2.createContext(defaultContext);
98
+ const Provider = (props) => {
99
+ const { children, ...context } = props;
100
+ const value = React2.useMemo(() => context, Object.values(context));
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
102
+ };
103
+ Provider.displayName = rootComponentName + "Provider";
104
+ function useContext22(consumerName) {
105
+ const context = React2.useContext(Context);
106
+ if (context) return context;
107
+ if (defaultContext !== void 0) return defaultContext;
108
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
109
+ }
110
+ return [Provider, useContext22];
111
+ }
112
+ function createContextScope(scopeName, createContextScopeDeps = []) {
113
+ let defaultContexts = [];
114
+ function createContext32(rootComponentName, defaultContext) {
115
+ const BaseContext = React2.createContext(defaultContext);
116
+ const index = defaultContexts.length;
117
+ defaultContexts = [...defaultContexts, defaultContext];
118
+ const Provider = (props) => {
119
+ const { scope, children, ...context } = props;
120
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
121
+ const value = React2.useMemo(() => context, Object.values(context));
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
123
+ };
124
+ Provider.displayName = rootComponentName + "Provider";
125
+ function useContext22(consumerName, scope) {
126
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
127
+ const context = React2.useContext(Context);
128
+ if (context) return context;
129
+ if (defaultContext !== void 0) return defaultContext;
130
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
131
+ }
132
+ return [Provider, useContext22];
133
+ }
134
+ const createScope = () => {
135
+ const scopeContexts = defaultContexts.map((defaultContext) => {
136
+ return React2.createContext(defaultContext);
137
+ });
138
+ return function useScope(scope) {
139
+ const contexts = scope?.[scopeName] || scopeContexts;
140
+ return React2.useMemo(
141
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
142
+ [scope, contexts]
143
+ );
144
+ };
145
+ };
146
+ createScope.scopeName = scopeName;
147
+ return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
148
+ }
149
+ function composeContextScopes(...scopes) {
150
+ const baseScope = scopes[0];
151
+ if (scopes.length === 1) return baseScope;
152
+ const createScope = () => {
153
+ const scopeHooks = scopes.map((createScope2) => ({
154
+ useScope: createScope2(),
155
+ scopeName: createScope2.scopeName
156
+ }));
157
+ return function useComposedScopes(overrideScopes) {
158
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
159
+ const scopeProps = useScope(overrideScopes);
160
+ const currentScope = scopeProps[`__scope${scopeName}`];
161
+ return { ...nextScopes2, ...currentScope };
162
+ }, {});
163
+ return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
164
+ };
165
+ };
166
+ createScope.scopeName = baseScope.scopeName;
167
+ return createScope;
168
+ }
169
+
170
+ // ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
171
+ var React4 = __toESM(require("react"), 1);
172
+
173
+ // ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
174
+ var React3 = __toESM(require("react"), 1);
175
+ var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
176
+ };
177
+
178
+ // ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
179
+ var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
180
+ var count = 0;
181
+ function useId(deterministicId) {
182
+ const [id, setId] = React4.useState(useReactId());
183
+ useLayoutEffect2(() => {
184
+ if (!deterministicId) setId((reactId) => reactId ?? String(count++));
185
+ }, [deterministicId]);
186
+ return deterministicId || (id ? `radix-${id}` : "");
187
+ }
188
+
189
+ // ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
190
+ var React5 = __toESM(require("react"), 1);
191
+ var React22 = __toESM(require("react"), 1);
192
+ var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
193
+ function useControllableState({
194
+ prop,
195
+ defaultProp,
196
+ onChange = () => {
197
+ },
198
+ caller
199
+ }) {
200
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
201
+ defaultProp,
202
+ onChange
203
+ });
204
+ const isControlled = prop !== void 0;
205
+ const value = isControlled ? prop : uncontrolledProp;
206
+ if (true) {
207
+ const isControlledRef = React5.useRef(prop !== void 0);
208
+ React5.useEffect(() => {
209
+ const wasControlled = isControlledRef.current;
210
+ if (wasControlled !== isControlled) {
211
+ const from = wasControlled ? "controlled" : "uncontrolled";
212
+ const to = isControlled ? "controlled" : "uncontrolled";
213
+ console.warn(
214
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
215
+ );
216
+ }
217
+ isControlledRef.current = isControlled;
218
+ }, [isControlled, caller]);
219
+ }
220
+ const setValue = React5.useCallback(
221
+ (nextValue) => {
222
+ if (isControlled) {
223
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
224
+ if (value2 !== prop) {
225
+ onChangeRef.current?.(value2);
226
+ }
227
+ } else {
228
+ setUncontrolledProp(nextValue);
229
+ }
230
+ },
231
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
232
+ );
233
+ return [value, setValue];
234
+ }
235
+ function useUncontrolledState({
236
+ defaultProp,
237
+ onChange
238
+ }) {
239
+ const [value, setValue] = React5.useState(defaultProp);
240
+ const prevValueRef = React5.useRef(value);
241
+ const onChangeRef = React5.useRef(onChange);
242
+ useInsertionEffect(() => {
243
+ onChangeRef.current = onChange;
244
+ }, [onChange]);
245
+ React5.useEffect(() => {
246
+ if (prevValueRef.current !== value) {
247
+ onChangeRef.current?.(value);
248
+ prevValueRef.current = value;
249
+ }
250
+ }, [value, prevValueRef]);
251
+ return [value, setValue, onChangeRef];
252
+ }
253
+ function isFunction(value) {
254
+ return typeof value === "function";
255
+ }
256
+ var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
257
+
258
+ // ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@18.3.5_@types+react@18.3.14__@types_dcs2l2jzs5flmzhfcv6rimpkfe/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
259
+ var React10 = __toESM(require("react"), 1);
260
+
261
+ // ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18_t6r7cxmbmoheujv3t43yqlikou/node_modules/@radix-ui/react-primitive/dist/index.mjs
262
+ var React7 = __toESM(require("react"), 1);
263
+ var ReactDOM = __toESM(require("react-dom"), 1);
264
+
265
+ // ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
266
+ var React6 = __toESM(require("react"), 1);
267
+ var import_jsx_runtime2 = require("react/jsx-runtime");
268
+ // @__NO_SIDE_EFFECTS__
269
+ function createSlot(ownerName) {
270
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
271
+ const Slot22 = React6.forwardRef((props, forwardedRef) => {
272
+ const { children, ...slotProps } = props;
273
+ const childrenArray = React6.Children.toArray(children);
274
+ const slottable = childrenArray.find(isSlottable);
275
+ if (slottable) {
276
+ const newElement = slottable.props.children;
277
+ const newChildren = childrenArray.map((child) => {
278
+ if (child === slottable) {
279
+ if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
280
+ return React6.isValidElement(newElement) ? newElement.props.children : null;
281
+ } else {
282
+ return child;
283
+ }
284
+ });
285
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
286
+ }
287
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
288
+ });
289
+ Slot22.displayName = `${ownerName}.Slot`;
290
+ return Slot22;
291
+ }
292
+ var Slot = /* @__PURE__ */ createSlot("Slot");
293
+ // @__NO_SIDE_EFFECTS__
294
+ function createSlotClone(ownerName) {
295
+ const SlotClone = React6.forwardRef((props, forwardedRef) => {
296
+ const { children, ...slotProps } = props;
297
+ if (React6.isValidElement(children)) {
298
+ const childrenRef = getElementRef(children);
299
+ const props2 = mergeProps(slotProps, children.props);
300
+ if (children.type !== React6.Fragment) {
301
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
302
+ }
303
+ return React6.cloneElement(children, props2);
304
+ }
305
+ return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
306
+ });
307
+ SlotClone.displayName = `${ownerName}.SlotClone`;
308
+ return SlotClone;
309
+ }
310
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
311
+ function isSlottable(child) {
312
+ return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
313
+ }
314
+ function mergeProps(slotProps, childProps) {
315
+ const overrideProps = { ...childProps };
316
+ for (const propName in childProps) {
317
+ const slotPropValue = slotProps[propName];
318
+ const childPropValue = childProps[propName];
319
+ const isHandler = /^on[A-Z]/.test(propName);
320
+ if (isHandler) {
321
+ if (slotPropValue && childPropValue) {
322
+ overrideProps[propName] = (...args) => {
323
+ const result = childPropValue(...args);
324
+ slotPropValue(...args);
325
+ return result;
326
+ };
327
+ } else if (slotPropValue) {
328
+ overrideProps[propName] = slotPropValue;
329
+ }
330
+ } else if (propName === "style") {
331
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
332
+ } else if (propName === "className") {
333
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
334
+ }
335
+ }
336
+ return { ...slotProps, ...overrideProps };
337
+ }
338
+ function getElementRef(element) {
339
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
340
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
341
+ if (mayWarn) {
342
+ return element.ref;
343
+ }
344
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
345
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
346
+ if (mayWarn) {
347
+ return element.props.ref;
348
+ }
349
+ return element.props.ref || element.ref;
350
+ }
351
+
352
+ // ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18_t6r7cxmbmoheujv3t43yqlikou/node_modules/@radix-ui/react-primitive/dist/index.mjs
353
+ var import_jsx_runtime3 = require("react/jsx-runtime");
354
+ var NODES = [
355
+ "a",
356
+ "button",
357
+ "div",
358
+ "form",
359
+ "h2",
360
+ "h3",
361
+ "img",
362
+ "input",
363
+ "label",
364
+ "li",
365
+ "nav",
366
+ "ol",
367
+ "p",
368
+ "select",
369
+ "span",
370
+ "svg",
371
+ "ul"
372
+ ];
373
+ var Primitive = NODES.reduce((primitive, node) => {
374
+ const Slot3 = createSlot(`Primitive.${node}`);
375
+ const Node2 = React7.forwardRef((props, forwardedRef) => {
376
+ const { asChild, ...primitiveProps } = props;
377
+ const Comp = asChild ? Slot3 : node;
378
+ if (typeof window !== "undefined") {
379
+ window[Symbol.for("radix-ui")] = true;
380
+ }
381
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
382
+ });
383
+ Node2.displayName = `Primitive.${node}`;
384
+ return { ...primitive, [node]: Node2 };
385
+ }, {});
386
+ function dispatchDiscreteCustomEvent(target, event) {
387
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
388
+ }
389
+
390
+ // ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
391
+ var React8 = __toESM(require("react"), 1);
392
+ function useCallbackRef(callback) {
393
+ const callbackRef = React8.useRef(callback);
394
+ React8.useEffect(() => {
395
+ callbackRef.current = callback;
396
+ });
397
+ return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
398
+ }
399
+
400
+ // ../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
401
+ var React9 = __toESM(require("react"), 1);
402
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
403
+ const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
404
+ React9.useEffect(() => {
405
+ const handleKeyDown = (event) => {
406
+ if (event.key === "Escape") {
407
+ onEscapeKeyDown(event);
408
+ }
409
+ };
410
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
411
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
412
+ }, [onEscapeKeyDown, ownerDocument]);
413
+ }
414
+
415
+ // ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@18.3.5_@types+react@18.3.14__@types_dcs2l2jzs5flmzhfcv6rimpkfe/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
416
+ var import_jsx_runtime4 = require("react/jsx-runtime");
417
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
418
+ var CONTEXT_UPDATE = "dismissableLayer.update";
419
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
420
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
421
+ var originalBodyPointerEvents;
422
+ var DismissableLayerContext = React10.createContext({
423
+ layers: /* @__PURE__ */ new Set(),
424
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
425
+ branches: /* @__PURE__ */ new Set()
426
+ });
427
+ var DismissableLayer = React10.forwardRef(
428
+ (props, forwardedRef) => {
429
+ const {
430
+ disableOutsidePointerEvents = false,
431
+ onEscapeKeyDown,
432
+ onPointerDownOutside,
433
+ onFocusOutside,
434
+ onInteractOutside,
435
+ onDismiss,
436
+ ...layerProps
437
+ } = props;
438
+ const context = React10.useContext(DismissableLayerContext);
439
+ const [node, setNode] = React10.useState(null);
440
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
441
+ const [, force] = React10.useState({});
442
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
443
+ const layers = Array.from(context.layers);
444
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
445
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
446
+ const index = node ? layers.indexOf(node) : -1;
447
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
448
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
449
+ const pointerDownOutside = usePointerDownOutside((event) => {
450
+ const target = event.target;
451
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
452
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
453
+ onPointerDownOutside?.(event);
454
+ onInteractOutside?.(event);
455
+ if (!event.defaultPrevented) onDismiss?.();
456
+ }, ownerDocument);
457
+ const focusOutside = useFocusOutside((event) => {
458
+ const target = event.target;
459
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
460
+ if (isFocusInBranch) return;
461
+ onFocusOutside?.(event);
462
+ onInteractOutside?.(event);
463
+ if (!event.defaultPrevented) onDismiss?.();
464
+ }, ownerDocument);
465
+ useEscapeKeydown((event) => {
466
+ const isHighestLayer = index === context.layers.size - 1;
467
+ if (!isHighestLayer) return;
468
+ onEscapeKeyDown?.(event);
469
+ if (!event.defaultPrevented && onDismiss) {
470
+ event.preventDefault();
471
+ onDismiss();
472
+ }
473
+ }, ownerDocument);
474
+ React10.useEffect(() => {
475
+ if (!node) return;
476
+ if (disableOutsidePointerEvents) {
477
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
478
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
479
+ ownerDocument.body.style.pointerEvents = "none";
480
+ }
481
+ context.layersWithOutsidePointerEventsDisabled.add(node);
482
+ }
483
+ context.layers.add(node);
484
+ dispatchUpdate();
485
+ return () => {
486
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
487
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
488
+ }
489
+ };
490
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
491
+ React10.useEffect(() => {
492
+ return () => {
493
+ if (!node) return;
494
+ context.layers.delete(node);
495
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
496
+ dispatchUpdate();
497
+ };
498
+ }, [node, context]);
499
+ React10.useEffect(() => {
500
+ const handleUpdate = () => force({});
501
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
502
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
503
+ }, []);
504
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
505
+ Primitive.div,
506
+ {
507
+ ...layerProps,
508
+ ref: composedRefs,
509
+ style: {
510
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
511
+ ...props.style
512
+ },
513
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
514
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
515
+ onPointerDownCapture: composeEventHandlers(
516
+ props.onPointerDownCapture,
517
+ pointerDownOutside.onPointerDownCapture
518
+ )
519
+ }
520
+ );
521
+ }
522
+ );
523
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
524
+ var BRANCH_NAME = "DismissableLayerBranch";
525
+ var DismissableLayerBranch = React10.forwardRef((props, forwardedRef) => {
526
+ const context = React10.useContext(DismissableLayerContext);
527
+ const ref = React10.useRef(null);
528
+ const composedRefs = useComposedRefs(forwardedRef, ref);
529
+ React10.useEffect(() => {
530
+ const node = ref.current;
531
+ if (node) {
532
+ context.branches.add(node);
533
+ return () => {
534
+ context.branches.delete(node);
535
+ };
536
+ }
537
+ }, [context.branches]);
538
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Primitive.div, { ...props, ref: composedRefs });
539
+ });
540
+ DismissableLayerBranch.displayName = BRANCH_NAME;
541
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
542
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
543
+ const isPointerInsideReactTreeRef = React10.useRef(false);
544
+ const handleClickRef = React10.useRef(() => {
545
+ });
546
+ React10.useEffect(() => {
547
+ const handlePointerDown = (event) => {
548
+ if (event.target && !isPointerInsideReactTreeRef.current) {
549
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
550
+ handleAndDispatchCustomEvent(
551
+ POINTER_DOWN_OUTSIDE,
552
+ handlePointerDownOutside,
553
+ eventDetail,
554
+ { discrete: true }
555
+ );
556
+ };
557
+ var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
558
+ const eventDetail = { originalEvent: event };
559
+ if (event.pointerType === "touch") {
560
+ ownerDocument.removeEventListener("click", handleClickRef.current);
561
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
562
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
563
+ } else {
564
+ handleAndDispatchPointerDownOutsideEvent2();
565
+ }
566
+ } else {
567
+ ownerDocument.removeEventListener("click", handleClickRef.current);
568
+ }
569
+ isPointerInsideReactTreeRef.current = false;
570
+ };
571
+ const timerId = window.setTimeout(() => {
572
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
573
+ }, 0);
574
+ return () => {
575
+ window.clearTimeout(timerId);
576
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
577
+ ownerDocument.removeEventListener("click", handleClickRef.current);
578
+ };
579
+ }, [ownerDocument, handlePointerDownOutside]);
580
+ return {
581
+ // ensures we check React component tree (not just DOM tree)
582
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
583
+ };
584
+ }
585
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
586
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
587
+ const isFocusInsideReactTreeRef = React10.useRef(false);
588
+ React10.useEffect(() => {
589
+ const handleFocus = (event) => {
590
+ if (event.target && !isFocusInsideReactTreeRef.current) {
591
+ const eventDetail = { originalEvent: event };
592
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
593
+ discrete: false
594
+ });
595
+ }
596
+ };
597
+ ownerDocument.addEventListener("focusin", handleFocus);
598
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
599
+ }, [ownerDocument, handleFocusOutside]);
600
+ return {
601
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
602
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
603
+ };
604
+ }
605
+ function dispatchUpdate() {
606
+ const event = new CustomEvent(CONTEXT_UPDATE);
607
+ document.dispatchEvent(event);
608
+ }
609
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
610
+ const target = detail.originalEvent.target;
611
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
612
+ if (handler) target.addEventListener(name, handler, { once: true });
613
+ if (discrete) {
614
+ dispatchDiscreteCustomEvent(target, event);
615
+ } else {
616
+ target.dispatchEvent(event);
617
+ }
618
+ }
619
+
620
+ // ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@_r3i6zfw7jzc6qbfsmvmyzd6wgu/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
621
+ var React11 = __toESM(require("react"), 1);
622
+ var import_jsx_runtime5 = require("react/jsx-runtime");
623
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
624
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
625
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
626
+ var FOCUS_SCOPE_NAME = "FocusScope";
627
+ var FocusScope = React11.forwardRef((props, forwardedRef) => {
628
+ const {
629
+ loop = false,
630
+ trapped = false,
631
+ onMountAutoFocus: onMountAutoFocusProp,
632
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
633
+ ...scopeProps
634
+ } = props;
635
+ const [container, setContainer] = React11.useState(null);
636
+ const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
637
+ const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
638
+ const lastFocusedElementRef = React11.useRef(null);
639
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
640
+ const focusScope = React11.useRef({
641
+ paused: false,
642
+ pause() {
643
+ this.paused = true;
644
+ },
645
+ resume() {
646
+ this.paused = false;
647
+ }
648
+ }).current;
649
+ React11.useEffect(() => {
650
+ if (trapped) {
651
+ let handleFocusIn2 = function(event) {
652
+ if (focusScope.paused || !container) return;
653
+ const target = event.target;
654
+ if (container.contains(target)) {
655
+ lastFocusedElementRef.current = target;
656
+ } else {
657
+ focus(lastFocusedElementRef.current, { select: true });
658
+ }
659
+ }, handleFocusOut2 = function(event) {
660
+ if (focusScope.paused || !container) return;
661
+ const relatedTarget = event.relatedTarget;
662
+ if (relatedTarget === null) return;
663
+ if (!container.contains(relatedTarget)) {
664
+ focus(lastFocusedElementRef.current, { select: true });
665
+ }
666
+ }, handleMutations2 = function(mutations) {
667
+ const focusedElement = document.activeElement;
668
+ if (focusedElement !== document.body) return;
669
+ for (const mutation of mutations) {
670
+ if (mutation.removedNodes.length > 0) focus(container);
671
+ }
672
+ };
673
+ var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
674
+ document.addEventListener("focusin", handleFocusIn2);
675
+ document.addEventListener("focusout", handleFocusOut2);
676
+ const mutationObserver = new MutationObserver(handleMutations2);
677
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
678
+ return () => {
679
+ document.removeEventListener("focusin", handleFocusIn2);
680
+ document.removeEventListener("focusout", handleFocusOut2);
681
+ mutationObserver.disconnect();
682
+ };
683
+ }
684
+ }, [trapped, container, focusScope.paused]);
685
+ React11.useEffect(() => {
686
+ if (container) {
687
+ focusScopesStack.add(focusScope);
688
+ const previouslyFocusedElement = document.activeElement;
689
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
690
+ if (!hasFocusedCandidate) {
691
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
692
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
693
+ container.dispatchEvent(mountEvent);
694
+ if (!mountEvent.defaultPrevented) {
695
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
696
+ if (document.activeElement === previouslyFocusedElement) {
697
+ focus(container);
698
+ }
699
+ }
700
+ }
701
+ return () => {
702
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
703
+ setTimeout(() => {
704
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
705
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
706
+ container.dispatchEvent(unmountEvent);
707
+ if (!unmountEvent.defaultPrevented) {
708
+ focus(previouslyFocusedElement ?? document.body, { select: true });
709
+ }
710
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
711
+ focusScopesStack.remove(focusScope);
712
+ }, 0);
713
+ };
714
+ }
715
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
716
+ const handleKeyDown = React11.useCallback(
717
+ (event) => {
718
+ if (!loop && !trapped) return;
719
+ if (focusScope.paused) return;
720
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
721
+ const focusedElement = document.activeElement;
722
+ if (isTabKey && focusedElement) {
723
+ const container2 = event.currentTarget;
724
+ const [first, last] = getTabbableEdges(container2);
725
+ const hasTabbableElementsInside = first && last;
726
+ if (!hasTabbableElementsInside) {
727
+ if (focusedElement === container2) event.preventDefault();
728
+ } else {
729
+ if (!event.shiftKey && focusedElement === last) {
730
+ event.preventDefault();
731
+ if (loop) focus(first, { select: true });
732
+ } else if (event.shiftKey && focusedElement === first) {
733
+ event.preventDefault();
734
+ if (loop) focus(last, { select: true });
735
+ }
736
+ }
737
+ }
738
+ },
739
+ [loop, trapped, focusScope.paused]
740
+ );
741
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
742
+ });
743
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
744
+ function focusFirst(candidates, { select = false } = {}) {
745
+ const previouslyFocusedElement = document.activeElement;
746
+ for (const candidate of candidates) {
747
+ focus(candidate, { select });
748
+ if (document.activeElement !== previouslyFocusedElement) return;
749
+ }
750
+ }
751
+ function getTabbableEdges(container) {
752
+ const candidates = getTabbableCandidates(container);
753
+ const first = findVisible(candidates, container);
754
+ const last = findVisible(candidates.reverse(), container);
755
+ return [first, last];
756
+ }
757
+ function getTabbableCandidates(container) {
758
+ const nodes = [];
759
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
760
+ acceptNode: (node) => {
761
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
762
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
763
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
764
+ }
765
+ });
766
+ while (walker.nextNode()) nodes.push(walker.currentNode);
767
+ return nodes;
768
+ }
769
+ function findVisible(elements, container) {
770
+ for (const element of elements) {
771
+ if (!isHidden(element, { upTo: container })) return element;
772
+ }
773
+ }
774
+ function isHidden(node, { upTo }) {
775
+ if (getComputedStyle(node).visibility === "hidden") return true;
776
+ while (node) {
777
+ if (upTo !== void 0 && node === upTo) return false;
778
+ if (getComputedStyle(node).display === "none") return true;
779
+ node = node.parentElement;
780
+ }
781
+ return false;
782
+ }
783
+ function isSelectableInput(element) {
784
+ return element instanceof HTMLInputElement && "select" in element;
785
+ }
786
+ function focus(element, { select = false } = {}) {
787
+ if (element && element.focus) {
788
+ const previouslyFocusedElement = document.activeElement;
789
+ element.focus({ preventScroll: true });
790
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
791
+ element.select();
792
+ }
793
+ }
794
+ var focusScopesStack = createFocusScopesStack();
795
+ function createFocusScopesStack() {
796
+ let stack = [];
797
+ return {
798
+ add(focusScope) {
799
+ const activeFocusScope = stack[0];
800
+ if (focusScope !== activeFocusScope) {
801
+ activeFocusScope?.pause();
802
+ }
803
+ stack = arrayRemove(stack, focusScope);
804
+ stack.unshift(focusScope);
805
+ },
806
+ remove(focusScope) {
807
+ stack = arrayRemove(stack, focusScope);
808
+ stack[0]?.resume();
809
+ }
810
+ };
811
+ }
812
+ function arrayRemove(array, item) {
813
+ const updatedArray = [...array];
814
+ const index = updatedArray.indexOf(item);
815
+ if (index !== -1) {
816
+ updatedArray.splice(index, 1);
817
+ }
818
+ return updatedArray;
819
+ }
820
+ function removeLinks(items) {
821
+ return items.filter((item) => item.tagName !== "A");
822
+ }
823
+
824
+ // ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._nlwlfidmfjbhuhdac2s4gonhum/node_modules/@radix-ui/react-portal/dist/index.mjs
825
+ var React12 = __toESM(require("react"), 1);
826
+ var import_react_dom = __toESM(require("react-dom"), 1);
827
+ var import_jsx_runtime6 = require("react/jsx-runtime");
828
+ var PORTAL_NAME = "Portal";
829
+ var Portal = React12.forwardRef((props, forwardedRef) => {
830
+ const { container: containerProp, ...portalProps } = props;
831
+ const [mounted, setMounted] = React12.useState(false);
832
+ useLayoutEffect2(() => setMounted(true), []);
833
+ const container = containerProp || mounted && globalThis?.document?.body;
834
+ return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
835
+ });
836
+ Portal.displayName = PORTAL_NAME;
837
+
838
+ // ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18._rdubggcljnkcjot4tnwunht5nu/node_modules/@radix-ui/react-presence/dist/index.mjs
839
+ var React23 = __toESM(require("react"), 1);
840
+ var React13 = __toESM(require("react"), 1);
841
+ function useStateMachine(initialState, machine) {
842
+ return React13.useReducer((state, event) => {
843
+ const nextState = machine[state][event];
844
+ return nextState ?? state;
845
+ }, initialState);
846
+ }
847
+ var Presence = (props) => {
848
+ const { present, children } = props;
849
+ const presence = usePresence(present);
850
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
851
+ const ref = useComposedRefs(presence.ref, getElementRef2(child));
852
+ const forceMount = typeof children === "function";
853
+ return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
854
+ };
855
+ Presence.displayName = "Presence";
856
+ function usePresence(present) {
857
+ const [node, setNode] = React23.useState();
858
+ const stylesRef = React23.useRef(null);
859
+ const prevPresentRef = React23.useRef(present);
860
+ const prevAnimationNameRef = React23.useRef("none");
861
+ const initialState = present ? "mounted" : "unmounted";
862
+ const [state, send] = useStateMachine(initialState, {
863
+ mounted: {
864
+ UNMOUNT: "unmounted",
865
+ ANIMATION_OUT: "unmountSuspended"
866
+ },
867
+ unmountSuspended: {
868
+ MOUNT: "mounted",
869
+ ANIMATION_END: "unmounted"
870
+ },
871
+ unmounted: {
872
+ MOUNT: "mounted"
873
+ }
874
+ });
875
+ React23.useEffect(() => {
876
+ const currentAnimationName = getAnimationName(stylesRef.current);
877
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
878
+ }, [state]);
879
+ useLayoutEffect2(() => {
880
+ const styles = stylesRef.current;
881
+ const wasPresent = prevPresentRef.current;
882
+ const hasPresentChanged = wasPresent !== present;
883
+ if (hasPresentChanged) {
884
+ const prevAnimationName = prevAnimationNameRef.current;
885
+ const currentAnimationName = getAnimationName(styles);
886
+ if (present) {
887
+ send("MOUNT");
888
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
889
+ send("UNMOUNT");
890
+ } else {
891
+ const isAnimating = prevAnimationName !== currentAnimationName;
892
+ if (wasPresent && isAnimating) {
893
+ send("ANIMATION_OUT");
894
+ } else {
895
+ send("UNMOUNT");
896
+ }
897
+ }
898
+ prevPresentRef.current = present;
899
+ }
900
+ }, [present, send]);
901
+ useLayoutEffect2(() => {
902
+ if (node) {
903
+ let timeoutId;
904
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
905
+ const handleAnimationEnd = (event) => {
906
+ const currentAnimationName = getAnimationName(stylesRef.current);
907
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
908
+ if (event.target === node && isCurrentAnimation) {
909
+ send("ANIMATION_END");
910
+ if (!prevPresentRef.current) {
911
+ const currentFillMode = node.style.animationFillMode;
912
+ node.style.animationFillMode = "forwards";
913
+ timeoutId = ownerWindow.setTimeout(() => {
914
+ if (node.style.animationFillMode === "forwards") {
915
+ node.style.animationFillMode = currentFillMode;
916
+ }
917
+ });
918
+ }
919
+ }
920
+ };
921
+ const handleAnimationStart = (event) => {
922
+ if (event.target === node) {
923
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
924
+ }
925
+ };
926
+ node.addEventListener("animationstart", handleAnimationStart);
927
+ node.addEventListener("animationcancel", handleAnimationEnd);
928
+ node.addEventListener("animationend", handleAnimationEnd);
929
+ return () => {
930
+ ownerWindow.clearTimeout(timeoutId);
931
+ node.removeEventListener("animationstart", handleAnimationStart);
932
+ node.removeEventListener("animationcancel", handleAnimationEnd);
933
+ node.removeEventListener("animationend", handleAnimationEnd);
934
+ };
935
+ } else {
936
+ send("ANIMATION_END");
937
+ }
938
+ }, [node, send]);
939
+ return {
940
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
941
+ ref: React23.useCallback((node2) => {
942
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
943
+ setNode(node2);
944
+ }, [])
945
+ };
946
+ }
947
+ function getAnimationName(styles) {
948
+ return styles?.animationName || "none";
949
+ }
950
+ function getElementRef2(element) {
951
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
952
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
953
+ if (mayWarn) {
954
+ return element.ref;
955
+ }
956
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
957
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
958
+ if (mayWarn) {
959
+ return element.props.ref;
960
+ }
961
+ return element.props.ref || element.ref;
962
+ }
963
+
964
+ // ../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
965
+ var React14 = __toESM(require("react"), 1);
966
+ var count2 = 0;
967
+ function useFocusGuards() {
968
+ React14.useEffect(() => {
969
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
970
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
971
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
972
+ count2++;
973
+ return () => {
974
+ if (count2 === 1) {
975
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
976
+ }
977
+ count2--;
978
+ };
979
+ }, []);
980
+ }
981
+ function createFocusGuard() {
982
+ const element = document.createElement("span");
983
+ element.setAttribute("data-radix-focus-guard", "");
984
+ element.tabIndex = 0;
985
+ element.style.outline = "none";
986
+ element.style.opacity = "0";
987
+ element.style.position = "fixed";
988
+ element.style.pointerEvents = "none";
989
+ return element;
990
+ }
991
+
992
+ // ../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
993
+ var __assign = function() {
994
+ __assign = Object.assign || function __assign2(t) {
995
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
996
+ s = arguments[i];
997
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
998
+ }
999
+ return t;
1000
+ };
1001
+ return __assign.apply(this, arguments);
1002
+ };
1003
+ function __rest(s, e) {
1004
+ var t = {};
1005
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1006
+ t[p] = s[p];
1007
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1008
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1009
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1010
+ t[p[i]] = s[p[i]];
1011
+ }
1012
+ return t;
1013
+ }
1014
+ function __spreadArray(to, from, pack) {
1015
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1016
+ if (ar || !(i in from)) {
1017
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1018
+ ar[i] = from[i];
1019
+ }
1020
+ }
1021
+ return to.concat(ar || Array.prototype.slice.call(from));
1022
+ }
1023
+
1024
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
1025
+ var React21 = __toESM(require("react"));
1026
+
1027
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
1028
+ var React17 = __toESM(require("react"));
1029
+
1030
+ // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1031
+ var zeroRightClassName = "right-scroll-bar-position";
1032
+ var fullWidthClassName = "width-before-scroll-bar";
1033
+ var noScrollbarsClassName = "with-scroll-bars-hidden";
1034
+ var removedBarSizeVariable = "--removed-body-scroll-bar-size";
1035
+
1036
+ // ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js
1037
+ function assignRef(ref, value) {
1038
+ if (typeof ref === "function") {
1039
+ ref(value);
1040
+ } else if (ref) {
1041
+ ref.current = value;
1042
+ }
1043
+ return ref;
1044
+ }
1045
+
1046
+ // ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js
1047
+ var import_react = require("react");
1048
+ function useCallbackRef2(initialValue, callback) {
1049
+ var ref = (0, import_react.useState)(function() {
1050
+ return {
1051
+ // value
1052
+ value: initialValue,
1053
+ // last callback
1054
+ callback,
1055
+ // "memoized" public interface
1056
+ facade: {
1057
+ get current() {
1058
+ return ref.value;
1059
+ },
1060
+ set current(value) {
1061
+ var last = ref.value;
1062
+ if (last !== value) {
1063
+ ref.value = value;
1064
+ ref.callback(value, last);
1065
+ }
1066
+ }
1067
+ }
1068
+ };
1069
+ })[0];
1070
+ ref.callback = callback;
1071
+ return ref.facade;
1072
+ }
1073
+
1074
+ // ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1075
+ var React15 = __toESM(require("react"));
1076
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
1077
+ var currentValues = /* @__PURE__ */ new WeakMap();
1078
+ function useMergeRefs(refs, defaultValue) {
1079
+ var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
1080
+ return refs.forEach(function(ref) {
1081
+ return assignRef(ref, newValue);
1082
+ });
1083
+ });
1084
+ useIsomorphicLayoutEffect(function() {
1085
+ var oldValue = currentValues.get(callbackRef);
1086
+ if (oldValue) {
1087
+ var prevRefs_1 = new Set(oldValue);
1088
+ var nextRefs_1 = new Set(refs);
1089
+ var current_1 = callbackRef.current;
1090
+ prevRefs_1.forEach(function(ref) {
1091
+ if (!nextRefs_1.has(ref)) {
1092
+ assignRef(ref, null);
1093
+ }
1094
+ });
1095
+ nextRefs_1.forEach(function(ref) {
1096
+ if (!prevRefs_1.has(ref)) {
1097
+ assignRef(ref, current_1);
1098
+ }
1099
+ });
1100
+ }
1101
+ currentValues.set(callbackRef, refs);
1102
+ }, [refs]);
1103
+ return callbackRef;
1104
+ }
1105
+
1106
+ // ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.14_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js
1107
+ function ItoI(a) {
1108
+ return a;
1109
+ }
1110
+ function innerCreateMedium(defaults, middleware) {
1111
+ if (middleware === void 0) {
1112
+ middleware = ItoI;
1113
+ }
1114
+ var buffer = [];
1115
+ var assigned = false;
1116
+ var medium = {
1117
+ read: function() {
1118
+ if (assigned) {
1119
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1120
+ }
1121
+ if (buffer.length) {
1122
+ return buffer[buffer.length - 1];
1123
+ }
1124
+ return defaults;
1125
+ },
1126
+ useMedium: function(data) {
1127
+ var item = middleware(data, assigned);
1128
+ buffer.push(item);
1129
+ return function() {
1130
+ buffer = buffer.filter(function(x) {
1131
+ return x !== item;
1132
+ });
1133
+ };
1134
+ },
1135
+ assignSyncMedium: function(cb) {
1136
+ assigned = true;
1137
+ while (buffer.length) {
1138
+ var cbs = buffer;
1139
+ buffer = [];
1140
+ cbs.forEach(cb);
1141
+ }
1142
+ buffer = {
1143
+ push: function(x) {
1144
+ return cb(x);
1145
+ },
1146
+ filter: function() {
1147
+ return buffer;
1148
+ }
1149
+ };
1150
+ },
1151
+ assignMedium: function(cb) {
1152
+ assigned = true;
1153
+ var pendingQueue = [];
1154
+ if (buffer.length) {
1155
+ var cbs = buffer;
1156
+ buffer = [];
1157
+ cbs.forEach(cb);
1158
+ pendingQueue = buffer;
1159
+ }
1160
+ var executeQueue = function() {
1161
+ var cbs2 = pendingQueue;
1162
+ pendingQueue = [];
1163
+ cbs2.forEach(cb);
1164
+ };
1165
+ var cycle = function() {
1166
+ return Promise.resolve().then(executeQueue);
1167
+ };
1168
+ cycle();
1169
+ buffer = {
1170
+ push: function(x) {
1171
+ pendingQueue.push(x);
1172
+ cycle();
1173
+ },
1174
+ filter: function(filter) {
1175
+ pendingQueue = pendingQueue.filter(filter);
1176
+ return buffer;
1177
+ }
1178
+ };
1179
+ }
1180
+ };
1181
+ return medium;
1182
+ }
1183
+ function createSidecarMedium(options) {
1184
+ if (options === void 0) {
1185
+ options = {};
1186
+ }
1187
+ var medium = innerCreateMedium(null);
1188
+ medium.options = __assign({ async: true, ssr: false }, options);
1189
+ return medium;
1190
+ }
1191
+
1192
+ // ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.14_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js
1193
+ var React16 = __toESM(require("react"));
1194
+ var SideCar = function(_a) {
1195
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1196
+ if (!sideCar) {
1197
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1198
+ }
1199
+ var Target = sideCar.read();
1200
+ if (!Target) {
1201
+ throw new Error("Sidecar medium not found");
1202
+ }
1203
+ return React16.createElement(Target, __assign({}, rest));
1204
+ };
1205
+ SideCar.isSideCarExport = true;
1206
+ function exportSidecar(medium, exported) {
1207
+ medium.useMedium(exported);
1208
+ return SideCar;
1209
+ }
1210
+
1211
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js
1212
+ var effectCar = createSidecarMedium();
1213
+
1214
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
1215
+ var nothing = function() {
1216
+ return;
1217
+ };
1218
+ var RemoveScroll = React17.forwardRef(function(props, parentRef) {
1219
+ var ref = React17.useRef(null);
1220
+ var _a = React17.useState({
1221
+ onScrollCapture: nothing,
1222
+ onWheelCapture: nothing,
1223
+ onTouchMoveCapture: nothing
1224
+ }), callbacks = _a[0], setCallbacks = _a[1];
1225
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
1226
+ var SideCar2 = sideCar;
1227
+ var containerRef = useMergeRefs([ref, parentRef]);
1228
+ var containerProps = __assign(__assign({}, rest), callbacks);
1229
+ return React17.createElement(
1230
+ React17.Fragment,
1231
+ null,
1232
+ enabled && React17.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1233
+ forwardProps ? React17.cloneElement(React17.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React17.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1234
+ );
1235
+ });
1236
+ RemoveScroll.defaultProps = {
1237
+ enabled: true,
1238
+ removeScrollBar: true,
1239
+ inert: false
1240
+ };
1241
+ RemoveScroll.classNames = {
1242
+ fullWidth: fullWidthClassName,
1243
+ zeroRight: zeroRightClassName
1244
+ };
1245
+
1246
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1247
+ var React20 = __toESM(require("react"));
1248
+
1249
+ // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
1250
+ var React19 = __toESM(require("react"));
1251
+
1252
+ // ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
1253
+ var React18 = __toESM(require("react"));
1254
+
1255
+ // ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
1256
+ var currentNonce;
1257
+ var getNonce = function() {
1258
+ if (currentNonce) {
1259
+ return currentNonce;
1260
+ }
1261
+ if (typeof __webpack_nonce__ !== "undefined") {
1262
+ return __webpack_nonce__;
1263
+ }
1264
+ return void 0;
1265
+ };
1266
+
1267
+ // ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js
1268
+ function makeStyleTag() {
1269
+ if (!document)
1270
+ return null;
1271
+ var tag = document.createElement("style");
1272
+ tag.type = "text/css";
1273
+ var nonce = getNonce();
1274
+ if (nonce) {
1275
+ tag.setAttribute("nonce", nonce);
1276
+ }
1277
+ return tag;
1278
+ }
1279
+ function injectStyles(tag, css) {
1280
+ if (tag.styleSheet) {
1281
+ tag.styleSheet.cssText = css;
1282
+ } else {
1283
+ tag.appendChild(document.createTextNode(css));
1284
+ }
1285
+ }
1286
+ function insertStyleTag(tag) {
1287
+ var head = document.head || document.getElementsByTagName("head")[0];
1288
+ head.appendChild(tag);
1289
+ }
1290
+ var stylesheetSingleton = function() {
1291
+ var counter = 0;
1292
+ var stylesheet = null;
1293
+ return {
1294
+ add: function(style) {
1295
+ if (counter == 0) {
1296
+ if (stylesheet = makeStyleTag()) {
1297
+ injectStyles(stylesheet, style);
1298
+ insertStyleTag(stylesheet);
1299
+ }
1300
+ }
1301
+ counter++;
1302
+ },
1303
+ remove: function() {
1304
+ counter--;
1305
+ if (!counter && stylesheet) {
1306
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
1307
+ stylesheet = null;
1308
+ }
1309
+ }
1310
+ };
1311
+ };
1312
+
1313
+ // ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
1314
+ var styleHookSingleton = function() {
1315
+ var sheet = stylesheetSingleton();
1316
+ return function(styles, isDynamic) {
1317
+ React18.useEffect(function() {
1318
+ sheet.add(styles);
1319
+ return function() {
1320
+ sheet.remove();
1321
+ };
1322
+ }, [styles && isDynamic]);
1323
+ };
1324
+ };
1325
+
1326
+ // ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js
1327
+ var styleSingleton = function() {
1328
+ var useStyle = styleHookSingleton();
1329
+ var Sheet = function(_a) {
1330
+ var styles = _a.styles, dynamic = _a.dynamic;
1331
+ useStyle(styles, dynamic);
1332
+ return null;
1333
+ };
1334
+ return Sheet;
1335
+ };
1336
+
1337
+ // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
1338
+ var zeroGap = {
1339
+ left: 0,
1340
+ top: 0,
1341
+ right: 0,
1342
+ gap: 0
1343
+ };
1344
+ var parse = function(x) {
1345
+ return parseInt(x || "", 10) || 0;
1346
+ };
1347
+ var getOffset = function(gapMode) {
1348
+ var cs = window.getComputedStyle(document.body);
1349
+ var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
1350
+ var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
1351
+ var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
1352
+ return [parse(left), parse(top), parse(right)];
1353
+ };
1354
+ var getGapWidth = function(gapMode) {
1355
+ if (gapMode === void 0) {
1356
+ gapMode = "margin";
1357
+ }
1358
+ if (typeof window === "undefined") {
1359
+ return zeroGap;
1360
+ }
1361
+ var offsets = getOffset(gapMode);
1362
+ var documentWidth = document.documentElement.clientWidth;
1363
+ var windowWidth = window.innerWidth;
1364
+ return {
1365
+ left: offsets[0],
1366
+ top: offsets[1],
1367
+ right: offsets[2],
1368
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
1369
+ };
1370
+ };
1371
+
1372
+ // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
1373
+ var Style = styleSingleton();
1374
+ var lockAttribute = "data-scroll-locked";
1375
+ var getStyles = function(_a, allowRelative, gapMode, important) {
1376
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
1377
+ if (gapMode === void 0) {
1378
+ gapMode = "margin";
1379
+ }
1380
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
1381
+ allowRelative && "position: relative ".concat(important, ";"),
1382
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
1383
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
1384
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
1385
+ };
1386
+ var getCurrentUseCounter = function() {
1387
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
1388
+ return isFinite(counter) ? counter : 0;
1389
+ };
1390
+ var useLockAttribute = function() {
1391
+ React19.useEffect(function() {
1392
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
1393
+ return function() {
1394
+ var newCounter = getCurrentUseCounter() - 1;
1395
+ if (newCounter <= 0) {
1396
+ document.body.removeAttribute(lockAttribute);
1397
+ } else {
1398
+ document.body.setAttribute(lockAttribute, newCounter.toString());
1399
+ }
1400
+ };
1401
+ }, []);
1402
+ };
1403
+ var RemoveScrollBar = function(_a) {
1404
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
1405
+ useLockAttribute();
1406
+ var gap = React19.useMemo(function() {
1407
+ return getGapWidth(gapMode);
1408
+ }, [gapMode]);
1409
+ return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1410
+ };
1411
+
1412
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
1413
+ var passiveSupported = false;
1414
+ if (typeof window !== "undefined") {
1415
+ try {
1416
+ options = Object.defineProperty({}, "passive", {
1417
+ get: function() {
1418
+ passiveSupported = true;
1419
+ return true;
1420
+ }
1421
+ });
1422
+ window.addEventListener("test", options, options);
1423
+ window.removeEventListener("test", options, options);
1424
+ } catch (err) {
1425
+ passiveSupported = false;
1426
+ }
1427
+ }
1428
+ var options;
1429
+ var nonPassive = passiveSupported ? { passive: false } : false;
1430
+
1431
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
1432
+ var alwaysContainsScroll = function(node) {
1433
+ return node.tagName === "TEXTAREA";
1434
+ };
1435
+ var elementCanBeScrolled = function(node, overflow) {
1436
+ if (!(node instanceof Element)) {
1437
+ return false;
1438
+ }
1439
+ var styles = window.getComputedStyle(node);
1440
+ return (
1441
+ // not-not-scrollable
1442
+ styles[overflow] !== "hidden" && // contains scroll inside self
1443
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
1444
+ );
1445
+ };
1446
+ var elementCouldBeVScrolled = function(node) {
1447
+ return elementCanBeScrolled(node, "overflowY");
1448
+ };
1449
+ var elementCouldBeHScrolled = function(node) {
1450
+ return elementCanBeScrolled(node, "overflowX");
1451
+ };
1452
+ var locationCouldBeScrolled = function(axis, node) {
1453
+ var ownerDocument = node.ownerDocument;
1454
+ var current = node;
1455
+ do {
1456
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
1457
+ current = current.host;
1458
+ }
1459
+ var isScrollable = elementCouldBeScrolled(axis, current);
1460
+ if (isScrollable) {
1461
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
1462
+ if (scrollHeight > clientHeight) {
1463
+ return true;
1464
+ }
1465
+ }
1466
+ current = current.parentNode;
1467
+ } while (current && current !== ownerDocument.body);
1468
+ return false;
1469
+ };
1470
+ var getVScrollVariables = function(_a) {
1471
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
1472
+ return [
1473
+ scrollTop,
1474
+ scrollHeight,
1475
+ clientHeight
1476
+ ];
1477
+ };
1478
+ var getHScrollVariables = function(_a) {
1479
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
1480
+ return [
1481
+ scrollLeft,
1482
+ scrollWidth,
1483
+ clientWidth
1484
+ ];
1485
+ };
1486
+ var elementCouldBeScrolled = function(axis, node) {
1487
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
1488
+ };
1489
+ var getScrollVariables = function(axis, node) {
1490
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
1491
+ };
1492
+ var getDirectionFactor = function(axis, direction) {
1493
+ return axis === "h" && direction === "rtl" ? -1 : 1;
1494
+ };
1495
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
1496
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
1497
+ var delta = directionFactor * sourceDelta;
1498
+ var target = event.target;
1499
+ var targetInLock = endTarget.contains(target);
1500
+ var shouldCancelScroll = false;
1501
+ var isDeltaPositive = delta > 0;
1502
+ var availableScroll = 0;
1503
+ var availableScrollTop = 0;
1504
+ do {
1505
+ if (!target) {
1506
+ break;
1507
+ }
1508
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
1509
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
1510
+ if (position || elementScroll) {
1511
+ if (elementCouldBeScrolled(axis, target)) {
1512
+ availableScroll += elementScroll;
1513
+ availableScrollTop += position;
1514
+ }
1515
+ }
1516
+ var parent_1 = target.parentNode;
1517
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
1518
+ } while (
1519
+ // portaled content
1520
+ !targetInLock && target !== document.body || // self content
1521
+ targetInLock && (endTarget.contains(target) || endTarget === target)
1522
+ );
1523
+ if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
1524
+ shouldCancelScroll = true;
1525
+ } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
1526
+ shouldCancelScroll = true;
1527
+ }
1528
+ return shouldCancelScroll;
1529
+ };
1530
+
1531
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1532
+ var getTouchXY = function(event) {
1533
+ return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
1534
+ };
1535
+ var getDeltaXY = function(event) {
1536
+ return [event.deltaX, event.deltaY];
1537
+ };
1538
+ var extractRef = function(ref) {
1539
+ return ref && "current" in ref ? ref.current : ref;
1540
+ };
1541
+ var deltaCompare = function(x, y) {
1542
+ return x[0] === y[0] && x[1] === y[1];
1543
+ };
1544
+ var generateStyle = function(id) {
1545
+ return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
1546
+ };
1547
+ var idCounter = 0;
1548
+ var lockStack = [];
1549
+ function RemoveScrollSideCar(props) {
1550
+ var shouldPreventQueue = React20.useRef([]);
1551
+ var touchStartRef = React20.useRef([0, 0]);
1552
+ var activeAxis = React20.useRef();
1553
+ var id = React20.useState(idCounter++)[0];
1554
+ var Style2 = React20.useState(styleSingleton)[0];
1555
+ var lastProps = React20.useRef(props);
1556
+ React20.useEffect(function() {
1557
+ lastProps.current = props;
1558
+ }, [props]);
1559
+ React20.useEffect(function() {
1560
+ if (props.inert) {
1561
+ document.body.classList.add("block-interactivity-".concat(id));
1562
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
1563
+ allow_1.forEach(function(el) {
1564
+ return el.classList.add("allow-interactivity-".concat(id));
1565
+ });
1566
+ return function() {
1567
+ document.body.classList.remove("block-interactivity-".concat(id));
1568
+ allow_1.forEach(function(el) {
1569
+ return el.classList.remove("allow-interactivity-".concat(id));
1570
+ });
1571
+ };
1572
+ }
1573
+ return;
1574
+ }, [props.inert, props.lockRef.current, props.shards]);
1575
+ var shouldCancelEvent = React20.useCallback(function(event, parent) {
1576
+ if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
1577
+ return !lastProps.current.allowPinchZoom;
1578
+ }
1579
+ var touch = getTouchXY(event);
1580
+ var touchStart = touchStartRef.current;
1581
+ var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
1582
+ var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
1583
+ var currentAxis;
1584
+ var target = event.target;
1585
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
1586
+ if ("touches" in event && moveDirection === "h" && target.type === "range") {
1587
+ return false;
1588
+ }
1589
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1590
+ if (!canBeScrolledInMainDirection) {
1591
+ return true;
1592
+ }
1593
+ if (canBeScrolledInMainDirection) {
1594
+ currentAxis = moveDirection;
1595
+ } else {
1596
+ currentAxis = moveDirection === "v" ? "h" : "v";
1597
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1598
+ }
1599
+ if (!canBeScrolledInMainDirection) {
1600
+ return false;
1601
+ }
1602
+ if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
1603
+ activeAxis.current = currentAxis;
1604
+ }
1605
+ if (!currentAxis) {
1606
+ return true;
1607
+ }
1608
+ var cancelingAxis = activeAxis.current || currentAxis;
1609
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
1610
+ }, []);
1611
+ var shouldPrevent = React20.useCallback(function(_event) {
1612
+ var event = _event;
1613
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
1614
+ return;
1615
+ }
1616
+ var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
1617
+ var sourceEvent = shouldPreventQueue.current.filter(function(e) {
1618
+ return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
1619
+ })[0];
1620
+ if (sourceEvent && sourceEvent.should) {
1621
+ if (event.cancelable) {
1622
+ event.preventDefault();
1623
+ }
1624
+ return;
1625
+ }
1626
+ if (!sourceEvent) {
1627
+ var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
1628
+ return node.contains(event.target);
1629
+ });
1630
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
1631
+ if (shouldStop) {
1632
+ if (event.cancelable) {
1633
+ event.preventDefault();
1634
+ }
1635
+ }
1636
+ }
1637
+ }, []);
1638
+ var shouldCancel = React20.useCallback(function(name, delta, target, should) {
1639
+ var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
1640
+ shouldPreventQueue.current.push(event);
1641
+ setTimeout(function() {
1642
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
1643
+ return e !== event;
1644
+ });
1645
+ }, 1);
1646
+ }, []);
1647
+ var scrollTouchStart = React20.useCallback(function(event) {
1648
+ touchStartRef.current = getTouchXY(event);
1649
+ activeAxis.current = void 0;
1650
+ }, []);
1651
+ var scrollWheel = React20.useCallback(function(event) {
1652
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1653
+ }, []);
1654
+ var scrollTouchMove = React20.useCallback(function(event) {
1655
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
1656
+ }, []);
1657
+ React20.useEffect(function() {
1658
+ lockStack.push(Style2);
1659
+ props.setCallbacks({
1660
+ onScrollCapture: scrollWheel,
1661
+ onWheelCapture: scrollWheel,
1662
+ onTouchMoveCapture: scrollTouchMove
1663
+ });
1664
+ document.addEventListener("wheel", shouldPrevent, nonPassive);
1665
+ document.addEventListener("touchmove", shouldPrevent, nonPassive);
1666
+ document.addEventListener("touchstart", scrollTouchStart, nonPassive);
1667
+ return function() {
1668
+ lockStack = lockStack.filter(function(inst) {
1669
+ return inst !== Style2;
1670
+ });
1671
+ document.removeEventListener("wheel", shouldPrevent, nonPassive);
1672
+ document.removeEventListener("touchmove", shouldPrevent, nonPassive);
1673
+ document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
1674
+ };
1675
+ }, []);
1676
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
1677
+ return React20.createElement(
1678
+ React20.Fragment,
1679
+ null,
1680
+ inert ? React20.createElement(Style2, { styles: generateStyle(id) }) : null,
1681
+ removeScrollBar ? React20.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
1682
+ );
1683
+ }
1684
+ function getOutermostShadowParent(node) {
1685
+ var shadowParent = null;
1686
+ while (node !== null) {
1687
+ if (node instanceof ShadowRoot) {
1688
+ shadowParent = node.host;
1689
+ node = node.host;
1690
+ }
1691
+ node = node.parentNode;
1692
+ }
1693
+ return shadowParent;
1694
+ }
1695
+
1696
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js
1697
+ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
1698
+
1699
+ // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
1700
+ var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
1701
+ return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
1702
+ });
1703
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
1704
+ var Combination_default = ReactRemoveScroll;
1705
+
1706
+ // ../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
1707
+ var getDefaultParent = function(originalTarget) {
1708
+ if (typeof document === "undefined") {
1709
+ return null;
1710
+ }
1711
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
1712
+ return sampleTarget.ownerDocument.body;
1713
+ };
1714
+ var counterMap = /* @__PURE__ */ new WeakMap();
1715
+ var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1716
+ var markerMap = {};
1717
+ var lockCount = 0;
1718
+ var unwrapHost = function(node) {
1719
+ return node && (node.host || unwrapHost(node.parentNode));
1720
+ };
1721
+ var correctTargets = function(parent, targets) {
1722
+ return targets.map(function(target) {
1723
+ if (parent.contains(target)) {
1724
+ return target;
1725
+ }
1726
+ var correctedTarget = unwrapHost(target);
1727
+ if (correctedTarget && parent.contains(correctedTarget)) {
1728
+ return correctedTarget;
1729
+ }
1730
+ console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
1731
+ return null;
1732
+ }).filter(function(x) {
1733
+ return Boolean(x);
1734
+ });
1735
+ };
1736
+ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
1737
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1738
+ if (!markerMap[markerName]) {
1739
+ markerMap[markerName] = /* @__PURE__ */ new WeakMap();
1740
+ }
1741
+ var markerCounter = markerMap[markerName];
1742
+ var hiddenNodes = [];
1743
+ var elementsToKeep = /* @__PURE__ */ new Set();
1744
+ var elementsToStop = new Set(targets);
1745
+ var keep = function(el) {
1746
+ if (!el || elementsToKeep.has(el)) {
1747
+ return;
1748
+ }
1749
+ elementsToKeep.add(el);
1750
+ keep(el.parentNode);
1751
+ };
1752
+ targets.forEach(keep);
1753
+ var deep = function(parent) {
1754
+ if (!parent || elementsToStop.has(parent)) {
1755
+ return;
1756
+ }
1757
+ Array.prototype.forEach.call(parent.children, function(node) {
1758
+ if (elementsToKeep.has(node)) {
1759
+ deep(node);
1760
+ } else {
1761
+ try {
1762
+ var attr = node.getAttribute(controlAttribute);
1763
+ var alreadyHidden = attr !== null && attr !== "false";
1764
+ var counterValue = (counterMap.get(node) || 0) + 1;
1765
+ var markerValue = (markerCounter.get(node) || 0) + 1;
1766
+ counterMap.set(node, counterValue);
1767
+ markerCounter.set(node, markerValue);
1768
+ hiddenNodes.push(node);
1769
+ if (counterValue === 1 && alreadyHidden) {
1770
+ uncontrolledNodes.set(node, true);
1771
+ }
1772
+ if (markerValue === 1) {
1773
+ node.setAttribute(markerName, "true");
1774
+ }
1775
+ if (!alreadyHidden) {
1776
+ node.setAttribute(controlAttribute, "true");
1777
+ }
1778
+ } catch (e) {
1779
+ console.error("aria-hidden: cannot operate on ", node, e);
1780
+ }
1781
+ }
1782
+ });
1783
+ };
1784
+ deep(parentNode);
1785
+ elementsToKeep.clear();
1786
+ lockCount++;
1787
+ return function() {
1788
+ hiddenNodes.forEach(function(node) {
1789
+ var counterValue = counterMap.get(node) - 1;
1790
+ var markerValue = markerCounter.get(node) - 1;
1791
+ counterMap.set(node, counterValue);
1792
+ markerCounter.set(node, markerValue);
1793
+ if (!counterValue) {
1794
+ if (!uncontrolledNodes.has(node)) {
1795
+ node.removeAttribute(controlAttribute);
1796
+ }
1797
+ uncontrolledNodes.delete(node);
1798
+ }
1799
+ if (!markerValue) {
1800
+ node.removeAttribute(markerName);
1801
+ }
1802
+ });
1803
+ lockCount--;
1804
+ if (!lockCount) {
1805
+ counterMap = /* @__PURE__ */ new WeakMap();
1806
+ counterMap = /* @__PURE__ */ new WeakMap();
1807
+ uncontrolledNodes = /* @__PURE__ */ new WeakMap();
1808
+ markerMap = {};
1809
+ }
1810
+ };
1811
+ };
1812
+ var hideOthers = function(originalTarget, parentNode, markerName) {
1813
+ if (markerName === void 0) {
1814
+ markerName = "data-aria-hidden";
1815
+ }
1816
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
1817
+ var activeParentNode = parentNode || getDefaultParent(originalTarget);
1818
+ if (!activeParentNode) {
1819
+ return function() {
1820
+ return null;
1821
+ };
1822
+ }
1823
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
1824
+ return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
1825
+ };
1826
+
1827
+ // ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3_osy3texbcyy7oe3sqigksqvg74/node_modules/@radix-ui/react-dialog/dist/index.mjs
1828
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1829
+ var DIALOG_NAME = "Dialog";
1830
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
1831
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
1832
+ var Dialog = (props) => {
1833
+ const {
1834
+ __scopeDialog,
1835
+ children,
1836
+ open: openProp,
1837
+ defaultOpen,
1838
+ onOpenChange,
1839
+ modal = true
1840
+ } = props;
1841
+ const triggerRef = React24.useRef(null);
1842
+ const contentRef = React24.useRef(null);
1843
+ const [open, setOpen] = useControllableState({
1844
+ prop: openProp,
1845
+ defaultProp: defaultOpen ?? false,
1846
+ onChange: onOpenChange,
1847
+ caller: DIALOG_NAME
1848
+ });
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1850
+ DialogProvider,
1851
+ {
1852
+ scope: __scopeDialog,
1853
+ triggerRef,
1854
+ contentRef,
1855
+ contentId: useId(),
1856
+ titleId: useId(),
1857
+ descriptionId: useId(),
1858
+ open,
1859
+ onOpenChange: setOpen,
1860
+ onOpenToggle: React24.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1861
+ modal,
1862
+ children
1863
+ }
1864
+ );
1865
+ };
1866
+ Dialog.displayName = DIALOG_NAME;
1867
+ var TRIGGER_NAME = "DialogTrigger";
1868
+ var DialogTrigger = React24.forwardRef(
1869
+ (props, forwardedRef) => {
1870
+ const { __scopeDialog, ...triggerProps } = props;
1871
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
1872
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
1873
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1874
+ Primitive.button,
1875
+ {
1876
+ type: "button",
1877
+ "aria-haspopup": "dialog",
1878
+ "aria-expanded": context.open,
1879
+ "aria-controls": context.contentId,
1880
+ "data-state": getState(context.open),
1881
+ ...triggerProps,
1882
+ ref: composedTriggerRef,
1883
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
1884
+ }
1885
+ );
1886
+ }
1887
+ );
1888
+ DialogTrigger.displayName = TRIGGER_NAME;
1889
+ var PORTAL_NAME2 = "DialogPortal";
1890
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
1891
+ forceMount: void 0
1892
+ });
1893
+ var DialogPortal = (props) => {
1894
+ const { __scopeDialog, forceMount, children, container } = props;
1895
+ const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React24.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Portal, { asChild: true, container, children: child }) })) });
1897
+ };
1898
+ DialogPortal.displayName = PORTAL_NAME2;
1899
+ var OVERLAY_NAME = "DialogOverlay";
1900
+ var DialogOverlay = React24.forwardRef(
1901
+ (props, forwardedRef) => {
1902
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
1903
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
1904
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
1905
+ return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
1906
+ }
1907
+ );
1908
+ DialogOverlay.displayName = OVERLAY_NAME;
1909
+ var Slot2 = createSlot("DialogOverlay.RemoveScroll");
1910
+ var DialogOverlayImpl = React24.forwardRef(
1911
+ (props, forwardedRef) => {
1912
+ const { __scopeDialog, ...overlayProps } = props;
1913
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
1914
+ return (
1915
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1916
+ // ie. when `Overlay` and `Content` are siblings
1917
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1918
+ Primitive.div,
1919
+ {
1920
+ "data-state": getState(context.open),
1921
+ ...overlayProps,
1922
+ ref: forwardedRef,
1923
+ style: { pointerEvents: "auto", ...overlayProps.style }
1924
+ }
1925
+ ) })
1926
+ );
1927
+ }
1928
+ );
1929
+ var CONTENT_NAME = "DialogContent";
1930
+ var DialogContent = React24.forwardRef(
1931
+ (props, forwardedRef) => {
1932
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
1933
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
1934
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
1935
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
1936
+ }
1937
+ );
1938
+ DialogContent.displayName = CONTENT_NAME;
1939
+ var DialogContentModal = React24.forwardRef(
1940
+ (props, forwardedRef) => {
1941
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
1942
+ const contentRef = React24.useRef(null);
1943
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
1944
+ React24.useEffect(() => {
1945
+ const content = contentRef.current;
1946
+ if (content) return hideOthers(content);
1947
+ }, []);
1948
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1949
+ DialogContentImpl,
1950
+ {
1951
+ ...props,
1952
+ ref: composedRefs,
1953
+ trapFocus: context.open,
1954
+ disableOutsidePointerEvents: true,
1955
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
1956
+ event.preventDefault();
1957
+ context.triggerRef.current?.focus();
1958
+ }),
1959
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
1960
+ const originalEvent = event.detail.originalEvent;
1961
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
1962
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
1963
+ if (isRightClick) event.preventDefault();
1964
+ }),
1965
+ onFocusOutside: composeEventHandlers(
1966
+ props.onFocusOutside,
1967
+ (event) => event.preventDefault()
1968
+ )
1969
+ }
1970
+ );
1971
+ }
1972
+ );
1973
+ var DialogContentNonModal = React24.forwardRef(
1974
+ (props, forwardedRef) => {
1975
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
1976
+ const hasInteractedOutsideRef = React24.useRef(false);
1977
+ const hasPointerDownOutsideRef = React24.useRef(false);
1978
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1979
+ DialogContentImpl,
1980
+ {
1981
+ ...props,
1982
+ ref: forwardedRef,
1983
+ trapFocus: false,
1984
+ disableOutsidePointerEvents: false,
1985
+ onCloseAutoFocus: (event) => {
1986
+ props.onCloseAutoFocus?.(event);
1987
+ if (!event.defaultPrevented) {
1988
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
1989
+ event.preventDefault();
1990
+ }
1991
+ hasInteractedOutsideRef.current = false;
1992
+ hasPointerDownOutsideRef.current = false;
1993
+ },
1994
+ onInteractOutside: (event) => {
1995
+ props.onInteractOutside?.(event);
1996
+ if (!event.defaultPrevented) {
1997
+ hasInteractedOutsideRef.current = true;
1998
+ if (event.detail.originalEvent.type === "pointerdown") {
1999
+ hasPointerDownOutsideRef.current = true;
2000
+ }
2001
+ }
2002
+ const target = event.target;
2003
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
2004
+ if (targetIsTrigger) event.preventDefault();
2005
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
2006
+ event.preventDefault();
2007
+ }
2008
+ }
2009
+ }
2010
+ );
2011
+ }
2012
+ );
2013
+ var DialogContentImpl = React24.forwardRef(
2014
+ (props, forwardedRef) => {
2015
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2016
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
2017
+ const contentRef = React24.useRef(null);
2018
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2019
+ useFocusGuards();
2020
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2021
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2022
+ FocusScope,
2023
+ {
2024
+ asChild: true,
2025
+ loop: true,
2026
+ trapped: trapFocus,
2027
+ onMountAutoFocus: onOpenAutoFocus,
2028
+ onUnmountAutoFocus: onCloseAutoFocus,
2029
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2030
+ DismissableLayer,
2031
+ {
2032
+ role: "dialog",
2033
+ id: context.contentId,
2034
+ "aria-describedby": context.descriptionId,
2035
+ "aria-labelledby": context.titleId,
2036
+ "data-state": getState(context.open),
2037
+ ...contentProps,
2038
+ ref: composedRefs,
2039
+ onDismiss: () => context.onOpenChange(false)
2040
+ }
2041
+ )
2042
+ }
2043
+ ),
2044
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2045
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TitleWarning, { titleId: context.titleId }),
2046
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
2047
+ ] })
2048
+ ] });
2049
+ }
2050
+ );
2051
+ var TITLE_NAME = "DialogTitle";
2052
+ var DialogTitle = React24.forwardRef(
2053
+ (props, forwardedRef) => {
2054
+ const { __scopeDialog, ...titleProps } = props;
2055
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
2056
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
2057
+ }
2058
+ );
2059
+ DialogTitle.displayName = TITLE_NAME;
2060
+ var DESCRIPTION_NAME = "DialogDescription";
2061
+ var DialogDescription = React24.forwardRef(
2062
+ (props, forwardedRef) => {
2063
+ const { __scopeDialog, ...descriptionProps } = props;
2064
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
2065
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
2066
+ }
2067
+ );
2068
+ DialogDescription.displayName = DESCRIPTION_NAME;
2069
+ var CLOSE_NAME = "DialogClose";
2070
+ var DialogClose = React24.forwardRef(
2071
+ (props, forwardedRef) => {
2072
+ const { __scopeDialog, ...closeProps } = props;
2073
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
2074
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2075
+ Primitive.button,
2076
+ {
2077
+ type: "button",
2078
+ ...closeProps,
2079
+ ref: forwardedRef,
2080
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
2081
+ }
2082
+ );
2083
+ }
2084
+ );
2085
+ DialogClose.displayName = CLOSE_NAME;
2086
+ function getState(open) {
2087
+ return open ? "open" : "closed";
2088
+ }
2089
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
2090
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
2091
+ contentName: CONTENT_NAME,
2092
+ titleName: TITLE_NAME,
2093
+ docsSlug: "dialog"
2094
+ });
2095
+ var TitleWarning = ({ titleId }) => {
2096
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
2097
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
2098
+
2099
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2100
+
2101
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2102
+ React24.useEffect(() => {
2103
+ if (titleId) {
2104
+ const hasTitle = document.getElementById(titleId);
2105
+ if (!hasTitle) console.error(MESSAGE);
2106
+ }
2107
+ }, [MESSAGE, titleId]);
2108
+ return null;
2109
+ };
2110
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2111
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
2112
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2113
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2114
+ React24.useEffect(() => {
2115
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
2116
+ if (descriptionId && describedById) {
2117
+ const hasDescription = document.getElementById(descriptionId);
2118
+ if (!hasDescription) console.warn(MESSAGE);
2119
+ }
2120
+ }, [MESSAGE, contentRef, descriptionId]);
2121
+ return null;
2122
+ };
2123
+ var Root = Dialog;
2124
+ var Portal2 = DialogPortal;
2125
+ var Overlay = DialogOverlay;
2126
+ var Content = DialogContent;
2127
+ var Title = DialogTitle;
2128
+ var Description = DialogDescription;
2129
+ var Close = DialogClose;
42
2130
 
43
2131
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
44
- var import_react2 = require("react");
2132
+ var import_react3 = require("react");
45
2133
 
46
2134
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
47
2135
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -65,7 +2153,7 @@ var hasA11yProp = (props) => {
65
2153
  };
66
2154
 
67
2155
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
68
- var import_react = require("react");
2156
+ var import_react2 = require("react");
69
2157
 
70
2158
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
71
2159
  var defaultAttributes = {
@@ -81,7 +2169,7 @@ var defaultAttributes = {
81
2169
  };
82
2170
 
83
2171
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
84
- var Icon = (0, import_react.forwardRef)(
2172
+ var Icon = (0, import_react2.forwardRef)(
85
2173
  ({
86
2174
  color = "currentColor",
87
2175
  size = 24,
@@ -91,7 +2179,7 @@ var Icon = (0, import_react.forwardRef)(
91
2179
  children,
92
2180
  iconNode,
93
2181
  ...rest
94
- }, ref) => (0, import_react.createElement)(
2182
+ }, ref) => (0, import_react2.createElement)(
95
2183
  "svg",
96
2184
  {
97
2185
  ref,
@@ -105,7 +2193,7 @@ var Icon = (0, import_react.forwardRef)(
105
2193
  ...rest
106
2194
  },
107
2195
  [
108
- ...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)),
2196
+ ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
109
2197
  ...Array.isArray(children) ? children : [children]
110
2198
  ]
111
2199
  )
@@ -113,8 +2201,8 @@ var Icon = (0, import_react.forwardRef)(
113
2201
 
114
2202
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
115
2203
  var createLucideIcon = (iconName, iconNode) => {
116
- const Component = (0, import_react2.forwardRef)(
117
- ({ className, ...props }, ref) => (0, import_react2.createElement)(Icon, {
2204
+ const Component = (0, import_react3.forwardRef)(
2205
+ ({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
118
2206
  ref,
119
2207
  iconNode,
120
2208
  className: mergeClasses(
@@ -2613,108 +4701,156 @@ var getDefaultConfig = () => {
2613
4701
  }
2614
4702
  };
2615
4703
  };
2616
- var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
4704
+ var mergeConfigs = (baseConfig, {
4705
+ cacheSize,
4706
+ prefix,
4707
+ separator,
4708
+ experimentalParseClassName,
4709
+ extend = {},
4710
+ override = {}
4711
+ }) => {
4712
+ overrideProperty(baseConfig, "cacheSize", cacheSize);
4713
+ overrideProperty(baseConfig, "prefix", prefix);
4714
+ overrideProperty(baseConfig, "separator", separator);
4715
+ overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
4716
+ for (const configKey in override) {
4717
+ overrideConfigProperties(baseConfig[configKey], override[configKey]);
4718
+ }
4719
+ for (const key in extend) {
4720
+ mergeConfigProperties(baseConfig[key], extend[key]);
4721
+ }
4722
+ return baseConfig;
4723
+ };
4724
+ var overrideProperty = (baseObject, overrideKey, overrideValue) => {
4725
+ if (overrideValue !== void 0) {
4726
+ baseObject[overrideKey] = overrideValue;
4727
+ }
4728
+ };
4729
+ var overrideConfigProperties = (baseObject, overrideObject) => {
4730
+ if (overrideObject) {
4731
+ for (const key in overrideObject) {
4732
+ overrideProperty(baseObject, key, overrideObject[key]);
4733
+ }
4734
+ }
4735
+ };
4736
+ var mergeConfigProperties = (baseObject, mergeObject) => {
4737
+ if (mergeObject) {
4738
+ for (const key in mergeObject) {
4739
+ const mergeValue = mergeObject[key];
4740
+ if (mergeValue !== void 0) {
4741
+ baseObject[key] = (baseObject[key] || []).concat(mergeValue);
4742
+ }
4743
+ }
4744
+ }
4745
+ };
4746
+ var extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2617
4747
 
2618
4748
  // src/libraries/react/lib/utils.ts
4749
+ var twMerge = extendTailwindMerge({
4750
+ prefix: "au-"
4751
+ });
2619
4752
  function cn(...inputs) {
2620
4753
  return twMerge(clsx(inputs));
2621
4754
  }
2622
4755
 
2623
4756
  // src/libraries/react/components/ui/dialog.tsx
2624
- var import_jsx_runtime = require("react/jsx-runtime");
2625
- function Dialog({
2626
- ...props
2627
- }) {
2628
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
2629
- }
2630
- function DialogPortal({
2631
- ...props
2632
- }) {
2633
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
2634
- }
2635
- function DialogOverlay({
2636
- className,
4757
+ var import_jsx_runtime8 = require("react/jsx-runtime");
4758
+ var Dialog2 = Root;
4759
+ var DialogPortal2 = ({
4760
+ children,
2637
4761
  ...props
2638
- }) {
2639
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2640
- DialogPrimitive.Overlay,
4762
+ }) => {
4763
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Portal2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "au-root", children }) });
4764
+ };
4765
+ var DialogOverlay2 = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4766
+ Overlay,
4767
+ {
4768
+ ref,
4769
+ className: cn(
4770
+ "au-fixed au-inset-0 au-z-50 au-bg-black/80 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0",
4771
+ className
4772
+ ),
4773
+ ...props
4774
+ }
4775
+ ));
4776
+ DialogOverlay2.displayName = Overlay.displayName;
4777
+ var DialogContent2 = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DialogPortal2, { children: [
4778
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogOverlay2, {}),
4779
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4780
+ Content,
2641
4781
  {
2642
- "data-slot": "dialog-overlay",
4782
+ ref,
2643
4783
  className: cn(
2644
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
4784
+ `au-fixed au-left-[50%] au-top-[50%] au-z-50 au-grid au-w-full au-max-w-lg au-translate-x-[-50%] au-translate-y-[-50%] au-gap-4 au-border au-bg-background au-p-6 au-shadow-lg au-duration-200 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0 data-[state=closed]:au-zoom-out-95 data-[state=open]:au-zoom-in-95 data-[state=closed]:au-slide-out-to-left-1/2 data-[state=closed]:au-slide-out-to-top-[48%] data-[state=open]:au-slide-in-from-left-1/2 data-[state=open]:au-slide-in-from-top-[48%] sm:au-rounded-lg`,
2645
4785
  className
2646
4786
  ),
2647
- ...props
4787
+ ...props,
4788
+ children: [
4789
+ children,
4790
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Close, { className: "au-absolute au-right-4 au-top-4 au-rounded-sm au-opacity-70 au-ring-offset-background au-transition-opacity hover:au-opacity-100 focus:au-outline-none focus:au-ring-2 focus:au-ring-ring focus:au-ring-offset-2 disabled:au-pointer-events-none data-[state=open]:au-bg-accent data-[state=open]:au-text-muted-foreground", children: [
4791
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(X, { className: "au-h-4 au-w-4" }),
4792
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "au-sr-only", children: "Close" })
4793
+ ] })
4794
+ ]
2648
4795
  }
2649
- );
2650
- }
2651
- function DialogContent({
4796
+ )
4797
+ ] }));
4798
+ DialogContent2.displayName = Content.displayName;
4799
+ var DialogHeader = ({
2652
4800
  className,
2653
- children,
2654
- showCloseButton = true,
2655
4801
  ...props
2656
- }) {
2657
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { "data-slot": "dialog-portal", children: [
2658
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
2659
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2660
- DialogPrimitive.Content,
2661
- {
2662
- "data-slot": "dialog-content",
2663
- className: cn(
2664
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
2665
- className
2666
- ),
2667
- ...props,
2668
- children: [
2669
- children,
2670
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2671
- DialogPrimitive.Close,
2672
- {
2673
- "data-slot": "dialog-close",
2674
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2675
- children: [
2676
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, {}),
2677
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Close" })
2678
- ]
2679
- }
2680
- )
2681
- ]
2682
- }
2683
- )
2684
- ] });
2685
- }
2686
- function DialogFooter({ className, ...props }) {
2687
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2688
- "div",
2689
- {
2690
- "data-slot": "dialog-footer",
2691
- className: cn(
2692
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
2693
- className
2694
- ),
2695
- ...props
2696
- }
2697
- );
2698
- }
2699
- function DialogTitle({
4802
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4803
+ "div",
4804
+ {
4805
+ className: cn(
4806
+ "au-flex au-flex-col au-space-y-1.5 au-text-center sm:au-text-left",
4807
+ className
4808
+ ),
4809
+ ...props
4810
+ }
4811
+ );
4812
+ DialogHeader.displayName = "DialogHeader";
4813
+ var DialogFooter = ({
2700
4814
  className,
2701
4815
  ...props
2702
- }) {
2703
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2704
- DialogPrimitive.Title,
2705
- {
2706
- "data-slot": "dialog-title",
2707
- className: cn("text-lg leading-none font-semibold", className),
2708
- ...props
2709
- }
2710
- );
2711
- }
4816
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4817
+ "div",
4818
+ {
4819
+ className: cn(
4820
+ "au-flex au-flex-col-reverse sm:au-flex-row sm:au-justify-end sm:au-space-x-2",
4821
+ className
4822
+ ),
4823
+ ...props
4824
+ }
4825
+ );
4826
+ DialogFooter.displayName = "DialogFooter";
4827
+ var DialogTitle2 = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4828
+ Title,
4829
+ {
4830
+ ref,
4831
+ className: cn(
4832
+ "au-text-lg au-font-semibold au-leading-none au-tracking-tight",
4833
+ className
4834
+ ),
4835
+ ...props
4836
+ }
4837
+ ));
4838
+ DialogTitle2.displayName = Title.displayName;
4839
+ var DialogDescription2 = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4840
+ Description,
4841
+ {
4842
+ ref,
4843
+ className: cn("au-text-sm au-text-muted-foreground", className),
4844
+ ...props
4845
+ }
4846
+ ));
4847
+ DialogDescription2.displayName = Description.displayName;
2712
4848
 
2713
4849
  // src/libraries/react/components/check-dialog/check-dialog-synced.tsx
2714
- var import_react3 = require("react");
4850
+ var import_react4 = require("react");
2715
4851
 
2716
4852
  // src/libraries/react/components/ui/button.tsx
2717
- var import_react_slot = require("@radix-ui/react-slot");
4853
+ var React26 = __toESM(require("react"));
2718
4854
 
2719
4855
  // ../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
2720
4856
  var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
@@ -2759,24 +4895,24 @@ var cva = (base, config) => (props) => {
2759
4895
  };
2760
4896
 
2761
4897
  // src/libraries/react/components/ui/button.tsx
2762
- var import_jsx_runtime2 = require("react/jsx-runtime");
4898
+ var import_jsx_runtime9 = require("react/jsx-runtime");
2763
4899
  var buttonVariants = cva(
2764
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
4900
+ "au-inline-flex au-items-center au-justify-center au-gap-2 au-whitespace-nowrap au-rounded-md au-text-sm au-font-medium au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-1 focus-visible:au-ring-ring disabled:au-pointer-events-none disabled:au-opacity-50 [&_svg]:au-pointer-events-none [&_svg]:au-size-4 [&_svg]:au-shrink-0",
2765
4901
  {
2766
4902
  variants: {
2767
4903
  variant: {
2768
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
2769
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/90",
2770
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
2771
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
2772
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2773
- link: "text-primary underline-offset-4 hover:underline"
4904
+ default: "au-bg-primary au-text-primary-foreground au-shadow hover:au-bg-primary/90",
4905
+ destructive: "au-bg-destructive au-text-destructive-foreground au-shadow-sm hover:au-bg-destructive/90",
4906
+ outline: "au-border au-border-input au-bg-background au-shadow-sm hover:au-bg-accent hover:au-text-accent-foreground",
4907
+ secondary: "au-bg-secondary au-text-secondary-foreground au-shadow-sm hover:au-bg-secondary/80",
4908
+ ghost: "hover:au-bg-accent hover:au-text-accent-foreground",
4909
+ link: "au-text-primary au-underline-offset-4 hover:au-underline"
2774
4910
  },
2775
4911
  size: {
2776
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
2777
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
2778
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
2779
- icon: "size-9"
4912
+ default: "au-h-9 au-px-4 au-py-2",
4913
+ sm: "au-h-8 au-rounded-md au-px-3 au-text-xs",
4914
+ lg: "au-h-10 au-rounded-md au-px-8",
4915
+ icon: "au-h-9 au-w-9"
2780
4916
  }
2781
4917
  },
2782
4918
  defaultVariants: {
@@ -2785,23 +4921,20 @@ var buttonVariants = cva(
2785
4921
  }
2786
4922
  }
2787
4923
  );
2788
- function Button({
2789
- className,
2790
- variant,
2791
- size,
2792
- asChild = false,
2793
- ...props
2794
- }) {
2795
- const Comp = asChild ? import_react_slot.Slot : "button";
2796
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2797
- Comp,
2798
- {
2799
- "data-slot": "button",
2800
- className: cn(buttonVariants({ variant, size, className })),
2801
- ...props
2802
- }
2803
- );
2804
- }
4924
+ var Button = React26.forwardRef(
4925
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
4926
+ const Comp = asChild ? Slot : "button";
4927
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4928
+ Comp,
4929
+ {
4930
+ className: cn(buttonVariants({ variant, size }), className),
4931
+ ref,
4932
+ ...props
4933
+ }
4934
+ );
4935
+ }
4936
+ );
4937
+ Button.displayName = "Button";
2805
4938
 
2806
4939
  // src/libraries/react/components/check-dialog/lib/check-content.tsx
2807
4940
  var getCheckContent = (preview) => {
@@ -2849,28 +4982,28 @@ var getCheckContent = (preview) => {
2849
4982
  };
2850
4983
 
2851
4984
  // src/libraries/react/components/check-dialog/check-dialog-synced.tsx
2852
- var import_jsx_runtime3 = require("react/jsx-runtime");
4985
+ var import_jsx_runtime10 = require("react/jsx-runtime");
2853
4986
  function CheckDialog(params) {
2854
- const [loading] = (0, import_react3.useState)(false);
4987
+ const [loading] = (0, import_react4.useState)(false);
2855
4988
  if (!params || !params.preview) {
2856
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
4989
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, {});
2857
4990
  }
2858
4991
  const { open, setOpen } = params;
2859
4992
  const { products } = params.preview;
2860
4993
  const { title, message } = getCheckContent(params.preview);
2861
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DialogContent, { className: "p-0 pt-4 gap-0 text-foreground overflow-hidden text-sm", children: [
2862
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogTitle, { className: cn("font-bold text-xl px-6"), children: title }),
2863
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-6 my-2", children: message }),
2864
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogFooter, { className: "flex flex-col sm:flex-row justify-between gap-x-4 py-2 mt-4 pl-6 pr-3 bg-secondary border-t", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4994
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Dialog2, { open, onOpenChange: setOpen, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogContent2, { className: "au-p-0 au-pt-4 au-gap-0 au-text-foreground au-overflow-hidden au-text-sm", children: [
4995
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogTitle2, { className: cn("au-font-bold au-text-xl au-px-6"), children: title }),
4996
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "au-px-6 au-my-2", children: message }),
4997
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogFooter, { className: "au-flex au-flex-col sm:au-flex-row au-justify-between au-gap-x-4 au-py-2 au-mt-4 au-pl-6 au-pr-3 au-bg-secondary au-border-t", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2865
4998
  Button,
2866
4999
  {
2867
5000
  size: "sm",
2868
- className: "font-medium shadow transition min-w-20",
5001
+ className: "au-font-medium au-shadow au-transition au-min-w-20",
2869
5002
  onClick: async () => {
2870
5003
  setOpen(false);
2871
5004
  },
2872
5005
  children: [
2873
- loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LoaderCircle, { className: "w-4 h-4 mr-2 animate-spin" }),
5006
+ loading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoaderCircle, { className: "au-w-4 au-h-4 au-mr-2 au-animate-spin" }),
2874
5007
  "Confirm"
2875
5008
  ]
2876
5009
  }