@metricshift/react 1.0.2 → 1.1.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/components/FeedbackButton.d.ts +2 -14
- package/dist/components/FeedbackButton.d.ts.map +1 -1
- package/dist/index.esm.js +492 -465
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +11 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Le, { useState as B, useRef as $e, useEffect as We, createContext as vr, useContext as gr } from "react";
|
|
2
|
+
var Ee = { exports: {} }, te = {};
|
|
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
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var d =
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
12
|
+
var Ye;
|
|
13
|
+
function hr() {
|
|
14
|
+
if (Ye) return te;
|
|
15
|
+
Ye = 1;
|
|
16
|
+
var d = Le, E = Symbol.for("react.element"), j = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, p = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function P(g, b, w) {
|
|
18
|
+
var h, k = {}, C = null, W = null;
|
|
19
|
+
w !== void 0 && (C = "" + w), b.key !== void 0 && (C = "" + b.key), b.ref !== void 0 && (W = b.ref);
|
|
20
|
+
for (h in b) c.call(b, h) && !n.hasOwnProperty(h) && (k[h] = b[h]);
|
|
21
|
+
if (g && g.defaultProps) for (h in b = g.defaultProps, b) k[h] === void 0 && (k[h] = b[h]);
|
|
22
|
+
return { $$typeof: E, type: g, key: C, ref: W, props: k, _owner: p.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return te.Fragment = j, te.jsx = P, te.jsxs = P, te;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var ne = {};
|
|
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
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
var d =
|
|
40
|
-
function
|
|
36
|
+
var Be;
|
|
37
|
+
function xr() {
|
|
38
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
+
var d = Le, E = Symbol.for("react.element"), j = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), g = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), S = Symbol.iterator, M = "@@iterator";
|
|
40
|
+
function L(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = S && e[S] || e[M];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var O = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function x(e) {
|
|
48
48
|
{
|
|
49
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
50
|
-
t[
|
|
51
|
-
|
|
49
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
50
|
+
t[o - 1] = arguments[o];
|
|
51
|
+
q("error", e, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function q(e, r, t) {
|
|
55
55
|
{
|
|
56
|
-
var
|
|
56
|
+
var o = O.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
57
57
|
u !== "" && (r += "%s", t = t.concat([u]));
|
|
58
|
-
var
|
|
58
|
+
var f = t.map(function(l) {
|
|
59
59
|
return String(l);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var i = !1,
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
64
|
+
var i = !1, T = !1, ae = !1, oe = !1, de = !1, Z;
|
|
65
|
+
Z = Symbol.for("react.module.reference");
|
|
66
|
+
function ie(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === n || de || e === p || e === w || e === h || oe || e === W || i || T || ae || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === k || e.$$typeof === P || e.$$typeof === g || e.$$typeof === b || // 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 ===
|
|
71
|
+
e.$$typeof === Z || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
73
|
+
function pe(e, r, t) {
|
|
74
|
+
var o = e.displayName;
|
|
75
|
+
if (o)
|
|
76
|
+
return o;
|
|
77
77
|
var u = r.displayName || r.name || "";
|
|
78
78
|
return u !== "" ? t + "(" + u + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function se(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
83
|
function I(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
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
|
|
91
|
+
case c:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case j:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case n:
|
|
96
96
|
return "Profiler";
|
|
97
97
|
case p:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case w:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case h:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case g:
|
|
107
107
|
var r = e;
|
|
108
|
-
return
|
|
109
|
-
case
|
|
108
|
+
return se(r) + ".Consumer";
|
|
109
|
+
case P:
|
|
110
110
|
var t = e;
|
|
111
|
-
return
|
|
111
|
+
return se(t._context) + ".Provider";
|
|
112
112
|
case b:
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
case
|
|
118
|
-
var u = e,
|
|
113
|
+
return pe(e, e.render, "ForwardRef");
|
|
114
|
+
case k:
|
|
115
|
+
var o = e.displayName || null;
|
|
116
|
+
return o !== null ? o : I(e.type) || "Memo";
|
|
117
|
+
case C: {
|
|
118
|
+
var u = e, f = u._payload, l = u._init;
|
|
119
119
|
try {
|
|
120
|
-
return I(l(
|
|
120
|
+
return I(l(f));
|
|
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
|
|
129
|
-
function
|
|
128
|
+
var D = Object.assign, A = 0, le, H, J, Y, K, N, U;
|
|
129
|
+
function G() {
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
G.__reactDisabledLog = !0;
|
|
132
|
+
function Se() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (A === 0) {
|
|
135
|
+
le = console.log, H = console.info, J = console.warn, Y = console.error, K = console.group, N = console.groupCollapsed, U = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: G,
|
|
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
|
-
|
|
152
|
+
A++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function be() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (A--, A === 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:
|
|
165
|
-
value:
|
|
164
|
+
log: D({}, e, {
|
|
165
|
+
value: le
|
|
166
166
|
}),
|
|
167
|
-
info:
|
|
168
|
-
value:
|
|
167
|
+
info: D({}, e, {
|
|
168
|
+
value: H
|
|
169
169
|
}),
|
|
170
|
-
warn:
|
|
171
|
-
value:
|
|
170
|
+
warn: D({}, e, {
|
|
171
|
+
value: J
|
|
172
172
|
}),
|
|
173
|
-
error:
|
|
174
|
-
value:
|
|
173
|
+
error: D({}, e, {
|
|
174
|
+
value: Y
|
|
175
175
|
}),
|
|
176
|
-
group:
|
|
177
|
-
value:
|
|
176
|
+
group: D({}, e, {
|
|
177
|
+
value: K
|
|
178
178
|
}),
|
|
179
|
-
groupCollapsed:
|
|
180
|
-
value:
|
|
179
|
+
groupCollapsed: D({}, e, {
|
|
180
|
+
value: N
|
|
181
181
|
}),
|
|
182
|
-
groupEnd:
|
|
183
|
-
value:
|
|
182
|
+
groupEnd: D({}, e, {
|
|
183
|
+
value: U
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
A < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var ee = O.ReactCurrentDispatcher, ce;
|
|
191
|
+
function m(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (ce === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (u) {
|
|
197
|
-
var
|
|
198
|
-
|
|
197
|
+
var o = u.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
+
ce = o && o[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + ce + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var z = !1, $;
|
|
205
205
|
{
|
|
206
206
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
|
|
207
|
+
$ = new Ue();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function ke(e, r) {
|
|
210
|
+
if (!e || z)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var t =
|
|
213
|
+
var t = $.get(e);
|
|
214
214
|
if (t !== void 0)
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
|
-
var
|
|
218
|
-
|
|
217
|
+
var o;
|
|
218
|
+
z = !0;
|
|
219
219
|
var u = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var f;
|
|
222
|
+
f = ee.current, ee.current = null, Se();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var l = function() {
|
|
@@ -233,14 +233,14 @@ function yr() {
|
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(l, []);
|
|
235
235
|
} catch (_) {
|
|
236
|
-
|
|
236
|
+
o = _;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], l);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
l.call();
|
|
242
242
|
} catch (_) {
|
|
243
|
-
|
|
243
|
+
o = _;
|
|
244
244
|
}
|
|
245
245
|
e.call(l.prototype);
|
|
246
246
|
}
|
|
@@ -248,101 +248,101 @@ function yr() {
|
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
250
|
} catch (_) {
|
|
251
|
-
|
|
251
|
+
o = _;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
255
|
} catch (_) {
|
|
256
|
-
if (_ &&
|
|
256
|
+
if (_ && o && typeof _.stack == "string") {
|
|
257
257
|
for (var s = _.stack.split(`
|
|
258
|
-
`),
|
|
259
|
-
`),
|
|
260
|
-
|
|
261
|
-
for (;
|
|
262
|
-
if (s[
|
|
263
|
-
if (
|
|
258
|
+
`), R = o.stack.split(`
|
|
259
|
+
`), v = s.length - 1, y = R.length - 1; v >= 1 && y >= 0 && s[v] !== R[y]; )
|
|
260
|
+
y--;
|
|
261
|
+
for (; v >= 1 && y >= 0; v--, y--)
|
|
262
|
+
if (s[v] !== R[y]) {
|
|
263
|
+
if (v !== 1 || y !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
266
|
-
var
|
|
267
|
-
` + s[
|
|
268
|
-
return e.displayName &&
|
|
265
|
+
if (v--, y--, y < 0 || s[v] !== R[y]) {
|
|
266
|
+
var F = `
|
|
267
|
+
` + s[v].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && F.includes("<anonymous>") && (F = F.replace("<anonymous>", e.displayName)), typeof e == "function" && $.set(e, F), F;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (v >= 1 && y >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
z = !1, ee.current = f, be(), Error.prepareStackTrace = u;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var Q = e ? e.displayName || e.name : "", V = Q ? m(Q) : "";
|
|
278
|
+
return typeof e == "function" && $.set(e, V), V;
|
|
279
279
|
}
|
|
280
280
|
function Ve(e, r, t) {
|
|
281
|
-
return
|
|
281
|
+
return ke(e, !1);
|
|
282
282
|
}
|
|
283
283
|
function qe(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ue(e, r, t) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return ke(e, qe(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return m(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
296
|
-
return
|
|
297
|
-
case
|
|
298
|
-
return
|
|
295
|
+
case w:
|
|
296
|
+
return m("Suspense");
|
|
297
|
+
case h:
|
|
298
|
+
return m("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
302
|
case b:
|
|
303
303
|
return Ve(e.render);
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var
|
|
304
|
+
case k:
|
|
305
|
+
return ue(e.type, r, t);
|
|
306
|
+
case C: {
|
|
307
|
+
var o = e, u = o._payload, f = o._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return ue(f(u), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var re = Object.prototype.hasOwnProperty, Re = {}, _e = O.ReactDebugCurrentFrame;
|
|
317
|
+
function fe(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, t =
|
|
320
|
-
|
|
319
|
+
var r = e._owner, t = ue(e.type, e._source, r ? r.type : null);
|
|
320
|
+
_e.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
_e.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function He(e, r, t, o, u) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var f = Function.call.bind(re);
|
|
327
327
|
for (var l in e)
|
|
328
|
-
if (
|
|
328
|
+
if (f(e, l)) {
|
|
329
329
|
var s = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[l] != "function") {
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
332
|
+
var R = Error((o || "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 R.name = "Invariant Violation", R;
|
|
334
334
|
}
|
|
335
|
-
s = e[l](r, l,
|
|
336
|
-
} catch (
|
|
337
|
-
s =
|
|
335
|
+
s = e[l](r, l, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
+
} catch (v) {
|
|
337
|
+
s = v;
|
|
338
338
|
}
|
|
339
|
-
s && !(s instanceof Error) && (
|
|
339
|
+
s && !(s instanceof Error) && (fe(u), 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).", o || "React class", t, l, typeof s), fe(null)), s instanceof Error && !(s.message in Re) && (Re[s.message] = !0, fe(u), x("Failed %s type: %s", t, s.message), fe(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
return
|
|
343
|
+
var Je = Array.isArray;
|
|
344
|
+
function ve(e) {
|
|
345
|
+
return Je(e);
|
|
346
346
|
}
|
|
347
347
|
function Ke(e) {
|
|
348
348
|
{
|
|
@@ -352,26 +352,26 @@ function yr() {
|
|
|
352
352
|
}
|
|
353
353
|
function Ge(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return je(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function je(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function we(e) {
|
|
364
364
|
if (Ge(e))
|
|
365
|
-
return
|
|
365
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), je(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var Ce = O.ReactCurrentOwner, Xe = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, Te, Pe;
|
|
373
373
|
function Qe(e) {
|
|
374
|
-
if (
|
|
374
|
+
if (re.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 (
|
|
382
|
+
if (re.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" &&
|
|
390
|
+
typeof e.ref == "string" && Ce.current;
|
|
391
391
|
}
|
|
392
392
|
function rr(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var t = function() {
|
|
395
|
-
|
|
395
|
+
Te || (Te = !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,
|
|
@@ -403,7 +403,7 @@ function yr() {
|
|
|
403
403
|
function tr(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
Pe || (Pe = !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,17 +411,17 @@ function yr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var nr = function(e, r, t,
|
|
414
|
+
var nr = function(e, r, t, o, u, f, l) {
|
|
415
415
|
var s = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: E,
|
|
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:
|
|
424
|
+
_owner: f
|
|
425
425
|
};
|
|
426
426
|
return s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -432,7 +432,7 @@ function yr() {
|
|
|
432
432
|
configurable: !1,
|
|
433
433
|
enumerable: !1,
|
|
434
434
|
writable: !1,
|
|
435
|
-
value:
|
|
435
|
+
value: o
|
|
436
436
|
}), Object.defineProperty(s, "_source", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
@@ -440,41 +440,41 @@ function yr() {
|
|
|
440
440
|
value: u
|
|
441
441
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
442
442
|
};
|
|
443
|
-
function ar(e, r, t,
|
|
443
|
+
function ar(e, r, t, o, u) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
t !== void 0 && (
|
|
447
|
-
for (
|
|
448
|
-
|
|
445
|
+
var f, l = {}, s = null, R = null;
|
|
446
|
+
t !== void 0 && (we(t), s = "" + t), Ze(r) && (we(r.key), s = "" + r.key), Qe(r) && (R = r.ref, er(r, u));
|
|
447
|
+
for (f in r)
|
|
448
|
+
re.call(r, f) && !Xe.hasOwnProperty(f) && (l[f] = r[f]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
|
-
var
|
|
451
|
-
for (
|
|
452
|
-
l[
|
|
450
|
+
var v = e.defaultProps;
|
|
451
|
+
for (f in v)
|
|
452
|
+
l[f] === void 0 && (l[f] = v[f]);
|
|
453
453
|
}
|
|
454
|
-
if (s ||
|
|
455
|
-
var
|
|
456
|
-
s && rr(l,
|
|
454
|
+
if (s || R) {
|
|
455
|
+
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
s && rr(l, y), R && tr(l, y);
|
|
457
457
|
}
|
|
458
|
-
return nr(e, s,
|
|
458
|
+
return nr(e, s, R, u, o, Ce.current, l);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var ge = O.ReactCurrentOwner, Oe = O.ReactDebugCurrentFrame;
|
|
462
|
+
function X(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, t =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = ue(e.type, e._source, r ? r.type : null);
|
|
465
|
+
Oe.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
Oe.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
469
|
+
var he;
|
|
470
|
+
he = !1;
|
|
471
|
+
function xe(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === E;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Fe() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e = I(
|
|
476
|
+
if (ge.current) {
|
|
477
|
+
var e = I(ge.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
|
|
489
|
+
var Ie = {};
|
|
490
490
|
function ir(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = Fe();
|
|
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
|
|
502
|
+
function Me(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 (
|
|
508
|
+
if (Ie[t])
|
|
509
509
|
return;
|
|
510
|
-
|
|
511
|
-
var
|
|
512
|
-
e && e._owner && e._owner !==
|
|
510
|
+
Ie[t] = !0;
|
|
511
|
+
var o = "";
|
|
512
|
+
e && e._owner && e._owner !== ge.current && (o = " It was passed a child from " + I(e._owner.type) + "."), X(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, o), X(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function De(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
519
|
+
if (ve(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
|
-
var
|
|
522
|
-
|
|
521
|
+
var o = e[t];
|
|
522
|
+
xe(o) && Me(o, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (xe(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var u =
|
|
527
|
+
var u = L(e);
|
|
528
528
|
if (typeof u == "function" && u !== e.entries)
|
|
529
|
-
for (var
|
|
530
|
-
|
|
529
|
+
for (var f = u.call(e), l; !(l = f.next()).done; )
|
|
530
|
+
xe(l.value) && Me(l.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -541,147 +541,147 @@ Check the top-level render call using <` + t + ">.");
|
|
|
541
541
|
t = r.propTypes;
|
|
542
542
|
else if (typeof r == "object" && (r.$$typeof === b || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
544
|
+
r.$$typeof === k))
|
|
545
545
|
t = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (t) {
|
|
549
|
-
var
|
|
550
|
-
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
549
|
+
var o = I(r);
|
|
550
|
+
He(t, e.props, "prop", o, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !he) {
|
|
552
|
+
he = !0;
|
|
553
553
|
var u = I(r);
|
|
554
|
-
|
|
554
|
+
x("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 &&
|
|
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
559
|
function lr(e) {
|
|
560
560
|
{
|
|
561
561
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
562
|
-
var
|
|
563
|
-
if (
|
|
564
|
-
|
|
562
|
+
var o = r[t];
|
|
563
|
+
if (o !== "children" && o !== "key") {
|
|
564
|
+
X(e), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), X(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (X(e), x("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function ze(e, r, t,
|
|
571
|
+
var Ae = {};
|
|
572
|
+
function ze(e, r, t, o, u, f) {
|
|
573
573
|
{
|
|
574
|
-
var l =
|
|
574
|
+
var l = ie(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
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
e === null ?
|
|
578
|
+
var R = or();
|
|
579
|
+
R ? s += R : s += Fe();
|
|
580
|
+
var v;
|
|
581
|
+
e === null ? v = "null" : ve(e) ? v = "array" : e !== void 0 && e.$$typeof === E ? (v = "<" + (I(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : v = 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", v, s);
|
|
582
582
|
}
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
583
|
+
var y = ar(e, r, t, u, f);
|
|
584
|
+
if (y == null)
|
|
585
|
+
return y;
|
|
586
586
|
if (l) {
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
for (var
|
|
592
|
-
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
587
|
+
var F = r.children;
|
|
588
|
+
if (F !== void 0)
|
|
589
|
+
if (o)
|
|
590
|
+
if (ve(F)) {
|
|
591
|
+
for (var Q = 0; Q < F.length; Q++)
|
|
592
|
+
De(F[Q], e);
|
|
593
|
+
Object.freeze && Object.freeze(F);
|
|
594
594
|
} else
|
|
595
|
-
|
|
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
|
-
|
|
597
|
+
De(F, e);
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
var
|
|
601
|
-
return
|
|
602
|
-
}),
|
|
603
|
-
if (!
|
|
599
|
+
if (re.call(r, "key")) {
|
|
600
|
+
var V = I(e), _ = Object.keys(r).filter(function(br) {
|
|
601
|
+
return br !== "key";
|
|
602
|
+
}), me = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
+
if (!Ae[V + me]) {
|
|
604
604
|
var pr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
|
|
605
|
-
|
|
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} />`,
|
|
610
|
+
<%s key={someKey} {...props} />`, me, V, pr, V), Ae[V + me] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
613
|
+
return e === c ? lr(y) : sr(y), y;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function cr(e, r, t) {
|
|
617
617
|
return ze(e, r, t, !0);
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function ur(e, r, t) {
|
|
620
620
|
return ze(e, r, t, !1);
|
|
621
621
|
}
|
|
622
|
-
var fr =
|
|
623
|
-
|
|
624
|
-
}()),
|
|
622
|
+
var fr = ur, dr = cr;
|
|
623
|
+
ne.Fragment = c, ne.jsx = fr, ne.jsxs = dr;
|
|
624
|
+
}()), ne;
|
|
625
625
|
}
|
|
626
|
-
process.env.NODE_ENV === "production" ?
|
|
627
|
-
var
|
|
628
|
-
const
|
|
626
|
+
process.env.NODE_ENV === "production" ? Ee.exports = hr() : Ee.exports = xr();
|
|
627
|
+
var a = Ee.exports;
|
|
628
|
+
const mr = ({
|
|
629
629
|
isOpen: d,
|
|
630
|
-
onClose:
|
|
631
|
-
onSubmit:
|
|
630
|
+
onClose: E,
|
|
631
|
+
onSubmit: j
|
|
632
632
|
}) => {
|
|
633
|
-
const [
|
|
633
|
+
const [c, p] = B({
|
|
634
634
|
text: "",
|
|
635
635
|
rating: void 0,
|
|
636
636
|
feedbackType: "general",
|
|
637
637
|
userEmail: "",
|
|
638
638
|
userName: ""
|
|
639
|
-
}), [
|
|
640
|
-
|
|
639
|
+
}), [n, P] = B(!1), [g, b] = B("idle"), [w, h] = B(""), [k, C] = B(!1), W = $e(null), S = $e(null);
|
|
640
|
+
We(() => (d ? (C(!0), document.body.style.overflow = "hidden", setTimeout(() => {
|
|
641
641
|
var i;
|
|
642
|
-
(i =
|
|
642
|
+
(i = S.current) == null || i.focus();
|
|
643
643
|
}, 150)) : document.body.style.overflow = "unset", () => {
|
|
644
644
|
document.body.style.overflow = "unset";
|
|
645
|
-
}), [d]),
|
|
646
|
-
const i = (
|
|
647
|
-
|
|
645
|
+
}), [d]), We(() => {
|
|
646
|
+
const i = (T) => {
|
|
647
|
+
T.key === "Escape" && d && !n && M();
|
|
648
648
|
};
|
|
649
649
|
return d && document.addEventListener("keydown", i), () => {
|
|
650
650
|
document.removeEventListener("keydown", i);
|
|
651
651
|
};
|
|
652
|
-
}, [d,
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
|
|
652
|
+
}, [d, n]);
|
|
653
|
+
const M = () => {
|
|
654
|
+
C(!1), setTimeout(() => {
|
|
655
|
+
E(), setTimeout(() => {
|
|
656
656
|
p({
|
|
657
657
|
text: "",
|
|
658
658
|
rating: void 0,
|
|
659
659
|
feedbackType: "general",
|
|
660
660
|
userEmail: "",
|
|
661
661
|
userName: ""
|
|
662
|
-
}), b("idle"),
|
|
662
|
+
}), b("idle"), h("");
|
|
663
663
|
}, 100);
|
|
664
664
|
}, 200);
|
|
665
|
-
},
|
|
666
|
-
if (i.preventDefault(), !
|
|
667
|
-
|
|
665
|
+
}, L = async (i) => {
|
|
666
|
+
if (i.preventDefault(), !c.text.trim()) {
|
|
667
|
+
h("Please enter your feedback");
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
|
|
670
|
+
P(!0), h("");
|
|
671
671
|
try {
|
|
672
|
-
await
|
|
673
|
-
|
|
672
|
+
await j(c), b("success"), setTimeout(() => {
|
|
673
|
+
M();
|
|
674
674
|
}, 2e3);
|
|
675
|
-
} catch (
|
|
676
|
-
b("error"),
|
|
675
|
+
} catch (T) {
|
|
676
|
+
b("error"), h(T instanceof Error ? T.message : "Failed to submit feedback");
|
|
677
677
|
} finally {
|
|
678
|
-
|
|
678
|
+
P(!1);
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
681
|
if (!d) return null;
|
|
682
|
-
const
|
|
683
|
-
i.target === i.currentTarget && !
|
|
684
|
-
},
|
|
682
|
+
const O = (i) => {
|
|
683
|
+
i.target === i.currentTarget && !n && M();
|
|
684
|
+
}, x = {
|
|
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:
|
|
696
|
+
opacity: k ? 1 : 0,
|
|
697
697
|
transition: "opacity 0.2s ease-in-out"
|
|
698
|
-
},
|
|
698
|
+
}, q = {
|
|
699
699
|
backgroundColor: "white",
|
|
700
700
|
borderRadius: "12px",
|
|
701
701
|
padding: "24px",
|
|
@@ -704,27 +704,27 @@ 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:
|
|
708
|
-
opacity:
|
|
707
|
+
transform: k ? "scale(1)" : "scale(0.95)",
|
|
708
|
+
opacity: k ? 1 : 0,
|
|
709
709
|
transition: "all 0.2s ease-in-out"
|
|
710
710
|
};
|
|
711
|
-
return /* @__PURE__ */
|
|
711
|
+
return /* @__PURE__ */ a.jsx(
|
|
712
712
|
"div",
|
|
713
713
|
{
|
|
714
|
-
onClick:
|
|
715
|
-
style:
|
|
714
|
+
onClick: O,
|
|
715
|
+
style: x,
|
|
716
716
|
role: "dialog",
|
|
717
717
|
"aria-modal": "true",
|
|
718
718
|
"aria-labelledby": "feedback-modal-title",
|
|
719
|
-
children: /* @__PURE__ */
|
|
719
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
720
720
|
"div",
|
|
721
721
|
{
|
|
722
|
-
ref:
|
|
723
|
-
style:
|
|
722
|
+
ref: W,
|
|
723
|
+
style: q,
|
|
724
724
|
onClick: (i) => i.stopPropagation(),
|
|
725
725
|
children: [
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "24px", display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
727
|
+
/* @__PURE__ */ a.jsx(
|
|
728
728
|
"h2",
|
|
729
729
|
{
|
|
730
730
|
id: "feedback-modal-title",
|
|
@@ -732,30 +732,30 @@ const hr = ({
|
|
|
732
732
|
children: "Send Feedback"
|
|
733
733
|
}
|
|
734
734
|
),
|
|
735
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ a.jsx(
|
|
736
736
|
"button",
|
|
737
737
|
{
|
|
738
|
-
onClick:
|
|
739
|
-
disabled:
|
|
738
|
+
onClick: M,
|
|
739
|
+
disabled: n,
|
|
740
740
|
"aria-label": "Close feedback form",
|
|
741
741
|
style: {
|
|
742
742
|
background: "none",
|
|
743
743
|
border: "none",
|
|
744
744
|
fontSize: "24px",
|
|
745
|
-
cursor:
|
|
745
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
746
746
|
color: "#6b7280",
|
|
747
747
|
padding: "0",
|
|
748
748
|
lineHeight: "1",
|
|
749
|
-
opacity:
|
|
749
|
+
opacity: n ? 0.5 : 1,
|
|
750
750
|
transition: "color 0.2s"
|
|
751
751
|
},
|
|
752
|
-
onMouseEnter: (i) => !
|
|
753
|
-
onMouseLeave: (i) => !
|
|
752
|
+
onMouseEnter: (i) => !n && (i.currentTarget.style.color = "#111827"),
|
|
753
|
+
onMouseLeave: (i) => !n && (i.currentTarget.style.color = "#6b7280"),
|
|
754
754
|
children: "×"
|
|
755
755
|
}
|
|
756
756
|
)
|
|
757
757
|
] }),
|
|
758
|
-
|
|
758
|
+
g === "success" && /* @__PURE__ */ a.jsxs(
|
|
759
759
|
"div",
|
|
760
760
|
{
|
|
761
761
|
style: {
|
|
@@ -773,12 +773,12 @@ const hr = ({
|
|
|
773
773
|
role: "status",
|
|
774
774
|
"aria-live": "polite",
|
|
775
775
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ a.jsx("span", { style: { fontSize: "18px" }, children: "✓" }),
|
|
777
|
+
/* @__PURE__ */ a.jsx("span", { children: "Thank you! Your feedback has been submitted." })
|
|
778
778
|
]
|
|
779
779
|
}
|
|
780
780
|
),
|
|
781
|
-
|
|
781
|
+
w && /* @__PURE__ */ a.jsxs(
|
|
782
782
|
"div",
|
|
783
783
|
{
|
|
784
784
|
style: {
|
|
@@ -795,14 +795,14 @@ const hr = ({
|
|
|
795
795
|
role: "alert",
|
|
796
796
|
"aria-live": "assertive",
|
|
797
797
|
children: [
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ a.jsx("span", { style: { fontSize: "18px" }, children: "⚠" }),
|
|
799
|
+
/* @__PURE__ */ a.jsx("span", { children: w })
|
|
800
800
|
]
|
|
801
801
|
}
|
|
802
802
|
),
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
805
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ a.jsxs("form", { onSubmit: L, children: [
|
|
804
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "16px" }, children: [
|
|
805
|
+
/* @__PURE__ */ a.jsx(
|
|
806
806
|
"label",
|
|
807
807
|
{
|
|
808
808
|
htmlFor: "feedback-type",
|
|
@@ -810,13 +810,13 @@ const hr = ({
|
|
|
810
810
|
children: "Type"
|
|
811
811
|
}
|
|
812
812
|
),
|
|
813
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ a.jsxs(
|
|
814
814
|
"select",
|
|
815
815
|
{
|
|
816
816
|
id: "feedback-type",
|
|
817
|
-
value:
|
|
818
|
-
onChange: (i) => p({ ...
|
|
819
|
-
disabled:
|
|
817
|
+
value: c.feedbackType,
|
|
818
|
+
onChange: (i) => p({ ...c, feedbackType: i.target.value }),
|
|
819
|
+
disabled: n,
|
|
820
820
|
style: {
|
|
821
821
|
width: "100%",
|
|
822
822
|
padding: "8px 12px",
|
|
@@ -824,69 +824,69 @@ const hr = ({
|
|
|
824
824
|
borderRadius: "6px",
|
|
825
825
|
fontSize: "14px",
|
|
826
826
|
backgroundColor: "white",
|
|
827
|
-
cursor:
|
|
828
|
-
opacity:
|
|
827
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
828
|
+
opacity: n ? 0.6 : 1
|
|
829
829
|
},
|
|
830
830
|
children: [
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ a.jsx("option", { value: "general", children: "General Feedback" }),
|
|
832
|
+
/* @__PURE__ */ a.jsx("option", { value: "bug", children: "Bug Report" }),
|
|
833
|
+
/* @__PURE__ */ a.jsx("option", { value: "feature_request", children: "Feature Request" }),
|
|
834
|
+
/* @__PURE__ */ a.jsx("option", { value: "question", children: "Question" }),
|
|
835
|
+
/* @__PURE__ */ a.jsx("option", { value: "praise", children: "Praise" })
|
|
836
836
|
]
|
|
837
837
|
}
|
|
838
838
|
)
|
|
839
839
|
] }),
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "16px" }, children: [
|
|
841
|
+
/* @__PURE__ */ a.jsx("label", { style: { display: "block", marginBottom: "8px", fontSize: "14px", fontWeight: "500", color: "#374151" }, children: "Rating (optional)" }),
|
|
842
|
+
/* @__PURE__ */ a.jsx("div", { style: { display: "flex", gap: "8px" }, role: "group", "aria-label": "Rating", children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ a.jsx(
|
|
843
843
|
"button",
|
|
844
844
|
{
|
|
845
845
|
type: "button",
|
|
846
|
-
onClick: () => p({ ...
|
|
847
|
-
disabled:
|
|
846
|
+
onClick: () => p({ ...c, rating: i }),
|
|
847
|
+
disabled: n,
|
|
848
848
|
"aria-label": `Rate ${i} stars`,
|
|
849
|
-
"aria-pressed":
|
|
849
|
+
"aria-pressed": c.rating === i,
|
|
850
850
|
style: {
|
|
851
851
|
background: "none",
|
|
852
852
|
border: "none",
|
|
853
853
|
fontSize: "28px",
|
|
854
|
-
cursor:
|
|
854
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
855
855
|
padding: "0",
|
|
856
|
-
color:
|
|
856
|
+
color: c.rating && c.rating >= i ? "#fbbf24" : "#d1d5db",
|
|
857
857
|
transition: "all 0.2s",
|
|
858
|
-
opacity:
|
|
858
|
+
opacity: n ? 0.6 : 1,
|
|
859
859
|
transform: "scale(1)"
|
|
860
860
|
},
|
|
861
|
-
onMouseEnter: (
|
|
862
|
-
onMouseLeave: (
|
|
861
|
+
onMouseEnter: (T) => !n && (T.currentTarget.style.transform = "scale(1.2)"),
|
|
862
|
+
onMouseLeave: (T) => !n && (T.currentTarget.style.transform = "scale(1)"),
|
|
863
863
|
children: "★"
|
|
864
864
|
},
|
|
865
865
|
i
|
|
866
866
|
)) })
|
|
867
867
|
] }),
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "16px" }, children: [
|
|
869
|
+
/* @__PURE__ */ a.jsxs(
|
|
870
870
|
"label",
|
|
871
871
|
{
|
|
872
872
|
htmlFor: "feedback-text",
|
|
873
873
|
style: { display: "block", marginBottom: "8px", fontSize: "14px", fontWeight: "500", color: "#374151" },
|
|
874
874
|
children: [
|
|
875
875
|
"Your Feedback ",
|
|
876
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ a.jsx("span", { style: { color: "#ef4444" }, children: "*" })
|
|
877
877
|
]
|
|
878
878
|
}
|
|
879
879
|
),
|
|
880
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ a.jsx(
|
|
881
881
|
"textarea",
|
|
882
882
|
{
|
|
883
883
|
id: "feedback-text",
|
|
884
|
-
ref:
|
|
885
|
-
value:
|
|
886
|
-
onChange: (i) => p({ ...
|
|
884
|
+
ref: S,
|
|
885
|
+
value: c.text,
|
|
886
|
+
onChange: (i) => p({ ...c, text: i.target.value }),
|
|
887
887
|
placeholder: "Tell us what you think...",
|
|
888
888
|
required: !0,
|
|
889
|
-
disabled:
|
|
889
|
+
disabled: n,
|
|
890
890
|
rows: 4,
|
|
891
891
|
"aria-required": "true",
|
|
892
892
|
style: {
|
|
@@ -897,14 +897,14 @@ const hr = ({
|
|
|
897
897
|
fontSize: "14px",
|
|
898
898
|
resize: "vertical",
|
|
899
899
|
fontFamily: "inherit",
|
|
900
|
-
opacity:
|
|
901
|
-
cursor:
|
|
900
|
+
opacity: n ? 0.6 : 1,
|
|
901
|
+
cursor: n ? "not-allowed" : "text"
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
] }),
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "16px" }, children: [
|
|
907
|
+
/* @__PURE__ */ a.jsx(
|
|
908
908
|
"label",
|
|
909
909
|
{
|
|
910
910
|
htmlFor: "feedback-name",
|
|
@@ -912,28 +912,28 @@ const hr = ({
|
|
|
912
912
|
children: "Name (optional)"
|
|
913
913
|
}
|
|
914
914
|
),
|
|
915
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ a.jsx(
|
|
916
916
|
"input",
|
|
917
917
|
{
|
|
918
918
|
id: "feedback-name",
|
|
919
919
|
type: "text",
|
|
920
|
-
value:
|
|
921
|
-
onChange: (i) => p({ ...
|
|
920
|
+
value: c.userName,
|
|
921
|
+
onChange: (i) => p({ ...c, userName: i.target.value }),
|
|
922
922
|
placeholder: "Your name",
|
|
923
|
-
disabled:
|
|
923
|
+
disabled: n,
|
|
924
924
|
style: {
|
|
925
925
|
width: "100%",
|
|
926
926
|
padding: "8px 12px",
|
|
927
927
|
border: "1px solid #d1d5db",
|
|
928
928
|
borderRadius: "6px",
|
|
929
929
|
fontSize: "14px",
|
|
930
|
-
opacity:
|
|
930
|
+
opacity: n ? 0.6 : 1
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
)
|
|
934
934
|
] }),
|
|
935
|
-
/* @__PURE__ */
|
|
936
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ a.jsxs("div", { style: { marginBottom: "24px" }, children: [
|
|
936
|
+
/* @__PURE__ */ a.jsx(
|
|
937
937
|
"label",
|
|
938
938
|
{
|
|
939
939
|
htmlFor: "feedback-email",
|
|
@@ -941,33 +941,33 @@ const hr = ({
|
|
|
941
941
|
children: "Email (optional)"
|
|
942
942
|
}
|
|
943
943
|
),
|
|
944
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ a.jsx(
|
|
945
945
|
"input",
|
|
946
946
|
{
|
|
947
947
|
id: "feedback-email",
|
|
948
948
|
type: "email",
|
|
949
|
-
value:
|
|
950
|
-
onChange: (i) => p({ ...
|
|
949
|
+
value: c.userEmail,
|
|
950
|
+
onChange: (i) => p({ ...c, userEmail: i.target.value }),
|
|
951
951
|
placeholder: "your@email.com",
|
|
952
|
-
disabled:
|
|
952
|
+
disabled: n,
|
|
953
953
|
style: {
|
|
954
954
|
width: "100%",
|
|
955
955
|
padding: "8px 12px",
|
|
956
956
|
border: "1px solid #d1d5db",
|
|
957
957
|
borderRadius: "6px",
|
|
958
958
|
fontSize: "14px",
|
|
959
|
-
opacity:
|
|
959
|
+
opacity: n ? 0.6 : 1
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
)
|
|
963
963
|
] }),
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ a.jsxs("div", { style: { display: "flex", gap: "12px", justifyContent: "flex-end" }, children: [
|
|
965
|
+
/* @__PURE__ */ a.jsx(
|
|
966
966
|
"button",
|
|
967
967
|
{
|
|
968
968
|
type: "button",
|
|
969
|
-
onClick:
|
|
970
|
-
disabled:
|
|
969
|
+
onClick: M,
|
|
970
|
+
disabled: n,
|
|
971
971
|
style: {
|
|
972
972
|
padding: "10px 20px",
|
|
973
973
|
border: "1px solid #d1d5db",
|
|
@@ -976,37 +976,37 @@ const hr = ({
|
|
|
976
976
|
color: "#374151",
|
|
977
977
|
fontSize: "14px",
|
|
978
978
|
fontWeight: "500",
|
|
979
|
-
cursor:
|
|
980
|
-
opacity:
|
|
979
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
980
|
+
opacity: n ? 0.5 : 1,
|
|
981
981
|
transition: "all 0.2s"
|
|
982
982
|
},
|
|
983
|
-
onMouseEnter: (i) => !
|
|
984
|
-
onMouseLeave: (i) => !
|
|
983
|
+
onMouseEnter: (i) => !n && (i.currentTarget.style.backgroundColor = "#f9fafb"),
|
|
984
|
+
onMouseLeave: (i) => !n && (i.currentTarget.style.backgroundColor = "white"),
|
|
985
985
|
children: "Cancel"
|
|
986
986
|
}
|
|
987
987
|
),
|
|
988
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ a.jsxs(
|
|
989
989
|
"button",
|
|
990
990
|
{
|
|
991
991
|
type: "submit",
|
|
992
|
-
disabled:
|
|
992
|
+
disabled: n || g === "success",
|
|
993
993
|
style: {
|
|
994
994
|
padding: "10px 20px",
|
|
995
995
|
border: "none",
|
|
996
996
|
borderRadius: "6px",
|
|
997
|
-
backgroundColor:
|
|
997
|
+
backgroundColor: g === "success" ? "#10b981" : "#3b82f6",
|
|
998
998
|
color: "white",
|
|
999
999
|
fontSize: "14px",
|
|
1000
1000
|
fontWeight: "500",
|
|
1001
|
-
cursor:
|
|
1002
|
-
opacity:
|
|
1001
|
+
cursor: n || g === "success" ? "not-allowed" : "pointer",
|
|
1002
|
+
opacity: n ? 0.7 : 1,
|
|
1003
1003
|
transition: "all 0.2s",
|
|
1004
1004
|
display: "flex",
|
|
1005
1005
|
alignItems: "center",
|
|
1006
1006
|
gap: "8px"
|
|
1007
1007
|
},
|
|
1008
1008
|
children: [
|
|
1009
|
-
|
|
1009
|
+
n && /* @__PURE__ */ a.jsx(
|
|
1010
1010
|
"span",
|
|
1011
1011
|
{
|
|
1012
1012
|
style: {
|
|
@@ -1020,13 +1020,13 @@ const hr = ({
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
),
|
|
1023
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ a.jsx("span", { children: n ? "Sending..." : g === "success" ? "✓ Sent!" : "Send Feedback" })
|
|
1024
1024
|
]
|
|
1025
1025
|
}
|
|
1026
1026
|
)
|
|
1027
1027
|
] })
|
|
1028
1028
|
] }),
|
|
1029
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ a.jsx("style", { children: `
|
|
1030
1030
|
@keyframes spin {
|
|
1031
1031
|
to { transform: rotate(360deg); }
|
|
1032
1032
|
}
|
|
@@ -1047,188 +1047,215 @@ const hr = ({
|
|
|
1047
1047
|
}
|
|
1048
1048
|
);
|
|
1049
1049
|
};
|
|
1050
|
-
async function
|
|
1051
|
-
const
|
|
1050
|
+
async function yr(d, E, j) {
|
|
1051
|
+
const c = {
|
|
1052
1052
|
"Content-Type": "application/json"
|
|
1053
1053
|
};
|
|
1054
|
-
|
|
1054
|
+
j && (c.Authorization = `Bearer ${j}`);
|
|
1055
1055
|
try {
|
|
1056
1056
|
const p = await fetch(`${d}/api/feedback`, {
|
|
1057
1057
|
method: "POST",
|
|
1058
|
-
headers:
|
|
1059
|
-
body: JSON.stringify(
|
|
1058
|
+
headers: c,
|
|
1059
|
+
body: JSON.stringify(E)
|
|
1060
1060
|
});
|
|
1061
1061
|
if (!p.ok) {
|
|
1062
|
-
const
|
|
1063
|
-
throw new Error(
|
|
1062
|
+
const n = await p.json().catch(() => ({}));
|
|
1063
|
+
throw new Error(n.message || `HTTP ${p.status}: ${p.statusText}`);
|
|
1064
1064
|
}
|
|
1065
1065
|
return await p.json();
|
|
1066
1066
|
} catch (p) {
|
|
1067
1067
|
throw p instanceof Error ? p : new Error("Failed to submit feedback");
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
|
-
const
|
|
1070
|
+
const Er = (d, E = 0.12) => {
|
|
1071
|
+
const j = /^#([0-9a-fA-F]{6})$/.exec(d);
|
|
1072
|
+
if (!j) return d;
|
|
1073
|
+
const c = parseInt(j[1], 16), p = Math.max(0, Math.min(255, Math.round((c >> 16 & 255) * (1 - E)))), n = Math.max(0, Math.min(255, Math.round((c >> 8 & 255) * (1 - E)))), P = Math.max(0, Math.min(255, Math.round((c & 255) * (1 - E)))), g = (b) => b.toString(16).padStart(2, "0");
|
|
1074
|
+
return `#${g(p)}${g(n)}${g(P)}`;
|
|
1075
|
+
}, kr = ({
|
|
1071
1076
|
projectId: d,
|
|
1072
|
-
apiKey:
|
|
1073
|
-
apiUrl:
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1077
|
+
apiKey: E,
|
|
1078
|
+
apiUrl: j = "https://metricshift-sdk-be-production.up.railway.app",
|
|
1079
|
+
// Text & display
|
|
1080
|
+
buttonText: c = "Feedback",
|
|
1081
|
+
showIcon: p = !1,
|
|
1082
|
+
// iconless by default
|
|
1083
|
+
// Position & size
|
|
1084
|
+
position: n = "bottom-right",
|
|
1085
|
+
size: P = "medium",
|
|
1086
|
+
// Legacy styling / overrides
|
|
1087
|
+
buttonColor: g,
|
|
1088
|
+
buttonHoverColor: b,
|
|
1089
|
+
buttonTextColor: w,
|
|
1090
|
+
customStyles: h,
|
|
1091
|
+
customClassName: k = "",
|
|
1092
|
+
// New styling API
|
|
1093
|
+
variant: C = "outline",
|
|
1094
|
+
accentColor: W,
|
|
1095
|
+
// Behavior
|
|
1096
|
+
disabled: S = !1,
|
|
1097
|
+
autoOpen: M = !1,
|
|
1098
|
+
// Callbacks
|
|
1099
|
+
onOpen: L,
|
|
1100
|
+
onClose: O,
|
|
1101
|
+
onSuccess: x,
|
|
1102
|
+
onError: q
|
|
1089
1103
|
}) => {
|
|
1090
|
-
const [
|
|
1091
|
-
|
|
1092
|
-
},
|
|
1093
|
-
|
|
1094
|
-
},
|
|
1104
|
+
const [i, T] = B(M), [ae, oe] = B(!1), [de, Z] = B(!1), ie = () => {
|
|
1105
|
+
S || (T(!0), L == null || L());
|
|
1106
|
+
}, pe = () => {
|
|
1107
|
+
T(!1), O == null || O();
|
|
1108
|
+
}, se = async (m) => {
|
|
1095
1109
|
try {
|
|
1096
|
-
const
|
|
1097
|
-
...
|
|
1110
|
+
const z = {
|
|
1111
|
+
...m,
|
|
1098
1112
|
project_id: d,
|
|
1099
1113
|
page_url: window.location.href,
|
|
1100
1114
|
page_title: document.title,
|
|
1101
1115
|
user_agent: navigator.userAgent,
|
|
1102
|
-
user_identifier:
|
|
1103
|
-
user_email:
|
|
1104
|
-
user_name:
|
|
1105
|
-
feedback_type:
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1108
|
-
} catch (
|
|
1109
|
-
throw
|
|
1116
|
+
user_identifier: m.userEmail || "anonymous",
|
|
1117
|
+
user_email: m.userEmail,
|
|
1118
|
+
user_name: m.userName,
|
|
1119
|
+
feedback_type: m.feedbackType
|
|
1120
|
+
}, $ = await yr(j, z, E);
|
|
1121
|
+
x && ($ != null && $.id) && x($.id);
|
|
1122
|
+
} catch (z) {
|
|
1123
|
+
throw q && z instanceof Error && q(z), z;
|
|
1110
1124
|
}
|
|
1111
|
-
},
|
|
1125
|
+
}, I = {
|
|
1112
1126
|
small: {
|
|
1113
|
-
padding: "
|
|
1114
|
-
fontSize: "
|
|
1115
|
-
iconSize: "
|
|
1127
|
+
padding: "6px 14px",
|
|
1128
|
+
fontSize: "13px",
|
|
1129
|
+
iconSize: "14px"
|
|
1116
1130
|
},
|
|
1117
1131
|
medium: {
|
|
1118
|
-
padding: "
|
|
1119
|
-
fontSize: "
|
|
1120
|
-
iconSize: "
|
|
1132
|
+
padding: "10px 18px",
|
|
1133
|
+
fontSize: "15px",
|
|
1134
|
+
iconSize: "18px"
|
|
1121
1135
|
},
|
|
1122
1136
|
large: {
|
|
1123
|
-
padding: "
|
|
1124
|
-
fontSize: "
|
|
1125
|
-
iconSize: "
|
|
1137
|
+
padding: "14px 24px",
|
|
1138
|
+
fontSize: "17px",
|
|
1139
|
+
iconSize: "22px"
|
|
1126
1140
|
}
|
|
1127
|
-
},
|
|
1128
|
-
if (
|
|
1141
|
+
}, D = () => {
|
|
1142
|
+
if (n === "inline")
|
|
1129
1143
|
return {
|
|
1130
1144
|
display: "inline-flex",
|
|
1131
1145
|
position: "relative"
|
|
1132
1146
|
};
|
|
1133
|
-
const
|
|
1147
|
+
const m = {
|
|
1134
1148
|
position: "fixed",
|
|
1135
1149
|
zIndex: 9999
|
|
1136
1150
|
};
|
|
1137
|
-
return
|
|
1138
|
-
},
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1151
|
+
return n.includes("bottom") ? m.bottom = "20px" : m.top = "20px", n.includes("right") ? m.right = "20px" : m.left = "20px", m;
|
|
1152
|
+
}, A = I[P], le = D(), H = W ?? g ?? "#111827", J = n !== "inline" ? "0 12px 30px rgba(15, 23, 42, 0.12)" : "none";
|
|
1153
|
+
let Y = "#ffffff", K = "#f3f4f6", N = w || H, U = "rgba(15, 23, 42, 0.08)", G = 1;
|
|
1154
|
+
C === "solid" ? (Y = g || H, K = b || Er(Y, 0.12), N = w || "#ffffff", U = "transparent", G = 0) : C === "ghost" && (Y = "transparent", K = "#f3f4f6", N = w || H, U = "transparent", G = 0);
|
|
1155
|
+
const be = {
|
|
1156
|
+
...le,
|
|
1157
|
+
...{
|
|
1158
|
+
// hosts can override these via .ms-feedback-button selector
|
|
1159
|
+
"--ms-feedback-bg": Y,
|
|
1160
|
+
"--ms-feedback-color": N,
|
|
1161
|
+
"--ms-feedback-border": U,
|
|
1162
|
+
"--ms-feedback-radius": "9999px",
|
|
1163
|
+
"--ms-feedback-shadow": J
|
|
1164
|
+
},
|
|
1165
|
+
padding: A.padding,
|
|
1166
|
+
backgroundColor: ae && !S ? K : Y,
|
|
1167
|
+
color: N,
|
|
1168
|
+
border: G ? `1px solid ${U}` : "1px solid transparent",
|
|
1169
|
+
borderRadius: "9999px",
|
|
1170
|
+
fontSize: A.fontSize,
|
|
1171
|
+
fontWeight: 600,
|
|
1172
|
+
cursor: S ? "not-allowed" : "pointer",
|
|
1148
1173
|
display: "flex",
|
|
1149
1174
|
alignItems: "center",
|
|
1150
1175
|
justifyContent: "center",
|
|
1151
1176
|
gap: "8px",
|
|
1152
|
-
boxShadow:
|
|
1177
|
+
boxShadow: de ? `${J}, 0 0 0 3px rgba(59,130,246,0.45)` : J,
|
|
1153
1178
|
transition: "all 0.2s ease",
|
|
1154
|
-
opacity:
|
|
1155
|
-
transform:
|
|
1179
|
+
opacity: S ? 0.6 : 1,
|
|
1180
|
+
transform: ae && !S ? "translateY(-2px)" : "translateY(0)",
|
|
1156
1181
|
outline: "none",
|
|
1157
|
-
...
|
|
1158
|
-
},
|
|
1159
|
-
fontSize:
|
|
1182
|
+
...h
|
|
1183
|
+
}, ee = {
|
|
1184
|
+
fontSize: A.iconSize,
|
|
1160
1185
|
lineHeight: 1,
|
|
1161
1186
|
display: "flex",
|
|
1162
1187
|
alignItems: "center"
|
|
1163
1188
|
};
|
|
1164
|
-
return /* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1189
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1190
|
+
/* @__PURE__ */ a.jsxs(
|
|
1166
1191
|
"button",
|
|
1167
1192
|
{
|
|
1168
|
-
onClick:
|
|
1169
|
-
onMouseEnter: () => !
|
|
1170
|
-
onMouseLeave: () => !
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1193
|
+
onClick: ie,
|
|
1194
|
+
onMouseEnter: () => !S && oe(!0),
|
|
1195
|
+
onMouseLeave: () => !S && oe(!1),
|
|
1196
|
+
onFocus: () => Z(!0),
|
|
1197
|
+
onBlur: () => Z(!1),
|
|
1198
|
+
disabled: S,
|
|
1199
|
+
className: `ms-feedback-button ${k}`.trim(),
|
|
1200
|
+
style: be,
|
|
1174
1201
|
"aria-label": "Open feedback form",
|
|
1175
|
-
"aria-pressed":
|
|
1176
|
-
"aria-disabled":
|
|
1202
|
+
"aria-pressed": i,
|
|
1203
|
+
"aria-disabled": S,
|
|
1177
1204
|
role: "button",
|
|
1178
|
-
tabIndex:
|
|
1179
|
-
onKeyDown: (
|
|
1180
|
-
!
|
|
1205
|
+
tabIndex: S ? -1 : 0,
|
|
1206
|
+
onKeyDown: (m) => {
|
|
1207
|
+
!S && (m.key === "Enter" || m.key === " ") && (m.preventDefault(), ie());
|
|
1181
1208
|
},
|
|
1182
1209
|
children: [
|
|
1183
|
-
p && /* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1210
|
+
p && /* @__PURE__ */ a.jsx("span", { style: ee, "aria-hidden": "true", children: "💬" }),
|
|
1211
|
+
/* @__PURE__ */ a.jsx("span", { children: c })
|
|
1185
1212
|
]
|
|
1186
1213
|
}
|
|
1187
1214
|
),
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
|
|
1215
|
+
/* @__PURE__ */ a.jsx(
|
|
1216
|
+
mr,
|
|
1190
1217
|
{
|
|
1191
|
-
isOpen:
|
|
1192
|
-
onClose:
|
|
1193
|
-
onSubmit:
|
|
1218
|
+
isOpen: i,
|
|
1219
|
+
onClose: pe,
|
|
1220
|
+
onSubmit: se
|
|
1194
1221
|
}
|
|
1195
1222
|
)
|
|
1196
1223
|
] });
|
|
1197
|
-
},
|
|
1198
|
-
const d = gr(
|
|
1224
|
+
}, Ne = vr(null), Rr = () => {
|
|
1225
|
+
const d = gr(Ne);
|
|
1199
1226
|
if (!d)
|
|
1200
1227
|
throw new Error("useMetricShift must be used within MetricShiftProvider");
|
|
1201
1228
|
return d;
|
|
1202
1229
|
}, _r = ({
|
|
1203
1230
|
config: d,
|
|
1204
|
-
children:
|
|
1205
|
-
}) => /* @__PURE__ */
|
|
1206
|
-
let
|
|
1207
|
-
const
|
|
1231
|
+
children: E
|
|
1232
|
+
}) => /* @__PURE__ */ a.jsx(Ne.Provider, { value: d, children: E });
|
|
1233
|
+
let ye = null;
|
|
1234
|
+
const jr = {
|
|
1208
1235
|
/**
|
|
1209
1236
|
* Initialize the MetricShift SDK
|
|
1210
1237
|
* @param config - SDK configuration
|
|
1211
1238
|
*/
|
|
1212
1239
|
init: (d) => {
|
|
1213
|
-
|
|
1240
|
+
ye = {
|
|
1214
1241
|
apiUrl: "http://localhost:3000",
|
|
1215
1242
|
...d
|
|
1216
1243
|
}, console.log("✅ MetricShift SDK initialized", {
|
|
1217
1244
|
projectId: d.projectId,
|
|
1218
|
-
apiUrl:
|
|
1245
|
+
apiUrl: ye.apiUrl
|
|
1219
1246
|
});
|
|
1220
1247
|
},
|
|
1221
1248
|
/**
|
|
1222
1249
|
* Get current SDK configuration
|
|
1223
1250
|
*/
|
|
1224
|
-
getConfig: () =>
|
|
1251
|
+
getConfig: () => ye
|
|
1225
1252
|
};
|
|
1226
1253
|
export {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1254
|
+
kr as FeedbackButton,
|
|
1255
|
+
mr as FeedbackModal,
|
|
1256
|
+
jr as MetricShift,
|
|
1230
1257
|
_r as MetricShiftProvider,
|
|
1231
|
-
|
|
1232
|
-
|
|
1258
|
+
yr as submitFeedback,
|
|
1259
|
+
Rr as useMetricShift
|
|
1233
1260
|
};
|
|
1234
1261
|
//# sourceMappingURL=index.esm.js.map
|