styllar-react-plugin 1.0.0 → 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 $e, { useState as F } from "react";
2
- var ue = { exports: {} }, B = {};
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,21 +9,21 @@ var ue = { exports: {} }, B = {};
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 fr() {
14
- if (Ae) return B;
15
- Ae = 1;
16
- var $ = $e, O = Symbol.for("react.element"), k = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, W = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, L = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function S(w, d, P) {
18
- var v, E = {}, j = null, Y = null;
19
- P !== void 0 && (j = "" + P), d.key !== void 0 && (j = "" + d.key), d.ref !== void 0 && (Y = d.ref);
20
- for (v in d) y.call(d, v) && !L.hasOwnProperty(v) && (E[v] = d[v]);
21
- if (w && w.defaultProps) for (v in d = w.defaultProps, d) E[v] === void 0 && (E[v] = d[v]);
22
- return { $$typeof: O, type: w, key: j, ref: Y, props: E, _owner: W.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 B.Fragment = k, B.jsx = S, B.jsxs = S, B;
24
+ return J.Fragment = f, J.jsx = F, J.jsxs = F, J;
25
25
  }
26
- var J = {};
26
+ var K = {};
27
27
  /**
28
28
  * @license React
29
29
  * react-jsx-runtime.development.js
@@ -33,91 +33,91 @@ var J = {};
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 dr() {
38
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
39
- var $ = $e, O = Symbol.for("react.element"), k = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), w = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), Y = 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 N = $.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function p(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 = N.ReactDebugCurrentFrame, i = n.getStackAddendum();
57
- i !== "" && (r += "%s", t = t.concat([i]));
58
- var c = t.map(function(o) {
59
- return String(o);
56
+ var n = A.ReactDebugCurrentFrame, l = n.getStackAddendum();
57
+ l !== "" && (r += "%s", t = t.concat([l]));
58
+ var c = t.map(function(i) {
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 l = !1, x = !1, g = !1, T = !1, C = !1, R;
65
- R = Symbol.for("react.module.reference");
66
- function b(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === y || e === L || C || e === W || e === P || e === v || T || e === Y || l || x || g || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === E || e.$$typeof === S || e.$$typeof === w || e.$$typeof === d || // 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 === R || e.getModuleId !== void 0));
71
+ e.$$typeof === u || e.getModuleId !== void 0));
72
72
  }
73
- function K(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 i = r.displayName || r.name || "";
78
- return i !== "" ? t + "(" + i + ")" : t;
77
+ var l = r.displayName || r.name || "";
78
+ return l !== "" ? t + "(" + l + ")" : t;
79
79
  }
80
- function fe(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" && p("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 y:
91
+ case g:
92
92
  return "Fragment";
93
- case k:
93
+ case f:
94
94
  return "Portal";
95
- case L:
95
+ case D:
96
96
  return "Profiler";
97
- case W:
97
+ case E:
98
98
  return "StrictMode";
99
- case P:
99
+ case N:
100
100
  return "Suspense";
101
- case v:
101
+ case h:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
- case w:
106
+ case O:
107
107
  var r = e;
108
- return fe(r) + ".Consumer";
109
- case S:
108
+ return w(r) + ".Consumer";
109
+ case F:
110
110
  var t = e;
111
- return fe(t._context) + ".Provider";
112
- case d:
113
- return K(e, e.render, "ForwardRef");
114
- case E:
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 j: {
118
- var i = e, c = i._payload, o = i._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(o(c));
120
+ return v(i(c));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,18 +125,18 @@ function dr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var A = Object.assign, V = 0, de, ve, pe, ge, he, me, 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;
131
+ _e.__reactDisabledLog = !0;
132
132
  function We() {
133
133
  {
134
- if (V === 0) {
135
- de = console.log, ve = console.info, pe = console.warn, ge = console.error, he = console.group, me = 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,250 +149,250 @@ function dr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- V++;
152
+ $++;
153
153
  }
154
154
  }
155
- function Le() {
155
+ function Me() {
156
156
  {
157
- if (V--, V === 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
167
+ info: b({}, e, {
168
+ value: me
172
169
  }),
173
- error: A({}, e, {
170
+ warn: b({}, e, {
174
171
  value: ge
175
172
  }),
176
- group: A({}, e, {
173
+ error: b({}, e, {
177
174
  value: he
178
175
  }),
179
- groupCollapsed: A({}, e, {
180
- value: me
181
- }),
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
- V < 0 && p("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 te = N.ReactCurrentDispatcher, ne;
191
- function X(e, r, t) {
190
+ var ae = A.ReactCurrentDispatcher, oe;
191
+ function G(e, r, t) {
192
192
  {
193
- if (ne === void 0)
193
+ if (oe === void 0)
194
194
  try {
195
195
  throw Error();
196
- } catch (i) {
197
- var n = i.stack.trim().match(/\n( *(at )?)/);
198
- ne = 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
- ` + ne + e;
201
+ ` + oe + e;
202
202
  }
203
203
  }
204
- var ae = !1, G;
204
+ var ie = !1, H;
205
205
  {
206
- var Ye = typeof WeakMap == "function" ? WeakMap : Map;
207
- G = new Ye();
206
+ var Ue = typeof WeakMap == "function" ? WeakMap : Map;
207
+ H = new Ue();
208
208
  }
209
- function xe(e, r) {
210
- if (!e || ae)
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
- ae = !0;
219
- var i = Error.prepareStackTrace;
218
+ ie = !0;
219
+ var l = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var c;
222
- c = te.current, te.current = null, We();
222
+ c = ae.current, ae.current = null, We();
223
223
  try {
224
224
  if (r) {
225
- var o = function() {
225
+ var i = function() {
226
226
  throw Error();
227
227
  };
228
- if (Object.defineProperty(o.prototype, "props", {
228
+ if (Object.defineProperty(i.prototype, "props", {
229
229
  set: function() {
230
230
  throw Error();
231
231
  }
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
- Reflect.construct(o, []);
235
- } catch (m) {
236
- n = m;
234
+ Reflect.construct(i, []);
235
+ } catch (T) {
236
+ n = T;
237
237
  }
238
- Reflect.construct(e, [], o);
238
+ Reflect.construct(e, [], i);
239
239
  } else {
240
240
  try {
241
- o.call();
242
- } catch (m) {
243
- n = m;
241
+ i.call();
242
+ } catch (T) {
243
+ n = T;
244
244
  }
245
- e.call(o.prototype);
245
+ e.call(i.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (m) {
251
- n = m;
250
+ } catch (T) {
251
+ n = T;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (m) {
256
- if (m && n && typeof m.stack == "string") {
257
- for (var a = m.stack.split(`
258
- `), h = n.stack.split(`
259
- `), u = a.length - 1, f = h.length - 1; u >= 1 && f >= 0 && a[u] !== h[f]; )
260
- f--;
261
- for (; u >= 1 && f >= 0; u--, f--)
262
- if (a[u] !== h[f]) {
263
- if (u !== 1 || f !== 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--, f--, f < 0 || a[u] !== h[f]) {
266
- var _ = `
267
- ` + a[u].replace(" at new ", " at ");
268
- return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, _), _;
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 && f >= 0);
270
+ while (d >= 1 && m >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- ae = !1, te.current = c, Le(), Error.prepareStackTrace = i;
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
- function ze(e, r, t) {
281
- return xe(e, !1);
280
+ function Ye(e, r, t) {
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
- case P:
296
- return X("Suspense");
297
- case v:
298
- return X("SuspenseList");
295
+ case N:
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 d:
303
- return ze(e.render);
304
- case E:
305
- return H(e.type, r, t);
306
- case j: {
307
- var n = e, i = n._payload, c = n._init;
302
+ case y:
303
+ return Ye(e.render);
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(i), 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 q = Object.prototype.hasOwnProperty, _e = {}, Ee = N.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, i) {
324
+ function qe(e, r, t, n, l) {
325
325
  {
326
- var c = Function.call.bind(q);
327
- for (var o in e)
328
- if (c(e, o)) {
326
+ var c = Function.call.bind(V);
327
+ for (var i in e)
328
+ if (c(e, i)) {
329
329
  var a = void 0;
330
330
  try {
331
- if (typeof e[o] != "function") {
332
- var h = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw h.name = "Invariant Violation", h;
331
+ if (typeof e[i] != "function") {
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
- a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (u) {
337
- a = u;
335
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ } catch (d) {
337
+ a = d;
338
338
  }
339
- a && !(a instanceof Error) && (Z(i), p("%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, o, typeof a), Z(null)), a instanceof Error && !(a.message in _e) && (_e[a.message] = !0, Z(i), p("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 oe(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 p("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 je = N.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
- }, Se, Te;
373
- function Ke(e) {
374
- if (q.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 (q.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" && je.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
- Se || (Se = !0, p("%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 dr() {
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, p("%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,15 +411,15 @@ function dr() {
411
411
  });
412
412
  }
413
413
  }
414
- var Qe = function(e, r, t, n, i, c, o) {
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: O,
417
+ $$typeof: _,
418
418
  // Built-in properties that belong on the element
419
419
  type: e,
420
420
  key: r,
421
421
  ref: t,
422
- props: o,
422
+ props: i,
423
423
  // Record the component responsible for creating this element.
424
424
  _owner: c
425
425
  };
@@ -437,44 +437,44 @@ function dr() {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !1,
440
- value: i
440
+ value: l
441
441
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
442
  };
443
- function er(e, r, t, n, i) {
443
+ function tr(e, r, t, n, l) {
444
444
  {
445
- var c, o = {}, a = null, h = null;
446
- t !== void 0 && (we(t), a = "" + t), Xe(r) && (we(r.key), a = "" + r.key), Ke(r) && (h = r.ref, Ge(r, i));
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
- q.call(r, c) && !Je.hasOwnProperty(c) && (o[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
- o[c] === void 0 && (o[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 || h) {
455
- var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && He(o, f), h && Ze(o, f);
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, h, i, n, je.current, o);
458
+ return rr(e, a, R, l, n, Te.current, i);
459
459
  }
460
460
  }
461
- var ie = N.ReactCurrentOwner, Ce = N.ReactDebugCurrentFrame;
462
- function z(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 se;
470
- se = !1;
471
- function le(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === O;
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 (ie.current) {
477
- var e = D(ie.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 !== ie.current && (n = " It was passed a child from " + D(e._owner.type) + "."), z(e), p('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), z(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 (oe(e))
519
+ if (se(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var n = e[t];
522
- le(n) && Pe(n, r);
522
+ ue(n) && Ne(n, r);
523
523
  }
524
- else if (le(e))
524
+ else if (ue(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var i = ee(e);
528
- if (typeof i == "function" && i !== e.entries)
529
- for (var c = i.call(e), o; !(o = c.next()).done; )
530
- le(o.value) && Pe(o.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,240 +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 === d || // 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 === E))
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 && !se) {
552
- se = !0;
553
- var i = D(r);
554
- p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "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 && p("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
- z(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), z(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 && (z(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), z(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, i, c) {
571
+ var Fe = {};
572
+ function Ie(e, r, t, n, l, c) {
573
573
  {
574
- var o = b(e);
575
- if (!o) {
574
+ var i = p(e);
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 h = rr();
579
- h ? a += h : a += Oe();
580
- var u;
581
- e === null ? u = "null" : oe(e) ? u = "array" : e !== void 0 && e.$$typeof === O ? (u = "<" + (D(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, p("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 f = er(e, r, t, i, c);
584
- if (f == null)
585
- return f;
586
- if (o) {
587
- var _ = r.children;
588
- if (_ !== void 0)
583
+ var m = tr(e, r, t, l, c);
584
+ if (m == null)
585
+ return m;
586
+ if (i) {
587
+ var k = r.children;
588
+ if (k !== void 0)
589
589
  if (n)
590
- if (oe(_)) {
591
- for (var M = 0; M < _.length; M++)
592
- Ne(_[M], e);
593
- Object.freeze && Object.freeze(_);
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
- p("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(_, e);
597
+ Ae(k, e);
598
598
  }
599
- if (q.call(r, "key")) {
600
- var I = D(e), m = Object.keys(r).filter(function(ur) {
601
- return ur !== "key";
602
- }), ce = m.length > 0 ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!De[I + ce]) {
604
- var cr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
605
- p(`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} />`, ce, I, cr, I), De[I + ce] = !0;
610
+ <%s key={someKey} {...props} />`, fe, L, fr, L), Fe[L + fe] = !0;
611
611
  }
612
612
  }
613
- return e === y ? ar(f) : nr(f), f;
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
- J.Fragment = y, J.jsx = sr, J.jsxs = lr;
624
- }()), J;
622
+ var cr = lr, ur = sr;
623
+ K.Fragment = g, K.jsx = cr, K.jsxs = ur;
624
+ }()), K;
625
625
  }
626
- process.env.NODE_ENV === "production" ? ue.exports = fr() : ue.exports = dr();
627
- var s = ue.exports;
628
- const pr = () => {
629
- const [$, O] = F(!1), [k, y] = F("idle"), [W, L] = F(""), [S, w] = F(null), [d, P] = F(""), [v, E] = F(""), [j, Y] = F(null), [U, Q] = F(null), ee = "http://136.113.197.77:5000/predict/size-from-chart";
630
- function N() {
631
- var R;
632
- let l = 0, x = 0;
633
- const g = ["pant", "jeans", "trouser", "skirt", "short", "legging", "jogger", "bottom", "denim", "cargo"], T = ["shirt", "top", "tee", "blouse", "jacket", "coat", "hoodie", "sweater", "vest", "cardigan", "dress", "t-shirt"], C = (document.title + " " + (((R = document.querySelector("h1")) == null ? void 0 : R.innerText) || "")).toLowerCase();
634
- return g.forEach((b) => {
635
- C.includes(b) && (x += 2);
636
- }), T.forEach((b) => {
637
- C.includes(b) && (l += 2);
638
- }), x > l ? "bottom" : "top";
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;
669
+ }
670
+ return !1;
671
+ };
672
+ if (!u()) {
673
+ let p = 0;
674
+ const j = setInterval(() => {
675
+ p++, (u() || p > 10) && clearInterval(j);
676
+ }, 500);
677
+ }
678
+ };
679
+ function re() {
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";
639
688
  }
640
- function p() {
641
- const l = { chart_type: "none", chart_content: null, available_sizes: [] }, x = document.querySelector("table");
642
- if (x && /chest|waist|bust|hip|size/i.test(x.innerText))
643
- return l.chart_type = "html_table", l.chart_content = x.outerHTML, l;
644
- const g = document.querySelectorAll("img");
645
- for (let R of g) {
646
- const b = R.src.toLowerCase(), K = (R.alt || "").toLowerCase();
647
- if (b.includes("size") && b.includes("chart") || K.includes("size") && K.includes("guide"))
648
- return l.chart_type = "image_url", l.chart_content = R.src, l;
649
- }
650
- const T = document.querySelector('.size-guide, #size-chart, .measurement-guide, [class*="SizeGuide"]');
651
- return T ? (l.chart_type = "raw_text", l.chart_content = T.innerText, l) : (document.querySelectorAll("button, span, li").forEach((R) => {
652
- const b = R.innerText.trim();
653
- /^(XS|S|M|L|XL|XXL|[0-9]{2})$/i.test(b) && b.length < 4 && (l.available_sizes.includes(b) || l.available_sizes.push(b));
654
- }), l);
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);
655
704
  }
656
- const re = async () => {
657
- if (!j || !U || !d || !v) {
705
+ const X = async () => {
706
+ if (!M || !q || !h || !C) {
658
707
  alert("Please fill all fields.");
659
708
  return;
660
709
  }
661
- y("loading");
662
- const l = N(), x = p(), g = new FormData();
663
- g.append("front_image", j), g.append("side_image", U), g.append("height", d), g.append("weight", v), g.append("product_type", l), g.append("chart_type", x.chart_type), g.append("chart_content", x.chart_content), g.append("available_sizes", JSON.stringify(x.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));
664
713
  try {
665
- const C = await (await fetch(ee, { method: "POST", body: g })).json();
666
- if (C.error) throw new Error(C.error);
667
- w(C), y("success");
668
- } catch (T) {
669
- L(T.message), y("error");
670
- }
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");
671
722
  };
672
- return /* @__PURE__ */ s.jsxs("div", { className: "fixed bottom-6 right-6 z-[999999]", children: [
673
- /* @__PURE__ */ s.jsx(
723
+ return /* @__PURE__ */ o.jsxs("div", { className: "fixed bottom-6 right-6 z-[999999]", children: [
724
+ /* @__PURE__ */ o.jsx(
674
725
  "button",
675
726
  {
676
- onClick: () => O(!$),
727
+ onClick: () => _(!S),
677
728
  className: "bg-black text-white px-7 py-3.5 rounded-full shadow-xl font-bold text-sm hover:opacity-80 transition-opacity",
678
729
  children: "Styllar"
679
730
  }
680
731
  ),
681
- $ && /* @__PURE__ */ s.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: [
682
- /* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
683
- /* @__PURE__ */ s.jsx("h3", { className: "m-0 text-lg font-bold", children: "Smart Fit Assistant" }),
684
- /* @__PURE__ */ s.jsx("button", { onClick: () => O(!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: "×" })
685
736
  ] }),
686
- k === "loading" && /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center justify-center py-8", children: [
687
- /* @__PURE__ */ s.jsx("div", { className: "w-8 h-8 border-4 border-gray-200 border-t-black rounded-full animate-spin mb-4" }),
688
- /* @__PURE__ */ s.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..." })
689
740
  ] }),
690
- k === "success" && S && /* @__PURE__ */ s.jsxs("div", { className: "text-center py-6", children: [
691
- /* @__PURE__ */ s.jsx("div", { className: "text-sm text-green-600 font-bold tracking-wider", children: "MATCH FOUND" }),
692
- /* @__PURE__ */ s.jsx("div", { className: "text-5xl font-black my-4 text-black", children: S.recommended_size }),
693
- /* @__PURE__ */ s.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: [
694
745
  "Confidence: ",
695
- S.confidence
746
+ F.confidence
696
747
  ] }),
697
- /* @__PURE__ */ s.jsx(
748
+ /* @__PURE__ */ o.jsx(
698
749
  "button",
699
750
  {
700
751
  onClick: () => {
701
- y("idle"), w(null);
752
+ g("idle"), O(null);
702
753
  },
703
754
  className: "text-blue-600 text-sm underline hover:text-blue-800",
704
- children: "Run New Scan"
755
+ children: "Scan Another Product"
705
756
  }
706
757
  )
707
758
  ] }),
708
- k === "error" && /* @__PURE__ */ s.jsxs("div", { className: "py-4", children: [
709
- /* @__PURE__ */ s.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: [
710
761
  "Error: ",
711
- W
762
+ E
712
763
  ] }),
713
- /* @__PURE__ */ s.jsx(
764
+ /* @__PURE__ */ o.jsx(
714
765
  "button",
715
766
  {
716
- onClick: () => y("idle"),
767
+ onClick: () => g("idle"),
717
768
  className: "w-full bg-black text-white py-3 rounded-xl font-bold text-sm",
718
769
  children: "Try Again"
719
770
  }
720
771
  )
721
772
  ] }),
722
- k === "idle" && /* @__PURE__ */ s.jsxs("div", { children: [
723
- /* @__PURE__ */ s.jsx("p", { className: "text-sm text-gray-600 mb-5 leading-relaxed", children: "Upload photos for a precision body scan." }),
724
- /* @__PURE__ */ s.jsxs("div", { className: "flex gap-3 mb-4", children: [
725
- /* @__PURE__ */ s.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(
726
805
  "input",
727
806
  {
728
807
  type: "number",
729
808
  placeholder: "Height (cm)",
730
- value: d,
731
- onChange: (l) => P(l.target.value),
809
+ value: h,
810
+ onChange: (s) => P(s.target.value),
732
811
  className: "w-1/2 p-2.5 border border-gray-300 rounded-lg outline-none focus:border-black text-sm"
733
812
  }
734
813
  ),
735
- /* @__PURE__ */ s.jsx(
814
+ /* @__PURE__ */ o.jsx(
736
815
  "input",
737
816
  {
738
817
  type: "number",
739
818
  placeholder: "Weight (kg)",
740
- value: v,
741
- onChange: (l) => E(l.target.value),
819
+ value: C,
820
+ onChange: (s) => z(s.target.value),
742
821
  className: "w-1/2 p-2.5 border border-gray-300 rounded-lg outline-none focus:border-black text-sm"
743
822
  }
744
823
  )
745
824
  ] }),
746
- /* @__PURE__ */ s.jsxs("div", { className: "mb-3", children: [
747
- /* @__PURE__ */ s.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Front Image" }),
748
- /* @__PURE__ */ s.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(
749
828
  "input",
750
829
  {
751
830
  type: "file",
752
831
  accept: "image/*",
753
- onChange: (l) => Y(l.target.files[0]),
832
+ onChange: (s) => B(s.target.files[0]),
754
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"
755
834
  }
756
835
  )
757
836
  ] }),
758
- /* @__PURE__ */ s.jsxs("div", { className: "mb-5", children: [
759
- /* @__PURE__ */ s.jsx("label", { className: "text-[11px] font-bold text-gray-400 uppercase block mb-1", children: "Side Image" }),
760
- /* @__PURE__ */ s.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(
761
840
  "input",
762
841
  {
763
842
  type: "file",
764
843
  accept: "image/*",
765
- onChange: (l) => Q(l.target.files[0]),
844
+ onChange: (s) => A(s.target.files[0]),
766
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"
767
846
  }
768
847
  )
769
848
  ] }),
770
- /* @__PURE__ */ s.jsx(
849
+ /* @__PURE__ */ o.jsx(
771
850
  "button",
772
851
  {
773
- onClick: re,
852
+ onClick: X,
774
853
  className: "w-full bg-black text-white py-3.5 rounded-xl font-bold text-sm hover:opacity-80 transition-opacity",
775
- children: "Run Body Scan"
854
+ children: "Save Profile & Scan"
776
855
  }
777
856
  )
778
857
  ] })
@@ -780,5 +859,5 @@ const pr = () => {
780
859
  ] });
781
860
  };
782
861
  export {
783
- pr as StyllarPlugin
862
+ _r as StyllarPlugin
784
863
  };