styllar-react-plugin 1.0.1 → 1.0.2

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.
@@ -1,5 +1,5 @@
1
- import ze, { useState as F, useEffect as fr } from "react";
2
- var fe = { exports: {} }, J = {};
1
+ import Le, { useState as I, useEffect as pr } from "react";
2
+ var de = { exports: {} }, J = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,19 +9,19 @@ var fe = { exports: {} }, J = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Ae;
13
- function dr() {
14
- if (Ae) return J;
15
- Ae = 1;
16
- var z = ze, k = Symbol.for("react.element"), P = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, $ = z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, W = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function C(j, v, N) {
18
- var p, S = {}, T = null, L = null;
19
- N !== void 0 && (T = "" + N), v.key !== void 0 && (T = "" + v.key), v.ref !== void 0 && (L = v.ref);
20
- for (p in v) R.call(v, p) && !W.hasOwnProperty(p) && (S[p] = v[p]);
21
- if (j && j.defaultProps) for (p in v = j.defaultProps, v) S[p] === void 0 && (S[p] = v[p]);
22
- return { $$typeof: k, type: j, key: T, ref: L, props: S, _owner: $.current };
12
+ var ze;
13
+ function vr() {
14
+ if (ze) return J;
15
+ ze = 1;
16
+ var S = Le, _ = Symbol.for("react.element"), f = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, E = S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, D = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function F(O, y, N) {
18
+ var h, P = {}, C = null, z = null;
19
+ N !== void 0 && (C = "" + N), y.key !== void 0 && (C = "" + y.key), y.ref !== void 0 && (z = y.ref);
20
+ for (h in y) g.call(y, h) && !D.hasOwnProperty(h) && (P[h] = y[h]);
21
+ if (O && O.defaultProps) for (h in y = O.defaultProps, y) P[h] === void 0 && (P[h] = y[h]);
22
+ return { $$typeof: _, type: O, key: C, ref: z, props: P, _owner: E.current };
23
23
  }
24
- return J.Fragment = P, J.jsx = C, J.jsxs = C, J;
24
+ return J.Fragment = f, J.jsx = F, J.jsxs = F, J;
25
25
  }
26
26
  var K = {};
27
27
  /**
@@ -33,91 +33,91 @@ var K = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var Ie;
37
- function vr() {
38
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
39
- var z = ze, k = Symbol.for("react.element"), P = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), j = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), U = Symbol.iterator, Q = "@@iterator";
40
- function ee(e) {
36
+ var $e;
37
+ function mr() {
38
+ return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var S = Le, _ = Symbol.for("react.element"), f = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), F = Symbol.for("react.provider"), O = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), M = Symbol.iterator, B = "@@iterator";
40
+ function q(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = U && e[U] || e[Q];
43
+ var r = M && e[M] || e[B];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
- var O = z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function m(e) {
46
+ var A = S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function x(e) {
48
48
  {
49
49
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
50
  t[n - 1] = arguments[n];
51
- re("error", e, t);
51
+ ee("error", e, t);
52
52
  }
53
53
  }
54
- function re(e, r, t) {
54
+ function ee(e, r, t) {
55
55
  {
56
- var n = O.ReactDebugCurrentFrame, s = n.getStackAddendum();
57
- s !== "" && (r += "%s", t = t.concat([s]));
56
+ var n = A.ReactDebugCurrentFrame, l = n.getStackAddendum();
57
+ l !== "" && (r += "%s", t = t.concat([l]));
58
58
  var c = t.map(function(i) {
59
59
  return String(i);
60
60
  });
61
61
  c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
62
62
  }
63
63
  }
64
- var te = !1, o = !1, h = !1, f = !1, y = !1, g;
65
- g = Symbol.for("react.module.reference");
66
- function _(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === R || e === W || y || e === $ || e === N || e === p || f || e === L || te || o || h || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === S || e.$$typeof === C || e.$$typeof === j || e.$$typeof === v || // This needs to include all possible module reference object
64
+ var re = !1, te = !1, X = !1, ne = !1, s = !1, u;
65
+ u = Symbol.for("react.module.reference");
66
+ function p(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === g || e === D || s || e === E || e === N || e === h || ne || e === z || re || te || X || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === P || e.$$typeof === F || e.$$typeof === O || e.$$typeof === y || // This needs to include all possible module reference object
68
68
  // types supported by any Flight configuration anywhere since
69
69
  // we don't know which Flight build this will end up being used
70
70
  // with.
71
- e.$$typeof === g || e.getModuleId !== void 0));
71
+ e.$$typeof === u || e.getModuleId !== void 0));
72
72
  }
73
- function E(e, r, t) {
73
+ function j(e, r, t) {
74
74
  var n = e.displayName;
75
75
  if (n)
76
76
  return n;
77
- var s = r.displayName || r.name || "";
78
- return s !== "" ? t + "(" + s + ")" : t;
77
+ var l = r.displayName || r.name || "";
78
+ return l !== "" ? t + "(" + l + ")" : t;
79
79
  }
80
- function V(e) {
80
+ function w(e) {
81
81
  return e.displayName || "Context";
82
82
  }
83
- function D(e) {
83
+ function v(e) {
84
84
  if (e == null)
85
85
  return null;
86
- if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
86
+ if (typeof e.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
87
  return e.displayName || e.name || null;
88
88
  if (typeof e == "string")
89
89
  return e;
90
90
  switch (e) {
91
- case R:
91
+ case g:
92
92
  return "Fragment";
93
- case P:
93
+ case f:
94
94
  return "Portal";
95
- case W:
95
+ case D:
96
96
  return "Profiler";
97
- case $:
97
+ case E:
98
98
  return "StrictMode";
99
99
  case N:
100
100
  return "Suspense";
101
- case p:
101
+ case h:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
- case j:
106
+ case O:
107
107
  var r = e;
108
- return V(r) + ".Consumer";
109
- case C:
108
+ return w(r) + ".Consumer";
109
+ case F:
110
110
  var t = e;
111
- return V(t._context) + ".Provider";
112
- case v:
113
- return E(e, e.render, "ForwardRef");
114
- case S:
111
+ return w(t._context) + ".Provider";
112
+ case y:
113
+ return j(e, e.render, "ForwardRef");
114
+ case P:
115
115
  var n = e.displayName || null;
116
- return n !== null ? n : D(e.type) || "Memo";
117
- case T: {
118
- var s = e, c = s._payload, i = s._init;
116
+ return n !== null ? n : v(e.type) || "Memo";
117
+ case C: {
118
+ var l = e, c = l._payload, i = l._init;
119
119
  try {
120
- return D(i(c));
120
+ return v(i(c));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,18 +125,18 @@ function vr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var A = Object.assign, q = 0, de, ve, pe, me, ge, he, be;
129
- function ye() {
128
+ var b = Object.assign, $ = 0, ve, me, ge, he, be, ye, xe;
129
+ function _e() {
130
130
  }
131
- ye.__reactDisabledLog = !0;
132
- function $e() {
131
+ _e.__reactDisabledLog = !0;
132
+ function We() {
133
133
  {
134
- if (q === 0) {
135
- de = console.log, ve = console.info, pe = console.warn, me = console.error, ge = console.group, he = console.groupCollapsed, be = console.groupEnd;
134
+ if ($ === 0) {
135
+ ve = console.log, me = console.info, ge = console.warn, he = console.error, be = console.group, ye = console.groupCollapsed, xe = console.groupEnd;
136
136
  var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
139
- value: ye,
139
+ value: _e,
140
140
  writable: !0
141
141
  };
142
142
  Object.defineProperties(console, {
@@ -149,77 +149,77 @@ function vr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- q++;
152
+ $++;
153
153
  }
154
154
  }
155
- function We() {
155
+ function Me() {
156
156
  {
157
- if (q--, q === 0) {
157
+ if ($--, $ === 0) {
158
158
  var e = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
161
161
  writable: !0
162
162
  };
163
163
  Object.defineProperties(console, {
164
- log: A({}, e, {
165
- value: de
166
- }),
167
- info: A({}, e, {
164
+ log: b({}, e, {
168
165
  value: ve
169
166
  }),
170
- warn: A({}, e, {
171
- value: pe
172
- }),
173
- error: A({}, e, {
167
+ info: b({}, e, {
174
168
  value: me
175
169
  }),
176
- group: A({}, e, {
170
+ warn: b({}, e, {
177
171
  value: ge
178
172
  }),
179
- groupCollapsed: A({}, e, {
173
+ error: b({}, e, {
180
174
  value: he
181
175
  }),
182
- groupEnd: A({}, e, {
176
+ group: b({}, e, {
183
177
  value: be
178
+ }),
179
+ groupCollapsed: b({}, e, {
180
+ value: ye
181
+ }),
182
+ groupEnd: b({}, e, {
183
+ value: xe
184
184
  })
185
185
  });
186
186
  }
187
- q < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ $ < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var ne = O.ReactCurrentDispatcher, ae;
191
- function X(e, r, t) {
190
+ var ae = A.ReactCurrentDispatcher, oe;
191
+ function G(e, r, t) {
192
192
  {
193
- if (ae === void 0)
193
+ if (oe === void 0)
194
194
  try {
195
195
  throw Error();
196
- } catch (s) {
197
- var n = s.stack.trim().match(/\n( *(at )?)/);
198
- ae = n && n[1] || "";
196
+ } catch (l) {
197
+ var n = l.stack.trim().match(/\n( *(at )?)/);
198
+ oe = n && n[1] || "";
199
199
  }
200
200
  return `
201
- ` + ae + e;
201
+ ` + oe + e;
202
202
  }
203
203
  }
204
- var oe = !1, G;
204
+ var ie = !1, H;
205
205
  {
206
- var Le = typeof WeakMap == "function" ? WeakMap : Map;
207
- G = new Le();
206
+ var Ue = typeof WeakMap == "function" ? WeakMap : Map;
207
+ H = new Ue();
208
208
  }
209
- function xe(e, r) {
210
- if (!e || oe)
209
+ function Ee(e, r) {
210
+ if (!e || ie)
211
211
  return "";
212
212
  {
213
- var t = G.get(e);
213
+ var t = H.get(e);
214
214
  if (t !== void 0)
215
215
  return t;
216
216
  }
217
217
  var n;
218
- oe = !0;
219
- var s = Error.prepareStackTrace;
218
+ ie = !0;
219
+ var l = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var c;
222
- c = ne.current, ne.current = null, $e();
222
+ c = ae.current, ae.current = null, We();
223
223
  try {
224
224
  if (r) {
225
225
  var i = function() {
@@ -232,167 +232,167 @@ function vr() {
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
234
  Reflect.construct(i, []);
235
- } catch (x) {
236
- n = x;
235
+ } catch (T) {
236
+ n = T;
237
237
  }
238
238
  Reflect.construct(e, [], i);
239
239
  } else {
240
240
  try {
241
241
  i.call();
242
- } catch (x) {
243
- n = x;
242
+ } catch (T) {
243
+ n = T;
244
244
  }
245
245
  e.call(i.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (x) {
251
- n = x;
250
+ } catch (T) {
251
+ n = T;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (x) {
256
- if (x && n && typeof x.stack == "string") {
257
- for (var a = x.stack.split(`
258
- `), b = n.stack.split(`
259
- `), u = a.length - 1, d = b.length - 1; u >= 1 && d >= 0 && a[u] !== b[d]; )
260
- d--;
261
- for (; u >= 1 && d >= 0; u--, d--)
262
- if (a[u] !== b[d]) {
263
- if (u !== 1 || d !== 1)
255
+ } catch (T) {
256
+ if (T && n && typeof T.stack == "string") {
257
+ for (var a = T.stack.split(`
258
+ `), R = n.stack.split(`
259
+ `), d = a.length - 1, m = R.length - 1; d >= 1 && m >= 0 && a[d] !== R[m]; )
260
+ m--;
261
+ for (; d >= 1 && m >= 0; d--, m--)
262
+ if (a[d] !== R[m]) {
263
+ if (d !== 1 || m !== 1)
264
264
  do
265
- if (u--, d--, d < 0 || a[u] !== b[d]) {
266
- var w = `
267
- ` + a[u].replace(" at new ", " at ");
268
- return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, w), w;
265
+ if (d--, m--, m < 0 || a[d] !== R[m]) {
266
+ var k = `
267
+ ` + a[d].replace(" at new ", " at ");
268
+ return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && H.set(e, k), k;
269
269
  }
270
- while (u >= 1 && d >= 0);
270
+ while (d >= 1 && m >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- oe = !1, ne.current = c, We(), Error.prepareStackTrace = s;
275
+ ie = !1, ae.current = c, Me(), Error.prepareStackTrace = l;
276
276
  }
277
- var M = e ? e.displayName || e.name : "", I = M ? X(M) : "";
278
- return typeof e == "function" && G.set(e, I), I;
277
+ var Y = e ? e.displayName || e.name : "", L = Y ? G(Y) : "";
278
+ return typeof e == "function" && H.set(e, L), L;
279
279
  }
280
280
  function Ye(e, r, t) {
281
- return xe(e, !1);
281
+ return Ee(e, !1);
282
282
  }
283
- function Me(e) {
283
+ function Be(e) {
284
284
  var r = e.prototype;
285
285
  return !!(r && r.isReactComponent);
286
286
  }
287
- function H(e, r, t) {
287
+ function Z(e, r, t) {
288
288
  if (e == null)
289
289
  return "";
290
290
  if (typeof e == "function")
291
- return xe(e, Me(e));
291
+ return Ee(e, Be(e));
292
292
  if (typeof e == "string")
293
- return X(e);
293
+ return G(e);
294
294
  switch (e) {
295
295
  case N:
296
- return X("Suspense");
297
- case p:
298
- return X("SuspenseList");
296
+ return G("Suspense");
297
+ case h:
298
+ return G("SuspenseList");
299
299
  }
300
300
  if (typeof e == "object")
301
301
  switch (e.$$typeof) {
302
- case v:
302
+ case y:
303
303
  return Ye(e.render);
304
- case S:
305
- return H(e.type, r, t);
306
- case T: {
307
- var n = e, s = n._payload, c = n._init;
304
+ case P:
305
+ return Z(e.type, r, t);
306
+ case C: {
307
+ var n = e, l = n._payload, c = n._init;
308
308
  try {
309
- return H(c(s), r, t);
309
+ return Z(c(l), r, t);
310
310
  } catch {
311
311
  }
312
312
  }
313
313
  }
314
314
  return "";
315
315
  }
316
- var B = Object.prototype.hasOwnProperty, _e = {}, Ee = O.ReactDebugCurrentFrame;
317
- function Z(e) {
316
+ var V = Object.prototype.hasOwnProperty, we = {}, Re = A.ReactDebugCurrentFrame;
317
+ function Q(e) {
318
318
  if (e) {
319
- var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
320
- Ee.setExtraStackFrame(t);
319
+ var r = e._owner, t = Z(e.type, e._source, r ? r.type : null);
320
+ Re.setExtraStackFrame(t);
321
321
  } else
322
- Ee.setExtraStackFrame(null);
322
+ Re.setExtraStackFrame(null);
323
323
  }
324
- function Ue(e, r, t, n, s) {
324
+ function qe(e, r, t, n, l) {
325
325
  {
326
- var c = Function.call.bind(B);
326
+ var c = Function.call.bind(V);
327
327
  for (var i in e)
328
328
  if (c(e, i)) {
329
329
  var a = void 0;
330
330
  try {
331
331
  if (typeof e[i] != "function") {
332
- var b = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw b.name = "Invariant Violation", b;
332
+ var R = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw R.name = "Invariant Violation", R;
334
334
  }
335
335
  a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (u) {
337
- a = u;
336
+ } catch (d) {
337
+ a = d;
338
338
  }
339
- a && !(a instanceof Error) && (Z(s), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), Z(null)), a instanceof Error && !(a.message in _e) && (_e[a.message] = !0, Z(s), m("Failed %s type: %s", t, a.message), Z(null));
339
+ a && !(a instanceof Error) && (Q(l), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), Q(null)), a instanceof Error && !(a.message in we) && (we[a.message] = !0, Q(l), x("Failed %s type: %s", t, a.message), Q(null));
340
340
  }
341
341
  }
342
342
  }
343
343
  var Ve = Array.isArray;
344
- function ie(e) {
344
+ function se(e) {
345
345
  return Ve(e);
346
346
  }
347
- function qe(e) {
347
+ function Je(e) {
348
348
  {
349
349
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
350
  return t;
351
351
  }
352
352
  }
353
- function Be(e) {
353
+ function Ke(e) {
354
354
  try {
355
- return Re(e), !1;
355
+ return Se(e), !1;
356
356
  } catch {
357
357
  return !0;
358
358
  }
359
359
  }
360
- function Re(e) {
360
+ function Se(e) {
361
361
  return "" + e;
362
362
  }
363
- function we(e) {
364
- if (Be(e))
365
- return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), Re(e);
363
+ function je(e) {
364
+ if (Ke(e))
365
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), Se(e);
366
366
  }
367
- var Se = O.ReactCurrentOwner, Je = {
367
+ var Te = A.ReactCurrentOwner, Xe = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, je, Te;
373
- function Ke(e) {
374
- if (B.call(e, "ref")) {
372
+ }, Pe, Ce;
373
+ function Ge(e) {
374
+ if (V.call(e, "ref")) {
375
375
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
376
  if (r && r.isReactWarning)
377
377
  return !1;
378
378
  }
379
379
  return e.ref !== void 0;
380
380
  }
381
- function Xe(e) {
382
- if (B.call(e, "key")) {
381
+ function He(e) {
382
+ if (V.call(e, "key")) {
383
383
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
384
  if (r && r.isReactWarning)
385
385
  return !1;
386
386
  }
387
387
  return e.key !== void 0;
388
388
  }
389
- function Ge(e, r) {
390
- typeof e.ref == "string" && Se.current;
389
+ function Ze(e, r) {
390
+ typeof e.ref == "string" && Te.current;
391
391
  }
392
- function He(e, r) {
392
+ function Qe(e, r) {
393
393
  {
394
394
  var t = function() {
395
- je || (je = !0, m("%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://reactjs.org/link/special-props)", r));
395
+ Pe || (Pe = !0, x("%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://reactjs.org/link/special-props)", r));
396
396
  };
397
397
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
398
  get: t,
@@ -400,10 +400,10 @@ function vr() {
400
400
  });
401
401
  }
402
402
  }
403
- function Ze(e, r) {
403
+ function er(e, r) {
404
404
  {
405
405
  var t = function() {
406
- Te || (Te = !0, m("%s: `ref` 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://reactjs.org/link/special-props)", r));
406
+ Ce || (Ce = !0, x("%s: `ref` 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://reactjs.org/link/special-props)", r));
407
407
  };
408
408
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
409
  get: t,
@@ -411,10 +411,10 @@ function vr() {
411
411
  });
412
412
  }
413
413
  }
414
- var Qe = function(e, r, t, n, s, c, i) {
414
+ var rr = function(e, r, t, n, l, c, i) {
415
415
  var a = {
416
416
  // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: k,
417
+ $$typeof: _,
418
418
  // Built-in properties that belong on the element
419
419
  type: e,
420
420
  key: r,
@@ -437,44 +437,44 @@ function vr() {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !1,
440
- value: s
440
+ value: l
441
441
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
442
  };
443
- function er(e, r, t, n, s) {
443
+ function tr(e, r, t, n, l) {
444
444
  {
445
- var c, i = {}, a = null, b = null;
446
- t !== void 0 && (we(t), a = "" + t), Xe(r) && (we(r.key), a = "" + r.key), Ke(r) && (b = r.ref, Ge(r, s));
445
+ var c, i = {}, a = null, R = null;
446
+ t !== void 0 && (je(t), a = "" + t), He(r) && (je(r.key), a = "" + r.key), Ge(r) && (R = r.ref, Ze(r, l));
447
447
  for (c in r)
448
- B.call(r, c) && !Je.hasOwnProperty(c) && (i[c] = r[c]);
448
+ V.call(r, c) && !Xe.hasOwnProperty(c) && (i[c] = r[c]);
449
449
  if (e && e.defaultProps) {
450
- var u = e.defaultProps;
451
- for (c in u)
452
- i[c] === void 0 && (i[c] = u[c]);
450
+ var d = e.defaultProps;
451
+ for (c in d)
452
+ i[c] === void 0 && (i[c] = d[c]);
453
453
  }
454
- if (a || b) {
455
- var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && He(i, d), b && Ze(i, d);
454
+ if (a || R) {
455
+ var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ a && Qe(i, m), R && er(i, m);
457
457
  }
458
- return Qe(e, a, b, s, n, Se.current, i);
458
+ return rr(e, a, R, l, n, Te.current, i);
459
459
  }
460
460
  }
461
- var se = O.ReactCurrentOwner, Ce = O.ReactDebugCurrentFrame;
462
- function Y(e) {
461
+ var le = A.ReactCurrentOwner, ke = A.ReactDebugCurrentFrame;
462
+ function U(e) {
463
463
  if (e) {
464
- var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
465
- Ce.setExtraStackFrame(t);
464
+ var r = e._owner, t = Z(e.type, e._source, r ? r.type : null);
465
+ ke.setExtraStackFrame(t);
466
466
  } else
467
- Ce.setExtraStackFrame(null);
467
+ ke.setExtraStackFrame(null);
468
468
  }
469
- var le;
470
- le = !1;
471
- function ce(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === k;
469
+ var ce;
470
+ ce = !1;
471
+ function ue(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === _;
473
473
  }
474
474
  function Oe() {
475
475
  {
476
- if (se.current) {
477
- var e = D(se.current.type);
476
+ if (le.current) {
477
+ var e = v(le.current.type);
478
478
  if (e)
479
479
  return `
480
480
 
@@ -483,11 +483,11 @@ Check the render method of \`` + e + "`.";
483
483
  return "";
484
484
  }
485
485
  }
486
- function rr(e) {
486
+ function nr(e) {
487
487
  return "";
488
488
  }
489
- var ke = {};
490
- function tr(e) {
489
+ var De = {};
490
+ function ar(e) {
491
491
  {
492
492
  var r = Oe();
493
493
  if (!r) {
@@ -499,39 +499,39 @@ Check the top-level render call using <` + t + ">.");
499
499
  return r;
500
500
  }
501
501
  }
502
- function Pe(e, r) {
502
+ function Ne(e, r) {
503
503
  {
504
504
  if (!e._store || e._store.validated || e.key != null)
505
505
  return;
506
506
  e._store.validated = !0;
507
- var t = tr(r);
508
- if (ke[t])
507
+ var t = ar(r);
508
+ if (De[t])
509
509
  return;
510
- ke[t] = !0;
510
+ De[t] = !0;
511
511
  var n = "";
512
- e && e._owner && e._owner !== se.current && (n = " It was passed a child from " + D(e._owner.type) + "."), Y(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), Y(null);
512
+ e && e._owner && e._owner !== le.current && (n = " It was passed a child from " + v(e._owner.type) + "."), U(e), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), U(null);
513
513
  }
514
514
  }
515
- function Ne(e, r) {
515
+ function Ae(e, r) {
516
516
  {
517
517
  if (typeof e != "object")
518
518
  return;
519
- if (ie(e))
519
+ if (se(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var n = e[t];
522
- ce(n) && Pe(n, r);
522
+ ue(n) && Ne(n, r);
523
523
  }
524
- else if (ce(e))
524
+ else if (ue(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var s = ee(e);
528
- if (typeof s == "function" && s !== e.entries)
529
- for (var c = s.call(e), i; !(i = c.next()).done; )
530
- ce(i.value) && Pe(i.value, r);
527
+ var l = q(e);
528
+ if (typeof l == "function" && l !== e.entries)
529
+ for (var c = l.call(e), i; !(i = c.next()).done; )
530
+ ue(i.value) && Ne(i.value, r);
531
531
  }
532
532
  }
533
533
  }
534
- function nr(e) {
534
+ function or(e) {
535
535
  {
536
536
  var r = e.type;
537
537
  if (r == null || typeof r == "string")
@@ -539,262 +539,319 @@ Check the top-level render call using <` + t + ">.");
539
539
  var t;
540
540
  if (typeof r == "function")
541
541
  t = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
542
+ else if (typeof r == "object" && (r.$$typeof === y || // Note: Memo only checks outer props here.
543
543
  // Inner props are checked in the reconciler.
544
- r.$$typeof === S))
544
+ r.$$typeof === P))
545
545
  t = r.propTypes;
546
546
  else
547
547
  return;
548
548
  if (t) {
549
- var n = D(r);
550
- Ue(t, e.props, "prop", n, e);
551
- } else if (r.PropTypes !== void 0 && !le) {
552
- le = !0;
553
- var s = D(r);
554
- m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
549
+ var n = v(r);
550
+ qe(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !ce) {
552
+ ce = !0;
553
+ var l = v(r);
554
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
555
555
  }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
557
  }
558
558
  }
559
- function ar(e) {
559
+ function ir(e) {
560
560
  {
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var n = r[t];
563
563
  if (n !== "children" && n !== "key") {
564
- Y(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), Y(null);
564
+ U(e), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), U(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (Y(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
568
+ e.ref !== null && (U(e), x("Invalid attribute `ref` supplied to `React.Fragment`."), U(null));
569
569
  }
570
570
  }
571
- var De = {};
572
- function Fe(e, r, t, n, s, c) {
571
+ var Fe = {};
572
+ function Ie(e, r, t, n, l, c) {
573
573
  {
574
- var i = _(e);
574
+ var i = p(e);
575
575
  if (!i) {
576
576
  var a = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
- var b = rr();
579
- b ? a += b : a += Oe();
580
- var u;
581
- e === null ? u = "null" : ie(e) ? u = "array" : e !== void 0 && e.$$typeof === k ? (u = "<" + (D(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, a);
578
+ var R = nr();
579
+ R ? a += R : a += Oe();
580
+ var d;
581
+ e === null ? d = "null" : se(e) ? d = "array" : e !== void 0 && e.$$typeof === _ ? (d = "<" + (v(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
582
582
  }
583
- var d = er(e, r, t, s, c);
584
- if (d == null)
585
- return d;
583
+ var m = tr(e, r, t, l, c);
584
+ if (m == null)
585
+ return m;
586
586
  if (i) {
587
- var w = r.children;
588
- if (w !== void 0)
587
+ var k = r.children;
588
+ if (k !== void 0)
589
589
  if (n)
590
- if (ie(w)) {
591
- for (var M = 0; M < w.length; M++)
592
- Ne(w[M], e);
593
- Object.freeze && Object.freeze(w);
590
+ if (se(k)) {
591
+ for (var Y = 0; Y < k.length; Y++)
592
+ Ae(k[Y], e);
593
+ Object.freeze && Object.freeze(k);
594
594
  } else
595
- m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
595
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
596
  else
597
- Ne(w, e);
597
+ Ae(k, e);
598
598
  }
599
- if (B.call(r, "key")) {
600
- var I = D(e), x = Object.keys(r).filter(function(ur) {
601
- return ur !== "key";
602
- }), ue = x.length > 0 ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!De[I + ue]) {
604
- var cr = x.length > 0 ? "{" + x.join(": ..., ") + ": ...}" : "{}";
605
- m(`A props object containing a "key" prop is being spread into JSX:
599
+ if (V.call(r, "key")) {
600
+ var L = v(e), T = Object.keys(r).filter(function(dr) {
601
+ return dr !== "key";
602
+ }), fe = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Fe[L + fe]) {
604
+ var fr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
605
+ x(`A props object containing a "key" prop is being spread into JSX:
606
606
  let props = %s;
607
607
  <%s {...props} />
608
608
  React keys must be passed directly to JSX without using spread:
609
609
  let props = %s;
610
- <%s key={someKey} {...props} />`, ue, I, cr, I), De[I + ue] = !0;
610
+ <%s key={someKey} {...props} />`, fe, L, fr, L), Fe[L + fe] = !0;
611
611
  }
612
612
  }
613
- return e === R ? ar(d) : nr(d), d;
613
+ return e === g ? ir(m) : or(m), m;
614
614
  }
615
615
  }
616
- function or(e, r, t) {
617
- return Fe(e, r, t, !0);
616
+ function sr(e, r, t) {
617
+ return Ie(e, r, t, !0);
618
618
  }
619
- function ir(e, r, t) {
620
- return Fe(e, r, t, !1);
619
+ function lr(e, r, t) {
620
+ return Ie(e, r, t, !1);
621
621
  }
622
- var sr = ir, lr = or;
623
- K.Fragment = R, K.jsx = sr, K.jsxs = lr;
622
+ var cr = lr, ur = sr;
623
+ K.Fragment = g, K.jsx = cr, K.jsxs = ur;
624
624
  }()), K;
625
625
  }
626
- process.env.NODE_ENV === "production" ? fe.exports = dr() : fe.exports = vr();
627
- var l = fe.exports;
628
- const mr = () => {
629
- const [z, k] = F(!1), [P, R] = F("idle"), [$, W] = F(""), [C, j] = F(null), [v, N] = F(""), [p, S] = F(""), [T, L] = F(null), [U, Q] = F(null), ee = "http://136.113.197.77:5000/predict/size-from-chart", O = (o) => {
630
- if (!o) return;
631
- const h = () => {
632
- const f = document.querySelectorAll('button, .size-swatch, .size-option, li[role="radio"], div[data-value]');
633
- for (let y of f) {
634
- const g = y.innerText.trim().toUpperCase(), _ = String(o).trim().toUpperCase();
635
- if (g === _ || g === `SIZE ${_}`)
636
- return y.click(), console.log(`Styllar: Successfully auto-selected size ${o}`), !0;
626
+ process.env.NODE_ENV === "production" ? de.exports = vr() : de.exports = mr();
627
+ var o = de.exports;
628
+ const gr = "StyllarDB", W = "user_profile", pe = () => new Promise((S, _) => {
629
+ const f = indexedDB.open(gr, 1);
630
+ f.onupgradeneeded = (g) => g.target.result.createObjectStore(W), f.onsuccess = () => S(f.result), f.onerror = () => _(f.error);
631
+ }), hr = async (S) => {
632
+ const _ = await pe();
633
+ return new Promise((f, g) => {
634
+ const D = _.transaction(W, "readwrite").objectStore(W).put(S, "userData");
635
+ D.onsuccess = () => f(), D.onerror = () => g(D.error);
636
+ });
637
+ }, br = async () => {
638
+ const S = await pe();
639
+ return new Promise((_, f) => {
640
+ const E = S.transaction(W, "readonly").objectStore(W).get("userData");
641
+ E.onsuccess = () => _(E.result), E.onerror = () => f(E.error);
642
+ });
643
+ }, yr = async () => {
644
+ const S = await pe();
645
+ return new Promise((_, f) => {
646
+ const E = S.transaction(W, "readwrite").objectStore(W).delete("userData");
647
+ E.onsuccess = () => _(), E.onerror = () => f(E.error);
648
+ });
649
+ }, _r = () => {
650
+ const [S, _] = I(!1), [f, g] = I("idle"), [E, D] = I(""), [F, O] = I(null), [y, N] = I(!1), [h, P] = I(""), [C, z] = I(""), [M, B] = I(null), [q, A] = I(null), x = "http://136.113.197.77:5000/predict/size-from-chart";
651
+ pr(() => {
652
+ (async () => {
653
+ try {
654
+ const u = await br();
655
+ u && u.frontImage && u.sideImage && (P(u.height), z(u.weight), B(u.frontImage), A(u.sideImage), N(!0), console.log("Styllar: Loaded user profile from memory."));
656
+ } catch (u) {
657
+ console.error("Styllar: Failed to load profile", u);
658
+ }
659
+ })();
660
+ }, []);
661
+ const ee = (s) => {
662
+ if (!s) return;
663
+ const u = () => {
664
+ const p = document.querySelectorAll('button, .size-swatch, .size-option, li[role="radio"], div[data-value]');
665
+ for (let j of p) {
666
+ const w = j.innerText.trim().toUpperCase(), v = String(s).trim().toUpperCase();
667
+ if (w === v || w === `SIZE ${v}`)
668
+ return j.click(), !0;
637
669
  }
638
670
  return !1;
639
671
  };
640
- if (!h()) {
641
- let f = 0;
642
- const y = setInterval(() => {
643
- f++, (h() || f > 10) && clearInterval(y);
672
+ if (!u()) {
673
+ let p = 0;
674
+ const j = setInterval(() => {
675
+ p++, (u() || p > 10) && clearInterval(j);
644
676
  }, 500);
645
677
  }
646
678
  };
647
- fr(() => {
648
- typeof chrome < "u" && chrome.storage && chrome.storage.local.get(["styllar_last_size"], (o) => {
649
- o.styllar_last_size && (console.log("Styllar: Found saved size:", o.styllar_last_size), setTimeout(() => O(o.styllar_last_size), 1e3));
650
- });
651
- }, []);
652
- function m() {
653
- var _;
654
- let o = 0, h = 0;
655
- const f = ["pant", "jeans", "trouser", "skirt", "short", "legging", "jogger", "bottom", "denim", "cargo"], y = ["shirt", "top", "tee", "blouse", "jacket", "coat", "hoodie", "sweater", "vest", "cardigan", "dress", "t-shirt"], g = (document.title + " " + (((_ = document.querySelector("h1")) == null ? void 0 : _.innerText) || "")).toLowerCase();
656
- return f.forEach((E) => {
657
- g.includes(E) && (h += 2);
658
- }), y.forEach((E) => {
659
- g.includes(E) && (o += 2);
660
- }), h > o ? "bottom" : "top";
661
- }
662
679
  function re() {
663
- const o = { chart_type: "none", chart_content: null, available_sizes: [] }, h = document.querySelector("table");
664
- if (h && /chest|waist|bust|hip|size/i.test(h.innerText))
665
- return o.chart_type = "html_table", o.chart_content = h.outerHTML, o;
666
- const f = document.querySelectorAll("img");
667
- for (let _ of f) {
668
- const E = _.src.toLowerCase(), V = (_.alt || "").toLowerCase();
669
- if (E.includes("size") && E.includes("chart") || V.includes("size") && V.includes("guide"))
670
- return o.chart_type = "image_url", o.chart_content = _.src, o;
671
- }
672
- const y = document.querySelector('.size-guide, #size-chart, .measurement-guide, [class*="SizeGuide"]');
673
- return y ? (o.chart_type = "raw_text", o.chart_content = y.innerText, o) : (document.querySelectorAll("button, span, li").forEach((_) => {
674
- const E = _.innerText.trim();
675
- /^(XS|S|M|L|XL|XXL|[0-9]{2})$/i.test(E) && E.length < 4 && (o.available_sizes.includes(E) || o.available_sizes.push(E));
676
- }), o);
680
+ var v;
681
+ let s = 0, u = 0;
682
+ const p = ["pant", "jeans", "trouser", "skirt", "short", "legging", "jogger", "bottom", "denim", "cargo"], j = ["shirt", "top", "tee", "blouse", "jacket", "coat", "hoodie", "sweater", "vest", "cardigan", "dress", "t-shirt"], w = (document.title + " " + (((v = document.querySelector("h1")) == null ? void 0 : v.innerText) || "")).toLowerCase();
683
+ return p.forEach((b) => {
684
+ w.includes(b) && (u += 2);
685
+ }), j.forEach((b) => {
686
+ w.includes(b) && (s += 2);
687
+ }), u > s ? "bottom" : "top";
677
688
  }
678
- const te = async () => {
679
- if (!T || !U || !v || !p) {
689
+ function te() {
690
+ const s = { chart_type: "none", chart_content: null, available_sizes: [] }, u = document.querySelector("table");
691
+ if (u && /chest|waist|bust|hip|size/i.test(u.innerText))
692
+ return s.chart_type = "html_table", s.chart_content = u.outerHTML, s;
693
+ const p = document.querySelectorAll("img");
694
+ for (let v of p) {
695
+ const b = v.src.toLowerCase(), $ = (v.alt || "").toLowerCase();
696
+ if (b.includes("size") && b.includes("chart") || $.includes("size") && $.includes("guide"))
697
+ return s.chart_type = "image_url", s.chart_content = v.src, s;
698
+ }
699
+ const j = document.querySelector('.size-guide, #size-chart, .measurement-guide, [class*="SizeGuide"]');
700
+ return j ? (s.chart_type = "raw_text", s.chart_content = j.innerText, s) : (document.querySelectorAll("button, span, li").forEach((v) => {
701
+ const b = v.innerText.trim();
702
+ /^(XS|S|M|L|XL|XXL|[0-9]{2})$/i.test(b) && b.length < 4 && (s.available_sizes.includes(b) || s.available_sizes.push(b));
703
+ }), s);
704
+ }
705
+ const X = async () => {
706
+ if (!M || !q || !h || !C) {
680
707
  alert("Please fill all fields.");
681
708
  return;
682
709
  }
683
- R("loading");
684
- const o = m(), h = re(), f = new FormData();
685
- f.append("front_image", T), f.append("side_image", U), f.append("height", v), f.append("weight", p), f.append("product_type", o), f.append("chart_type", h.chart_type), f.append("chart_content", h.chart_content), f.append("available_sizes", JSON.stringify(h.available_sizes));
710
+ g("loading"), await hr({ height: h, weight: C, frontImage: M, sideImage: q }), N(!0);
711
+ const s = re(), u = te(), p = new FormData();
712
+ p.append("front_image", M), p.append("side_image", q), p.append("height", h), p.append("weight", C), p.append("product_type", s), p.append("chart_type", u.chart_type), p.append("chart_content", u.chart_content), p.append("available_sizes", JSON.stringify(u.available_sizes));
686
713
  try {
687
- const g = await (await fetch(ee, { method: "POST", body: f })).json();
688
- if (g.error) throw new Error(g.error);
689
- j(g), R("success"), g.recommended_size && (O(g.recommended_size), typeof chrome < "u" && chrome.storage && chrome.storage.local.set({ styllar_last_size: g.recommended_size }));
690
- } catch (y) {
691
- W(y.message), R("error");
692
- }
714
+ const w = await (await fetch(x, { method: "POST", body: p })).json();
715
+ if (w.error) throw new Error(w.error);
716
+ O(w), g("success"), w.recommended_size && ee(w.recommended_size);
717
+ } catch (j) {
718
+ D(j.message), g("error");
719
+ }
720
+ }, ne = async () => {
721
+ await yr(), P(""), z(""), B(null), A(null), N(!1), O(null), g("idle");
693
722
  };
694
- return /* @__PURE__ */ l.jsxs("div", { className: "fixed bottom-6 right-6 z-[999999]", children: [
695
- /* @__PURE__ */ l.jsx(
723
+ return /* @__PURE__ */ o.jsxs("div", { className: "fixed bottom-6 right-6 z-[999999]", children: [
724
+ /* @__PURE__ */ o.jsx(
696
725
  "button",
697
726
  {
698
- onClick: () => k(!z),
727
+ onClick: () => _(!S),
699
728
  className: "bg-black text-white px-7 py-3.5 rounded-full shadow-xl font-bold text-sm hover:opacity-80 transition-opacity",
700
729
  children: "Styllar"
701
730
  }
702
731
  ),
703
- z && /* @__PURE__ */ l.jsxs("div", { className: "absolute bottom-20 right-0 w-[330px] bg-white rounded-2xl p-6 shadow-2xl border border-gray-100 text-black", children: [
704
- /* @__PURE__ */ l.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
705
- /* @__PURE__ */ l.jsx("h3", { className: "m-0 text-lg font-bold", children: "Smart Fit Assistant" }),
706
- /* @__PURE__ */ l.jsx("button", { onClick: () => k(!1), className: "text-gray-400 hover:text-black text-2xl leading-none", children: "×" })
732
+ S && /* @__PURE__ */ o.jsxs("div", { className: "absolute bottom-20 right-0 w-[330px] bg-white rounded-2xl p-6 shadow-2xl border border-gray-100 text-black", children: [
733
+ /* @__PURE__ */ o.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
734
+ /* @__PURE__ */ o.jsx("h3", { className: "m-0 text-lg font-bold", children: "Smart Fit Assistant" }),
735
+ /* @__PURE__ */ o.jsx("button", { onClick: () => _(!1), className: "text-gray-400 hover:text-black text-2xl leading-none", children: "×" })
707
736
  ] }),
708
- P === "loading" && /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col items-center justify-center py-8", children: [
709
- /* @__PURE__ */ l.jsx("div", { className: "w-8 h-8 border-4 border-gray-200 border-t-black rounded-full animate-spin mb-4" }),
710
- /* @__PURE__ */ l.jsx("p", { className: "text-sm text-gray-600", children: "Analyzing body & page data..." })
737
+ f === "loading" && /* @__PURE__ */ o.jsxs("div", { className: "flex flex-col items-center justify-center py-8", children: [
738
+ /* @__PURE__ */ o.jsx("div", { className: "w-8 h-8 border-4 border-gray-200 border-t-black rounded-full animate-spin mb-4" }),
739
+ /* @__PURE__ */ o.jsx("p", { className: "text-sm text-gray-600", children: "Analyzing body & page data..." })
711
740
  ] }),
712
- P === "success" && C && /* @__PURE__ */ l.jsxs("div", { className: "text-center py-6", children: [
713
- /* @__PURE__ */ l.jsx("div", { className: "text-sm text-green-600 font-bold tracking-wider", children: "MATCH FOUND" }),
714
- /* @__PURE__ */ l.jsx("div", { className: "text-5xl font-black my-4 text-black", children: C.recommended_size }),
715
- /* @__PURE__ */ l.jsxs("div", { className: "text-xs text-gray-500 mb-6", children: [
741
+ f === "success" && F && /* @__PURE__ */ o.jsxs("div", { className: "text-center py-6", children: [
742
+ /* @__PURE__ */ o.jsx("div", { className: "text-sm text-green-600 font-bold tracking-wider", children: "MATCH FOUND" }),
743
+ /* @__PURE__ */ o.jsx("div", { className: "text-5xl font-black my-4 text-black", children: F.recommended_size }),
744
+ /* @__PURE__ */ o.jsxs("div", { className: "text-xs text-gray-500 mb-6", children: [
716
745
  "Confidence: ",
717
- C.confidence
746
+ F.confidence
718
747
  ] }),
719
- /* @__PURE__ */ l.jsx(
748
+ /* @__PURE__ */ o.jsx(
720
749
  "button",
721
750
  {
722
751
  onClick: () => {
723
- R("idle"), j(null);
752
+ g("idle"), O(null);
724
753
  },
725
754
  className: "text-blue-600 text-sm underline hover:text-blue-800",
726
- children: "Run New Scan"
755
+ children: "Scan Another Product"
727
756
  }
728
757
  )
729
758
  ] }),
730
- P === "error" && /* @__PURE__ */ l.jsxs("div", { className: "py-4", children: [
731
- /* @__PURE__ */ l.jsxs("p", { className: "text-red-500 text-sm mb-4", children: [
759
+ f === "error" && /* @__PURE__ */ o.jsxs("div", { className: "py-4", children: [
760
+ /* @__PURE__ */ o.jsxs("p", { className: "text-red-500 text-sm mb-4", children: [
732
761
  "Error: ",
733
- $
762
+ E
734
763
  ] }),
735
- /* @__PURE__ */ l.jsx(
764
+ /* @__PURE__ */ o.jsx(
736
765
  "button",
737
766
  {
738
- onClick: () => R("idle"),
767
+ onClick: () => g("idle"),
739
768
  className: "w-full bg-black text-white py-3 rounded-xl font-bold text-sm",
740
769
  children: "Try Again"
741
770
  }
742
771
  )
743
772
  ] }),
744
- P === "idle" && /* @__PURE__ */ l.jsxs("div", { children: [
745
- /* @__PURE__ */ l.jsx("p", { className: "text-sm text-gray-600 mb-5 leading-relaxed", children: "Upload photos for a precision body scan." }),
746
- /* @__PURE__ */ l.jsxs("div", { className: "flex gap-3 mb-4", children: [
747
- /* @__PURE__ */ l.jsx(
773
+ f === "idle" && y && /* @__PURE__ */ o.jsxs("div", { className: "py-4", children: [
774
+ /* @__PURE__ */ o.jsxs("div", { className: "bg-gray-50 border border-gray-200 rounded-xl p-4 mb-5 text-center", children: [
775
+ /* @__PURE__ */ o.jsx("span", { className: "block text-xl mb-2", children: "👤" }),
776
+ /* @__PURE__ */ o.jsx("h4", { className: "font-bold text-sm mb-1", children: "Body Profile Saved" }),
777
+ /* @__PURE__ */ o.jsxs("p", { className: "text-xs text-gray-500", children: [
778
+ h,
779
+ "cm | ",
780
+ C,
781
+ "kg"
782
+ ] })
783
+ ] }),
784
+ /* @__PURE__ */ o.jsx(
785
+ "button",
786
+ {
787
+ onClick: X,
788
+ className: "w-full bg-black text-white py-3.5 rounded-xl font-bold text-sm hover:opacity-80 transition-opacity mb-3",
789
+ children: "⚡ Auto-Scan This Product"
790
+ }
791
+ ),
792
+ /* @__PURE__ */ o.jsx(
793
+ "button",
794
+ {
795
+ onClick: ne,
796
+ className: "w-full text-gray-500 text-xs underline hover:text-black",
797
+ children: "Edit Profile / Upload New Photos"
798
+ }
799
+ )
800
+ ] }),
801
+ f === "idle" && !y && /* @__PURE__ */ o.jsxs("div", { children: [
802
+ /* @__PURE__ */ o.jsx("p", { className: "text-sm text-gray-600 mb-5 leading-relaxed", children: "Upload photos for a precision body scan." }),
803
+ /* @__PURE__ */ o.jsxs("div", { className: "flex gap-3 mb-4", children: [
804
+ /* @__PURE__ */ o.jsx(
748
805
  "input",
749
806
  {
750
807
  type: "number",
751
808
  placeholder: "Height (cm)",
752
- value: v,
753
- onChange: (o) => N(o.target.value),
809
+ value: h,
810
+ onChange: (s) => P(s.target.value),
754
811
  className: "w-1/2 p-2.5 border border-gray-300 rounded-lg outline-none focus:border-black text-sm"
755
812
  }
756
813
  ),
757
- /* @__PURE__ */ l.jsx(
814
+ /* @__PURE__ */ o.jsx(
758
815
  "input",
759
816
  {
760
817
  type: "number",
761
818
  placeholder: "Weight (kg)",
762
- value: p,
763
- onChange: (o) => S(o.target.value),
819
+ value: C,
820
+ onChange: (s) => z(s.target.value),
764
821
  className: "w-1/2 p-2.5 border border-gray-300 rounded-lg outline-none focus:border-black text-sm"
765
822
  }
766
823
  )
767
824
  ] }),
768
- /* @__PURE__ */ l.jsxs("div", { className: "mb-3", children: [
769
- /* @__PURE__ */ l.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Front Image" }),
770
- /* @__PURE__ */ l.jsx(
825
+ /* @__PURE__ */ o.jsxs("div", { className: "mb-3", children: [
826
+ /* @__PURE__ */ o.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Front Image" }),
827
+ /* @__PURE__ */ o.jsx(
771
828
  "input",
772
829
  {
773
830
  type: "file",
774
831
  accept: "image/*",
775
- onChange: (o) => L(o.target.files[0]),
832
+ onChange: (s) => B(s.target.files[0]),
776
833
  className: "w-full text-xs file:mr-3 file:py-1.5 file:px-3 file:rounded-md file:border-0 file:text-xs file:bg-gray-100 file:text-black hover:file:bg-gray-200"
777
834
  }
778
835
  )
779
836
  ] }),
780
- /* @__PURE__ */ l.jsxs("div", { className: "mb-5", children: [
781
- /* @__PURE__ */ l.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Side Image" }),
782
- /* @__PURE__ */ l.jsx(
837
+ /* @__PURE__ */ o.jsxs("div", { className: "mb-5", children: [
838
+ /* @__PURE__ */ o.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Side Image" }),
839
+ /* @__PURE__ */ o.jsx(
783
840
  "input",
784
841
  {
785
842
  type: "file",
786
843
  accept: "image/*",
787
- onChange: (o) => Q(o.target.files[0]),
844
+ onChange: (s) => A(s.target.files[0]),
788
845
  className: "w-full text-xs file:mr-3 file:py-1.5 file:px-3 file:rounded-md file:border-0 file:text-xs file:bg-gray-100 file:text-black hover:file:bg-gray-200"
789
846
  }
790
847
  )
791
848
  ] }),
792
- /* @__PURE__ */ l.jsx(
849
+ /* @__PURE__ */ o.jsx(
793
850
  "button",
794
851
  {
795
- onClick: te,
852
+ onClick: X,
796
853
  className: "w-full bg-black text-white py-3.5 rounded-xl font-bold text-sm hover:opacity-80 transition-opacity",
797
- children: "Run Body Scan"
854
+ children: "Save Profile & Scan"
798
855
  }
799
856
  )
800
857
  ] })
@@ -802,5 +859,5 @@ const mr = () => {
802
859
  ] });
803
860
  };
804
861
  export {
805
- mr as StyllarPlugin
862
+ _r as StyllarPlugin
806
863
  };