@rubenpazch/image-upload 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,627 @@
1
+ 'use strict';
2
+
3
+ var n$1 = require('react');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var n__namespace = /*#__PURE__*/_interopNamespaceDefault(n$1);
23
+
24
+ var jsxRuntime = {exports: {}};
25
+
26
+ var reactJsxRuntime_production = {};
27
+
28
+ /**
29
+ * @license React
30
+ * react-jsx-runtime.production.js
31
+ *
32
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
33
+ *
34
+ * This source code is licensed under the MIT license found in the
35
+ * LICENSE file in the root directory of this source tree.
36
+ */
37
+
38
+ var hasRequiredReactJsxRuntime_production;
39
+
40
+ function requireReactJsxRuntime_production () {
41
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
42
+ hasRequiredReactJsxRuntime_production = 1;
43
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
44
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
45
+ function jsxProd(type, config, maybeKey) {
46
+ var key = null;
47
+ void 0 !== maybeKey && (key = "" + maybeKey);
48
+ void 0 !== config.key && (key = "" + config.key);
49
+ if ("key" in config) {
50
+ maybeKey = {};
51
+ for (var propName in config)
52
+ "key" !== propName && (maybeKey[propName] = config[propName]);
53
+ } else maybeKey = config;
54
+ config = maybeKey.ref;
55
+ return {
56
+ $$typeof: REACT_ELEMENT_TYPE,
57
+ type: type,
58
+ key: key,
59
+ ref: void 0 !== config ? config : null,
60
+ props: maybeKey
61
+ };
62
+ }
63
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
64
+ reactJsxRuntime_production.jsx = jsxProd;
65
+ reactJsxRuntime_production.jsxs = jsxProd;
66
+ return reactJsxRuntime_production;
67
+ }
68
+
69
+ var reactJsxRuntime_development = {};
70
+
71
+ /**
72
+ * @license React
73
+ * react-jsx-runtime.development.js
74
+ *
75
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
76
+ *
77
+ * This source code is licensed under the MIT license found in the
78
+ * LICENSE file in the root directory of this source tree.
79
+ */
80
+
81
+ var hasRequiredReactJsxRuntime_development;
82
+
83
+ function requireReactJsxRuntime_development () {
84
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
85
+ hasRequiredReactJsxRuntime_development = 1;
86
+ "production" !== process.env.NODE_ENV &&
87
+ (function () {
88
+ function getComponentNameFromType(type) {
89
+ if (null == type) return null;
90
+ if ("function" === typeof type)
91
+ return type.$$typeof === REACT_CLIENT_REFERENCE
92
+ ? null
93
+ : type.displayName || type.name || null;
94
+ if ("string" === typeof type) return type;
95
+ switch (type) {
96
+ case REACT_FRAGMENT_TYPE:
97
+ return "Fragment";
98
+ case REACT_PROFILER_TYPE:
99
+ return "Profiler";
100
+ case REACT_STRICT_MODE_TYPE:
101
+ return "StrictMode";
102
+ case REACT_SUSPENSE_TYPE:
103
+ return "Suspense";
104
+ case REACT_SUSPENSE_LIST_TYPE:
105
+ return "SuspenseList";
106
+ case REACT_ACTIVITY_TYPE:
107
+ return "Activity";
108
+ }
109
+ if ("object" === typeof type)
110
+ switch (
111
+ ("number" === typeof type.tag &&
112
+ console.error(
113
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
114
+ ),
115
+ type.$$typeof)
116
+ ) {
117
+ case REACT_PORTAL_TYPE:
118
+ return "Portal";
119
+ case REACT_CONTEXT_TYPE:
120
+ return type.displayName || "Context";
121
+ case REACT_CONSUMER_TYPE:
122
+ return (type._context.displayName || "Context") + ".Consumer";
123
+ case REACT_FORWARD_REF_TYPE:
124
+ var innerType = type.render;
125
+ type = type.displayName;
126
+ type ||
127
+ ((type = innerType.displayName || innerType.name || ""),
128
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
129
+ return type;
130
+ case REACT_MEMO_TYPE:
131
+ return (
132
+ (innerType = type.displayName || null),
133
+ null !== innerType
134
+ ? innerType
135
+ : getComponentNameFromType(type.type) || "Memo"
136
+ );
137
+ case REACT_LAZY_TYPE:
138
+ innerType = type._payload;
139
+ type = type._init;
140
+ try {
141
+ return getComponentNameFromType(type(innerType));
142
+ } catch (x) {}
143
+ }
144
+ return null;
145
+ }
146
+ function testStringCoercion(value) {
147
+ return "" + value;
148
+ }
149
+ function checkKeyStringCoercion(value) {
150
+ try {
151
+ testStringCoercion(value);
152
+ var JSCompiler_inline_result = !1;
153
+ } catch (e) {
154
+ JSCompiler_inline_result = true;
155
+ }
156
+ if (JSCompiler_inline_result) {
157
+ JSCompiler_inline_result = console;
158
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
159
+ var JSCompiler_inline_result$jscomp$0 =
160
+ ("function" === typeof Symbol &&
161
+ Symbol.toStringTag &&
162
+ value[Symbol.toStringTag]) ||
163
+ value.constructor.name ||
164
+ "Object";
165
+ JSCompiler_temp_const.call(
166
+ JSCompiler_inline_result,
167
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
168
+ JSCompiler_inline_result$jscomp$0
169
+ );
170
+ return testStringCoercion(value);
171
+ }
172
+ }
173
+ function getTaskName(type) {
174
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
175
+ if (
176
+ "object" === typeof type &&
177
+ null !== type &&
178
+ type.$$typeof === REACT_LAZY_TYPE
179
+ )
180
+ return "<...>";
181
+ try {
182
+ var name = getComponentNameFromType(type);
183
+ return name ? "<" + name + ">" : "<...>";
184
+ } catch (x) {
185
+ return "<...>";
186
+ }
187
+ }
188
+ function getOwner() {
189
+ var dispatcher = ReactSharedInternals.A;
190
+ return null === dispatcher ? null : dispatcher.getOwner();
191
+ }
192
+ function UnknownOwner() {
193
+ return Error("react-stack-top-frame");
194
+ }
195
+ function hasValidKey(config) {
196
+ if (hasOwnProperty.call(config, "key")) {
197
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
198
+ if (getter && getter.isReactWarning) return false;
199
+ }
200
+ return void 0 !== config.key;
201
+ }
202
+ function defineKeyPropWarningGetter(props, displayName) {
203
+ function warnAboutAccessingKey() {
204
+ specialPropKeyWarningShown ||
205
+ ((specialPropKeyWarningShown = true),
206
+ console.error(
207
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
208
+ displayName
209
+ ));
210
+ }
211
+ warnAboutAccessingKey.isReactWarning = true;
212
+ Object.defineProperty(props, "key", {
213
+ get: warnAboutAccessingKey,
214
+ configurable: true
215
+ });
216
+ }
217
+ function elementRefGetterWithDeprecationWarning() {
218
+ var componentName = getComponentNameFromType(this.type);
219
+ didWarnAboutElementRef[componentName] ||
220
+ ((didWarnAboutElementRef[componentName] = true),
221
+ console.error(
222
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
223
+ ));
224
+ componentName = this.props.ref;
225
+ return void 0 !== componentName ? componentName : null;
226
+ }
227
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
228
+ var refProp = props.ref;
229
+ type = {
230
+ $$typeof: REACT_ELEMENT_TYPE,
231
+ type: type,
232
+ key: key,
233
+ props: props,
234
+ _owner: owner
235
+ };
236
+ null !== (void 0 !== refProp ? refProp : null)
237
+ ? Object.defineProperty(type, "ref", {
238
+ enumerable: false,
239
+ get: elementRefGetterWithDeprecationWarning
240
+ })
241
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
242
+ type._store = {};
243
+ Object.defineProperty(type._store, "validated", {
244
+ configurable: false,
245
+ enumerable: false,
246
+ writable: true,
247
+ value: 0
248
+ });
249
+ Object.defineProperty(type, "_debugInfo", {
250
+ configurable: false,
251
+ enumerable: false,
252
+ writable: true,
253
+ value: null
254
+ });
255
+ Object.defineProperty(type, "_debugStack", {
256
+ configurable: false,
257
+ enumerable: false,
258
+ writable: true,
259
+ value: debugStack
260
+ });
261
+ Object.defineProperty(type, "_debugTask", {
262
+ configurable: false,
263
+ enumerable: false,
264
+ writable: true,
265
+ value: debugTask
266
+ });
267
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
268
+ return type;
269
+ }
270
+ function jsxDEVImpl(
271
+ type,
272
+ config,
273
+ maybeKey,
274
+ isStaticChildren,
275
+ debugStack,
276
+ debugTask
277
+ ) {
278
+ var children = config.children;
279
+ if (void 0 !== children)
280
+ if (isStaticChildren)
281
+ if (isArrayImpl(children)) {
282
+ for (
283
+ isStaticChildren = 0;
284
+ isStaticChildren < children.length;
285
+ isStaticChildren++
286
+ )
287
+ validateChildKeys(children[isStaticChildren]);
288
+ Object.freeze && Object.freeze(children);
289
+ } else
290
+ console.error(
291
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
292
+ );
293
+ else validateChildKeys(children);
294
+ if (hasOwnProperty.call(config, "key")) {
295
+ children = getComponentNameFromType(type);
296
+ var keys = Object.keys(config).filter(function (k) {
297
+ return "key" !== k;
298
+ });
299
+ isStaticChildren =
300
+ 0 < keys.length
301
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
302
+ : "{key: someKey}";
303
+ didWarnAboutKeySpread[children + isStaticChildren] ||
304
+ ((keys =
305
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
306
+ console.error(
307
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
308
+ isStaticChildren,
309
+ children,
310
+ keys,
311
+ children
312
+ ),
313
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
314
+ }
315
+ children = null;
316
+ void 0 !== maybeKey &&
317
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
318
+ hasValidKey(config) &&
319
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
320
+ if ("key" in config) {
321
+ maybeKey = {};
322
+ for (var propName in config)
323
+ "key" !== propName && (maybeKey[propName] = config[propName]);
324
+ } else maybeKey = config;
325
+ children &&
326
+ defineKeyPropWarningGetter(
327
+ maybeKey,
328
+ "function" === typeof type
329
+ ? type.displayName || type.name || "Unknown"
330
+ : type
331
+ );
332
+ return ReactElement(
333
+ type,
334
+ children,
335
+ maybeKey,
336
+ getOwner(),
337
+ debugStack,
338
+ debugTask
339
+ );
340
+ }
341
+ function validateChildKeys(node) {
342
+ isValidElement(node)
343
+ ? node._store && (node._store.validated = 1)
344
+ : "object" === typeof node &&
345
+ null !== node &&
346
+ node.$$typeof === REACT_LAZY_TYPE &&
347
+ ("fulfilled" === node._payload.status
348
+ ? isValidElement(node._payload.value) &&
349
+ node._payload.value._store &&
350
+ (node._payload.value._store.validated = 1)
351
+ : node._store && (node._store.validated = 1));
352
+ }
353
+ function isValidElement(object) {
354
+ return (
355
+ "object" === typeof object &&
356
+ null !== object &&
357
+ object.$$typeof === REACT_ELEMENT_TYPE
358
+ );
359
+ }
360
+ var React = n$1,
361
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
362
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
363
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
364
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
365
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
366
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
367
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
368
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
369
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
370
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
371
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
372
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
373
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
374
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
375
+ ReactSharedInternals =
376
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
377
+ hasOwnProperty = Object.prototype.hasOwnProperty,
378
+ isArrayImpl = Array.isArray,
379
+ createTask = console.createTask
380
+ ? console.createTask
381
+ : function () {
382
+ return null;
383
+ };
384
+ React = {
385
+ react_stack_bottom_frame: function (callStackForError) {
386
+ return callStackForError();
387
+ }
388
+ };
389
+ var specialPropKeyWarningShown;
390
+ var didWarnAboutElementRef = {};
391
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
392
+ React,
393
+ UnknownOwner
394
+ )();
395
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
396
+ var didWarnAboutKeySpread = {};
397
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
398
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
399
+ var trackActualOwner =
400
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
401
+ return jsxDEVImpl(
402
+ type,
403
+ config,
404
+ maybeKey,
405
+ false,
406
+ trackActualOwner
407
+ ? Error("react-stack-top-frame")
408
+ : unknownOwnerDebugStack,
409
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
410
+ );
411
+ };
412
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
413
+ var trackActualOwner =
414
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
415
+ return jsxDEVImpl(
416
+ type,
417
+ config,
418
+ maybeKey,
419
+ true,
420
+ trackActualOwner
421
+ ? Error("react-stack-top-frame")
422
+ : unknownOwnerDebugStack,
423
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
424
+ );
425
+ };
426
+ })();
427
+ return reactJsxRuntime_development;
428
+ }
429
+
430
+ var hasRequiredJsxRuntime;
431
+
432
+ function requireJsxRuntime () {
433
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
434
+ hasRequiredJsxRuntime = 1;
435
+
436
+ if (process.env.NODE_ENV === 'production') {
437
+ jsxRuntime.exports = requireReactJsxRuntime_production();
438
+ } else {
439
+ jsxRuntime.exports = requireReactJsxRuntime_development();
440
+ }
441
+ return jsxRuntime.exports;
442
+ }
443
+
444
+ var jsxRuntimeExports = requireJsxRuntime();
445
+
446
+ var r$1,o$1={exports:{}},t$1={};var l$1,n,a$1={};
447
+ /**
448
+ * @license React
449
+ * react-jsx-runtime.development.js
450
+ *
451
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
452
+ *
453
+ * This source code is licensed under the MIT license found in the
454
+ * LICENSE file in the root directory of this source tree.
455
+ */function i$1(){return l$1||(l$1=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=n$1,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a$1.Fragment=x,a$1.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a$1.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a$1}var c$1=(n||(n=1,"production"===process.env.NODE_ENV?o$1.exports=function(){if(r$1)return t$1;r$1=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t$1.Fragment=s,t$1.jsx=o,t$1.jsxs=o,t$1}():o$1.exports=i$1()),o$1.exports);const T=({className:e="",size:s="md"})=>{const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c$1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-label":"Document",children:c$1.jsx("path",{d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};const He=({className:e="",size:s="md",color:r="currentColor"})=>c$1.jsxs("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} animate-spin ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",children:[c$1.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c$1.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});const Ae={sm:16,md:24,lg:32},Oe=({size:e="md",color:s="currentColor",className:r="",...o})=>{const t="string"==typeof e?Ae[e]||24:e;return c$1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 48 48",fill:"none",stroke:s,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`icon icon-tabler icon-tabler-upload ${r}`.trim(),...o,children:c$1.jsx("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02"})})};Oe.displayName="UploadIcon";const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=n__namespace.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c$1.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
456
+
457
+ var e,o={exports:{}},t={};var r,a,l={};
458
+ /**
459
+ * @license React
460
+ * react-jsx-runtime.development.js
461
+ *
462
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
463
+ *
464
+ * This source code is licensed under the MIT license found in the
465
+ * LICENSE file in the root directory of this source tree.
466
+ */function i(){return r||(r=1,"production"!==process.env.NODE_ENV&&function(){function e(n){if(null==n)return null;if("function"==typeof n)return n.$$typeof===O?null:n.displayName||n.name||null;if("string"==typeof n)return n;switch(n){case p:return "Fragment";case y:return "Profiler";case b:return "StrictMode";case B:return "Suspense";case v:return "SuspenseList";case E:return "Activity"}if("object"==typeof n)switch("number"==typeof n.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case f:return "Portal";case h:return n.displayName||"Context";case g:return (n._context.displayName||"Context")+".Consumer";case x:var o=n.render;return (n=n.displayName)||(n=""!==(n=o.displayName||o.name||"")?"ForwardRef("+n+")":"ForwardRef"),n;case k:return null!==(o=n.displayName||null)?o:e(n.type)||"Memo";case S:o=n._payload,n=n._init;try{return e(n(o))}catch(n){}}return null}function o(n){return ""+n}function t(n){try{o(n);var e=!1;}catch(n){e=true;}if(e){var t=(e=console).error,r="function"==typeof Symbol&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return t.call(e,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",r),o(n)}}function r(n){if(n===p)return "<>";if("object"==typeof n&&null!==n&&n.$$typeof===S)return "<...>";try{var o=e(n);return o?"<"+o+">":"<...>"}catch(n){return "<...>"}}function a(){return Error("react-stack-top-frame")}function i(){var n=e(this.type);return P[n]||(P[n]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(n=this.props.ref)?n:null}function u(n,o,r,a,l,u){var c,_=o.children;if(void 0!==_)if(a)if(j(_)){for(a=0;a<_.length;a++)d(_[a]);Object.freeze&&Object.freeze(_);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(_);if(N.call(o,"key")){_=e(n);var f=Object.keys(o).filter(function(n){return "key"!==n});a=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",z[_+a]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,_,f,_),z[_+a]=true);}if(_=null,void 0!==r&&(t(r),_=""+r),function(n){if(N.call(n,"key")){var e=Object.getOwnPropertyDescriptor(n,"key").get;if(e&&e.isReactWarning)return false}return void 0!==n.key}(o)&&(t(o.key),_=""+o.key),"key"in o)for(var p in r={},o)"key"!==p&&(r[p]=o[p]);else r=o;return _&&function(n,e){function o(){s||(s=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",e));}o.isReactWarning=true,Object.defineProperty(n,"key",{get:o,configurable:true});}(r,"function"==typeof n?n.displayName||n.name||"Unknown":n),function(n,e,o,t,r,a){var l=o.ref;return n={$$typeof:m,type:n,key:e,props:o,_owner:t},null!==(void 0!==l?l:null)?Object.defineProperty(n,"ref",{enumerable:false,get:i}):Object.defineProperty(n,"ref",{enumerable:false,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(n,"_debugStack",{configurable:false,enumerable:false,writable:true,value:r}),Object.defineProperty(n,"_debugTask",{configurable:false,enumerable:false,writable:true,value:a}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}(n,_,r,null===(c=w.A)?null:c.getOwner(),l,u)}function d(n){c(n)?n._store&&(n._store.validated=1):"object"==typeof n&&null!==n&&n.$$typeof===S&&("fulfilled"===n._payload.status?c(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1));}function c(n){return "object"==typeof n&&null!==n&&n.$$typeof===m}var s,_=n$1,m=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),w=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.prototype.hasOwnProperty,j=Array.isArray,I=console.createTask?console.createTask:function(){return null},P={},W=(_={react_stack_bottom_frame:function(n){return n()}}).react_stack_bottom_frame.bind(_,a)(),C=I(r(a)),z={};l.Fragment=p,l.jsx=function(n,e,o){var t=1e4>w.recentlyCreatedOwnerStacks++;return u(n,e,o,false,t?Error("react-stack-top-frame"):W,t?I(r(n)):C)},l.jsxs=function(n,e,o){var t=1e4>w.recentlyCreatedOwnerStacks++;return u(n,e,o,true,t?Error("react-stack-top-frame"):W,t?I(r(n)):C)};}()),l}var u=(a||(a=1,"production"===process.env.NODE_ENV?o.exports=function(){if(e)return t;e=1;var n=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function r(e,o,t){var r=null;if(void 0!==t&&(r=""+t),void 0!==o.key&&(r=""+o.key),"key"in o)for(var a in t={},o)"key"!==a&&(t[a]=o[a]);else t=o;return o=t.ref,{$$typeof:n,type:e,key:r,ref:void 0!==o?o:null,props:t}}return t.Fragment=o,t.jsx=r,t.jsxs=r,t}():o.exports=i()),o.exports);var d={root:"Button-module_root__CbGH4",sizeSmall:"Button-module_sizeSmall__cwk1u",sizeMedium:"Button-module_sizeMedium__WI9SU",sizeLarge:"Button-module_sizeLarge__DCsOs",disabled:"Button-module_disabled__JgtZl",fullWidth:"Button-module_fullWidth__dOsPn",noElevation:"Button-module_noElevation__I6-zN",loading:"Button-module_loading__fZbPs",loadingWrapper:"Button-module_loadingWrapper__NrZp3",content:"Button-module_content__xCYa9",contentHidden:"Button-module_contentHidden__lJy-Z",startIcon:"Button-module_startIcon__x3190",endIcon:"Button-module_endIcon__9vUum",text:"Button-module_text__5mE0X",textPrimary:"Button-module_textPrimary__vfnk5",textSecondary:"Button-module_textSecondary__a3EiY",textSuccess:"Button-module_textSuccess__F84Hf",textError:"Button-module_textError__47t2-",textWarning:"Button-module_textWarning__sUoJ4",textInfo:"Button-module_textInfo__eHIQf",contained:"Button-module_contained__ihcEr",containedPrimary:"Button-module_containedPrimary__QABiB",containedSecondary:"Button-module_containedSecondary__Amyuq",containedSuccess:"Button-module_containedSuccess__klgok",containedError:"Button-module_containedError__WOxWG",containedWarning:"Button-module_containedWarning__dFc-N",containedInfo:"Button-module_containedInfo__PLgZO",outlined:"Button-module_outlined__3QTXD",outlinedPrimary:"Button-module_outlinedPrimary__fKrCf",outlinedSecondary:"Button-module_outlinedSecondary__n7OpX",outlinedSuccess:"Button-module_outlinedSuccess__Y2Plg",outlinedError:"Button-module_outlinedError__6NJ-J",outlinedWarning:"Button-module_outlinedWarning__aXlYk",outlinedInfo:"Button-module_outlinedInfo__hpDkF",spinner:"Button-module_spinner__vwfOT",spin:"Button-module_spin__fjXhP",spinnerCircle:"Button-module_spinnerCircle__7vRpf",spinnerDash:"Button-module_spinnerDash__y8Dii"};!function(n,e){ void 0===e&&(e={});var o=e.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n));}}(".Button-module_root__CbGH4 {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n font-family: inherit;\n font-weight: 500;\n border: 1px solid transparent;\n line-height: 1.75;\n white-space: nowrap;\n background: transparent;\n color: inherit;\n cursor: pointer;\n border-radius: 0.25rem;\n transition:\n background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n border-color 250ms cubic-bezier(0.4, 0, 0.2, 1),\n box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.Button-module_root__CbGH4:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.5);\n}\n\n/* Size variants */\n.Button-module_sizeSmall__cwk1u {\n padding: 0.25rem 0.625rem;\n font-size: 0.8125rem;\n min-height: 1.875rem;\n}\n\n.Button-module_sizeMedium__WI9SU {\n padding: 0.375rem 1rem;\n font-size: 0.875rem;\n min-height: 2.25rem;\n}\n\n.Button-module_sizeLarge__DCsOs {\n padding: 0.5rem 1.375rem;\n font-size: 0.9375rem;\n min-height: 2.625rem;\n}\n\n/* Disabled state */\n.Button-module_disabled__JgtZl {\n background: rgba(0, 0, 0, 0.12);\n color: rgba(0, 0, 0, 0.26);\n border-color: transparent;\n cursor: not-allowed;\n pointer-events: none;\n box-shadow: none;\n}\n\n/* Full width */\n.Button-module_fullWidth__dOsPn {\n width: 100%;\n}\n\n/* No elevation */\n.Button-module_noElevation__I6-zN {\n box-shadow: none !important;\n}\n\n/* Loading state */\n.Button-module_loading__fZbPs {\n pointer-events: none;\n}\n\n.Button-module_loadingWrapper__NrZp3 {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.Button-module_content__xCYa9 {\n display: inline-flex;\n align-items: inherit;\n justify-content: inherit;\n gap: 0.5rem;\n}\n\n.Button-module_contentHidden__lJy-Z {\n opacity: 0;\n}\n\n.Button-module_startIcon__x3190,\n.Button-module_endIcon__9vUum {\n display: inherit;\n font-size: 1.25em;\n line-height: 1;\n}\n\n/* Variant: text */\n.Button-module_text__5mE0X {\n padding: 0.375rem 0.5rem;\n}\n\n.Button-module_text__5mE0X:hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n/* ============================================\n COLOR STYLES - TEXT VARIANT\n ============================================ */\n\n/* Primary */\n.Button-module_textPrimary__vfnk5 {\n color: #1976d2;\n}\n.Button-module_textPrimary__vfnk5:hover {\n background-color: rgba(25, 118, 210, 0.04);\n}\n\n/* Secondary */\n.Button-module_textSecondary__a3EiY {\n color: #9c27b0;\n}\n.Button-module_textSecondary__a3EiY:hover {\n background-color: rgba(156, 39, 176, 0.04);\n}\n\n/* Success */\n.Button-module_textSuccess__F84Hf {\n color: #2e7d32;\n}\n.Button-module_textSuccess__F84Hf:hover {\n background-color: rgba(46, 125, 50, 0.04);\n}\n\n/* Error */\n.Button-module_textError__47t2- {\n color: #d32f2f;\n}\n.Button-module_textError__47t2-:hover {\n background-color: rgba(211, 47, 47, 0.04);\n}\n\n/* Warning */\n.Button-module_textWarning__sUoJ4 {\n color: #ed6c02;\n}\n.Button-module_textWarning__sUoJ4:hover {\n background-color: rgba(237, 108, 2, 0.04);\n}\n\n/* Info */\n.Button-module_textInfo__eHIQf {\n color: #0288d1;\n}\n.Button-module_textInfo__eHIQf:hover {\n background-color: rgba(2, 136, 209, 0.04);\n}\n\n/* ============================================\n COLOR STYLES - CONTAINED VARIANT\n ============================================ */\n\n/* Contained base */\n.Button-module_contained__ihcEr {\n box-shadow:\n 0px 3px 1px -2px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 5px 0px rgba(0, 0, 0, 0.12);\n}\n\n.Button-module_contained__ihcEr:hover {\n box-shadow:\n 0px 2px 4px -1px rgba(0, 0, 0, 0.2),\n 0px 4px 5px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 10px 0px rgba(0, 0, 0, 0.12);\n}\n\n.Button-module_contained__ihcEr:active {\n box-shadow:\n 0px 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0px 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0px 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n\n/* Primary */\n.Button-module_containedPrimary__QABiB {\n background-color: #1976d2;\n color: #fff;\n}\n.Button-module_containedPrimary__QABiB:hover {\n background-color: #1565c0;\n}\n\n/* Secondary */\n.Button-module_containedSecondary__Amyuq {\n background-color: #9c27b0;\n color: #fff;\n}\n.Button-module_containedSecondary__Amyuq:hover {\n background-color: #7b1fa2;\n}\n\n/* Success */\n.Button-module_containedSuccess__klgok {\n background-color: #2e7d32;\n color: #fff;\n}\n.Button-module_containedSuccess__klgok:hover {\n background-color: #1b5e20;\n}\n\n/* Error */\n.Button-module_containedError__WOxWG {\n background-color: #d32f2f;\n color: #fff;\n}\n.Button-module_containedError__WOxWG:hover {\n background-color: #c62828;\n}\n\n/* Warning */\n.Button-module_containedWarning__dFc-N {\n background-color: #ed6c02;\n color: #fff;\n}\n.Button-module_containedWarning__dFc-N:hover {\n background-color: #e65100;\n}\n\n/* Info */\n.Button-module_containedInfo__PLgZO {\n background-color: #0288d1;\n color: #fff;\n}\n.Button-module_containedInfo__PLgZO:hover {\n background-color: #01579b;\n}\n\n/* ============================================\n COLOR STYLES - OUTLINED VARIANT\n ============================================ */\n\n/* Outlined base */\n.Button-module_outlined__3QTXD {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n/* Primary */\n.Button-module_outlinedPrimary__fKrCf {\n color: #1976d2;\n border-color: rgba(25, 118, 210, 0.5);\n}\n.Button-module_outlinedPrimary__fKrCf:hover {\n background-color: rgba(25, 118, 210, 0.04);\n border-color: #1976d2;\n}\n\n/* Secondary */\n.Button-module_outlinedSecondary__n7OpX {\n color: #9c27b0;\n border-color: rgba(156, 39, 176, 0.5);\n}\n.Button-module_outlinedSecondary__n7OpX:hover {\n background-color: rgba(156, 39, 176, 0.04);\n border-color: #9c27b0;\n}\n\n/* Success */\n.Button-module_outlinedSuccess__Y2Plg {\n color: #2e7d32;\n border-color: rgba(46, 125, 50, 0.5);\n}\n.Button-module_outlinedSuccess__Y2Plg:hover {\n background-color: rgba(46, 125, 50, 0.04);\n border-color: #2e7d32;\n}\n\n/* Error */\n.Button-module_outlinedError__6NJ-J {\n color: #d32f2f;\n border-color: rgba(211, 47, 47, 0.5);\n}\n.Button-module_outlinedError__6NJ-J:hover {\n background-color: rgba(211, 47, 47, 0.04);\n border-color: #d32f2f;\n}\n\n/* Warning */\n.Button-module_outlinedWarning__aXlYk {\n color: #ed6c02;\n border-color: rgba(237, 108, 2, 0.5);\n}\n.Button-module_outlinedWarning__aXlYk:hover {\n background-color: rgba(237, 108, 2, 0.04);\n border-color: #ed6c02;\n}\n\n/* Info */\n.Button-module_outlinedInfo__hpDkF {\n color: #0288d1;\n border-color: rgba(2, 136, 209, 0.5);\n}\n.Button-module_outlinedInfo__hpDkF:hover {\n background-color: rgba(2, 136, 209, 0.04);\n border-color: #0288d1;\n}\n\n/* Spinner animation */\n.Button-module_spinner__vwfOT {\n display: inline-flex;\n animation: Button-module_spin__fjXhP 0.8s linear infinite;\n}\n\n.Button-module_spinnerCircle__7vRpf {\n stroke-dasharray: 50;\n stroke-dashoffset: 25;\n animation: Button-module_spinnerDash__y8Dii 1.5s ease-in-out infinite;\n}\n\n@keyframes Button-module_spin__fjXhP {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes Button-module_spinnerDash__y8Dii {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n");const c=(...n)=>n.filter(Boolean).join(" "),s={small:d.sizeSmall,medium:d.sizeMedium,large:d.sizeLarge},_=({size:n})=>{const e={small:14,medium:18,large:22}[n];return u.jsx("svg",{className:d.spinner,width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("circle",{className:d.spinnerCircle,cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})},m=n$1.forwardRef((n,e)=>{const{variant:o="text",color:t="primary",size:r="medium",component:a,className:l,loading:i=false,startIcon:m,endIcon:f,fullWidth:p=false,disableElevation:b=false,children:y,...g}=n,h="disabled"in n&&n.disabled,x="href"in n?n.href:void 0,B=a||(x?"a":"button"),v=h||i,k=c(d.root,d[o],((n,e)=>{const o=`${e}${n.charAt(0).toUpperCase()}${n.slice(1)}`;return d[o]||""})(t,o),s[r],v?d.disabled:void 0,p?d.fullWidth:void 0,b?d.noElevation:void 0,i?d.loading:void 0,l),S="button"===B?{disabled:v}:{},E="a"===B?{href:x,"aria-disabled":v}:{};return u.jsxs(B,{ref:e,className:k,...S,...E,...g,children:[i&&u.jsx("span",{className:d.loadingWrapper,children:u.jsx(_,{size:r})}),u.jsxs("span",{className:c(d.content,i?d.contentHidden:void 0),children:[m&&u.jsx("span",{className:d.startIcon,children:m}),y,f&&u.jsx("span",{className:d.endIcon,children:f})]})]})});m.displayName="Button";
467
+
468
+ function styleInject(css, ref) {
469
+ if ( ref === void 0 ) ref = {};
470
+ var insertAt = ref.insertAt;
471
+
472
+ if (typeof document === 'undefined') { return; }
473
+
474
+ var head = document.head || document.getElementsByTagName('head')[0];
475
+ var style = document.createElement('style');
476
+ style.type = 'text/css';
477
+
478
+ if (insertAt === 'top') {
479
+ if (head.firstChild) {
480
+ head.insertBefore(style, head.firstChild);
481
+ } else {
482
+ head.appendChild(style);
483
+ }
484
+ } else {
485
+ head.appendChild(style);
486
+ }
487
+
488
+ if (style.styleSheet) {
489
+ style.styleSheet.cssText = css;
490
+ } else {
491
+ style.appendChild(document.createTextNode(css));
492
+ }
493
+ }
494
+
495
+ var css_248z = ".ImageUpload-module_container__KfRP7 {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n width: 100%;\n max-width: 520px;\n}\n\n.ImageUpload-module_label__KrvGJ {\n font-size: 0.875rem;\n font-weight: 600;\n color: #374151;\n}\n\n.ImageUpload-module_content__h1n0w {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.ImageUpload-module_dropzone__r29hi {\n position: relative;\n border: 2px dashed #d1d5db;\n border-radius: 0.75rem;\n padding: 1.5rem;\n background: #ffffff;\n transition:\n border-color 150ms ease,\n background-color 150ms ease;\n cursor: pointer;\n}\n\n.ImageUpload-module_dropzoneActive__gKHgT {\n border-color: #3b82f6;\n background: #eff6ff;\n}\n\n.ImageUpload-module_dropzoneDisabled__sroj7 {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.ImageUpload-module_dropzoneFilled__mW0tg {\n background: #f9fafb;\n}\n\n.ImageUpload-module_inputHidden__zyeM2 {\n display: none;\n}\n\n.ImageUpload-module_uploading__P5wVR {\n text-align: center;\n}\n\n.ImageUpload-module_uploadingIcon__uSwpq {\n margin: 0 auto 0.5rem;\n color: #2563eb;\n}\n\n.ImageUpload-module_uploadingText__t0BkQ {\n font-size: 0.875rem;\n color: #4b5563;\n}\n\n.ImageUpload-module_preview__CqJi- {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n}\n\n.ImageUpload-module_imagePreview__22wJp {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\n}\n\n.ImageUpload-module_previewImage__FpdIn {\n object-fit: contain;\n border-radius: 0.75rem;\n}\n\n.ImageUpload-module_pdfPreview__D6OCc {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 0.5rem;\n}\n\n.ImageUpload-module_pdfIcon__DIdkd {\n width: 4rem;\n height: 4rem;\n color: #dc2626;\n}\n\n.ImageUpload-module_pdfLabel__Ff-Al {\n font-size: 0.875rem;\n font-weight: 600;\n color: #4b5563;\n}\n\n.ImageUpload-module_linkGroup__mZFWH {\n display: flex;\n gap: 0.75rem;\n}\n\n.ImageUpload-module_linkPrimary__byUBf {\n font-size: 0.875rem;\n color: #2563eb;\n text-decoration: underline;\n}\n\n.ImageUpload-module_linkPrimary__byUBf:hover {\n color: #1d4ed8;\n}\n\n.ImageUpload-module_linkSecondary__2E4IZ {\n font-size: 0.875rem;\n color: #16a34a;\n text-decoration: underline;\n}\n\n.ImageUpload-module_linkSecondary__2E4IZ:hover {\n color: #15803d;\n}\n\n.ImageUpload-module_actions__hX2N3 {\n display: flex;\n gap: 0.5rem;\n}\n\n.ImageUpload-module_prompt__Cm0R6 {\n text-align: center;\n}\n\n.ImageUpload-module_uploadIcon__g9U0X {\n margin: 0 auto;\n color: #9ca3af;\n}\n\n.ImageUpload-module_promptText__-d7wp {\n margin-top: 0.5rem;\n font-size: 0.875rem;\n color: #4b5563;\n}\n\n.ImageUpload-module_promptAction__qFDjq {\n font-weight: 600;\n color: #2563eb;\n}\n\n.ImageUpload-module_helperText__AbZRs {\n margin-top: 0.25rem;\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.ImageUpload-module_error__TBlHx {\n border-radius: 0.5rem;\n background: #fef2f2;\n padding: 1rem;\n}\n\n.ImageUpload-module_errorTitle__ktusO {\n font-size: 0.875rem;\n font-weight: 600;\n color: #991b1b;\n margin: 0;\n}\n\n.ImageUpload-module_errorMessage__RTkNU {\n margin-top: 0.5rem;\n font-size: 0.875rem;\n color: #b91c1c;\n}\n";
496
+ var styles = {"container":"ImageUpload-module_container__KfRP7","label":"ImageUpload-module_label__KrvGJ","content":"ImageUpload-module_content__h1n0w","dropzone":"ImageUpload-module_dropzone__r29hi","dropzoneActive":"ImageUpload-module_dropzoneActive__gKHgT","dropzoneDisabled":"ImageUpload-module_dropzoneDisabled__sroj7","dropzoneFilled":"ImageUpload-module_dropzoneFilled__mW0tg","inputHidden":"ImageUpload-module_inputHidden__zyeM2","uploading":"ImageUpload-module_uploading__P5wVR","uploadingIcon":"ImageUpload-module_uploadingIcon__uSwpq","uploadingText":"ImageUpload-module_uploadingText__t0BkQ","preview":"ImageUpload-module_preview__CqJi-","imagePreview":"ImageUpload-module_imagePreview__22wJp","previewImage":"ImageUpload-module_previewImage__FpdIn","pdfPreview":"ImageUpload-module_pdfPreview__D6OCc","pdfIcon":"ImageUpload-module_pdfIcon__DIdkd","pdfLabel":"ImageUpload-module_pdfLabel__Ff-Al","linkGroup":"ImageUpload-module_linkGroup__mZFWH","linkPrimary":"ImageUpload-module_linkPrimary__byUBf","linkSecondary":"ImageUpload-module_linkSecondary__2E4IZ","actions":"ImageUpload-module_actions__hX2N3","prompt":"ImageUpload-module_prompt__Cm0R6","uploadIcon":"ImageUpload-module_uploadIcon__g9U0X","promptText":"ImageUpload-module_promptText__-d7wp","promptAction":"ImageUpload-module_promptAction__qFDjq","helperText":"ImageUpload-module_helperText__AbZRs","error":"ImageUpload-module_error__TBlHx","errorTitle":"ImageUpload-module_errorTitle__ktusO","errorMessage":"ImageUpload-module_errorMessage__RTkNU"};
497
+ styleInject(css_248z);
498
+
499
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
500
+ const interpolate = (template, values) => template.replace(/\{(\w+)\}/g, (_, key) => String(values[key] ?? ""));
501
+ const ImageUpload = ({ label, currentImageUrl, onUpload, onRemove, maxSizeMB = 5, acceptedFormats = ["image/jpeg", "image/png", "image/svg+xml"], previewWidth = 200, previewHeight = 200, className = "", disabled = false, labels, }) => {
502
+ const displayLabel = label || labels.uploadImage;
503
+ const [preview, setPreview] = n$1.useState(currentImageUrl || null);
504
+ const [uploading, setUploading] = n$1.useState(false);
505
+ const [error, setError] = n$1.useState(null);
506
+ const [dragActive, setDragActive] = n$1.useState(false);
507
+ const fileInputRef = n$1.useRef(null);
508
+ // Sync preview with currentImageUrl prop
509
+ n$1.useEffect(() => {
510
+ setPreview(currentImageUrl || null);
511
+ }, [currentImageUrl]);
512
+ const formatFileSize = (bytes) => (bytes / (1024 * 1024)).toFixed(2);
513
+ const validateFile = (file) => {
514
+ // Check file type
515
+ if (!acceptedFormats.includes(file.type)) {
516
+ const formats = acceptedFormats.join(", ");
517
+ return interpolate(labels.invalidFileType, { formats });
518
+ }
519
+ // Check file size
520
+ const fileSizeMB = file.size / (1024 * 1024);
521
+ if (fileSizeMB > maxSizeMB) {
522
+ return interpolate(labels.fileSizeExceeded, {
523
+ size: formatFileSize(file.size),
524
+ maxSize: maxSizeMB,
525
+ });
526
+ }
527
+ return null;
528
+ };
529
+ const handleFileChange = async (file) => {
530
+ setError(null);
531
+ // Validate file
532
+ const validationError = validateFile(file);
533
+ if (validationError) {
534
+ setError(validationError);
535
+ return;
536
+ }
537
+ // Create preview (only for images, not PDFs)
538
+ if (file.type.startsWith("image/")) {
539
+ const reader = new FileReader();
540
+ reader.onloadend = () => {
541
+ setPreview(reader.result);
542
+ };
543
+ reader.readAsDataURL(file);
544
+ }
545
+ else {
546
+ // For PDFs, just set a placeholder to indicate file is selected
547
+ setPreview("PDF_PLACEHOLDER");
548
+ }
549
+ // Upload file
550
+ try {
551
+ setUploading(true);
552
+ await onUpload(file);
553
+ }
554
+ catch (err) {
555
+ setError(err instanceof Error ? err.message : labels.uploadFailed);
556
+ setPreview(currentImageUrl || null);
557
+ }
558
+ finally {
559
+ setUploading(false);
560
+ }
561
+ };
562
+ const handleInputChange = (e) => {
563
+ const file = e.target.files?.[0];
564
+ if (file) {
565
+ handleFileChange(file);
566
+ }
567
+ };
568
+ const handleDrag = (e) => {
569
+ e.preventDefault();
570
+ e.stopPropagation();
571
+ if (e.type === "dragenter" || e.type === "dragover") {
572
+ setDragActive(true);
573
+ }
574
+ else if (e.type === "dragleave") {
575
+ setDragActive(false);
576
+ }
577
+ };
578
+ const handleDrop = (e) => {
579
+ e.preventDefault();
580
+ e.stopPropagation();
581
+ setDragActive(false);
582
+ const file = e.dataTransfer.files?.[0];
583
+ if (file) {
584
+ handleFileChange(file);
585
+ }
586
+ };
587
+ const handleRemove = async () => {
588
+ if (onRemove) {
589
+ try {
590
+ setUploading(true);
591
+ await onRemove();
592
+ setPreview(null);
593
+ if (fileInputRef.current) {
594
+ fileInputRef.current.value = "";
595
+ }
596
+ }
597
+ catch (err) {
598
+ setError(err instanceof Error ? err.message : labels.removeFailed);
599
+ }
600
+ finally {
601
+ setUploading(false);
602
+ }
603
+ }
604
+ };
605
+ const handleClick = () => {
606
+ if (!disabled) {
607
+ fileInputRef.current?.click();
608
+ }
609
+ };
610
+ return (jsxRuntimeExports.jsxs("div", { className: classNames(styles.container, className), "data-testid": "image-upload", children: [jsxRuntimeExports.jsx("label", { className: styles.label, children: displayLabel }), jsxRuntimeExports.jsxs("div", { className: styles.content, children: [jsxRuntimeExports.jsxs("div", { onDragEnter: handleDrag, onDragLeave: handleDrag, onDragOver: handleDrag, onDrop: handleDrop, onClick: handleClick, className: classNames(styles.dropzone, dragActive && styles.dropzoneActive, disabled && styles.dropzoneDisabled, Boolean(preview) && styles.dropzoneFilled), "data-testid": "image-upload-dropzone", children: [jsxRuntimeExports.jsx("input", { ref: fileInputRef, type: "file", onChange: handleInputChange, accept: acceptedFormats.join(","), className: styles.inputHidden, disabled: disabled || uploading, "data-testid": "image-upload-input" }), uploading ? (jsxRuntimeExports.jsxs("div", { className: styles.uploading, children: [jsxRuntimeExports.jsx(He, { size: "lg", className: styles.uploadingIcon }), jsxRuntimeExports.jsx("p", { className: styles.uploadingText, children: labels.uploading })] })) : preview ? (jsxRuntimeExports.jsxs("div", { className: styles.preview, children: [preview.endsWith(".pdf") ||
611
+ preview === "PDF_PLACEHOLDER" ||
612
+ currentImageUrl?.endsWith(".pdf") ? (
613
+ // PDF preview
614
+ jsxRuntimeExports.jsxs("div", { className: styles.pdfPreview, children: [jsxRuntimeExports.jsx(T, { className: styles.pdfIcon }), jsxRuntimeExports.jsx("p", { className: styles.pdfLabel, children: labels.pdfDocument }), currentImageUrl && (jsxRuntimeExports.jsxs("div", { className: styles.linkGroup, children: [jsxRuntimeExports.jsx("a", { href: currentImageUrl, target: "_blank", rel: "noopener noreferrer", className: styles.linkPrimary, onClick: (e) => e.stopPropagation(), children: labels.viewDocument }), jsxRuntimeExports.jsx("a", { href: currentImageUrl, download: true, target: "_blank", rel: "noopener noreferrer", className: styles.linkSecondary, onClick: (e) => e.stopPropagation(), children: labels.downloadDocument })] }))] })) : (
615
+ // Image preview
616
+ jsxRuntimeExports.jsxs("div", { className: styles.imagePreview, children: [jsxRuntimeExports.jsx("img", { src: preview, alt: labels.previewAltText, style: { maxWidth: previewWidth, maxHeight: previewHeight }, className: styles.previewImage }), currentImageUrl && (jsxRuntimeExports.jsxs("div", { className: styles.linkGroup, children: [jsxRuntimeExports.jsx("a", { href: currentImageUrl, target: "_blank", rel: "noopener noreferrer", className: styles.linkPrimary, onClick: (e) => e.stopPropagation(), children: labels.viewDocument }), jsxRuntimeExports.jsx("a", { href: currentImageUrl, download: true, target: "_blank", rel: "noopener noreferrer", className: styles.linkSecondary, onClick: (e) => e.stopPropagation(), children: labels.downloadImage })] }))] })), jsxRuntimeExports.jsxs("div", { className: styles.actions, children: [jsxRuntimeExports.jsx(m, { type: "button", variant: "outlined", color: "secondary", size: "small", onClick: (event) => {
617
+ event.stopPropagation();
618
+ handleClick();
619
+ }, disabled: disabled, children: labels.changeImage }), onRemove && (jsxRuntimeExports.jsx(m, { type: "button", variant: "outlined", color: "warning", size: "small", onClick: (event) => {
620
+ event.stopPropagation();
621
+ handleRemove();
622
+ }, disabled: disabled, children: labels.remove }))] })] })) : (jsxRuntimeExports.jsxs("div", { className: styles.prompt, children: [jsxRuntimeExports.jsx(Oe, { className: styles.uploadIcon }), jsxRuntimeExports.jsxs("p", { className: styles.promptText, children: [jsxRuntimeExports.jsx("span", { className: styles.promptAction, children: labels.clickToUpload }), " ", labels.dragAndDrop] }), jsxRuntimeExports.jsxs("p", { className: styles.helperText, children: [acceptedFormats
623
+ .map((format) => format.split("/")[1].toUpperCase())
624
+ .join(", "), " ", labels.upTo, " ", maxSizeMB, "MB"] })] }))] }), error && (jsxRuntimeExports.jsxs("div", { className: styles.error, children: [jsxRuntimeExports.jsx("h3", { className: styles.errorTitle, children: labels.uploadError }), jsxRuntimeExports.jsx("p", { className: styles.errorMessage, children: error })] }))] })] }));
625
+ };
626
+
627
+ module.exports = ImageUpload;