@metricshift/react 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import $e, { useState as $, useRef as Ae, useEffect as Me, createContext as br, useContext as gr } from "react";
2
- var ve = { exports: {} }, J = {};
1
+ import Je, { useState as Y, useRef as Ue, useEffect as Ve, createContext as gr, useContext as vr } from "react";
2
+ var Pe = { exports: {} }, se = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,21 +9,21 @@ var ve = { 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 We;
13
- function xr() {
14
- if (We) return J;
15
- We = 1;
16
- var d = $e, _ = Symbol.for("react.element"), O = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, p = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function F(E, b, T) {
18
- var y, R = {}, v = null, A = null;
19
- T !== void 0 && (v = "" + T), b.key !== void 0 && (v = "" + b.key), b.ref !== void 0 && (A = b.ref);
20
- for (y in b) f.call(b, y) && !o.hasOwnProperty(y) && (R[y] = b[y]);
21
- if (E && E.defaultProps) for (y in b = E.defaultProps, b) R[y] === void 0 && (R[y] = b[y]);
22
- return { $$typeof: _, type: E, key: v, ref: A, props: R, _owner: p.current };
12
+ var qe;
13
+ function hr() {
14
+ if (qe) return se;
15
+ qe = 1;
16
+ var p = Je, m = Symbol.for("react.element"), C = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, b = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function R(x, g, j) {
18
+ var v, S = {}, T = null, F = null;
19
+ j !== void 0 && (T = "" + j), g.key !== void 0 && (T = "" + g.key), g.ref !== void 0 && (F = g.ref);
20
+ for (v in g) c.call(g, v) && !o.hasOwnProperty(v) && (S[v] = g[v]);
21
+ if (x && x.defaultProps) for (v in g = x.defaultProps, g) S[v] === void 0 && (S[v] = g[v]);
22
+ return { $$typeof: m, type: x, key: T, ref: F, props: S, _owner: b.current };
23
23
  }
24
- return J.Fragment = O, J.jsx = F, J.jsxs = F, J;
24
+ return se.Fragment = C, se.jsx = R, se.jsxs = R, se;
25
25
  }
26
- var H = {};
26
+ var le = {};
27
27
  /**
28
28
  * @license React
29
29
  * react-jsx-runtime.development.js
@@ -33,91 +33,91 @@ var H = {};
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 Ye;
37
- function yr() {
38
- return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
39
- var d = $e, _ = Symbol.for("react.element"), O = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), F = Symbol.for("react.provider"), E = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), D = Symbol.iterator, C = "@@iterator";
40
- function B(e) {
36
+ var He;
37
+ function xr() {
38
+ return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var p = Je, m = Symbol.for("react.element"), C = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), x = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), B = Symbol.iterator, A = "@@iterator";
40
+ function q(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = D && e[D] || e[C];
43
+ var r = B && e[B] || e[A];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
- var P = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function h(e) {
46
+ var I = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function f(e) {
48
48
  {
49
49
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
50
50
  t[a - 1] = arguments[a];
51
- L("error", e, t);
51
+ re("error", e, t);
52
52
  }
53
53
  }
54
- function L(e, r, t) {
54
+ function re(e, r, t) {
55
55
  {
56
- var a = P.ReactDebugCurrentFrame, u = a.getStackAddendum();
56
+ var a = I.ReactDebugCurrentFrame, u = a.getStackAddendum();
57
57
  u !== "" && (r += "%s", t = t.concat([u]));
58
- var c = t.map(function(l) {
58
+ var d = t.map(function(l) {
59
59
  return String(l);
60
60
  });
61
- c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
61
+ d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
62
62
  }
63
63
  }
64
- var i = !1, j = !1, K = !1, re = !1, te = !1, G;
65
- G = Symbol.for("react.module.reference");
66
- function ne(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === f || e === o || te || e === p || e === T || e === y || re || e === A || i || j || K || typeof e == "object" && e !== null && (e.$$typeof === v || e.$$typeof === R || e.$$typeof === F || e.$$typeof === E || e.$$typeof === b || // This needs to include all possible module reference object
64
+ var i = !1, _ = !1, ce = !1, ue = !1, fe = !1, te;
65
+ te = Symbol.for("react.module.reference");
66
+ function de(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === c || e === o || fe || e === b || e === j || e === v || ue || e === F || i || _ || ce || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === S || e.$$typeof === R || e.$$typeof === x || e.$$typeof === g || // 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 === te || e.getModuleId !== void 0));
72
72
  }
73
- function V(e, r, t) {
73
+ function pe(e, r, t) {
74
74
  var a = e.displayName;
75
75
  if (a)
76
76
  return a;
77
77
  var u = r.displayName || r.name || "";
78
78
  return u !== "" ? t + "(" + u + ")" : t;
79
79
  }
80
- function ae(e) {
80
+ function be(e) {
81
81
  return e.displayName || "Context";
82
82
  }
83
- function I(e) {
83
+ function O(e) {
84
84
  if (e == null)
85
85
  return null;
86
- if (typeof e.tag == "number" && h("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" && f("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 f:
91
+ case c:
92
92
  return "Fragment";
93
- case O:
93
+ case C:
94
94
  return "Portal";
95
95
  case o:
96
96
  return "Profiler";
97
- case p:
97
+ case b:
98
98
  return "StrictMode";
99
- case T:
99
+ case j:
100
100
  return "Suspense";
101
- case y:
101
+ case v:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
- case E:
106
+ case x:
107
107
  var r = e;
108
- return ae(r) + ".Consumer";
109
- case F:
110
- var t = e;
111
- return ae(t._context) + ".Provider";
112
- case b:
113
- return V(e, e.render, "ForwardRef");
108
+ return be(r) + ".Consumer";
114
109
  case R:
110
+ var t = e;
111
+ return be(t._context) + ".Provider";
112
+ case g:
113
+ return pe(e, e.render, "ForwardRef");
114
+ case S:
115
115
  var a = e.displayName || null;
116
- return a !== null ? a : I(e.type) || "Memo";
117
- case v: {
118
- var u = e, c = u._payload, l = u._init;
116
+ return a !== null ? a : O(e.type) || "Memo";
117
+ case T: {
118
+ var u = e, d = u._payload, l = u._init;
119
119
  try {
120
- return I(l(c));
120
+ return O(l(d));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,18 +125,18 @@ function yr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var z = Object.assign, g = 0, M, W, be, ge, xe, ye, he;
129
- function me() {
128
+ var M = Object.assign, L = 0, ge, ve, ne, he, H, xe, J;
129
+ function K() {
130
130
  }
131
- me.__reactDisabledLog = !0;
132
- function Le() {
131
+ K.__reactDisabledLog = !0;
132
+ function N() {
133
133
  {
134
- if (g === 0) {
135
- M = console.log, W = console.info, be = console.warn, ge = console.error, xe = console.group, ye = console.groupCollapsed, he = console.groupEnd;
134
+ if (L === 0) {
135
+ ge = console.log, ve = console.info, ne = console.warn, he = console.error, H = console.group, xe = console.groupCollapsed, J = console.groupEnd;
136
136
  var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
139
- value: me,
139
+ value: K,
140
140
  writable: !0
141
141
  };
142
142
  Object.defineProperties(console, {
@@ -149,77 +149,77 @@ function yr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- g++;
152
+ L++;
153
153
  }
154
154
  }
155
- function Ne() {
155
+ function ae() {
156
156
  {
157
- if (g--, g === 0) {
157
+ if (L--, L === 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: z({}, e, {
165
- value: M
164
+ log: M({}, e, {
165
+ value: ge
166
166
  }),
167
- info: z({}, e, {
168
- value: W
167
+ info: M({}, e, {
168
+ value: ve
169
169
  }),
170
- warn: z({}, e, {
171
- value: be
170
+ warn: M({}, e, {
171
+ value: ne
172
172
  }),
173
- error: z({}, e, {
174
- value: ge
173
+ error: M({}, e, {
174
+ value: he
175
175
  }),
176
- group: z({}, e, {
177
- value: xe
176
+ group: M({}, e, {
177
+ value: H
178
178
  }),
179
- groupCollapsed: z({}, e, {
180
- value: ye
179
+ groupCollapsed: M({}, e, {
180
+ value: xe
181
181
  }),
182
- groupEnd: z({}, e, {
183
- value: he
182
+ groupEnd: M({}, e, {
183
+ value: J
184
184
  })
185
185
  });
186
186
  }
187
- g < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ L < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var oe = P.ReactCurrentDispatcher, ie;
191
- function X(e, r, t) {
190
+ var W = I.ReactCurrentDispatcher, z;
191
+ function $(e, r, t) {
192
192
  {
193
- if (ie === void 0)
193
+ if (z === void 0)
194
194
  try {
195
195
  throw Error();
196
196
  } catch (u) {
197
197
  var a = u.stack.trim().match(/\n( *(at )?)/);
198
- ie = a && a[1] || "";
198
+ z = a && a[1] || "";
199
199
  }
200
200
  return `
201
- ` + ie + e;
201
+ ` + z + e;
202
202
  }
203
203
  }
204
- var se = !1, Q;
204
+ var oe = !1, ie;
205
205
  {
206
- var Ue = typeof WeakMap == "function" ? WeakMap : Map;
207
- Q = new Ue();
206
+ var Se = typeof WeakMap == "function" ? WeakMap : Map;
207
+ ie = new Se();
208
208
  }
209
- function Ee(e, r) {
210
- if (!e || se)
209
+ function ye(e, r) {
210
+ if (!e || oe)
211
211
  return "";
212
212
  {
213
- var t = Q.get(e);
213
+ var t = ie.get(e);
214
214
  if (t !== void 0)
215
215
  return t;
216
216
  }
217
217
  var a;
218
- se = !0;
218
+ oe = !0;
219
219
  var u = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
- var c;
222
- c = oe.current, oe.current = null, Le();
221
+ var d;
222
+ d = W.current, W.current = null, N();
223
223
  try {
224
224
  if (r) {
225
225
  var l = function() {
@@ -232,119 +232,119 @@ function yr() {
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
234
  Reflect.construct(l, []);
235
- } catch (k) {
236
- a = k;
235
+ } catch (w) {
236
+ a = w;
237
237
  }
238
238
  Reflect.construct(e, [], l);
239
239
  } else {
240
240
  try {
241
241
  l.call();
242
- } catch (k) {
243
- a = k;
242
+ } catch (w) {
243
+ a = w;
244
244
  }
245
245
  e.call(l.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (k) {
251
- a = k;
250
+ } catch (w) {
251
+ a = w;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (k) {
256
- if (k && a && typeof k.stack == "string") {
257
- for (var s = k.stack.split(`
258
- `), S = a.stack.split(`
259
- `), x = s.length - 1, m = S.length - 1; x >= 1 && m >= 0 && s[x] !== S[m]; )
260
- m--;
261
- for (; x >= 1 && m >= 0; x--, m--)
262
- if (s[x] !== S[m]) {
263
- if (x !== 1 || m !== 1)
255
+ } catch (w) {
256
+ if (w && a && typeof w.stack == "string") {
257
+ for (var s = w.stack.split(`
258
+ `), k = a.stack.split(`
259
+ `), h = s.length - 1, y = k.length - 1; h >= 1 && y >= 0 && s[h] !== k[y]; )
260
+ y--;
261
+ for (; h >= 1 && y >= 0; h--, y--)
262
+ if (s[h] !== k[y]) {
263
+ if (h !== 1 || y !== 1)
264
264
  do
265
- if (x--, m--, m < 0 || s[x] !== S[m]) {
266
- var w = `
267
- ` + s[x].replace(" at new ", " at ");
268
- return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, w), w;
265
+ if (h--, y--, y < 0 || s[h] !== k[y]) {
266
+ var P = `
267
+ ` + s[h].replace(" at new ", " at ");
268
+ return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, P), P;
269
269
  }
270
- while (x >= 1 && m >= 0);
270
+ while (h >= 1 && y >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- se = !1, oe.current = c, Ne(), Error.prepareStackTrace = u;
275
+ oe = !1, W.current = d, ae(), Error.prepareStackTrace = u;
276
276
  }
277
- var U = e ? e.displayName || e.name : "", Y = U ? X(U) : "";
278
- return typeof e == "function" && Q.set(e, Y), Y;
277
+ var ee = e ? e.displayName || e.name : "", V = ee ? $(ee) : "";
278
+ return typeof e == "function" && ie.set(e, V), V;
279
279
  }
280
- function Ve(e, r, t) {
281
- return Ee(e, !1);
280
+ function ke(e, r, t) {
281
+ return ye(e, !1);
282
282
  }
283
- function qe(e) {
283
+ function Re(e) {
284
284
  var r = e.prototype;
285
285
  return !!(r && r.isReactComponent);
286
286
  }
287
- function Z(e, r, t) {
287
+ function G(e, r, t) {
288
288
  if (e == null)
289
289
  return "";
290
290
  if (typeof e == "function")
291
- return Ee(e, qe(e));
291
+ return ye(e, Re(e));
292
292
  if (typeof e == "string")
293
- return X(e);
293
+ return $(e);
294
294
  switch (e) {
295
- case T:
296
- return X("Suspense");
297
- case y:
298
- return X("SuspenseList");
295
+ case j:
296
+ return $("Suspense");
297
+ case v:
298
+ return $("SuspenseList");
299
299
  }
300
300
  if (typeof e == "object")
301
301
  switch (e.$$typeof) {
302
- case b:
303
- return Ve(e.render);
304
- case R:
305
- return Z(e.type, r, t);
306
- case v: {
307
- var a = e, u = a._payload, c = a._init;
302
+ case g:
303
+ return ke(e.render);
304
+ case S:
305
+ return G(e.type, r, t);
306
+ case T: {
307
+ var a = e, u = a._payload, d = a._init;
308
308
  try {
309
- return Z(c(u), r, t);
309
+ return G(d(u), r, t);
310
310
  } catch {
311
311
  }
312
312
  }
313
313
  }
314
314
  return "";
315
315
  }
316
- var q = Object.prototype.hasOwnProperty, Re = {}, Se = P.ReactDebugCurrentFrame;
317
- function ee(e) {
316
+ var U = Object.prototype.hasOwnProperty, me = {}, Ee = I.ReactDebugCurrentFrame;
317
+ function X(e) {
318
318
  if (e) {
319
- var r = e._owner, t = Z(e.type, e._source, r ? r.type : null);
320
- Se.setExtraStackFrame(t);
319
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
320
+ Ee.setExtraStackFrame(t);
321
321
  } else
322
- Se.setExtraStackFrame(null);
322
+ Ee.setExtraStackFrame(null);
323
323
  }
324
- function Je(e, r, t, a, u) {
324
+ function Oe(e, r, t, a, u) {
325
325
  {
326
- var c = Function.call.bind(q);
326
+ var d = Function.call.bind(U);
327
327
  for (var l in e)
328
- if (c(e, l)) {
328
+ if (d(e, l)) {
329
329
  var s = void 0;
330
330
  try {
331
331
  if (typeof e[l] != "function") {
332
- var S = Error((a || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw S.name = "Invariant Violation", S;
332
+ var k = Error((a || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw k.name = "Invariant Violation", k;
334
334
  }
335
335
  s = e[l](r, l, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (x) {
337
- s = x;
336
+ } catch (h) {
337
+ s = h;
338
338
  }
339
- s && !(s instanceof Error) && (ee(u), h("%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).", a || "React class", t, l, typeof s), ee(null)), s instanceof Error && !(s.message in Re) && (Re[s.message] = !0, ee(u), h("Failed %s type: %s", t, s.message), ee(null));
339
+ s && !(s instanceof Error) && (X(u), f("%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).", a || "React class", t, l, typeof s), X(null)), s instanceof Error && !(s.message in me) && (me[s.message] = !0, X(u), f("Failed %s type: %s", t, s.message), X(null));
340
340
  }
341
341
  }
342
342
  }
343
- var He = Array.isArray;
344
- function le(e) {
345
- return He(e);
343
+ var E = Array.isArray;
344
+ function D(e) {
345
+ return E(e);
346
346
  }
347
- function Ke(e) {
347
+ function Q(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;
@@ -352,26 +352,26 @@ function yr() {
352
352
  }
353
353
  function Ge(e) {
354
354
  try {
355
- return ke(e), !1;
355
+ return Fe(e), !1;
356
356
  } catch {
357
357
  return !0;
358
358
  }
359
359
  }
360
- function ke(e) {
360
+ function Fe(e) {
361
361
  return "" + e;
362
362
  }
363
- function _e(e) {
363
+ function Ie(e) {
364
364
  if (Ge(e))
365
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), ke(e);
365
+ return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Q(e)), Fe(e);
366
366
  }
367
- var je = P.ReactCurrentOwner, Xe = {
367
+ var Me = I.ReactCurrentOwner, Xe = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, we, Te;
372
+ }, Ae, De;
373
373
  function Qe(e) {
374
- if (q.call(e, "ref")) {
374
+ if (U.call(e, "ref")) {
375
375
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
376
  if (r && r.isReactWarning)
377
377
  return !1;
@@ -379,7 +379,7 @@ function yr() {
379
379
  return e.ref !== void 0;
380
380
  }
381
381
  function Ze(e) {
382
- if (q.call(e, "key")) {
382
+ if (U.call(e, "key")) {
383
383
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
384
  if (r && r.isReactWarning)
385
385
  return !1;
@@ -387,12 +387,12 @@ function yr() {
387
387
  return e.key !== void 0;
388
388
  }
389
389
  function er(e, r) {
390
- typeof e.ref == "string" && je.current;
390
+ typeof e.ref == "string" && Me.current;
391
391
  }
392
392
  function rr(e, r) {
393
393
  {
394
394
  var t = function() {
395
- we || (we = !0, h("%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
+ Ae || (Ae = !0, f("%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,
@@ -403,7 +403,7 @@ function yr() {
403
403
  function tr(e, r) {
404
404
  {
405
405
  var t = function() {
406
- Te || (Te = !0, h("%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
+ De || (De = !0, f("%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,17 +411,17 @@ function yr() {
411
411
  });
412
412
  }
413
413
  }
414
- var nr = function(e, r, t, a, u, c, l) {
414
+ var nr = function(e, r, t, a, u, d, l) {
415
415
  var s = {
416
416
  // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: _,
417
+ $$typeof: m,
418
418
  // Built-in properties that belong on the element
419
419
  type: e,
420
420
  key: r,
421
421
  ref: t,
422
422
  props: l,
423
423
  // Record the component responsible for creating this element.
424
- _owner: c
424
+ _owner: d
425
425
  };
426
426
  return s._store = {}, Object.defineProperty(s._store, "validated", {
427
427
  configurable: !1,
@@ -442,39 +442,39 @@ function yr() {
442
442
  };
443
443
  function ar(e, r, t, a, u) {
444
444
  {
445
- var c, l = {}, s = null, S = null;
446
- t !== void 0 && (_e(t), s = "" + t), Ze(r) && (_e(r.key), s = "" + r.key), Qe(r) && (S = r.ref, er(r, u));
447
- for (c in r)
448
- q.call(r, c) && !Xe.hasOwnProperty(c) && (l[c] = r[c]);
445
+ var d, l = {}, s = null, k = null;
446
+ t !== void 0 && (Ie(t), s = "" + t), Ze(r) && (Ie(r.key), s = "" + r.key), Qe(r) && (k = r.ref, er(r, u));
447
+ for (d in r)
448
+ U.call(r, d) && !Xe.hasOwnProperty(d) && (l[d] = r[d]);
449
449
  if (e && e.defaultProps) {
450
- var x = e.defaultProps;
451
- for (c in x)
452
- l[c] === void 0 && (l[c] = x[c]);
450
+ var h = e.defaultProps;
451
+ for (d in h)
452
+ l[d] === void 0 && (l[d] = h[d]);
453
453
  }
454
- if (s || S) {
455
- var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- s && rr(l, m), S && tr(l, m);
454
+ if (s || k) {
455
+ var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ s && rr(l, y), k && tr(l, y);
457
457
  }
458
- return nr(e, s, S, u, a, je.current, l);
458
+ return nr(e, s, k, u, a, Me.current, l);
459
459
  }
460
460
  }
461
- var ue = P.ReactCurrentOwner, Ce = P.ReactDebugCurrentFrame;
462
- function N(e) {
461
+ var je = I.ReactCurrentOwner, We = I.ReactDebugCurrentFrame;
462
+ function Z(e) {
463
463
  if (e) {
464
- var r = e._owner, t = Z(e.type, e._source, r ? r.type : null);
465
- Ce.setExtraStackFrame(t);
464
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
465
+ We.setExtraStackFrame(t);
466
466
  } else
467
- Ce.setExtraStackFrame(null);
467
+ We.setExtraStackFrame(null);
468
468
  }
469
- var ce;
470
- ce = !1;
471
- function fe(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === _;
469
+ var _e;
470
+ _e = !1;
471
+ function we(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === m;
473
473
  }
474
- function Pe() {
474
+ function ze() {
475
475
  {
476
- if (ue.current) {
477
- var e = I(ue.current.type);
476
+ if (je.current) {
477
+ var e = O(je.current.type);
478
478
  if (e)
479
479
  return `
480
480
 
@@ -486,10 +486,10 @@ Check the render method of \`` + e + "`.";
486
486
  function or(e) {
487
487
  return "";
488
488
  }
489
- var Oe = {};
489
+ var $e = {};
490
490
  function ir(e) {
491
491
  {
492
- var r = Pe();
492
+ var r = ze();
493
493
  if (!r) {
494
494
  var t = typeof e == "string" ? e : e.displayName || e.name;
495
495
  t && (r = `
@@ -499,35 +499,35 @@ Check the top-level render call using <` + t + ">.");
499
499
  return r;
500
500
  }
501
501
  }
502
- function Fe(e, r) {
502
+ function Ye(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
507
  var t = ir(r);
508
- if (Oe[t])
508
+ if ($e[t])
509
509
  return;
510
- Oe[t] = !0;
510
+ $e[t] = !0;
511
511
  var a = "";
512
- e && e._owner && e._owner !== ue.current && (a = " It was passed a child from " + I(e._owner.type) + "."), N(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), N(null);
512
+ e && e._owner && e._owner !== je.current && (a = " It was passed a child from " + O(e._owner.type) + "."), Z(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), Z(null);
513
513
  }
514
514
  }
515
- function Ie(e, r) {
515
+ function Be(e, r) {
516
516
  {
517
517
  if (typeof e != "object")
518
518
  return;
519
- if (le(e))
519
+ if (D(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var a = e[t];
522
- fe(a) && Fe(a, r);
522
+ we(a) && Ye(a, r);
523
523
  }
524
- else if (fe(e))
524
+ else if (we(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var u = B(e);
527
+ var u = q(e);
528
528
  if (typeof u == "function" && u !== e.entries)
529
- for (var c = u.call(e), l; !(l = c.next()).done; )
530
- fe(l.value) && Fe(l.value, r);
529
+ for (var d = u.call(e), l; !(l = d.next()).done; )
530
+ we(l.value) && Ye(l.value, r);
531
531
  }
532
532
  }
533
533
  }
@@ -539,21 +539,21 @@ 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 === b || // Note: Memo only checks outer props here.
542
+ else if (typeof r == "object" && (r.$$typeof === g || // Note: Memo only checks outer props here.
543
543
  // Inner props are checked in the reconciler.
544
- r.$$typeof === R))
544
+ r.$$typeof === S))
545
545
  t = r.propTypes;
546
546
  else
547
547
  return;
548
548
  if (t) {
549
- var a = I(r);
550
- Je(t, e.props, "prop", a, e);
551
- } else if (r.PropTypes !== void 0 && !ce) {
552
- ce = !0;
553
- var u = I(r);
554
- h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
549
+ var a = O(r);
550
+ Oe(t, e.props, "prop", a, e);
551
+ } else if (r.PropTypes !== void 0 && !_e) {
552
+ _e = !0;
553
+ var u = O(r);
554
+ f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
555
555
  }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
557
  }
558
558
  }
559
559
  function lr(e) {
@@ -561,127 +561,127 @@ Check the top-level render call using <` + t + ">.");
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var a = r[t];
563
563
  if (a !== "children" && a !== "key") {
564
- N(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), N(null);
564
+ Z(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Z(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (N(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
568
+ e.ref !== null && (Z(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
569
569
  }
570
570
  }
571
- var De = {};
572
- function ze(e, r, t, a, u, c) {
571
+ var Le = {};
572
+ function Ne(e, r, t, a, u, d) {
573
573
  {
574
- var l = ne(e);
574
+ var l = de(e);
575
575
  if (!l) {
576
576
  var s = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " 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 S = or();
579
- S ? s += S : s += Pe();
580
- var x;
581
- e === null ? x = "null" : le(e) ? x = "array" : e !== void 0 && e.$$typeof === _ ? (x = "<" + (I(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, s);
578
+ var k = or();
579
+ k ? s += k : s += ze();
580
+ var h;
581
+ e === null ? h = "null" : D(e) ? h = "array" : e !== void 0 && e.$$typeof === m ? (h = "<" + (O(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, s);
582
582
  }
583
- var m = ar(e, r, t, u, c);
584
- if (m == null)
585
- return m;
583
+ var y = ar(e, r, t, u, d);
584
+ if (y == null)
585
+ return y;
586
586
  if (l) {
587
- var w = r.children;
588
- if (w !== void 0)
587
+ var P = r.children;
588
+ if (P !== void 0)
589
589
  if (a)
590
- if (le(w)) {
591
- for (var U = 0; U < w.length; U++)
592
- Ie(w[U], e);
593
- Object.freeze && Object.freeze(w);
590
+ if (D(P)) {
591
+ for (var ee = 0; ee < P.length; ee++)
592
+ Be(P[ee], e);
593
+ Object.freeze && Object.freeze(P);
594
594
  } else
595
- h("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
+ f("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
- Ie(w, e);
597
+ Be(P, e);
598
598
  }
599
- if (q.call(r, "key")) {
600
- var Y = I(e), k = Object.keys(r).filter(function(vr) {
601
- return vr !== "key";
602
- }), de = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!De[Y + de]) {
604
- var pr = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
605
- h(`A props object containing a "key" prop is being spread into JSX:
599
+ if (U.call(r, "key")) {
600
+ var V = O(e), w = Object.keys(r).filter(function(br) {
601
+ return br !== "key";
602
+ }), Ce = w.length > 0 ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Le[V + Ce]) {
604
+ var pr = w.length > 0 ? "{" + w.join(": ..., ") + ": ...}" : "{}";
605
+ f(`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} />`, de, Y, pr, Y), De[Y + de] = !0;
610
+ <%s key={someKey} {...props} />`, Ce, V, pr, V), Le[V + Ce] = !0;
611
611
  }
612
612
  }
613
- return e === f ? lr(m) : sr(m), m;
613
+ return e === c ? lr(y) : sr(y), y;
614
614
  }
615
615
  }
616
- function ur(e, r, t) {
617
- return ze(e, r, t, !0);
618
- }
619
616
  function cr(e, r, t) {
620
- return ze(e, r, t, !1);
617
+ return Ne(e, r, t, !0);
618
+ }
619
+ function ur(e, r, t) {
620
+ return Ne(e, r, t, !1);
621
621
  }
622
- var fr = cr, dr = ur;
623
- H.Fragment = f, H.jsx = fr, H.jsxs = dr;
624
- }()), H;
622
+ var fr = ur, dr = cr;
623
+ le.Fragment = c, le.jsx = fr, le.jsxs = dr;
624
+ }()), le;
625
625
  }
626
- process.env.NODE_ENV === "production" ? ve.exports = xr() : ve.exports = yr();
627
- var n = ve.exports;
628
- const hr = ({
629
- isOpen: d,
630
- onClose: _,
631
- onSubmit: O
626
+ process.env.NODE_ENV === "production" ? Pe.exports = hr() : Pe.exports = xr();
627
+ var n = Pe.exports;
628
+ const yr = ({
629
+ isOpen: p,
630
+ onClose: m,
631
+ onSubmit: C
632
632
  }) => {
633
- const [f, p] = $({
633
+ const [c, b] = Y({
634
634
  text: "",
635
635
  rating: void 0,
636
636
  feedbackType: "general",
637
637
  userEmail: "",
638
638
  userName: ""
639
- }), [o, F] = $(!1), [E, b] = $("idle"), [T, y] = $(""), [R, v] = $(!1), A = Ae(null), D = Ae(null);
640
- Me(() => (d ? (v(!0), document.body.style.overflow = "hidden", setTimeout(() => {
639
+ }), [o, R] = Y(!1), [x, g] = Y("idle"), [j, v] = Y(""), [S, T] = Y(!1), F = Ue(null), B = Ue(null);
640
+ Ve(() => (p ? (T(!0), document.body.style.overflow = "hidden", setTimeout(() => {
641
641
  var i;
642
- (i = D.current) == null || i.focus();
642
+ (i = B.current) == null || i.focus();
643
643
  }, 150)) : document.body.style.overflow = "unset", () => {
644
644
  document.body.style.overflow = "unset";
645
- }), [d]), Me(() => {
646
- const i = (j) => {
647
- j.key === "Escape" && d && !o && C();
645
+ }), [p]), Ve(() => {
646
+ const i = (_) => {
647
+ _.key === "Escape" && p && !o && A();
648
648
  };
649
- return d && document.addEventListener("keydown", i), () => {
649
+ return p && document.addEventListener("keydown", i), () => {
650
650
  document.removeEventListener("keydown", i);
651
651
  };
652
- }, [d, o]);
653
- const C = () => {
654
- v(!1), setTimeout(() => {
655
- _(), setTimeout(() => {
656
- p({
652
+ }, [p, o]);
653
+ const A = () => {
654
+ T(!1), setTimeout(() => {
655
+ m(), setTimeout(() => {
656
+ b({
657
657
  text: "",
658
658
  rating: void 0,
659
659
  feedbackType: "general",
660
660
  userEmail: "",
661
661
  userName: ""
662
- }), b("idle"), y("");
662
+ }), g("idle"), v("");
663
663
  }, 100);
664
664
  }, 200);
665
- }, B = async (i) => {
666
- if (i.preventDefault(), !f.text.trim()) {
667
- y("Please enter your feedback");
665
+ }, q = async (i) => {
666
+ if (i.preventDefault(), !c.text.trim()) {
667
+ v("Please enter your feedback");
668
668
  return;
669
669
  }
670
- F(!0), y("");
670
+ R(!0), v("");
671
671
  try {
672
- await O(f), b("success"), setTimeout(() => {
673
- C();
672
+ await C(c), g("success"), setTimeout(() => {
673
+ A();
674
674
  }, 2e3);
675
- } catch (j) {
676
- b("error"), y(j instanceof Error ? j.message : "Failed to submit feedback");
675
+ } catch (_) {
676
+ g("error"), v(_ instanceof Error ? _.message : "Failed to submit feedback");
677
677
  } finally {
678
- F(!1);
678
+ R(!1);
679
679
  }
680
680
  };
681
- if (!d) return null;
682
- const P = (i) => {
683
- i.target === i.currentTarget && !o && C();
684
- }, h = {
681
+ if (!p) return null;
682
+ const I = (i) => {
683
+ i.target === i.currentTarget && !o && A();
684
+ }, f = {
685
685
  position: "fixed",
686
686
  top: 0,
687
687
  left: 0,
@@ -693,9 +693,9 @@ const hr = ({
693
693
  justifyContent: "center",
694
694
  zIndex: 1e4,
695
695
  padding: "16px",
696
- opacity: R ? 1 : 0,
696
+ opacity: S ? 1 : 0,
697
697
  transition: "opacity 0.2s ease-in-out"
698
- }, L = {
698
+ }, re = {
699
699
  backgroundColor: "white",
700
700
  borderRadius: "12px",
701
701
  padding: "24px",
@@ -704,23 +704,23 @@ const hr = ({
704
704
  maxHeight: "90vh",
705
705
  overflowY: "auto",
706
706
  boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
707
- transform: R ? "scale(1)" : "scale(0.95)",
708
- opacity: R ? 1 : 0,
707
+ transform: S ? "scale(1)" : "scale(0.95)",
708
+ opacity: S ? 1 : 0,
709
709
  transition: "all 0.2s ease-in-out"
710
710
  };
711
711
  return /* @__PURE__ */ n.jsx(
712
712
  "div",
713
713
  {
714
- onClick: P,
715
- style: h,
714
+ onClick: I,
715
+ style: f,
716
716
  role: "dialog",
717
717
  "aria-modal": "true",
718
718
  "aria-labelledby": "feedback-modal-title",
719
719
  children: /* @__PURE__ */ n.jsxs(
720
720
  "div",
721
721
  {
722
- ref: A,
723
- style: L,
722
+ ref: F,
723
+ style: re,
724
724
  onClick: (i) => i.stopPropagation(),
725
725
  children: [
726
726
  /* @__PURE__ */ n.jsxs("div", { style: { marginBottom: "24px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
@@ -735,7 +735,7 @@ const hr = ({
735
735
  /* @__PURE__ */ n.jsx(
736
736
  "button",
737
737
  {
738
- onClick: C,
738
+ onClick: A,
739
739
  disabled: o,
740
740
  "aria-label": "Close feedback form",
741
741
  style: {
@@ -755,7 +755,7 @@ const hr = ({
755
755
  }
756
756
  )
757
757
  ] }),
758
- E === "success" && /* @__PURE__ */ n.jsxs(
758
+ x === "success" && /* @__PURE__ */ n.jsxs(
759
759
  "div",
760
760
  {
761
761
  style: {
@@ -778,7 +778,7 @@ const hr = ({
778
778
  ]
779
779
  }
780
780
  ),
781
- T && /* @__PURE__ */ n.jsxs(
781
+ j && /* @__PURE__ */ n.jsxs(
782
782
  "div",
783
783
  {
784
784
  style: {
@@ -796,11 +796,11 @@ const hr = ({
796
796
  "aria-live": "assertive",
797
797
  children: [
798
798
  /* @__PURE__ */ n.jsx("span", { style: { fontSize: "18px" }, children: "⚠" }),
799
- /* @__PURE__ */ n.jsx("span", { children: T })
799
+ /* @__PURE__ */ n.jsx("span", { children: j })
800
800
  ]
801
801
  }
802
802
  ),
803
- /* @__PURE__ */ n.jsxs("form", { onSubmit: B, children: [
803
+ /* @__PURE__ */ n.jsxs("form", { onSubmit: q, children: [
804
804
  /* @__PURE__ */ n.jsxs("div", { style: { marginBottom: "16px" }, children: [
805
805
  /* @__PURE__ */ n.jsx(
806
806
  "label",
@@ -814,8 +814,8 @@ const hr = ({
814
814
  "select",
815
815
  {
816
816
  id: "feedback-type",
817
- value: f.feedbackType,
818
- onChange: (i) => p({ ...f, feedbackType: i.target.value }),
817
+ value: c.feedbackType,
818
+ onChange: (i) => b({ ...c, feedbackType: i.target.value }),
819
819
  disabled: o,
820
820
  style: {
821
821
  width: "100%",
@@ -843,23 +843,23 @@ const hr = ({
843
843
  "button",
844
844
  {
845
845
  type: "button",
846
- onClick: () => p({ ...f, rating: i }),
846
+ onClick: () => b({ ...c, rating: i }),
847
847
  disabled: o,
848
848
  "aria-label": `Rate ${i} stars`,
849
- "aria-pressed": f.rating === i,
849
+ "aria-pressed": c.rating === i,
850
850
  style: {
851
851
  background: "none",
852
852
  border: "none",
853
853
  fontSize: "28px",
854
854
  cursor: o ? "not-allowed" : "pointer",
855
855
  padding: "0",
856
- color: f.rating && f.rating >= i ? "#fbbf24" : "#d1d5db",
856
+ color: c.rating && c.rating >= i ? "#fbbf24" : "#d1d5db",
857
857
  transition: "all 0.2s",
858
858
  opacity: o ? 0.6 : 1,
859
859
  transform: "scale(1)"
860
860
  },
861
- onMouseEnter: (j) => !o && (j.currentTarget.style.transform = "scale(1.2)"),
862
- onMouseLeave: (j) => !o && (j.currentTarget.style.transform = "scale(1)"),
861
+ onMouseEnter: (_) => !o && (_.currentTarget.style.transform = "scale(1.2)"),
862
+ onMouseLeave: (_) => !o && (_.currentTarget.style.transform = "scale(1)"),
863
863
  children: "★"
864
864
  },
865
865
  i
@@ -881,9 +881,9 @@ const hr = ({
881
881
  "textarea",
882
882
  {
883
883
  id: "feedback-text",
884
- ref: D,
885
- value: f.text,
886
- onChange: (i) => p({ ...f, text: i.target.value }),
884
+ ref: B,
885
+ value: c.text,
886
+ onChange: (i) => b({ ...c, text: i.target.value }),
887
887
  placeholder: "Tell us what you think...",
888
888
  required: !0,
889
889
  disabled: o,
@@ -917,8 +917,8 @@ const hr = ({
917
917
  {
918
918
  id: "feedback-name",
919
919
  type: "text",
920
- value: f.userName,
921
- onChange: (i) => p({ ...f, userName: i.target.value }),
920
+ value: c.userName,
921
+ onChange: (i) => b({ ...c, userName: i.target.value }),
922
922
  placeholder: "Your name",
923
923
  disabled: o,
924
924
  style: {
@@ -946,8 +946,8 @@ const hr = ({
946
946
  {
947
947
  id: "feedback-email",
948
948
  type: "email",
949
- value: f.userEmail,
950
- onChange: (i) => p({ ...f, userEmail: i.target.value }),
949
+ value: c.userEmail,
950
+ onChange: (i) => b({ ...c, userEmail: i.target.value }),
951
951
  placeholder: "your@email.com",
952
952
  disabled: o,
953
953
  style: {
@@ -966,7 +966,7 @@ const hr = ({
966
966
  "button",
967
967
  {
968
968
  type: "button",
969
- onClick: C,
969
+ onClick: A,
970
970
  disabled: o,
971
971
  style: {
972
972
  padding: "10px 20px",
@@ -989,16 +989,16 @@ const hr = ({
989
989
  "button",
990
990
  {
991
991
  type: "submit",
992
- disabled: o || E === "success",
992
+ disabled: o || x === "success",
993
993
  style: {
994
994
  padding: "10px 20px",
995
995
  border: "none",
996
996
  borderRadius: "6px",
997
- backgroundColor: E === "success" ? "#10b981" : "#3b82f6",
997
+ backgroundColor: x === "success" ? "#10b981" : "#3b82f6",
998
998
  color: "white",
999
999
  fontSize: "14px",
1000
1000
  fontWeight: "500",
1001
- cursor: o || E === "success" ? "not-allowed" : "pointer",
1001
+ cursor: o || x === "success" ? "not-allowed" : "pointer",
1002
1002
  opacity: o ? 0.7 : 1,
1003
1003
  transition: "all 0.2s",
1004
1004
  display: "flex",
@@ -1020,7 +1020,7 @@ const hr = ({
1020
1020
  }
1021
1021
  }
1022
1022
  ),
1023
- /* @__PURE__ */ n.jsx("span", { children: o ? "Sending..." : E === "success" ? "✓ Sent!" : "Send Feedback" })
1023
+ /* @__PURE__ */ n.jsx("span", { children: o ? "Sending..." : x === "success" ? "✓ Sent!" : "Send Feedback" })
1024
1024
  ]
1025
1025
  }
1026
1026
  )
@@ -1047,188 +1047,275 @@ const hr = ({
1047
1047
  }
1048
1048
  );
1049
1049
  };
1050
- async function mr(d, _, O) {
1051
- const f = {
1050
+ async function mr(p, m, C) {
1051
+ const c = {
1052
1052
  "Content-Type": "application/json"
1053
1053
  };
1054
- O && (f.Authorization = `Bearer ${O}`);
1054
+ C && (c.Authorization = `Bearer ${C}`);
1055
1055
  try {
1056
- const p = await fetch(`${d}/api/feedback`, {
1056
+ const b = await fetch(`${p}/api/feedback`, {
1057
1057
  method: "POST",
1058
- headers: f,
1059
- body: JSON.stringify(_)
1058
+ headers: c,
1059
+ body: JSON.stringify(m)
1060
1060
  });
1061
- if (!p.ok) {
1062
- const o = await p.json().catch(() => ({}));
1063
- throw new Error(o.message || `HTTP ${p.status}: ${p.statusText}`);
1061
+ if (!b.ok) {
1062
+ const o = await b.json().catch(() => ({}));
1063
+ throw new Error(o.message || `HTTP ${b.status}: ${b.statusText}`);
1064
1064
  }
1065
- return await p.json();
1066
- } catch (p) {
1067
- throw p instanceof Error ? p : new Error("Failed to submit feedback");
1065
+ return await b.json();
1066
+ } catch (b) {
1067
+ throw b instanceof Error ? b : new Error("Failed to submit feedback");
1068
1068
  }
1069
1069
  }
1070
- const Rr = ({
1071
- projectId: d,
1072
- apiKey: _,
1073
- apiUrl: O = "https://metricshift-sdk-be-production.up.railway.app",
1074
- buttonText: f = "Feedback",
1075
- showIcon: p = !0,
1076
- position: o = "bottom-right",
1077
- size: F = "medium",
1078
- buttonColor: E = "#3b82f6",
1079
- buttonHoverColor: b = "#2563eb",
1080
- buttonTextColor: T = "#ffffff",
1081
- customStyles: y,
1082
- customClassName: R = "",
1083
- disabled: v = !1,
1084
- autoOpen: A = !1,
1085
- onOpen: D,
1086
- onClose: C,
1087
- onSuccess: B,
1088
- onError: P
1070
+ const Er = (p, m = 0.12) => {
1071
+ const C = /^#([0-9a-fA-F]{6})$/.exec(p);
1072
+ if (!C) return p;
1073
+ const c = parseInt(C[1], 16), b = Math.max(0, Math.min(255, Math.round((c >> 16 & 255) * (1 - m)))), o = Math.max(0, Math.min(255, Math.round((c >> 8 & 255) * (1 - m)))), R = Math.max(0, Math.min(255, Math.round((c & 255) * (1 - m)))), x = (g) => g.toString(16).padStart(2, "0");
1074
+ return `#${x(b)}${x(o)}${x(R)}`;
1075
+ }, kr = ({
1076
+ projectId: p,
1077
+ apiKey: m,
1078
+ apiUrl: C = "https://metricshift-sdk-be-production.up.railway.app",
1079
+ // Text & display
1080
+ buttonText: c = "Feedback",
1081
+ subtitleText: b,
1082
+ showIcon: o = !1,
1083
+ // Avatar
1084
+ avatarSrc: R,
1085
+ avatarAlt: x,
1086
+ avatarSize: g = 40,
1087
+ // Position & size
1088
+ position: j = "bottom-right",
1089
+ size: v = "medium",
1090
+ // Legacy styling / overrides
1091
+ buttonColor: S,
1092
+ buttonHoverColor: T,
1093
+ buttonTextColor: F,
1094
+ customStyles: B,
1095
+ customClassName: A = "",
1096
+ // New styling API
1097
+ variant: q = "outline",
1098
+ accentColor: I,
1099
+ // Behavior
1100
+ disabled: f = !1,
1101
+ autoOpen: re = !1,
1102
+ // Callbacks
1103
+ onOpen: i,
1104
+ onClose: _,
1105
+ onSuccess: ce,
1106
+ onError: ue
1089
1107
  }) => {
1090
- const [h, L] = $(A), [i, j] = $(!1), K = () => {
1091
- v || (L(!0), D == null || D());
1092
- }, re = () => {
1093
- L(!1), C == null || C();
1094
- }, te = async (g) => {
1108
+ const [fe, te] = Y(re), [de, pe] = Y(!1), [be, O] = Y(!1), M = () => {
1109
+ f || (te(!0), i == null || i());
1110
+ }, L = () => {
1111
+ te(!1), _ == null || _();
1112
+ }, ge = async (E) => {
1095
1113
  try {
1096
- const M = {
1097
- ...g,
1098
- project_id: d,
1114
+ const D = {
1115
+ ...E,
1116
+ project_id: p,
1099
1117
  page_url: window.location.href,
1100
1118
  page_title: document.title,
1101
1119
  user_agent: navigator.userAgent,
1102
- user_identifier: g.userEmail || "anonymous",
1103
- user_email: g.userEmail,
1104
- user_name: g.userName,
1105
- feedback_type: g.feedbackType
1106
- }, W = await mr(O, M, _);
1107
- B && (W != null && W.id) && B(W.id);
1108
- } catch (M) {
1109
- throw P && M instanceof Error && P(M), M;
1120
+ user_identifier: E.userEmail || "anonymous",
1121
+ user_email: E.userEmail,
1122
+ user_name: E.userName,
1123
+ feedback_type: E.feedbackType
1124
+ }, Q = await mr(C, D, m);
1125
+ ce && (Q != null && Q.id) && ce(Q.id);
1126
+ } catch (D) {
1127
+ throw ue && D instanceof Error && ue(D), D;
1110
1128
  }
1111
- }, G = {
1129
+ }, ve = {
1112
1130
  small: {
1113
- padding: "8px 16px",
1114
- fontSize: "14px",
1115
- iconSize: "16px"
1131
+ padding: "6px 14px",
1132
+ fontSize: "13px",
1133
+ iconSize: "14px"
1116
1134
  },
1117
1135
  medium: {
1118
- padding: "12px 20px",
1119
- fontSize: "16px",
1120
- iconSize: "20px"
1136
+ padding: "10px 18px",
1137
+ fontSize: "15px",
1138
+ iconSize: "18px"
1121
1139
  },
1122
1140
  large: {
1123
- padding: "16px 28px",
1124
- fontSize: "18px",
1125
- iconSize: "24px"
1141
+ padding: "14px 24px",
1142
+ fontSize: "17px",
1143
+ iconSize: "22px"
1126
1144
  }
1127
- }, ne = () => {
1128
- if (o === "inline")
1145
+ }, ne = !!R, he = () => {
1146
+ if (j === "inline")
1129
1147
  return {
1130
- display: "inline-flex",
1131
1148
  position: "relative"
1132
1149
  };
1133
- const g = {
1150
+ const E = {
1134
1151
  position: "fixed",
1135
1152
  zIndex: 9999
1136
1153
  };
1137
- return o.includes("bottom") ? g.bottom = "20px" : g.top = "20px", o.includes("right") ? g.right = "20px" : g.left = "20px", g;
1138
- }, V = G[F], I = {
1139
- ...ne(),
1140
- padding: V.padding,
1141
- backgroundColor: i && !v ? b : E,
1142
- color: T,
1143
- border: "none",
1144
- borderRadius: "8px",
1145
- fontSize: V.fontSize,
1146
- fontWeight: "600",
1147
- cursor: v ? "not-allowed" : "pointer",
1154
+ return j.includes("bottom") ? E.bottom = "20px" : E.top = "20px", j.includes("right") ? E.right = "20px" : E.left = "20px", E;
1155
+ }, H = ve[v], xe = he(), J = I ?? S ?? "#111827", K = j !== "inline" ? "0 12px 30px rgba(15, 23, 42, 0.12)" : "none";
1156
+ let N = "#ffffff", ae = "#f3f4f6", W = F || J, z = "rgba(15, 23, 42, 0.08)", $ = 1;
1157
+ q === "solid" ? (N = S || J, ae = T || Er(N, 0.12), W = F || "#ffffff", z = "transparent", $ = 0) : q === "ghost" && (N = "transparent", ae = "#f3f4f6", W = F || J, z = "transparent", $ = 0);
1158
+ const oe = {
1159
+ // hosts can override these via .ms-feedback-button selector
1160
+ "--ms-feedback-bg": N,
1161
+ "--ms-feedback-color": W,
1162
+ "--ms-feedback-border": z,
1163
+ "--ms-feedback-radius": "9999px",
1164
+ "--ms-feedback-shadow": K
1165
+ }, Se = ne ? {
1166
+ small: "8px 14px",
1167
+ medium: "12px 18px",
1168
+ large: "16px 24px"
1169
+ }[v] : H.padding, ye = {
1170
+ ...oe,
1171
+ padding: Se,
1172
+ backgroundColor: de && !f ? ae : N,
1173
+ color: W,
1174
+ border: $ ? `1px solid ${z}` : "1px solid transparent",
1175
+ borderRadius: "9999px",
1176
+ fontSize: H.fontSize,
1177
+ fontWeight: 600,
1178
+ cursor: f ? "not-allowed" : "pointer",
1148
1179
  display: "flex",
1149
1180
  alignItems: "center",
1150
1181
  justifyContent: "center",
1151
1182
  gap: "8px",
1152
- boxShadow: o !== "inline" ? "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)" : "none",
1183
+ boxShadow: be ? `${K}, 0 0 0 3px rgba(59,130,246,0.45)` : K,
1153
1184
  transition: "all 0.2s ease",
1154
- opacity: v ? 0.6 : 1,
1155
- transform: i && !v ? "translateY(-2px)" : "translateY(0)",
1185
+ opacity: f ? 0.6 : 1,
1186
+ transform: de && !f ? "translateY(-2px)" : "translateY(0)",
1156
1187
  outline: "none",
1157
- ...y
1158
- }, z = {
1159
- fontSize: V.iconSize,
1188
+ position: "relative",
1189
+ ...B
1190
+ }, ke = {
1191
+ fontSize: H.iconSize,
1160
1192
  lineHeight: 1,
1161
1193
  display: "flex",
1162
1194
  alignItems: "center"
1195
+ }, Re = {
1196
+ display: "flex",
1197
+ flexDirection: "column",
1198
+ alignItems: "flex-start",
1199
+ lineHeight: 1.2
1200
+ }, G = {
1201
+ fontWeight: 600,
1202
+ fontSize: "inherit"
1203
+ }, U = {
1204
+ marginTop: "2px",
1205
+ fontWeight: 400,
1206
+ fontSize: "12px",
1207
+ opacity: 0.9
1208
+ }, me = {
1209
+ ...xe,
1210
+ display: "inline-flex",
1211
+ alignItems: "center",
1212
+ justifyContent: "center"
1213
+ }, Ee = {
1214
+ position: "absolute",
1215
+ top: 0,
1216
+ left: "50%",
1217
+ transform: "translate(-50%, -75%)",
1218
+ // lifted higher
1219
+ width: g,
1220
+ height: g,
1221
+ borderRadius: "9999px",
1222
+ overflow: "hidden",
1223
+ boxShadow: "0 8px 22px rgba(15,23,42,0.22)",
1224
+ border: "2px solid #ffffff",
1225
+ backgroundColor: "#e5e7eb",
1226
+ display: "flex",
1227
+ alignItems: "center",
1228
+ justifyContent: "center",
1229
+ zIndex: 1,
1230
+ pointerEvents: "none"
1231
+ }, X = {
1232
+ width: "100%",
1233
+ height: "100%",
1234
+ objectFit: "cover"
1163
1235
  };
1164
1236
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1165
- /* @__PURE__ */ n.jsxs(
1166
- "button",
1167
- {
1168
- onClick: K,
1169
- onMouseEnter: () => !v && j(!0),
1170
- onMouseLeave: () => !v && j(!1),
1171
- disabled: v,
1172
- className: R,
1173
- style: I,
1174
- "aria-label": "Open feedback form",
1175
- "aria-pressed": h,
1176
- "aria-disabled": v,
1177
- role: "button",
1178
- tabIndex: v ? -1 : 0,
1179
- onKeyDown: (g) => {
1180
- !v && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), K());
1181
- },
1182
- children: [
1183
- p && /* @__PURE__ */ n.jsx("span", { style: z, "aria-hidden": "true", children: "💬" }),
1184
- /* @__PURE__ */ n.jsx("span", { children: f })
1185
- ]
1186
- }
1187
- ),
1237
+ /* @__PURE__ */ n.jsxs("div", { style: me, children: [
1238
+ ne && /* @__PURE__ */ n.jsx("div", { style: Ee, "aria-hidden": x ? void 0 : !0, children: R && /* @__PURE__ */ n.jsx(
1239
+ "img",
1240
+ {
1241
+ src: R,
1242
+ alt: x || "",
1243
+ style: X
1244
+ }
1245
+ ) }),
1246
+ /* @__PURE__ */ n.jsxs(
1247
+ "button",
1248
+ {
1249
+ onClick: M,
1250
+ onMouseEnter: () => !f && pe(!0),
1251
+ onMouseLeave: () => !f && pe(!1),
1252
+ onFocus: () => O(!0),
1253
+ onBlur: () => O(!1),
1254
+ disabled: f,
1255
+ className: `ms-feedback-button ${A}`.trim(),
1256
+ style: ye,
1257
+ "aria-label": "Open feedback form",
1258
+ "aria-pressed": fe,
1259
+ "aria-disabled": f,
1260
+ role: "button",
1261
+ tabIndex: f ? -1 : 0,
1262
+ onKeyDown: (E) => {
1263
+ !f && (E.key === "Enter" || E.key === " ") && (E.preventDefault(), M());
1264
+ },
1265
+ children: [
1266
+ o && /* @__PURE__ */ n.jsx("span", { style: ke, "aria-hidden": "true", children: "💬" }),
1267
+ /* @__PURE__ */ n.jsxs("div", { style: Re, children: [
1268
+ /* @__PURE__ */ n.jsx("span", { style: G, children: c }),
1269
+ b && /* @__PURE__ */ n.jsx("span", { style: U, children: b })
1270
+ ] })
1271
+ ]
1272
+ }
1273
+ )
1274
+ ] }),
1188
1275
  /* @__PURE__ */ n.jsx(
1189
- hr,
1276
+ yr,
1190
1277
  {
1191
- isOpen: h,
1192
- onClose: re,
1193
- onSubmit: te
1278
+ isOpen: fe,
1279
+ onClose: L,
1280
+ onSubmit: ge
1194
1281
  }
1195
1282
  )
1196
1283
  ] });
1197
- }, Be = br(null), Sr = () => {
1198
- const d = gr(Be);
1199
- if (!d)
1284
+ }, Ke = gr(null), Rr = () => {
1285
+ const p = vr(Ke);
1286
+ if (!p)
1200
1287
  throw new Error("useMetricShift must be used within MetricShiftProvider");
1201
- return d;
1202
- }, kr = ({
1203
- config: d,
1204
- children: _
1205
- }) => /* @__PURE__ */ n.jsx(Be.Provider, { value: d, children: _ });
1206
- let pe = null;
1288
+ return p;
1289
+ }, jr = ({
1290
+ config: p,
1291
+ children: m
1292
+ }) => /* @__PURE__ */ n.jsx(Ke.Provider, { value: p, children: m });
1293
+ let Te = null;
1207
1294
  const _r = {
1208
1295
  /**
1209
1296
  * Initialize the MetricShift SDK
1210
1297
  * @param config - SDK configuration
1211
1298
  */
1212
- init: (d) => {
1213
- pe = {
1299
+ init: (p) => {
1300
+ Te = {
1214
1301
  apiUrl: "http://localhost:3000",
1215
- ...d
1302
+ ...p
1216
1303
  }, console.log("✅ MetricShift SDK initialized", {
1217
- projectId: d.projectId,
1218
- apiUrl: pe.apiUrl
1304
+ projectId: p.projectId,
1305
+ apiUrl: Te.apiUrl
1219
1306
  });
1220
1307
  },
1221
1308
  /**
1222
1309
  * Get current SDK configuration
1223
1310
  */
1224
- getConfig: () => pe
1311
+ getConfig: () => Te
1225
1312
  };
1226
1313
  export {
1227
- Rr as FeedbackButton,
1228
- hr as FeedbackModal,
1314
+ kr as FeedbackButton,
1315
+ yr as FeedbackModal,
1229
1316
  _r as MetricShift,
1230
- kr as MetricShiftProvider,
1317
+ jr as MetricShiftProvider,
1231
1318
  mr as submitFeedback,
1232
- Sr as useMetricShift
1319
+ Rr as useMetricShift
1233
1320
  };
1234
1321
  //# sourceMappingURL=index.esm.js.map