hocmai-feedback-widget 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { jsxs as x, jsx as b, Fragment as Gt } from "react/jsx-runtime";
2
- import vt, { forwardRef as Xt, createElement as it, useState as I, useEffect as xi, createContext as vi, useContext as ki } from "react";
3
- var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1
+ import { jsxs as x, jsx as b, Fragment as it } from "react/jsx-runtime";
2
+ import kt, { forwardRef as Xt, createElement as nt, useState as I, useEffect as xi, createContext as vi, useContext as ki } from "react";
3
+ var Si = "2.0.7", Ci = 500, St = "user-agent", he = "", Ct = "?", C = {
4
4
  FUNCTION: "function",
5
5
  OBJECT: "object",
6
6
  STRING: "string",
7
7
  UNDEFINED: "undefined"
8
- }, P = "browser", G = "cpu", B = "device", U = "engine", D = "os", fe = "result", c = "name", a = "type", d = "vendor", u = "version", M = "architecture", Se = "major", l = "model", Pe = "console", w = "mobile", v = "tablet", E = "smarttv", $ = "wearable", Oe = "xr", ke = "embedded", ae = "inapp", lt = "brands", ne = "formFactors", ct = "fullVersionList", pe = "platform", dt = "platformVersion", Ue = "bitness", Z = "sec-ch-ua", Ei = Z + "-full-version-list", Ii = Z + "-arch", Ti = Z + "-" + Ue, Ri = Z + "-form-factors", Oi = Z + "-" + w, Mi = Z + "-" + l, Yt = Z + "-" + pe, Ai = Yt + "-version", Qt = [lt, ct, w, l, pe, dt, M, ne, Ue], Me = "Amazon", le = "Apple", Ct = "ASUS", Et = "BlackBerry", ie = "Google", It = "Huawei", Ge = "Lenovo", Tt = "Honor", Ae = "LG", Xe = "Microsoft", Ye = "Motorola", Rt = "Nvidia", Ot = "OnePlus", Qe = "OPPO", ge = "Samsung", Mt = "Sharp", we = "Sony", Ke = "Xiaomi", Je = "Zebra", At = "Chrome", Ft = "Chromium", Y = "Chromecast", _e = "Edge", me = "Firefox", ye = "Opera", Ze = "Facebook", Pt = "Sogou", ce = "Mobile ", xe = " Browser", nt = "Windows", Fi = typeof window !== C.UNDEFINED, F = Fi && window.navigator ? window.navigator : void 0, re = F && F.userAgentData ? F.userAgentData : void 0, Pi = function(e, t) {
8
+ }, P = "browser", G = "cpu", B = "device", U = "engine", D = "os", fe = "result", c = "name", a = "type", d = "vendor", u = "version", M = "architecture", Se = "major", l = "model", Pe = "console", w = "mobile", v = "tablet", E = "smarttv", $ = "wearable", Oe = "xr", ke = "embedded", ae = "inapp", ct = "brands", ne = "formFactors", dt = "fullVersionList", pe = "platform", ut = "platformVersion", Ue = "bitness", Z = "sec-ch-ua", Ei = Z + "-full-version-list", Ii = Z + "-arch", Ti = Z + "-" + Ue, Ri = Z + "-form-factors", Oi = Z + "-" + w, Mi = Z + "-" + l, Yt = Z + "-" + pe, Ai = Yt + "-version", Qt = [ct, dt, w, l, pe, ut, M, ne, Ue], Me = "Amazon", le = "Apple", Et = "ASUS", It = "BlackBerry", ie = "Google", Tt = "Huawei", Ge = "Lenovo", Rt = "Honor", Ae = "LG", Xe = "Microsoft", Ye = "Motorola", Ot = "Nvidia", Mt = "OnePlus", Qe = "OPPO", ge = "Samsung", At = "Sharp", we = "Sony", Ke = "Xiaomi", Je = "Zebra", Ft = "Chrome", Pt = "Chromium", Y = "Chromecast", _e = "Edge", me = "Firefox", ye = "Opera", Ze = "Facebook", _t = "Sogou", ce = "Mobile ", xe = " Browser", rt = "Windows", Fi = typeof window !== C.UNDEFINED, F = Fi && window.navigator ? window.navigator : void 0, re = F && F.userAgentData ? F.userAgentData : void 0, Pi = function(e, t) {
9
9
  var i = {}, n = t;
10
10
  if (!Le(t)) {
11
11
  n = {};
@@ -20,7 +20,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
20
20
  for (var t = {}, i = 0; i < e.length; i++)
21
21
  t[e[i].toUpperCase()] = e[i];
22
22
  return t;
23
- }, rt = function(e, t) {
23
+ }, ot = function(e, t) {
24
24
  if (typeof e === C.OBJECT && e.length > 0) {
25
25
  for (var i in e)
26
26
  if (Q(t) == Q(e[i])) return !0;
@@ -44,7 +44,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
44
44
  }
45
45
  }, Q = function(e) {
46
46
  return Ce(e) ? e.toLowerCase() : e;
47
- }, ot = function(e) {
47
+ }, st = function(e) {
48
48
  return Ce(e) ? be(/[^\d\.]/g, e).split(".")[0] : void 0;
49
49
  }, j = function(e) {
50
50
  for (var t in e)
@@ -59,7 +59,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
59
59
  return be(/\\?\"/g, e);
60
60
  }, De = function(e, t) {
61
61
  return e = be(/^\s\s*/, String(e)), typeof t === C.UNDEFINED ? e : e.substring(0, t);
62
- }, st = function(e, t) {
62
+ }, at = function(e, t) {
63
63
  if (!(!e || !t))
64
64
  for (var i = 0, n, o, s, r, h, f; i < t.length && !h; ) {
65
65
  var g = t[i], m = t[i + 1];
@@ -73,12 +73,12 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
73
73
  for (var i in t)
74
74
  if (typeof t[i] === C.OBJECT && t[i].length > 0) {
75
75
  for (var n = 0; n < t[i].length; n++)
76
- if (rt(t[i][n], e))
77
- return i === St ? void 0 : i;
78
- } else if (rt(t[i], e))
79
- return i === St ? void 0 : i;
76
+ if (ot(t[i][n], e))
77
+ return i === Ct ? void 0 : i;
78
+ } else if (ot(t[i], e))
79
+ return i === Ct ? void 0 : i;
80
80
  return t.hasOwnProperty("*") ? t["*"] : e;
81
- }, _t = {
81
+ }, Lt = {
82
82
  ME: "4.90",
83
83
  "NT 3.51": "3.51",
84
84
  "NT 4.0": "4.0",
@@ -90,7 +90,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
90
90
  "8.1": "6.3",
91
91
  10: ["6.4", "10.0"],
92
92
  NT: ""
93
- }, Lt = {
93
+ }, Dt = {
94
94
  embedded: "Automotive",
95
95
  mobile: "Mobile",
96
96
  tablet: ["Tablet", "EInk"],
@@ -109,7 +109,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
109
109
  "MIUI Browser": "Miui Browser",
110
110
  "Opera Mobi": "OperaMobile",
111
111
  Yandex: "YaBrowser"
112
- }, Dt = {
112
+ }, zt = {
113
113
  browser: [
114
114
  [
115
115
  // Most common regardless engine
@@ -290,12 +290,12 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
290
290
  /metasr[\/ ]?([\d\.]+)/i
291
291
  // Sogou Explorer
292
292
  ],
293
- [u, [c, Pt + " Explorer"]],
293
+ [u, [c, _t + " Explorer"]],
294
294
  [
295
295
  /(sogou)mo\w+\/([\d\.]+)/i
296
296
  // Sogou Mobile
297
297
  ],
298
- [[c, Pt + " Mobile"], u],
298
+ [[c, _t + " Mobile"], u],
299
299
  [
300
300
  /(electron)\/([\w\.]+) safari/i,
301
301
  // Electron-based App
@@ -373,7 +373,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
373
373
  /headlesschrome(?:\/([\w\.]+)| )/i
374
374
  // Chrome Headless
375
375
  ],
376
- [u, [c, At + " Headless"]],
376
+ [u, [c, Ft + " Headless"]],
377
377
  [
378
378
  /wv\).+chrome\/([\w\.]+).+edgw\//i
379
379
  // Edge WebView2
@@ -383,7 +383,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
383
383
  / wv\).+(chrome)\/([\w\.]+)/i
384
384
  // Chrome WebView
385
385
  ],
386
- [[c, At + " WebView"], u],
386
+ [[c, Ft + " WebView"], u],
387
387
  [
388
388
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
389
389
  // Android Browser
@@ -555,26 +555,26 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
555
555
  // Sharp
556
556
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
557
557
  ],
558
- [l, [d, Mt], [a, w]],
558
+ [l, [d, At], [a, w]],
559
559
  [
560
560
  // Honor
561
561
  /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
562
562
  ],
563
- [l, [d, Tt], [a, v]],
563
+ [l, [d, Rt], [a, v]],
564
564
  [
565
565
  /honor([-\w ]+)[;\)]/i
566
566
  ],
567
- [l, [d, Tt], [a, w]],
567
+ [l, [d, Rt], [a, w]],
568
568
  [
569
569
  // Huawei
570
570
  /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
571
571
  ],
572
- [l, [d, It], [a, v]],
572
+ [l, [d, Tt], [a, v]],
573
573
  [
574
574
  /(?:huawei) ?([-\w ]+)[;\)]/i,
575
575
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i
576
576
  ],
577
- [l, [d, It], [a, w]],
577
+ [l, [d, Tt], [a, w]],
578
578
  [
579
579
  // Xiaomi
580
580
  /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
@@ -599,7 +599,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
599
599
  /droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,
600
600
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
601
601
  ],
602
- [l, [d, Ot], [a, w]],
602
+ [l, [d, Mt], [a, w]],
603
603
  [
604
604
  // OPPO
605
605
  /; (\w+) bui.+ oppo/i,
@@ -718,16 +718,16 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
718
718
  /\b((?:bb[a-f]|st[hv])100-\d)/i,
719
719
  /(?:blackberry|\(bb10;) (\w+)/i
720
720
  ],
721
- [l, [d, Et], [a, w]],
721
+ [l, [d, It], [a, w]],
722
722
  [
723
723
  // Asus
724
724
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
725
725
  ],
726
- [l, [d, Ct], [a, v]],
726
+ [l, [d, Et], [a, v]],
727
727
  [
728
728
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
729
729
  ],
730
- [l, [d, Ct], [a, w]],
730
+ [l, [d, Et], [a, w]],
731
731
  [
732
732
  // HTC
733
733
  /(nexus 9)/i
@@ -860,7 +860,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
860
860
  /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
861
861
  // Nvidia Tablets
862
862
  ],
863
- [l, [d, Rt], [a, v]],
863
+ [l, [d, Ot], [a, v]],
864
864
  [
865
865
  /(sprint) (\w+)/i
866
866
  // Sprint Phones
@@ -944,13 +944,13 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
944
944
  /(shield \w+ tv)/i
945
945
  // Nvidia Shield TV
946
946
  ],
947
- [l, [d, Rt], [a, E]],
947
+ [l, [d, Ot], [a, E]],
948
948
  [
949
949
  /\(dtv[\);].+(aquos)/i,
950
950
  /(aquos-tv[\w ]+)\)/i
951
951
  // Sharp
952
952
  ],
953
- [l, [d, Mt], [a, E]],
953
+ [l, [d, At], [a, E]],
954
954
  [
955
955
  /(bravia[\w ]+)( bui|\))/i
956
956
  // Sony
@@ -1027,7 +1027,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1027
1027
  /(opwwe\d{3})/i
1028
1028
  // OnePlus Watch
1029
1029
  ],
1030
- [l, [d, Ot], [a, $]],
1030
+ [l, [d, Mt], [a, $]],
1031
1031
  [
1032
1032
  /(moto 360)/i
1033
1033
  // Motorola 360
@@ -1172,7 +1172,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1172
1172
  /(windows nt) (6\.[23]); arm/i
1173
1173
  // Windows RT
1174
1174
  ],
1175
- [[c, /N/, "R"], [u, H, _t]],
1175
+ [[c, /N/, "R"], [u, H, Lt]],
1176
1176
  [
1177
1177
  /(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,
1178
1178
  // Windows IoT/Mobile/Phone
@@ -1184,7 +1184,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1184
1184
  /windows nt ?([\d\.\)]*)(?!.+xbox)/i,
1185
1185
  /\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
1186
1186
  ],
1187
- [[u, /(;|\))/g, "", H, _t], [c, nt]],
1187
+ [[u, /(;|\))/g, "", H, Lt], [c, rt]],
1188
1188
  [
1189
1189
  /(windows ce)\/?([\d\.]*)/i
1190
1190
  // Windows CE
@@ -1253,7 +1253,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1253
1253
  /\(bb(10);/i
1254
1254
  // BlackBerry 10
1255
1255
  ],
1256
- [u, [c, Et]],
1256
+ [u, [c, It]],
1257
1257
  [
1258
1258
  /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
1259
1259
  // Symbian
@@ -1375,7 +1375,7 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1375
1375
  }, t != fe && (r.prototype.is = function(h) {
1376
1376
  var f = !1;
1377
1377
  for (var g in this)
1378
- if (this.hasOwnProperty(g) && !rt(n, g) && Q(o ? be(o, this[g]) : this[g]) == Q(o ? be(o, h) : h)) {
1378
+ if (this.hasOwnProperty(g) && !ot(n, g) && Q(o ? be(o, this[g]) : this[g]) == Q(o ? be(o, h) : h)) {
1379
1379
  if (f = !0, h != C.UNDEFINED) break;
1380
1380
  } else if (h == C.UNDEFINED && f) {
1381
1381
  f = !f;
@@ -1405,12 +1405,12 @@ var Si = "2.0.7", Ci = 500, kt = "user-agent", he = "", St = "?", C = {
1405
1405
  function Kt(e, t) {
1406
1406
  if (e = e || {}, j.call(this, Qt), t)
1407
1407
  j.call(this, [
1408
- [lt, et(e[Z])],
1409
- [ct, et(e[Ei])],
1408
+ [ct, et(e[Z])],
1409
+ [dt, et(e[Ei])],
1410
1410
  [w, /\?1/.test(e[Oi])],
1411
1411
  [l, ve(e[Mi])],
1412
1412
  [pe, ve(e[Yt])],
1413
- [dt, ve(e[Ai])],
1413
+ [ut, ve(e[Ai])],
1414
1414
  [M, ve(e[Ii])],
1415
1415
  [ne, et(e[Ri])],
1416
1416
  [Ue, ve(e[Ti])]
@@ -1458,9 +1458,9 @@ J.prototype.detectFeature = function() {
1458
1458
  return this;
1459
1459
  };
1460
1460
  J.prototype.parseUA = function() {
1461
- switch (this.itemType != fe && st.call(this.data, this.ua, this.rgxMap), this.itemType) {
1461
+ switch (this.itemType != fe && at.call(this.data, this.ua, this.rgxMap), this.itemType) {
1462
1462
  case P:
1463
- this.set(Se, ot(this.get(u)));
1463
+ this.set(Se, st(this.get(u)));
1464
1464
  break;
1465
1465
  case D:
1466
1466
  if (this.get(c) == "iOS" && this.get(u) == "18.6") {
@@ -1476,39 +1476,39 @@ J.prototype.parseCH = function() {
1476
1476
  switch (this.itemType) {
1477
1477
  case P:
1478
1478
  case U:
1479
- var i = e[ct] || e[lt], n;
1479
+ var i = e[dt] || e[ct], n;
1480
1480
  if (i)
1481
1481
  for (var o = 0; o < i.length; o++) {
1482
1482
  var s = i[o].brand || i[o], r = i[o].version;
1483
- this.itemType == P && !/not.a.brand/i.test(s) && (!n || /Chrom/.test(n) && s != Ft || n == _e && /WebView2/.test(s)) && (s = H(s, _i), n = this.get(c), n && !/Chrom/.test(n) && /Chrom/.test(s) || this.set(c, s).set(u, r).set(Se, ot(r)), n = s), this.itemType == U && s == Ft && this.set(u, r);
1483
+ this.itemType == P && !/not.a.brand/i.test(s) && (!n || /Chrom/.test(n) && s != Pt || n == _e && /WebView2/.test(s)) && (s = H(s, _i), n = this.get(c), n && !/Chrom/.test(n) && /Chrom/.test(s) || this.set(c, s).set(u, r).set(Se, st(r)), n = s), this.itemType == U && s == Pt && this.set(u, r);
1484
1484
  }
1485
1485
  break;
1486
1486
  case G:
1487
1487
  var h = e[M];
1488
- h && (h && e[Ue] == "64" && (h += "64"), st.call(this.data, h + ";", t));
1488
+ h && (h && e[Ue] == "64" && (h += "64"), at.call(this.data, h + ";", t));
1489
1489
  break;
1490
1490
  case B:
1491
1491
  if (e[w] && this.set(a, w), e[l] && (this.set(l, e[l]), !this.get(a) || !this.get(d))) {
1492
1492
  var f = {};
1493
- st.call(f, "droid 9; " + e[l] + ")", t), !this.get(a) && f.type && this.set(a, f.type), !this.get(d) && f.vendor && this.set(d, f.vendor);
1493
+ at.call(f, "droid 9; " + e[l] + ")", t), !this.get(a) && f.type && this.set(a, f.type), !this.get(d) && f.vendor && this.set(d, f.vendor);
1494
1494
  }
1495
1495
  if (e[ne]) {
1496
1496
  var g;
1497
1497
  if (typeof e[ne] != "string")
1498
1498
  for (var m = 0; !g && m < e[ne].length; )
1499
- g = H(e[ne][m++], Lt);
1499
+ g = H(e[ne][m++], Dt);
1500
1500
  else
1501
- g = H(e[ne], Lt);
1501
+ g = H(e[ne], Dt);
1502
1502
  this.set(a, g);
1503
1503
  }
1504
1504
  break;
1505
1505
  case D:
1506
1506
  var k = e[pe];
1507
1507
  if (k) {
1508
- var T = e[dt];
1509
- k == nt && (T = parseInt(ot(T), 10) >= 13 ? "11" : "10"), this.set(c, k).set(u, T);
1508
+ var T = e[ut];
1509
+ k == rt && (T = parseInt(st(T), 10) >= 13 ? "11" : "10"), this.set(c, k).set(u, T);
1510
1510
  }
1511
- this.get(c) == nt && e[l] == "Xbox" && this.set(c, "Xbox").set(u, void 0);
1511
+ this.get(c) == rt && e[l] == "Xbox" && this.set(c, "Xbox").set(u, void 0);
1512
1512
  break;
1513
1513
  case fe:
1514
1514
  var z = this.data, R = function(y) {
@@ -1535,14 +1535,14 @@ function X(e, t, i) {
1535
1535
  return new X(e, t, i).getResult();
1536
1536
  var r = typeof e === C.STRING ? e : (
1537
1537
  // Passed user-agent string
1538
- i && i[kt] ? i[kt] : (
1538
+ i && i[St] ? i[St] : (
1539
1539
  // User-Agent from passed headers
1540
1540
  F && F.userAgent ? F.userAgent : (
1541
1541
  // navigator.userAgent
1542
1542
  he
1543
1543
  )
1544
1544
  )
1545
- ), h = new Kt(i, !0), f = t ? Pi(Dt, t) : Dt, g = function(m) {
1545
+ ), h = new Kt(i, !0), f = t ? Pi(zt, t) : zt, g = function(m) {
1546
1546
  return m == fe ? function() {
1547
1547
  return new J(m, r, f, h).set("ua", r).set(P, this.getBrowser()).set(G, this.getCPU()).set(B, this.getDevice()).set(U, this.getEngine()).set(D, this.getOS()).get();
1548
1548
  } : function() {
@@ -1674,7 +1674,7 @@ function ji(e, t, i, n) {
1674
1674
  const o = `.${e}:${t}`, s = i.cssText ? qi(i) : Ni(i, n);
1675
1675
  return document.createTextNode(`${o}{${s}}`);
1676
1676
  }
1677
- function zt(e, t, i, n) {
1677
+ function Ht(e, t, i, n) {
1678
1678
  const o = window.getComputedStyle(e, i), s = o.getPropertyValue("content");
1679
1679
  if (s === "" || s === "none")
1680
1680
  return;
@@ -1688,16 +1688,16 @@ function zt(e, t, i, n) {
1688
1688
  h.appendChild(ji(r, i, o, n)), t.appendChild(h);
1689
1689
  }
1690
1690
  function Gi(e, t, i) {
1691
- zt(e, t, ":before", i), zt(e, t, ":after", i);
1691
+ Ht(e, t, ":before", i), Ht(e, t, ":after", i);
1692
1692
  }
1693
- const Ht = "application/font-woff", Ut = "image/jpeg", Xi = {
1694
- woff: Ht,
1695
- woff2: Ht,
1693
+ const Ut = "application/font-woff", $t = "image/jpeg", Xi = {
1694
+ woff: Ut,
1695
+ woff2: Ut,
1696
1696
  ttf: "application/font-truetype",
1697
1697
  eot: "application/vnd.ms-fontobject",
1698
1698
  png: "image/png",
1699
- jpg: Ut,
1700
- jpeg: Ut,
1699
+ jpg: $t,
1700
+ jpeg: $t,
1701
1701
  gif: "image/gif",
1702
1702
  tiff: "image/tiff",
1703
1703
  svg: "image/svg+xml",
@@ -1707,14 +1707,14 @@ function Yi(e) {
1707
1707
  const t = /\.([^./]*?)$/g.exec(e);
1708
1708
  return t ? t[1] : "";
1709
1709
  }
1710
- function ut(e) {
1710
+ function ht(e) {
1711
1711
  const t = Yi(e).toLowerCase();
1712
1712
  return Xi[t] || "";
1713
1713
  }
1714
1714
  function Qi(e) {
1715
1715
  return e.split(/,/)[1];
1716
1716
  }
1717
- function at(e) {
1717
+ function lt(e) {
1718
1718
  return e.search(/^(data:)/) !== -1;
1719
1719
  }
1720
1720
  function Ki(e, t) {
@@ -1741,7 +1741,7 @@ function Ji(e, t, i) {
1741
1741
  let n = e.replace(/\?.*/, "");
1742
1742
  return i && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
1743
1743
  }
1744
- async function ht(e, t, i) {
1744
+ async function ft(e, t, i) {
1745
1745
  const n = Ji(e, t, i.includeQueryParams);
1746
1746
  if (tt[n] != null)
1747
1747
  return tt[n];
@@ -1768,7 +1768,7 @@ async function en(e, t) {
1768
1768
  const h = s.toDataURL();
1769
1769
  return He(h);
1770
1770
  }
1771
- const i = e.poster, n = ut(i), o = await ht(i, n, t);
1771
+ const i = e.poster, n = ht(i), o = await ft(i, n, t);
1772
1772
  return He(o);
1773
1773
  }
1774
1774
  async function tn(e, t) {
@@ -1849,13 +1849,13 @@ function fn(e) {
1849
1849
  }
1850
1850
  function pn(e) {
1851
1851
  const t = [];
1852
- return e.replace(ni, (i, n, o) => (t.push(o), i)), t.filter((i) => !at(i));
1852
+ return e.replace(ni, (i, n, o) => (t.push(o), i)), t.filter((i) => !lt(i));
1853
1853
  }
1854
1854
  async function bn(e, t, i, n, o) {
1855
1855
  try {
1856
- const s = i ? Di(t, i) : t, r = ut(t);
1856
+ const s = i ? Di(t, i) : t, r = ht(t);
1857
1857
  let h;
1858
- return o || (h = await ht(s, r, n)), e.replace(fn(t), `$1${h}$3`);
1858
+ return o || (h = await ft(s, r, n)), e.replace(fn(t), `$1${h}$3`);
1859
1859
  } catch {
1860
1860
  }
1861
1861
  return e;
@@ -1894,9 +1894,9 @@ async function wn(e, t) {
1894
1894
  }
1895
1895
  async function mn(e, t) {
1896
1896
  const i = _(e, HTMLImageElement);
1897
- if (!(i && !at(e.src)) && !(_(e, SVGImageElement) && !at(e.href.baseVal)))
1897
+ if (!(i && !lt(e.src)) && !(_(e, SVGImageElement) && !lt(e.href.baseVal)))
1898
1898
  return;
1899
- const n = i ? e.src : e.href.baseVal, o = await ht(n, ut(n), t);
1899
+ const n = i ? e.src : e.href.baseVal, o = await ft(n, ht(n), t);
1900
1900
  await new Promise((s, r) => {
1901
1901
  const f = [new Promise((m) => {
1902
1902
  e.onload = m;
@@ -1927,15 +1927,15 @@ function xn(e, t) {
1927
1927
  i[o] = n[o];
1928
1928
  }), e;
1929
1929
  }
1930
- const $t = {};
1931
- async function Bt(e) {
1932
- let t = $t[e];
1930
+ const Bt = {};
1931
+ async function Vt(e) {
1932
+ let t = Bt[e];
1933
1933
  if (t != null)
1934
1934
  return t;
1935
1935
  const n = await (await fetch(e)).text();
1936
- return t = { url: e, cssText: n }, $t[e] = t, t;
1936
+ return t = { url: e, cssText: n }, Bt[e] = t, t;
1937
1937
  }
1938
- async function Vt(e, t) {
1938
+ async function Wt(e, t) {
1939
1939
  let i = e.cssText;
1940
1940
  const n = /url\(["']?([^"')]+)["']?\)/g, s = (i.match(/url\([^)]+\)/g) || []).map(async (r) => {
1941
1941
  let h = r.replace(n, "$1");
@@ -1943,7 +1943,7 @@ async function Vt(e, t) {
1943
1943
  });
1944
1944
  return Promise.all(s).then(() => i);
1945
1945
  }
1946
- function Wt(e) {
1946
+ function qt(e) {
1947
1947
  if (e == null)
1948
1948
  return [];
1949
1949
  const t = [], i = /(\/\*[\s\S]*?\*\/)/gi;
@@ -1977,7 +1977,7 @@ async function vn(e, t) {
1977
1977
  K(o.cssRules || []).forEach((s, r) => {
1978
1978
  if (s.type === CSSRule.IMPORT_RULE) {
1979
1979
  let h = r + 1;
1980
- const f = s.href, g = Bt(f).then((m) => Vt(m, t)).then((m) => Wt(m).forEach((k) => {
1980
+ const f = s.href, g = Vt(f).then((m) => Wt(m, t)).then((m) => qt(m).forEach((k) => {
1981
1981
  try {
1982
1982
  o.insertRule(k, k.startsWith("@import") ? h += 1 : o.cssRules.length);
1983
1983
  } catch (T) {
@@ -1994,7 +1994,7 @@ async function vn(e, t) {
1994
1994
  });
1995
1995
  } catch (s) {
1996
1996
  const r = e.find((h) => h.href == null) || document.styleSheets[0];
1997
- o.href != null && n.push(Bt(o.href).then((h) => Vt(h, t)).then((h) => Wt(h).forEach((f) => {
1997
+ o.href != null && n.push(Vt(o.href).then((h) => Wt(h, t)).then((h) => qt(h).forEach((f) => {
1998
1998
  r.insertRule(f, r.cssRules.length);
1999
1999
  })).catch((h) => {
2000
2000
  console.error("Error loading remote stylesheet", h);
@@ -2094,7 +2094,7 @@ const Mn = async (e) => {
2094
2094
  const An = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Fn = (e) => e.replace(
2095
2095
  /^([A-Z])|[\s-_]+(\w)/g,
2096
2096
  (t, i, n) => n ? n.toUpperCase() : i.toLowerCase()
2097
- ), qt = (e) => {
2097
+ ), Nt = (e) => {
2098
2098
  const t = Fn(e);
2099
2099
  return t.charAt(0).toUpperCase() + t.slice(1);
2100
2100
  }, li = (...e) => e.filter((t, i, n) => !!t && t.trim() !== "" && n.indexOf(t) === i).join(" ").trim(), Pn = (e) => {
@@ -2123,7 +2123,7 @@ const Ln = Xt(
2123
2123
  children: s,
2124
2124
  iconNode: r,
2125
2125
  ...h
2126
- }, f) => it(
2126
+ }, f) => nt(
2127
2127
  "svg",
2128
2128
  {
2129
2129
  ref: f,
@@ -2137,25 +2137,25 @@ const Ln = Xt(
2137
2137
  ...h
2138
2138
  },
2139
2139
  [
2140
- ...r.map(([g, m]) => it(g, m)),
2140
+ ...r.map(([g, m]) => nt(g, m)),
2141
2141
  ...Array.isArray(s) ? s : [s]
2142
2142
  ]
2143
2143
  )
2144
2144
  );
2145
2145
  const ee = (e, t) => {
2146
2146
  const i = Xt(
2147
- ({ className: n, ...o }, s) => it(Ln, {
2147
+ ({ className: n, ...o }, s) => nt(Ln, {
2148
2148
  ref: s,
2149
2149
  iconNode: t,
2150
2150
  className: li(
2151
- `lucide-${An(qt(e))}`,
2151
+ `lucide-${An(Nt(e))}`,
2152
2152
  `lucide-${e}`,
2153
2153
  n
2154
2154
  ),
2155
2155
  ...o
2156
2156
  })
2157
2157
  );
2158
- return i.displayName = qt(e), i;
2158
+ return i.displayName = Nt(e), i;
2159
2159
  };
2160
2160
  const Dn = [
2161
2161
  ["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
@@ -2166,7 +2166,7 @@ const Hn = [
2166
2166
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
2167
2167
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
2168
2168
  ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
2169
- ], Nt = ee("hash", Hn);
2169
+ ], jt = ee("hash", Hn);
2170
2170
  const Un = [
2171
2171
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
2172
2172
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
@@ -2197,7 +2197,7 @@ const Gn = [
2197
2197
  const Yn = [
2198
2198
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
2199
2199
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
2200
- ], jt = ee("x", Yn), Qn = ({ onConfirm: e, onCancel: t }) => {
2200
+ ], Gt = ee("x", Yn), Qn = ({ onConfirm: e, onCancel: t }) => {
2201
2201
  const [i, n] = I(!1), [o, s] = I({ x: 0, y: 0 }), [r, h] = I({ x: 0, y: 0 }), f = (y) => {
2202
2202
  n(!0), s({ x: y.clientX, y: y.clientY }), h({ x: y.clientX, y: y.clientY });
2203
2203
  }, g = (y) => {
@@ -2299,8 +2299,8 @@ const Yn = [
2299
2299
  onOpen: h,
2300
2300
  onClose: f
2301
2301
  }) => {
2302
- const [g, m] = I(!1), [k, T] = I(""), [z, R] = I(e), [y, O] = I(t || ""), [V, W] = I([]), [Ve, We] = I(null), [di, ft] = I(!1), [te, pt] = I(!1), [bt, Ee] = I(!1), [q, oe] = I(null), [A, se] = I({}), [gt, Ie] = I("incorrect_content"), [ui, qe] = I(!1), wt = vt.useRef(null), Ne = r !== void 0 ? r : g, hi = Ne && !ui;
2303
- vt.useEffect(() => {
2302
+ const [g, m] = I(!1), [k, T] = I(""), [z, R] = I(e), [y, O] = I(t || ""), [V, W] = I([]), [Ve, We] = I(null), [di, pt] = I(!1), [te, bt] = I(!1), [gt, Ee] = I(!1), [q, oe] = I(null), [A, se] = I({}), [wt, Ie] = I("incorrect_content"), [ui, qe] = I(!1), mt = kt.useRef(null), Ne = r !== void 0 ? r : g, hi = Ne && !ui;
2303
+ kt.useEffect(() => {
2304
2304
  Ne && (se({}), R(e), O(t || ""), W([]), T(""), Ie("incorrect_content"));
2305
2305
  }, [Ne, e, t]);
2306
2306
  const fi = () => {
@@ -2308,7 +2308,7 @@ const Yn = [
2308
2308
  alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");
2309
2309
  return;
2310
2310
  }
2311
- wt.current?.click();
2311
+ mt.current?.click();
2312
2312
  }, pi = (p) => {
2313
2313
  const S = p.target.files?.[0];
2314
2314
  if (!S) return;
@@ -2323,11 +2323,11 @@ const Yn = [
2323
2323
  const N = new FileReader();
2324
2324
  N.onload = (Te) => {
2325
2325
  const Re = Te.target?.result;
2326
- Re && W((xt) => [...xt, Re]);
2326
+ Re && W((vt) => [...vt, Re]);
2327
2327
  }, N.readAsDataURL(S), p.target.value = "";
2328
2328
  }, bi = () => {
2329
2329
  W([]), T(""), R(e), O(t || ""), Ie("incorrect_content"), se({}), r === void 0 && m(!0);
2330
- }, mt = async (p) => {
2330
+ }, yt = async (p) => {
2331
2331
  if (V.length >= 3) {
2332
2332
  alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");
2333
2333
  return;
@@ -2337,20 +2337,20 @@ const Yn = [
2337
2337
  return;
2338
2338
  }
2339
2339
  setTimeout(async () => {
2340
- await yt();
2340
+ await xt();
2341
2341
  }, 150);
2342
- }, yt = async (p) => {
2343
- ft(!0);
2342
+ }, xt = async (p) => {
2343
+ pt(!0);
2344
2344
  try {
2345
2345
  const S = await Mn(p);
2346
2346
  S ? W((N) => [...N, S]) : alert("Không thể chụp ảnh màn hình. Vui lòng thử lại.");
2347
2347
  } catch (S) {
2348
2348
  console.error(S);
2349
2349
  } finally {
2350
- ft(!1), qe(!1);
2350
+ pt(!1), qe(!1);
2351
2351
  }
2352
2352
  }, gi = (p) => {
2353
- Ee(!1), yt(p);
2353
+ Ee(!1), xt(p);
2354
2354
  }, wi = () => {
2355
2355
  Ee(!1), qe(!1);
2356
2356
  }, mi = (p) => {
@@ -2363,7 +2363,7 @@ const Yn = [
2363
2363
  se(p);
2364
2364
  return;
2365
2365
  }
2366
- pt(!0);
2366
+ bt(!0);
2367
2367
  try {
2368
2368
  const S = Jt(), N = await Promise.all(
2369
2369
  V.map(async (Re) => (await (await fetch("https://lcms.icanwork.vn/api/upload-to-s3/upload-image-error-to-s3", {
@@ -2379,7 +2379,7 @@ const Yn = [
2379
2379
  await n({
2380
2380
  idQuestion: z,
2381
2381
  idChildQuestion: y,
2382
- errorType: gt,
2382
+ errorType: wt,
2383
2383
  errorDescription: k,
2384
2384
  listImage: N,
2385
2385
  deviceInfo: S,
@@ -2388,10 +2388,10 @@ const Yn = [
2388
2388
  } catch (S) {
2389
2389
  console.error("Submit feedback failed", S);
2390
2390
  } finally {
2391
- pt(!1);
2391
+ bt(!1);
2392
2392
  }
2393
2393
  };
2394
- return /* @__PURE__ */ x(Gt, { children: [
2394
+ return /* @__PURE__ */ x(it, { children: [
2395
2395
  /* @__PURE__ */ b("style", { id: "feedback-widget-styles", children: `
2396
2396
  @keyframes fb-fade-in {
2397
2397
  from { opacity: 0; transform: translateY(10px); }
@@ -2434,22 +2434,28 @@ const Yn = [
2434
2434
  right: 20px !important;
2435
2435
  }
2436
2436
  /* Prevent iOS zoom on inputs */
2437
- /* input, select, textarea {
2437
+ input, select, textarea {
2438
2438
  font-size: 16px !important;
2439
- } */
2439
+ }
2440
2440
  }
2441
- @media (max-width: 767px) {
2441
+ @media (max-width: 820px) {
2442
2442
  .fb-btn-crop {
2443
2443
  display: none !important;
2444
2444
  }
2445
+ /* Enforce 16px font on all mobile/tablet inputs to prevent zoom */
2446
+ .fb-widget-modal input,
2447
+ .fb-widget-modal select,
2448
+ .fb-widget-modal textarea {
2449
+ font-size: 16px !important;
2450
+ }
2445
2451
  }
2446
2452
  @media (min-width: 768px) {
2447
2453
  .fb-btn-upload {
2448
- display: none !important;
2454
+
2449
2455
  }
2450
2456
  }
2451
2457
  ` }),
2452
- bt && /* @__PURE__ */ b(Qn, { onConfirm: gi, onCancel: wi }),
2458
+ gt && /* @__PURE__ */ b(Qn, { onConfirm: gi, onCancel: wi }),
2453
2459
  Ve && /* @__PURE__ */ b(
2454
2460
  "div",
2455
2461
  {
@@ -2518,7 +2524,7 @@ const Yn = [
2518
2524
  }
2519
2525
  ) }),
2520
2526
  di && /* @__PURE__ */ b("div", { style: { position: "fixed", top: 20, right: 20, background: "rgba(0,0,0,0.8)", color: "white", padding: "8px 12px", borderRadius: "8px", zIndex: 1e4, fontWeight: 500, backdropFilter: "blur(4px)", fontSize: "0.8rem" }, children: "Đang chụp..." }),
2521
- hi && !bt && !Ve && /* @__PURE__ */ x("div", { className: "fb-widget-modal", children: [
2527
+ hi && !gt && !Ve && /* @__PURE__ */ x("div", { className: "fb-widget-modal", children: [
2522
2528
  /* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
2523
2529
  /* @__PURE__ */ b("h2", { style: { margin: 0, fontSize: "1rem", fontWeight: 700, color: "#111827" }, children: "Báo lỗi" }),
2524
2530
  /* @__PURE__ */ b(
@@ -2539,7 +2545,7 @@ const Yn = [
2539
2545
  },
2540
2546
  onMouseEnter: (p) => p.currentTarget.style.backgroundColor = "#f3f4f6",
2541
2547
  onMouseLeave: (p) => p.currentTarget.style.backgroundColor = "transparent",
2542
- children: /* @__PURE__ */ b(jt, { size: 18 })
2548
+ children: /* @__PURE__ */ b(Gt, { size: 18 })
2543
2549
  }
2544
2550
  )
2545
2551
  ] }),
@@ -2547,6 +2553,8 @@ const Yn = [
2547
2553
  /* @__PURE__ */ x("div", { children: [
2548
2554
  /* @__PURE__ */ x("label", { style: { display: "block", marginBottom: "2px", fontSize: "0.8rem", fontWeight: 600, color: "#374151" }, children: [
2549
2555
  "ID Câu hỏi ",
2556
+ t ? "bài đọc" : "",
2557
+ " ",
2550
2558
  /* @__PURE__ */ b("span", { style: { color: "#ef4444" }, children: "*" })
2551
2559
  ] }),
2552
2560
  /* @__PURE__ */ x("div", { style: {
@@ -2555,7 +2563,7 @@ const Yn = [
2555
2563
  alignItems: "center",
2556
2564
  transition: "all 0.2s"
2557
2565
  }, children: [
2558
- /* @__PURE__ */ b(Nt, { size: 12, style: {
2566
+ /* @__PURE__ */ b(jt, { size: 12, style: {
2559
2567
  position: "absolute",
2560
2568
  left: "10px",
2561
2569
  color: q === "id" ? o : A.questionId ? "#ef4444" : "#9ca3af",
@@ -2591,15 +2599,15 @@ const Yn = [
2591
2599
  ] }),
2592
2600
  A.questionId && /* @__PURE__ */ b("span", { style: { display: "block", marginTop: "2px", fontSize: "0.7rem", color: "#ef4444" }, children: A.questionId })
2593
2601
  ] }),
2594
- /* @__PURE__ */ x("div", { children: [
2595
- /* @__PURE__ */ b("label", { style: { display: "block", marginBottom: "2px", fontSize: "0.8rem", fontWeight: 600, color: "#374151" }, children: "ID Câu hỏi con" }),
2602
+ t ? /* @__PURE__ */ x("div", { children: [
2603
+ /* @__PURE__ */ b("label", { style: { display: "block", marginBottom: "2px", fontSize: "0.8rem", fontWeight: 600, color: "#374151" }, children: "ID Câu hỏi" }),
2596
2604
  /* @__PURE__ */ x("div", { style: {
2597
2605
  position: "relative",
2598
2606
  display: "flex",
2599
2607
  alignItems: "center",
2600
2608
  transition: "all 0.2s"
2601
2609
  }, children: [
2602
- /* @__PURE__ */ b(Nt, { size: 12, style: {
2610
+ /* @__PURE__ */ b(jt, { size: 12, style: {
2603
2611
  position: "absolute",
2604
2612
  left: "10px",
2605
2613
  color: q === "idChild" ? o : A.questionIdChild ? "#ef4444" : "#9ca3af",
@@ -2634,7 +2642,7 @@ const Yn = [
2634
2642
  )
2635
2643
  ] }),
2636
2644
  A.questionIdChild && /* @__PURE__ */ b("span", { style: { display: "block", marginTop: "2px", fontSize: "0.7rem", color: "#ef4444" }, children: A.questionIdChild })
2637
- ] }),
2645
+ ] }) : /* @__PURE__ */ b(it, {}),
2638
2646
  /* @__PURE__ */ x("div", { children: [
2639
2647
  /* @__PURE__ */ x("label", { style: { display: "block", marginBottom: "2px", fontSize: "0.8rem", fontWeight: 600, color: "#374151" }, children: [
2640
2648
  "Loại lỗi ",
@@ -2643,7 +2651,7 @@ const Yn = [
2643
2651
  /* @__PURE__ */ x(
2644
2652
  "select",
2645
2653
  {
2646
- value: gt,
2654
+ value: wt,
2647
2655
  onChange: (p) => Ie(p.target.value),
2648
2656
  style: {
2649
2657
  width: "100%",
@@ -2781,7 +2789,7 @@ const Yn = [
2781
2789
  padding: 0,
2782
2790
  boxShadow: "0 1px 2px rgba(0,0,0,0.2)"
2783
2791
  },
2784
- children: /* @__PURE__ */ b(jt, { size: 10 })
2792
+ children: /* @__PURE__ */ b(Gt, { size: 10 })
2785
2793
  }
2786
2794
  )
2787
2795
  ] }, S)) }),
@@ -2790,7 +2798,7 @@ const Yn = [
2790
2798
  "input",
2791
2799
  {
2792
2800
  type: "file",
2793
- ref: wt,
2801
+ ref: mt,
2794
2802
  style: { display: "none" },
2795
2803
  accept: "image/*",
2796
2804
  onChange: pi
@@ -2799,7 +2807,7 @@ const Yn = [
2799
2807
  /* @__PURE__ */ x(
2800
2808
  "button",
2801
2809
  {
2802
- onClick: () => mt("full"),
2810
+ onClick: () => yt("full"),
2803
2811
  style: {
2804
2812
  flex: 1,
2805
2813
  padding: "12px",
@@ -2832,7 +2840,7 @@ const Yn = [
2832
2840
  /* @__PURE__ */ x(
2833
2841
  "button",
2834
2842
  {
2835
- onClick: () => mt("crop"),
2843
+ onClick: () => yt("crop"),
2836
2844
  className: "fb-btn-crop",
2837
2845
  style: {
2838
2846
  flex: 1,
@@ -2975,7 +2983,7 @@ const Yn = [
2975
2983
  themeColor: i,
2976
2984
  isOpen: n,
2977
2985
  onClose: T,
2978
- triggerComponent: /* @__PURE__ */ b(Gt, {})
2986
+ triggerComponent: /* @__PURE__ */ b(it, {})
2979
2987
  }
2980
2988
  )
2981
2989
  ] });
@@ -1,5 +1,5 @@
1
- (function($,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],f):($=typeof globalThis<"u"?globalThis:$||self,f($.SupportFeedbackLib={},$.jsxRuntime,$.React))})(this,(function($,f,y){"use strict";var ai="2.0.7",li=500,ht="user-agent",oe="",ft="?",C={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},_="browser",V="cpu",B="device",H="engine",L="os",se="result",c="name",a="type",d="vendor",u="version",M="architecture",ge="major",l="model",Ee="console",w="mobile",x="tablet",E="smarttv",W="wearable",Ie="xr",we="embedded",ae="inapp",Ve="brands",te="formFactors",qe="fullVersionList",le="platform",Ne="platformVersion",Te="bitness",Y="sec-ch-ua",ci=Y+"-full-version-list",di=Y+"-arch",ui=Y+"-"+Te,hi=Y+"-form-factors",fi=Y+"-"+w,pi=Y+"-"+l,pt=Y+"-"+le,bi=pt+"-version",bt=[Ve,qe,w,l,le,Ne,M,te,Te],Oe="Amazon",ce="Apple",gt="ASUS",wt="BlackBerry",ie="Google",mt="Huawei",je="Lenovo",yt="Honor",Me="LG",Re="Microsoft",Ge="Motorola",xt="Nvidia",vt="OnePlus",Xe="OPPO",me="Samsung",kt="Sharp",ye="Sony",Ye="Xiaomi",Qe="Zebra",St="Chrome",Ct="Chromium",Q="Chromecast",_e="Edge",xe="Firefox",ve="Opera",Ke="Facebook",Et="Sogou",de="Mobile ",ke=" Browser",Je="Windows",gi=typeof window!==C.UNDEFINED,A=gi&&window.navigator?window.navigator:void 0,re=A&&A.userAgentData?A.userAgentData:void 0,wi=function(e,t){var i={},r=t;if(!Fe(t)){r={};for(var o in t)for(var s in t[o])r[s]=t[o][s].concat(r[s]?r[s]:[])}for(var n in e)i[n]=r[n]&&r[n].length%2===0?r[n].concat(e[n]):e[n];return i},Ae=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},Ze=function(e,t){if(typeof e===C.OBJECT&&e.length>0){for(var i in e)if(K(t)==K(e[i]))return!0;return!1}return Se(e)?K(t)==K(e):!1},Fe=function(e,t){for(var i in e)return/^(browser|cpu|device|engine|os)$/.test(i)||(t?Fe(e[i]):!1)},Se=function(e){return typeof e===C.STRING},et=function(e){if(e){for(var t=[],i=ue(/\\?\"/g,e).split(","),r=0;r<i.length;r++)if(i[r].indexOf(";")>-1){var o=Pe(i[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Pe(i[r]);return t}},K=function(e){return Se(e)?e.toLowerCase():e},tt=function(e){return Se(e)?ue(/[^\d\.]/g,e).split(".")[0]:void 0},q=function(e){for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];typeof i==C.OBJECT&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},ue=function(e,t){return Se(t)?t.replace(e,oe):t},Ce=function(e){return ue(/\\?\"/g,e)},Pe=function(e,t){return e=ue(/^\s\s*/,String(e)),typeof t===C.UNDEFINED?e:e.substring(0,t)},it=function(e,t){if(!(!e||!t))for(var i=0,r,o,s,n,h,p;i<t.length&&!h;){var g=t[i],m=t[i+1];for(r=o=0;r<g.length&&!h&&g[r];)if(h=g[r++].exec(e),h)for(s=0;s<m.length;s++)p=h[++o],n=m[s],typeof n===C.OBJECT&&n.length>0?n.length===2?typeof n[1]==C.FUNCTION?this[n[0]]=n[1].call(this,p):this[n[0]]=n[1]:n.length>=3&&(typeof n[1]===C.FUNCTION&&!(n[1].exec&&n[1].test)?n.length>3?this[n[0]]=p?n[1].apply(this,n.slice(2)):void 0:this[n[0]]=p?n[1].call(this,p,n[2]):void 0:n.length==3?this[n[0]]=p?p.replace(n[1],n[2]):void 0:n.length==4?this[n[0]]=p?n[3].call(this,p.replace(n[1],n[2])):void 0:n.length>4&&(this[n[0]]=p?n[3].apply(this,[p.replace(n[1],n[2])].concat(n.slice(4))):void 0)):this[n]=p||void 0;i+=2}},U=function(e,t){for(var i in t)if(typeof t[i]===C.OBJECT&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(Ze(t[i][r],e))return i===ft?void 0:i}else if(Ze(t[i],e))return i===ft?void 0:i;return t.hasOwnProperty("*")?t["*"]:e},It={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Tt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},mi={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ot={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,de+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[u,[c,_e+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ve+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ve+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ve]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart "+je+ke]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure"+ke],u],[/\bfocus\/([\w\.]+)/i],[u,[c,xe+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ve+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ve+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+ke]],[/fxios\/([\w\.-]+)/i],[u,[c,de+xe]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+ke],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,Et+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,Et+" Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Ke],u,[a,ae]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[c,u,[a,ae]],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"],[a,ae]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"],[a,ae]],[/\[(linkedin)app\]/i],[c,[a,ae]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[c,/(.+)/,"Zalo"],u,[a,ae]],[/(chromium)[\/ ]([-\w\.]+)/i],[c,u],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,St+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[u,[c,_e+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,St+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android"+ke]],[/chrome\/([\w\.]+) mobile/i],[u,[c,de+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[u,[c,de+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[c,de+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[c,de+xe],u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,xe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/[^\d\.]+./,oe]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[M,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[M,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[M,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[M,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[M,"arm"]],[/ sun4\w[;\)]/i],[[M,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[M,/ower/,oe,K]],[/mc680.0/i],[[M,"68k"]],[/winnt.+\[axp/i],[[M,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[d,me],[a,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[l,[d,me],[a,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[l,[d,ce],[a,w]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[l,[d,ce],[a,x]],[/(macintosh);/i],[l,[d,ce]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[d,kt],[a,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[l,[d,yt],[a,x]],[/honor([-\w ]+)[;\)]/i],[l,[d,yt],[a,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[l,[d,mt],[a,x]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[l,[d,mt],[a,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[l,/_/g," "],[d,Ye],[a,x]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[l,/_/g," "],[d,Ye],[a,w]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[d,vt],[a,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[d,Xe],[a,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[l,[d,U,{OnePlus:["203","304","403","404","413","415"],"*":Xe}],[a,x]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[l,[d,"BLU"],[a,w]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[d,"Vivo"],[a,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[d,"Realme"],[a,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[l,[d,je],[a,x]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[l,[d,je],[a,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[l,[d,Ge],[a,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[d,Ge],[a,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[d,Me],[a,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[d,Me],[a,w]],[/(nokia) (t[12][01])/i],[d,l,[a,x]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[l,/_/g," "],[a,w],[d,"Nokia"]],[/(pixel (c|tablet))\b/i],[l,[d,ie],[a,x]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[l,[d,ie],[a,w]],[/(google) (pixelbook( go)?)/i],[d,l],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[d,ye],[a,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[d,ye],[a,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[d,Oe],[a,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[d,Oe],[a,w]],[/(playbook);[-\w\),; ]+(rim)/i],[l,d,[a,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[l,[d,wt],[a,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[d,gt],[a,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[d,gt],[a,w]],[/(nexus 9)/i],[l,[d,"HTC"],[a,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[l,/_/g," "],[a,w]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[l,[d,"TCL"],[a,x]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[l,[d,"TCL"],[a,w]],[/(itel) ((\w+))/i],[[d,K],l,[a,U,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[d,"Acer"],[a,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[d,"Meizu"],[a,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[d,"Ulefone"],[a,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[l,[d,"Energizer"],[a,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[l,[d,"Cat"],[a,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[l,[d,"Smartfren"],[a,w]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[l,[d,"Nothing"],[a,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[l,[d,"Archos"],[a,x]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[l,[d,"Archos"],[a,w]],[/; (n159v)/i],[l,[d,"HMD"],[a,w]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[d,l,[a,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[d,l,[a,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[d,l,[a,x]],[/(surface duo)/i],[l,[d,Re],[a,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[d,"Fairphone"],[a,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[l,[d,xt],[a,x]],[/(sprint) (\w+)/i],[d,l,[a,w]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[d,Re],[a,w]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[d,Qe],[a,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[d,Qe],[a,w]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[d,[a,E]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[d,me],[a,E]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[d,l,[a,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,Me],[a,E]],[/(apple) ?tv/i],[d,[l,ce+" TV"],[a,E]],[/crkey.*devicetype\/chromecast/i],[[l,Q+" Third Generation"],[d,ie],[a,E]],[/crkey.*devicetype\/([^/]*)/i],[[l,/^/,"Chromecast "],[d,ie],[a,E]],[/fuchsia.*crkey/i],[[l,Q+" Nest Hub"],[d,ie],[a,E]],[/crkey/i],[[l,Q],[d,ie],[a,E]],[/(portaltv)/i],[l,[d,Ke],[a,E]],[/droid.+aft(\w+)( bui|\))/i],[l,[d,Oe],[a,E]],[/(shield \w+ tv)/i],[l,[d,xt],[a,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[d,kt],[a,E]],[/(bravia[\w ]+)( bui|\))/i],[l,[d,ye],[a,E]],[/(mi(tv|box)-?\w+) bui/i],[l,[d,Ye],[a,E]],[/Hbbtv.*(technisat) (.*);/i],[d,l,[a,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,/.+\/(\w+)/,"$1",U,{LG:"lge"}],[l,Pe],[a,E]],[/(playstation \w+)/i],[l,[d,ye],[a,Ee]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[d,Re],[a,Ee]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[d,U,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],l,[a,Ee]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[l,[d,me],[a,W]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[d,l,[a,W]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[l,[d,Xe],[a,W]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[d,ce],[a,W]],[/(opwwe\d{3})/i],[l,[d,vt],[a,W]],[/(moto 360)/i],[l,[d,Ge],[a,W]],[/(smartwatch 3)/i],[l,[d,ye],[a,W]],[/(g watch r)/i],[l,[d,Me],[a,W]],[/droid.+; (wt63?0{2,3})\)/i],[l,[d,Qe],[a,W]],[/droid.+; (glass) \d/i],[l,[d,ie],[a,Ie]],[/(pico) ([\w ]+) os\d/i],[d,l,[a,Ie]],[/(quest( \d| pro)?s?).+vr/i],[l,[d,Ke],[a,Ie]],[/mobile vr; rv.+firefox/i],[[a,Ie]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[a,we]],[/(aeobc)\b/i],[l,[d,Oe],[a,we]],[/(homepod).+mac os/i],[l,[d,ce],[a,we]],[/windows iot/i],[[a,we]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[l,[a,E]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[a,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[l,[a,U,{mobile:"Mobile",xr:"VR","*":x}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[a,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[a,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[l,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,_e+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/(windows nt) (6\.[23]); arm/i],[[c,/N/,"R"],[u,U,It]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[c,u],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[u,/(;|\))/g,"",U,It],[c,Je]],[/(windows ce)\/?([\d\.]*)/i],[c,u],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[c,"macOS"],[u,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[u,[c,Q+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[u,[c,Q+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[u,[c,Q+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[u,[c,Q+" Linux"]],[/crkey\/([\d\.]+)/i],[u,[c,Q]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,wt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,xe+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[u,[c,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[u,U,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,"Chrome OS"],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[c,u],[/(sunos) ?([\d\.]*)/i],[[c,"Solaris"],u],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},Le=(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return q.call(e.init,[[_,[c,u,ge,a]],[V,[M]],[B,[a,l,d]],[H,[c,u]],[L,[c,u]]]),q.call(e.isIgnore,[[_,[u,ge]],[H,[u]],[L,[u]]]),q.call(e.isIgnoreRgx,[[_,/ ?browser$/i],[L,/ ?os$/i]]),q.call(e.toString,[[_,[c,u]],[V,[M]],[B,[d,l]],[H,[c,u]],[L,[c,u]]]),e})(),yi=function(e,t){var i=Le.init[t],r=Le.isIgnore[t]||0,o=Le.isIgnoreRgx[t]||0,s=Le.toString[t]||0;function n(){q.call(this,i)}return n.prototype.getItem=function(){return e},n.prototype.withClientHints=function(){return re?re.getHighEntropyValues(bt).then(function(h){return e.setCH(new Mt(h,!1)).parseCH().get()}):e.parseCH().get()},n.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=se&&(n.prototype.is=function(h){var p=!1;for(var g in this)if(this.hasOwnProperty(g)&&!Ze(r,g)&&K(o?ue(o,this[g]):this[g])==K(o?ue(o,h):h)){if(p=!0,h!=C.UNDEFINED)break}else if(h==C.UNDEFINED&&p){p=!p;break}return p},n.prototype.toString=function(){var h=oe;for(var p in s)typeof this[s[p]]!==C.UNDEFINED&&(h+=(h?" ":oe)+this[s[p]]);return h||C.UNDEFINED}),n.prototype.then=function(h){var p=this,g=function(){for(var k in p)p.hasOwnProperty(k)&&(this[k]=p[k])};g.prototype={is:n.prototype.is,toString:n.prototype.toString,withClientHints:n.prototype.withClientHints,withFeatureCheck:n.prototype.withFeatureCheck};var m=new g;return h(m),m},new n};function Mt(e,t){if(e=e||{},q.call(this,bt),t)q.call(this,[[Ve,et(e[Y])],[qe,et(e[ci])],[w,/\?1/.test(e[fi])],[l,Ce(e[pi])],[le,Ce(e[pt])],[Ne,Ce(e[bi])],[M,Ce(e[di])],[te,et(e[hi])],[Te,Ce(e[ui])]]);else for(var i in e)this.hasOwnProperty(i)&&typeof e[i]!==C.UNDEFINED&&(this[i]=e[i])}function J(e,t,i,r){return q.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",i],["data",yi(this,e)]]),this}J.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},J.prototype.set=function(e,t){return this.data[e]=t,this},J.prototype.setCH=function(e){return this.uaCH=e,this},J.prototype.detectFeature=function(){if(A&&A.userAgent==this.ua)switch(this.itemType){case _:A.brave&&typeof A.brave.isBrave==C.FUNCTION&&this.set(c,"Brave");break;case B:!this.get(a)&&re&&re[w]&&this.set(a,w),this.get(l)=="Macintosh"&&A&&typeof A.standalone!==C.UNDEFINED&&A.maxTouchPoints&&A.maxTouchPoints>2&&this.set(l,"iPad").set(a,x);break;case L:!this.get(c)&&re&&re[le]&&this.set(c,re[le]);break;case se:var e=this.data,t=function(i){return e[i].getItem().detectFeature().get()};this.set(_,t(_)).set(V,t(V)).set(B,t(B)).set(H,t(H)).set(L,t(L))}return this},J.prototype.parseUA=function(){switch(this.itemType!=se&&it.call(this.data,this.ua,this.rgxMap),this.itemType){case _:this.set(ge,tt(this.get(u)));break;case L:if(this.get(c)=="iOS"&&this.get(u)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(u,e[1])}break}return this},J.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case _:case H:var i=e[qe]||e[Ve],r;if(i)for(var o=0;o<i.length;o++){var s=i[o].brand||i[o],n=i[o].version;this.itemType==_&&!/not.a.brand/i.test(s)&&(!r||/Chrom/.test(r)&&s!=Ct||r==_e&&/WebView2/.test(s))&&(s=U(s,mi),r=this.get(c),r&&!/Chrom/.test(r)&&/Chrom/.test(s)||this.set(c,s).set(u,n).set(ge,tt(n)),r=s),this.itemType==H&&s==Ct&&this.set(u,n)}break;case V:var h=e[M];h&&(h&&e[Te]=="64"&&(h+="64"),it.call(this.data,h+";",t));break;case B:if(e[w]&&this.set(a,w),e[l]&&(this.set(l,e[l]),!this.get(a)||!this.get(d))){var p={};it.call(p,"droid 9; "+e[l]+")",t),!this.get(a)&&p.type&&this.set(a,p.type),!this.get(d)&&p.vendor&&this.set(d,p.vendor)}if(e[te]){var g;if(typeof e[te]!="string")for(var m=0;!g&&m<e[te].length;)g=U(e[te][m++],Tt);else g=U(e[te],Tt);this.set(a,g)}break;case L:var k=e[le];if(k){var I=e[Ne];k==Je&&(I=parseInt(tt(I),10)>=13?"11":"10"),this.set(c,k).set(u,I)}this.get(c)==Je&&e[l]=="Xbox"&&this.set(c,"Xbox").set(u,void 0);break;case se:var z=this.data,T=function(v){return z[v].getItem().setCH(e).parseCH().get()};this.set(_,T(_)).set(V,T(V)).set(B,T(B)).set(H,T(H)).set(L,T(L))}return this};function N(e,t,i){if(typeof e===C.OBJECT?(Fe(e,!0)?(typeof t===C.OBJECT&&(i=t),t=e):(i=e,t=void 0),e=void 0):typeof e===C.STRING&&!Fe(t,!0)&&(i=t,t=void 0),i)if(typeof i.append===C.FUNCTION){var r={};i.forEach(function(m,k){r[String(k).toLowerCase()]=m}),i=r}else{var o={};for(var s in i)i.hasOwnProperty(s)&&(o[String(s).toLowerCase()]=i[s]);i=o}if(!(this instanceof N))return new N(e,t,i).getResult();var n=typeof e===C.STRING?e:i&&i[ht]?i[ht]:A&&A.userAgent?A.userAgent:oe,h=new Mt(i,!0),p=t?wi(Ot,t):Ot,g=function(m){return m==se?function(){return new J(m,n,p,h).set("ua",n).set(_,this.getBrowser()).set(V,this.getCPU()).set(B,this.getDevice()).set(H,this.getEngine()).set(L,this.getOS()).get()}:function(){return new J(m,n,p[m],h).parseUA().get()}};return q.call(this,[["getBrowser",g(_)],["getCPU",g(V)],["getDevice",g(B)],["getEngine",g(H)],["getOS",g(L)],["getResult",g(se)],["getUA",function(){return n}],["setUA",function(m){return Se(m)&&(n=Pe(m,li)),this}]]).setUA(n),this}N.VERSION=ai,N.BROWSER=Ae([c,u,ge,a]),N.CPU=Ae([M]),N.DEVICE=Ae([l,d,a,Ee,w,E,x,W,we]),N.ENGINE=N.OS=Ae([c,u]);const _t=()=>{const t=new N().getResult();return{os:t.os.name||"unknown",osVersion:t.os.version||"unknown",browser:t.browser.name||"unknown",browserVersion:t.browser.version||"unknown",deviceType:t.device.type||"desktop"}};function xi(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const i=document.implementation.createHTMLDocument(),r=i.createElement("base"),o=i.createElement("a");return i.head.appendChild(r),i.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}const vi=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let i=0,r=e.length;i<r;i++)t.push(e[i]);return t}let he=null;function At(e={}){return he||(e.includeStyleProperties?(he=e.includeStyleProperties,he):(he=Z(window.getComputedStyle(document.documentElement)),he))}function De(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function ki(e){const t=De(e,"border-left-width"),i=De(e,"border-right-width");return e.clientWidth+t+i}function Si(e){const t=De(e,"border-top-width"),i=De(e,"border-bottom-width");return e.clientHeight+t+i}function Ft(e,t={}){const i=t.width||ki(e),r=t.height||Si(e);return{width:i,height:r}}function Ci(){let e,t;try{t=process}catch{}const i=t&&t.env?t.env.devicePixelRatio:null;return i&&(e=parseInt(i,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Ei(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function ze(e){return new Promise((t,i)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=i,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Ii(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ti(e,t,i){const r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return o.setAttribute("width",`${t}`),o.setAttribute("height",`${i}`),o.setAttribute("viewBox",`0 0 ${t} ${i}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),o.appendChild(s),s.appendChild(e),Ii(o)}const F=(e,t)=>{if(e instanceof t)return!0;const i=Object.getPrototypeOf(e);return i===null?!1:i.constructor.name===t.name||F(i,t)};function Oi(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Mi(e,t){return At(t).map(i=>{const r=e.getPropertyValue(i),o=e.getPropertyPriority(i);return`${i}: ${r}${o?" !important":""};`}).join(" ")}function _i(e,t,i,r){const o=`.${e}:${t}`,s=i.cssText?Oi(i):Mi(i,r);return document.createTextNode(`${o}{${s}}`)}function Pt(e,t,i,r){const o=window.getComputedStyle(e,i),s=o.getPropertyValue("content");if(s===""||s==="none")return;const n=vi();try{t.className=`${t.className} ${n}`}catch{return}const h=document.createElement("style");h.appendChild(_i(n,i,o,r)),t.appendChild(h)}function Ai(e,t,i){Pt(e,t,":before",i),Pt(e,t,":after",i)}const Lt="application/font-woff",Dt="image/jpeg",Fi={woff:Lt,woff2:Lt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Dt,jpeg:Dt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Pi(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function rt(e){const t=Pi(e).toLowerCase();return Fi[t]||""}function Li(e){return e.split(/,/)[1]}function nt(e){return e.search(/^(data:)/)!==-1}function Di(e,t){return`data:${t};base64,${e}`}async function zt(e,t,i){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const o=await r.blob();return new Promise((s,n)=>{const h=new FileReader;h.onerror=n,h.onloadend=()=>{try{s(i({res:r,result:h.result}))}catch(p){n(p)}},h.readAsDataURL(o)})}const ot={};function zi(e,t,i){let r=e.replace(/\?.*/,"");return i&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function st(e,t,i){const r=zi(e,t,i.includeQueryParams);if(ot[r]!=null)return ot[r];i.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let o;try{const s=await zt(e,i.fetchRequestInit,({res:n,result:h})=>(t||(t=n.headers.get("Content-Type")||""),Li(h)));o=Di(s,t)}catch(s){o=i.imagePlaceholder||"";let n=`Failed to fetch resource: ${e}`;s&&(n=typeof s=="string"?s:s.message),n&&console.warn(n)}return ot[r]=o,o}async function Hi(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ze(t)}async function Ui(e,t){if(e.currentSrc){const s=document.createElement("canvas"),n=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,n?.drawImage(e,0,0,s.width,s.height);const h=s.toDataURL();return ze(h)}const i=e.poster,r=rt(i),o=await st(i,r,t);return ze(o)}async function $i(e,t){var i;try{if(!((i=e?.contentDocument)===null||i===void 0)&&i.body)return await He(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Bi(e,t){return F(e,HTMLCanvasElement)?Hi(e):F(e,HTMLVideoElement)?Ui(e,t):F(e,HTMLIFrameElement)?$i(e,t):e.cloneNode(Ht(e))}const Wi=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Vi(e,t,i){var r,o;if(Ht(t))return t;let s=[];return Wi(e)&&e.assignedNodes?s=Z(e.assignedNodes()):F(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=Z(e.contentDocument.body.childNodes):s=Z(((o=e.shadowRoot)!==null&&o!==void 0?o:e).childNodes),s.length===0||F(e,HTMLVideoElement)||await s.reduce((n,h)=>n.then(()=>He(h,i)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function qi(e,t,i){const r=t.style;if(!r)return;const o=window.getComputedStyle(e);o.cssText?(r.cssText=o.cssText,r.transformOrigin=o.transformOrigin):At(i).forEach(s=>{let n=o.getPropertyValue(s);s==="font-size"&&n.endsWith("px")&&(n=`${Math.floor(parseFloat(n.substring(0,n.length-2)))-.1}px`),F(e,HTMLIFrameElement)&&s==="display"&&n==="inline"&&(n="block"),s==="d"&&t.getAttribute("d")&&(n=`path(${t.getAttribute("d")})`),r.setProperty(s,n,o.getPropertyPriority(s))})}function Ni(e,t){F(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),F(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function ji(e,t){if(F(e,HTMLSelectElement)){const r=Array.from(t.children).find(o=>e.value===o.getAttribute("value"));r&&r.setAttribute("selected","")}}function Ri(e,t,i){return F(t,Element)&&(qi(e,t,i),Ai(e,t,i),Ni(e,t),ji(e,t)),t}async function Gi(e,t){const i=e.querySelectorAll?e.querySelectorAll("use"):[];if(i.length===0)return e;const r={};for(let s=0;s<i.length;s++){const h=i[s].getAttribute("xlink:href");if(h){const p=e.querySelector(h),g=document.querySelector(h);!p&&g&&!r[h]&&(r[h]=await He(g,t,!0))}}const o=Object.values(r);if(o.length){const s="http://www.w3.org/1999/xhtml",n=document.createElementNS(s,"svg");n.setAttribute("xmlns",s),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const h=document.createElementNS(s,"defs");n.appendChild(h);for(let p=0;p<o.length;p++)h.appendChild(o[p]);e.appendChild(n)}return e}async function He(e,t,i){return!i&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Bi(r,t)).then(r=>Vi(e,r,t)).then(r=>Ri(e,r,t)).then(r=>Gi(r,t))}const Ut=/url\((['"]?)([^'"]+?)\1\)/g,Xi=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Yi=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Qi(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Ki(e){const t=[];return e.replace(Ut,(i,r,o)=>(t.push(o),i)),t.filter(i=>!nt(i))}async function Ji(e,t,i,r,o){try{const s=i?xi(t,i):t,n=rt(t);let h;return o||(h=await st(s,n,r)),e.replace(Qi(t),`$1${h}$3`)}catch{}return e}function Zi(e,{preferredFontFormat:t}){return t?e.replace(Yi,i=>{for(;;){const[r,,o]=Xi.exec(i)||[];if(!o)return"";if(o===t)return`src: ${r};`}}):e}function $t(e){return e.search(Ut)!==-1}async function Bt(e,t,i){if(!$t(e))return e;const r=Zi(e,i);return Ki(r).reduce((s,n)=>s.then(h=>Ji(h,n,t,i)),Promise.resolve(r))}async function fe(e,t,i){var r;const o=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(o){const s=await Bt(o,null,i);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function er(e,t){await fe("background",e,t)||await fe("background-image",e,t),await fe("mask",e,t)||await fe("-webkit-mask",e,t)||await fe("mask-image",e,t)||await fe("-webkit-mask-image",e,t)}async function tr(e,t){const i=F(e,HTMLImageElement);if(!(i&&!nt(e.src))&&!(F(e,SVGImageElement)&&!nt(e.href.baseVal)))return;const r=i?e.src:e.href.baseVal,o=await st(r,rt(r),t);await new Promise((s,n)=>{const p=[new Promise(m=>{e.onload=m})];e.onerror=t.onImageErrorHandler?(...m)=>{try{s(t.onImageErrorHandler(...m))}catch(k){n(k)}}:n;const g=e;g.loading==="lazy"&&(g.loading="eager"),i?(e.srcset="",e.src=o):e.href.baseVal=o,g.decode&&p.push(g.decode().catch()),Promise.all(p).then(s)})}async function ir(e,t){const r=Z(e.childNodes).map(o=>Wt(o,t));await Promise.all(r).then(()=>e)}async function Wt(e,t){F(e,Element)&&(await er(e,t),await tr(e,t),await ir(e,t))}function rr(e,t){const{style:i}=e;t.backgroundColor&&(i.backgroundColor=t.backgroundColor),t.width&&(i.width=`${t.width}px`),t.height&&(i.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(o=>{i[o]=r[o]}),e}const Vt={};async function qt(e){let t=Vt[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Vt[e]=t,t}async function Nt(e,t){let i=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(i.match(/url\([^)]+\)/g)||[]).map(async n=>{let h=n.replace(r,"$1");return h.startsWith("https://")||(h=new URL(h,e.url).href),zt(h,t.fetchRequestInit,({result:p})=>(i=i.replace(n,`url(${p})`),[n,p]))});return Promise.all(s).then(()=>i)}function jt(e){if(e==null)return[];const t=[],i=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(i,"");const o=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=o.exec(r);if(p===null)break;t.push(p[0])}r=r.replace(o,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,n="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",h=new RegExp(n,"gi");for(;;){let p=s.exec(r);if(p===null){if(p=h.exec(r),p===null)break;s.lastIndex=h.lastIndex}else h.lastIndex=s.lastIndex;t.push(p[0])}return t}async function nr(e,t){const i=[],r=[];return e.forEach(o=>{if("cssRules"in o)try{Z(o.cssRules||[]).forEach((s,n)=>{if(s.type===CSSRule.IMPORT_RULE){let h=n+1;const p=s.href,g=qt(p).then(m=>Nt(m,t)).then(m=>jt(m).forEach(k=>{try{o.insertRule(k,k.startsWith("@import")?h+=1:o.cssRules.length)}catch(I){console.error("Error inserting rule from remote css",{rule:k,error:I})}})).catch(m=>{console.error("Error loading remote css",m.toString())});r.push(g)}})}catch(s){const n=e.find(h=>h.href==null)||document.styleSheets[0];o.href!=null&&r.push(qt(o.href).then(h=>Nt(h,t)).then(h=>jt(h).forEach(p=>{n.insertRule(p,n.cssRules.length)})).catch(h=>{console.error("Error loading remote stylesheet",h)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(o=>{if("cssRules"in o)try{Z(o.cssRules||[]).forEach(s=>{i.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${o.href}`,s)}}),i))}function or(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>$t(t.style.getPropertyValue("src")))}async function sr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const i=Z(e.ownerDocument.styleSheets),r=await nr(i,t);return or(r)}function Rt(e){return e.trim().replace(/["']/g,"")}function ar(e){const t=new Set;function i(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Rt(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&i(s)})}return i(e),t}async function lr(e,t){const i=await sr(e,t),r=ar(e);return(await Promise.all(i.filter(s=>r.has(Rt(s.style.fontFamily))).map(s=>{const n=s.parentStyleSheet?s.parentStyleSheet.href:null;return Bt(s.cssText,n,t)}))).join(`
2
- `)}async function cr(e,t){const i=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await lr(e,t);if(i){const r=document.createElement("style"),o=document.createTextNode(i);r.appendChild(o),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function dr(e,t={}){const{width:i,height:r}=Ft(e,t),o=await He(e,t,!0);return await cr(o,t),await Wt(o,t),rr(o,t),await Ti(o,i,r)}async function ur(e,t={}){const{width:i,height:r}=Ft(e,t),o=await dr(e,t),s=await ze(o),n=document.createElement("canvas"),h=n.getContext("2d"),p=t.pixelRatio||Ci(),g=t.canvasWidth||i,m=t.canvasHeight||r;return n.width=g*p,n.height=m*p,t.skipAutoScale||Ei(n),n.style.width=`${g}`,n.style.height=`${m}`,t.backgroundColor&&(h.fillStyle=t.backgroundColor,h.fillRect(0,0,n.width,n.height)),h.drawImage(s,0,0,n.width,n.height),n}async function hr(e,t={}){return(await ur(e,t)).toDataURL()}const fr=async e=>{let i=0;const{os:r}=_t(),o=r==="iOS";for(;i<3;)try{const s=document.documentElement,n=e?e.x:0,h=e?e.y:0,p=e?e.width:window.innerWidth,g=e?e.height:window.innerHeight,m=window.scrollX,k=window.scrollY,I=m+n,z=k+h;i>0&&await new Promise(O=>setTimeout(O,500*i));const T=o;return await hr(s,{quality:.9,pixelRatio:1,cacheBust:T?!1:i===0,skipAutoScale:!0,width:p,height:g,canvasWidth:p,canvasHeight:g,fontEmbedCSS:T||i>0?"":void 0,style:{transform:`translate(${-I}px, ${-z}px)`}})}catch(s){if(console.warn(`Screenshot attempt ${i+1} failed:`,s),i++,i===3)return console.error("All screenshot attempts failed."),null}return null};const pr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),br=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,r)=>r?r.toUpperCase():i.toLowerCase()),Gt=e=>{const t=br(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xt=(...e)=>e.filter((t,i,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===i).join(" ").trim(),gr=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var wr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const mr=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:n,...h},p)=>y.createElement("svg",{ref:p,...wr,width:t,height:t,stroke:e,strokeWidth:r?Number(i)*24/Number(t):i,className:Xt("lucide",o),...!s&&!gr(h)&&{"aria-hidden":"true"},...h},[...n.map(([g,m])=>y.createElement(g,m)),...Array.isArray(s)?s:[s]]));const ee=(e,t)=>{const i=y.forwardRef(({className:r,...o},s)=>y.createElement(mr,{ref:s,iconNode:t,className:Xt(`lucide-${pr(Gt(e))}`,`lucide-${e}`,r),...o}));return i.displayName=Gt(e),i};const yr=ee("crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);const Yt=ee("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const xr=ee("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const vr=ee("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const kr=ee("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const Sr=ee("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const Cr=ee("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);const Qt=ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Er=({onConfirm:e,onCancel:t})=>{const[i,r]=y.useState(!1),[o,s]=y.useState({x:0,y:0}),[n,h]=y.useState({x:0,y:0}),p=v=>{r(!0),s({x:v.clientX,y:v.clientY}),h({x:v.clientX,y:v.clientY})},g=v=>{i&&h({x:v.clientX,y:v.clientY})},m=()=>{T()},k=v=>{if(v.touches.length===1){r(!0);const O=v.touches[0];s({x:O.clientX,y:O.clientY}),h({x:O.clientX,y:O.clientY}),document.body.style.overflow="hidden"}},I=v=>{if(i&&v.touches.length===1){const O=v.touches[0];h({x:O.clientX,y:O.clientY})}},z=()=>{T(),document.body.style.overflow=""},T=()=>{if(i){r(!1);const v=Math.min(o.x,n.x),O=Math.min(o.y,n.y),j=Math.abs(n.x-o.x),R=Math.abs(n.y-o.y);j>10&&R>10&&e({x:v,y:O,width:j,height:R})}};return y.useEffect(()=>{const v=O=>{O.key==="Escape"&&t()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[t]),f.jsxs("div",{style:{position:"fixed",inset:0,zIndex:99999,cursor:"crosshair",userSelect:"none"},onMouseDown:p,onMouseMove:g,onMouseUp:m,onTouchStart:k,onTouchMove:I,onTouchEnd:z,children:[f.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)"}}),!i&&f.jsx("div",{style:{position:"absolute",top:"20px",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"20px",pointerEvents:"none",fontSize:"14px"},children:"Kéo chuột hoặc chạm để chọn vùng chụp ảnh (ESC để hủy)"}),i&&f.jsx("div",{style:{position:"absolute",left:Math.min(o.x,n.x),top:Math.min(o.y,n.y),width:Math.abs(n.x-o.x),height:Math.abs(n.y-o.y),border:"2px solid #fff",backgroundColor:"rgba(255, 255, 255, 0.1)",boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"}})]})},Kt=({questionId:e,questionIdChild:t,contextData:i,onSubmit:r,themeColor:o="#3b82f6",triggerComponent:s,isOpen:n,onOpen:h,onClose:p})=>{const[g,m]=y.useState(!1),[k,I]=y.useState(""),[z,T]=y.useState(e),[v,O]=y.useState(t||""),[j,R]=y.useState([]),[at,lt]=y.useState(null),[Or,Zt]=y.useState(!1),[ne,ei]=y.useState(!1),[ti,Ue]=y.useState(!1),[G,pe]=y.useState(null),[P,be]=y.useState({}),[ii,$e]=y.useState("incorrect_content"),[Mr,ct]=y.useState(!1),ri=y.useRef(null),dt=n!==void 0?n:g,_r=dt&&!Mr;y.useEffect(()=>{dt&&(be({}),T(e),O(t||""),R([]),I(""),$e("incorrect_content"))},[dt,e,t]);const Ar=()=>{if(j.length>=3){alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");return}ri.current?.click()},Fr=b=>{const S=b.target.files?.[0];if(!S)return;if(!S.type.startsWith("image/")){alert("Vui lòng chọn file ảnh.");return}if(S.size>5*1024*1024){alert("Ảnh quá lớn. Vui lòng chọn ảnh dưới 5MB.");return}const X=new FileReader;X.onload=Be=>{const We=Be.target?.result;We&&R(si=>[...si,We])},X.readAsDataURL(S),b.target.value=""},Pr=()=>{R([]),I(""),T(e),O(t||""),$e("incorrect_content"),be({}),n===void 0&&m(!0)},ni=async b=>{if(j.length>=3){alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");return}if(ct(!0),b==="crop"){setTimeout(()=>Ue(!0),150);return}setTimeout(async()=>{await oi()},150)},oi=async b=>{Zt(!0);try{const S=await fr(b);S?R(X=>[...X,S]):alert("Không thể chụp ảnh màn hình. Vui lòng thử lại.")}catch(S){console.error(S)}finally{Zt(!1),ct(!1)}},Lr=b=>{Ue(!1),oi(b)},Dr=()=>{Ue(!1),ct(!1)},zr=b=>{R(S=>S.filter((X,Be)=>Be!==b))},ut=()=>{p&&p(),m(!1),R([]),Ue(!1),lt(null),I(""),be({}),$e("incorrect_content")},Hr=async()=>{const b={};if(z?isNaN(Number(z))&&(b.questionId="ID câu hỏi phải là số"):b.questionId="Vui lòng nhập ID câu hỏi",v&&isNaN(Number(v))&&(b.questionIdChild="ID câu hỏi con phải là số"),k.trim()||(b.description="Vui lòng nhập mô tả lỗi"),Object.keys(b).length>0){be(b);return}ei(!0);try{const S=_t(),X=await Promise.all(j.map(async We=>(await(await fetch("https://lcms.icanwork.vn/api/upload-to-s3/upload-image-error-to-s3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({base64:We})})).json()).file_url));await r({idQuestion:z,idChildQuestion:v,errorType:ii,errorDescription:k,listImage:X,deviceInfo:S,contextData:i}),ut()}catch(S){console.error("Submit feedback failed",S)}finally{ei(!1)}};return f.jsxs(f.Fragment,{children:[f.jsx("style",{id:"feedback-widget-styles",children:`
1
+ (function($,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],h):($=typeof globalThis<"u"?globalThis:$||self,h($.SupportFeedbackLib={},$.jsxRuntime,$.React))})(this,(function($,h,y){"use strict";var ai="2.0.7",li=500,ft="user-agent",oe="",ht="?",C={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},_="browser",V="cpu",B="device",H="engine",L="os",se="result",c="name",a="type",d="vendor",u="version",M="architecture",ge="major",l="model",Ee="console",w="mobile",x="tablet",E="smarttv",W="wearable",Ie="xr",we="embedded",ae="inapp",Ve="brands",te="formFactors",qe="fullVersionList",le="platform",Ne="platformVersion",Te="bitness",Y="sec-ch-ua",ci=Y+"-full-version-list",di=Y+"-arch",ui=Y+"-"+Te,fi=Y+"-form-factors",hi=Y+"-"+w,pi=Y+"-"+l,pt=Y+"-"+le,bi=pt+"-version",bt=[Ve,qe,w,l,le,Ne,M,te,Te],Oe="Amazon",ce="Apple",gt="ASUS",wt="BlackBerry",ie="Google",mt="Huawei",je="Lenovo",yt="Honor",Me="LG",Re="Microsoft",Ge="Motorola",xt="Nvidia",vt="OnePlus",Xe="OPPO",me="Samsung",kt="Sharp",ye="Sony",Ye="Xiaomi",Qe="Zebra",St="Chrome",Ct="Chromium",Q="Chromecast",_e="Edge",xe="Firefox",ve="Opera",Ke="Facebook",Et="Sogou",de="Mobile ",ke=" Browser",Je="Windows",gi=typeof window!==C.UNDEFINED,A=gi&&window.navigator?window.navigator:void 0,re=A&&A.userAgentData?A.userAgentData:void 0,wi=function(e,t){var i={},r=t;if(!Fe(t)){r={};for(var o in t)for(var s in t[o])r[s]=t[o][s].concat(r[s]?r[s]:[])}for(var n in e)i[n]=r[n]&&r[n].length%2===0?r[n].concat(e[n]):e[n];return i},Ae=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},Ze=function(e,t){if(typeof e===C.OBJECT&&e.length>0){for(var i in e)if(K(t)==K(e[i]))return!0;return!1}return Se(e)?K(t)==K(e):!1},Fe=function(e,t){for(var i in e)return/^(browser|cpu|device|engine|os)$/.test(i)||(t?Fe(e[i]):!1)},Se=function(e){return typeof e===C.STRING},et=function(e){if(e){for(var t=[],i=ue(/\\?\"/g,e).split(","),r=0;r<i.length;r++)if(i[r].indexOf(";")>-1){var o=Pe(i[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Pe(i[r]);return t}},K=function(e){return Se(e)?e.toLowerCase():e},tt=function(e){return Se(e)?ue(/[^\d\.]/g,e).split(".")[0]:void 0},q=function(e){for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];typeof i==C.OBJECT&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},ue=function(e,t){return Se(t)?t.replace(e,oe):t},Ce=function(e){return ue(/\\?\"/g,e)},Pe=function(e,t){return e=ue(/^\s\s*/,String(e)),typeof t===C.UNDEFINED?e:e.substring(0,t)},it=function(e,t){if(!(!e||!t))for(var i=0,r,o,s,n,f,p;i<t.length&&!f;){var g=t[i],m=t[i+1];for(r=o=0;r<g.length&&!f&&g[r];)if(f=g[r++].exec(e),f)for(s=0;s<m.length;s++)p=f[++o],n=m[s],typeof n===C.OBJECT&&n.length>0?n.length===2?typeof n[1]==C.FUNCTION?this[n[0]]=n[1].call(this,p):this[n[0]]=n[1]:n.length>=3&&(typeof n[1]===C.FUNCTION&&!(n[1].exec&&n[1].test)?n.length>3?this[n[0]]=p?n[1].apply(this,n.slice(2)):void 0:this[n[0]]=p?n[1].call(this,p,n[2]):void 0:n.length==3?this[n[0]]=p?p.replace(n[1],n[2]):void 0:n.length==4?this[n[0]]=p?n[3].call(this,p.replace(n[1],n[2])):void 0:n.length>4&&(this[n[0]]=p?n[3].apply(this,[p.replace(n[1],n[2])].concat(n.slice(4))):void 0)):this[n]=p||void 0;i+=2}},U=function(e,t){for(var i in t)if(typeof t[i]===C.OBJECT&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(Ze(t[i][r],e))return i===ht?void 0:i}else if(Ze(t[i],e))return i===ht?void 0:i;return t.hasOwnProperty("*")?t["*"]:e},It={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Tt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},mi={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ot={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,de+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[u,[c,_e+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ve+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ve+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ve]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart "+je+ke]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure"+ke],u],[/\bfocus\/([\w\.]+)/i],[u,[c,xe+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ve+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ve+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+ke]],[/fxios\/([\w\.-]+)/i],[u,[c,de+xe]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+ke],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,Et+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,Et+" Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Ke],u,[a,ae]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[c,u,[a,ae]],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"],[a,ae]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"],[a,ae]],[/\[(linkedin)app\]/i],[c,[a,ae]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[c,/(.+)/,"Zalo"],u,[a,ae]],[/(chromium)[\/ ]([-\w\.]+)/i],[c,u],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,St+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[u,[c,_e+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,St+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android"+ke]],[/chrome\/([\w\.]+) mobile/i],[u,[c,de+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[u,[c,de+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[c,de+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[c,de+xe],u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,xe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/[^\d\.]+./,oe]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[M,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[M,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[M,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[M,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[M,"arm"]],[/ sun4\w[;\)]/i],[[M,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[M,/ower/,oe,K]],[/mc680.0/i],[[M,"68k"]],[/winnt.+\[axp/i],[[M,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[d,me],[a,x]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[l,[d,me],[a,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[l,[d,ce],[a,w]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[l,[d,ce],[a,x]],[/(macintosh);/i],[l,[d,ce]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[d,kt],[a,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[l,[d,yt],[a,x]],[/honor([-\w ]+)[;\)]/i],[l,[d,yt],[a,w]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[l,[d,mt],[a,x]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[l,[d,mt],[a,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[l,/_/g," "],[d,Ye],[a,x]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[l,/_/g," "],[d,Ye],[a,w]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[d,vt],[a,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[d,Xe],[a,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[l,[d,U,{OnePlus:["203","304","403","404","413","415"],"*":Xe}],[a,x]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[l,[d,"BLU"],[a,w]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[d,"Vivo"],[a,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[d,"Realme"],[a,w]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[l,[d,je],[a,x]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[l,[d,je],[a,w]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[l,[d,Ge],[a,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[d,Ge],[a,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[d,Me],[a,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[d,Me],[a,w]],[/(nokia) (t[12][01])/i],[d,l,[a,x]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[l,/_/g," "],[a,w],[d,"Nokia"]],[/(pixel (c|tablet))\b/i],[l,[d,ie],[a,x]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[l,[d,ie],[a,w]],[/(google) (pixelbook( go)?)/i],[d,l],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[d,ye],[a,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[d,ye],[a,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[d,Oe],[a,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[d,Oe],[a,w]],[/(playbook);[-\w\),; ]+(rim)/i],[l,d,[a,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[l,[d,wt],[a,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[d,gt],[a,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[d,gt],[a,w]],[/(nexus 9)/i],[l,[d,"HTC"],[a,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[l,/_/g," "],[a,w]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[l,[d,"TCL"],[a,x]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[l,[d,"TCL"],[a,w]],[/(itel) ((\w+))/i],[[d,K],l,[a,U,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[d,"Acer"],[a,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[d,"Meizu"],[a,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[d,"Ulefone"],[a,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[l,[d,"Energizer"],[a,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[l,[d,"Cat"],[a,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[l,[d,"Smartfren"],[a,w]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[l,[d,"Nothing"],[a,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[l,[d,"Archos"],[a,x]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[l,[d,"Archos"],[a,w]],[/; (n159v)/i],[l,[d,"HMD"],[a,w]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[d,l,[a,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[d,l,[a,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[d,l,[a,x]],[/(surface duo)/i],[l,[d,Re],[a,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[d,"Fairphone"],[a,w]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[l,[d,xt],[a,x]],[/(sprint) (\w+)/i],[d,l,[a,w]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[d,Re],[a,w]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[d,Qe],[a,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[d,Qe],[a,w]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[d,[a,E]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[d,me],[a,E]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[d,l,[a,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,Me],[a,E]],[/(apple) ?tv/i],[d,[l,ce+" TV"],[a,E]],[/crkey.*devicetype\/chromecast/i],[[l,Q+" Third Generation"],[d,ie],[a,E]],[/crkey.*devicetype\/([^/]*)/i],[[l,/^/,"Chromecast "],[d,ie],[a,E]],[/fuchsia.*crkey/i],[[l,Q+" Nest Hub"],[d,ie],[a,E]],[/crkey/i],[[l,Q],[d,ie],[a,E]],[/(portaltv)/i],[l,[d,Ke],[a,E]],[/droid.+aft(\w+)( bui|\))/i],[l,[d,Oe],[a,E]],[/(shield \w+ tv)/i],[l,[d,xt],[a,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[d,kt],[a,E]],[/(bravia[\w ]+)( bui|\))/i],[l,[d,ye],[a,E]],[/(mi(tv|box)-?\w+) bui/i],[l,[d,Ye],[a,E]],[/Hbbtv.*(technisat) (.*);/i],[d,l,[a,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d,/.+\/(\w+)/,"$1",U,{LG:"lge"}],[l,Pe],[a,E]],[/(playstation \w+)/i],[l,[d,ye],[a,Ee]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[d,Re],[a,Ee]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[d,U,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],l,[a,Ee]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[l,[d,me],[a,W]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[d,l,[a,W]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[l,[d,Xe],[a,W]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[d,ce],[a,W]],[/(opwwe\d{3})/i],[l,[d,vt],[a,W]],[/(moto 360)/i],[l,[d,Ge],[a,W]],[/(smartwatch 3)/i],[l,[d,ye],[a,W]],[/(g watch r)/i],[l,[d,Me],[a,W]],[/droid.+; (wt63?0{2,3})\)/i],[l,[d,Qe],[a,W]],[/droid.+; (glass) \d/i],[l,[d,ie],[a,Ie]],[/(pico) ([\w ]+) os\d/i],[d,l,[a,Ie]],[/(quest( \d| pro)?s?).+vr/i],[l,[d,Ke],[a,Ie]],[/mobile vr; rv.+firefox/i],[[a,Ie]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[a,we]],[/(aeobc)\b/i],[l,[d,Oe],[a,we]],[/(homepod).+mac os/i],[l,[d,ce],[a,we]],[/windows iot/i],[[a,we]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[l,[a,E]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[a,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[l,[a,U,{mobile:"Mobile",xr:"VR","*":x}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[a,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[a,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[l,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,_e+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/(windows nt) (6\.[23]); arm/i],[[c,/N/,"R"],[u,U,It]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[c,u],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[u,/(;|\))/g,"",U,It],[c,Je]],[/(windows ce)\/?([\d\.]*)/i],[c,u],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[c,"macOS"],[u,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[u,[c,Q+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[u,[c,Q+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[u,[c,Q+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[u,[c,Q+" Linux"]],[/crkey\/([\d\.]+)/i],[u,[c,Q]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,wt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,xe+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[u,[c,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[u,U,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,"Chrome OS"],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[c,u],[/(sunos) ?([\d\.]*)/i],[[c,"Solaris"],u],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},Le=(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return q.call(e.init,[[_,[c,u,ge,a]],[V,[M]],[B,[a,l,d]],[H,[c,u]],[L,[c,u]]]),q.call(e.isIgnore,[[_,[u,ge]],[H,[u]],[L,[u]]]),q.call(e.isIgnoreRgx,[[_,/ ?browser$/i],[L,/ ?os$/i]]),q.call(e.toString,[[_,[c,u]],[V,[M]],[B,[d,l]],[H,[c,u]],[L,[c,u]]]),e})(),yi=function(e,t){var i=Le.init[t],r=Le.isIgnore[t]||0,o=Le.isIgnoreRgx[t]||0,s=Le.toString[t]||0;function n(){q.call(this,i)}return n.prototype.getItem=function(){return e},n.prototype.withClientHints=function(){return re?re.getHighEntropyValues(bt).then(function(f){return e.setCH(new Mt(f,!1)).parseCH().get()}):e.parseCH().get()},n.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=se&&(n.prototype.is=function(f){var p=!1;for(var g in this)if(this.hasOwnProperty(g)&&!Ze(r,g)&&K(o?ue(o,this[g]):this[g])==K(o?ue(o,f):f)){if(p=!0,f!=C.UNDEFINED)break}else if(f==C.UNDEFINED&&p){p=!p;break}return p},n.prototype.toString=function(){var f=oe;for(var p in s)typeof this[s[p]]!==C.UNDEFINED&&(f+=(f?" ":oe)+this[s[p]]);return f||C.UNDEFINED}),n.prototype.then=function(f){var p=this,g=function(){for(var k in p)p.hasOwnProperty(k)&&(this[k]=p[k])};g.prototype={is:n.prototype.is,toString:n.prototype.toString,withClientHints:n.prototype.withClientHints,withFeatureCheck:n.prototype.withFeatureCheck};var m=new g;return f(m),m},new n};function Mt(e,t){if(e=e||{},q.call(this,bt),t)q.call(this,[[Ve,et(e[Y])],[qe,et(e[ci])],[w,/\?1/.test(e[hi])],[l,Ce(e[pi])],[le,Ce(e[pt])],[Ne,Ce(e[bi])],[M,Ce(e[di])],[te,et(e[fi])],[Te,Ce(e[ui])]]);else for(var i in e)this.hasOwnProperty(i)&&typeof e[i]!==C.UNDEFINED&&(this[i]=e[i])}function J(e,t,i,r){return q.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",i],["data",yi(this,e)]]),this}J.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},J.prototype.set=function(e,t){return this.data[e]=t,this},J.prototype.setCH=function(e){return this.uaCH=e,this},J.prototype.detectFeature=function(){if(A&&A.userAgent==this.ua)switch(this.itemType){case _:A.brave&&typeof A.brave.isBrave==C.FUNCTION&&this.set(c,"Brave");break;case B:!this.get(a)&&re&&re[w]&&this.set(a,w),this.get(l)=="Macintosh"&&A&&typeof A.standalone!==C.UNDEFINED&&A.maxTouchPoints&&A.maxTouchPoints>2&&this.set(l,"iPad").set(a,x);break;case L:!this.get(c)&&re&&re[le]&&this.set(c,re[le]);break;case se:var e=this.data,t=function(i){return e[i].getItem().detectFeature().get()};this.set(_,t(_)).set(V,t(V)).set(B,t(B)).set(H,t(H)).set(L,t(L))}return this},J.prototype.parseUA=function(){switch(this.itemType!=se&&it.call(this.data,this.ua,this.rgxMap),this.itemType){case _:this.set(ge,tt(this.get(u)));break;case L:if(this.get(c)=="iOS"&&this.get(u)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(u,e[1])}break}return this},J.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case _:case H:var i=e[qe]||e[Ve],r;if(i)for(var o=0;o<i.length;o++){var s=i[o].brand||i[o],n=i[o].version;this.itemType==_&&!/not.a.brand/i.test(s)&&(!r||/Chrom/.test(r)&&s!=Ct||r==_e&&/WebView2/.test(s))&&(s=U(s,mi),r=this.get(c),r&&!/Chrom/.test(r)&&/Chrom/.test(s)||this.set(c,s).set(u,n).set(ge,tt(n)),r=s),this.itemType==H&&s==Ct&&this.set(u,n)}break;case V:var f=e[M];f&&(f&&e[Te]=="64"&&(f+="64"),it.call(this.data,f+";",t));break;case B:if(e[w]&&this.set(a,w),e[l]&&(this.set(l,e[l]),!this.get(a)||!this.get(d))){var p={};it.call(p,"droid 9; "+e[l]+")",t),!this.get(a)&&p.type&&this.set(a,p.type),!this.get(d)&&p.vendor&&this.set(d,p.vendor)}if(e[te]){var g;if(typeof e[te]!="string")for(var m=0;!g&&m<e[te].length;)g=U(e[te][m++],Tt);else g=U(e[te],Tt);this.set(a,g)}break;case L:var k=e[le];if(k){var I=e[Ne];k==Je&&(I=parseInt(tt(I),10)>=13?"11":"10"),this.set(c,k).set(u,I)}this.get(c)==Je&&e[l]=="Xbox"&&this.set(c,"Xbox").set(u,void 0);break;case se:var z=this.data,T=function(v){return z[v].getItem().setCH(e).parseCH().get()};this.set(_,T(_)).set(V,T(V)).set(B,T(B)).set(H,T(H)).set(L,T(L))}return this};function N(e,t,i){if(typeof e===C.OBJECT?(Fe(e,!0)?(typeof t===C.OBJECT&&(i=t),t=e):(i=e,t=void 0),e=void 0):typeof e===C.STRING&&!Fe(t,!0)&&(i=t,t=void 0),i)if(typeof i.append===C.FUNCTION){var r={};i.forEach(function(m,k){r[String(k).toLowerCase()]=m}),i=r}else{var o={};for(var s in i)i.hasOwnProperty(s)&&(o[String(s).toLowerCase()]=i[s]);i=o}if(!(this instanceof N))return new N(e,t,i).getResult();var n=typeof e===C.STRING?e:i&&i[ft]?i[ft]:A&&A.userAgent?A.userAgent:oe,f=new Mt(i,!0),p=t?wi(Ot,t):Ot,g=function(m){return m==se?function(){return new J(m,n,p,f).set("ua",n).set(_,this.getBrowser()).set(V,this.getCPU()).set(B,this.getDevice()).set(H,this.getEngine()).set(L,this.getOS()).get()}:function(){return new J(m,n,p[m],f).parseUA().get()}};return q.call(this,[["getBrowser",g(_)],["getCPU",g(V)],["getDevice",g(B)],["getEngine",g(H)],["getOS",g(L)],["getResult",g(se)],["getUA",function(){return n}],["setUA",function(m){return Se(m)&&(n=Pe(m,li)),this}]]).setUA(n),this}N.VERSION=ai,N.BROWSER=Ae([c,u,ge,a]),N.CPU=Ae([M]),N.DEVICE=Ae([l,d,a,Ee,w,E,x,W,we]),N.ENGINE=N.OS=Ae([c,u]);const _t=()=>{const t=new N().getResult();return{os:t.os.name||"unknown",osVersion:t.os.version||"unknown",browser:t.browser.name||"unknown",browserVersion:t.browser.version||"unknown",deviceType:t.device.type||"desktop"}};function xi(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const i=document.implementation.createHTMLDocument(),r=i.createElement("base"),o=i.createElement("a");return i.head.appendChild(r),i.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}const vi=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let i=0,r=e.length;i<r;i++)t.push(e[i]);return t}let fe=null;function At(e={}){return fe||(e.includeStyleProperties?(fe=e.includeStyleProperties,fe):(fe=Z(window.getComputedStyle(document.documentElement)),fe))}function De(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function ki(e){const t=De(e,"border-left-width"),i=De(e,"border-right-width");return e.clientWidth+t+i}function Si(e){const t=De(e,"border-top-width"),i=De(e,"border-bottom-width");return e.clientHeight+t+i}function Ft(e,t={}){const i=t.width||ki(e),r=t.height||Si(e);return{width:i,height:r}}function Ci(){let e,t;try{t=process}catch{}const i=t&&t.env?t.env.devicePixelRatio:null;return i&&(e=parseInt(i,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Ei(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function ze(e){return new Promise((t,i)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=i,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Ii(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ti(e,t,i){const r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return o.setAttribute("width",`${t}`),o.setAttribute("height",`${i}`),o.setAttribute("viewBox",`0 0 ${t} ${i}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),o.appendChild(s),s.appendChild(e),Ii(o)}const F=(e,t)=>{if(e instanceof t)return!0;const i=Object.getPrototypeOf(e);return i===null?!1:i.constructor.name===t.name||F(i,t)};function Oi(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Mi(e,t){return At(t).map(i=>{const r=e.getPropertyValue(i),o=e.getPropertyPriority(i);return`${i}: ${r}${o?" !important":""};`}).join(" ")}function _i(e,t,i,r){const o=`.${e}:${t}`,s=i.cssText?Oi(i):Mi(i,r);return document.createTextNode(`${o}{${s}}`)}function Pt(e,t,i,r){const o=window.getComputedStyle(e,i),s=o.getPropertyValue("content");if(s===""||s==="none")return;const n=vi();try{t.className=`${t.className} ${n}`}catch{return}const f=document.createElement("style");f.appendChild(_i(n,i,o,r)),t.appendChild(f)}function Ai(e,t,i){Pt(e,t,":before",i),Pt(e,t,":after",i)}const Lt="application/font-woff",Dt="image/jpeg",Fi={woff:Lt,woff2:Lt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Dt,jpeg:Dt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Pi(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function rt(e){const t=Pi(e).toLowerCase();return Fi[t]||""}function Li(e){return e.split(/,/)[1]}function nt(e){return e.search(/^(data:)/)!==-1}function Di(e,t){return`data:${t};base64,${e}`}async function zt(e,t,i){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const o=await r.blob();return new Promise((s,n)=>{const f=new FileReader;f.onerror=n,f.onloadend=()=>{try{s(i({res:r,result:f.result}))}catch(p){n(p)}},f.readAsDataURL(o)})}const ot={};function zi(e,t,i){let r=e.replace(/\?.*/,"");return i&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function st(e,t,i){const r=zi(e,t,i.includeQueryParams);if(ot[r]!=null)return ot[r];i.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let o;try{const s=await zt(e,i.fetchRequestInit,({res:n,result:f})=>(t||(t=n.headers.get("Content-Type")||""),Li(f)));o=Di(s,t)}catch(s){o=i.imagePlaceholder||"";let n=`Failed to fetch resource: ${e}`;s&&(n=typeof s=="string"?s:s.message),n&&console.warn(n)}return ot[r]=o,o}async function Hi(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ze(t)}async function Ui(e,t){if(e.currentSrc){const s=document.createElement("canvas"),n=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,n?.drawImage(e,0,0,s.width,s.height);const f=s.toDataURL();return ze(f)}const i=e.poster,r=rt(i),o=await st(i,r,t);return ze(o)}async function $i(e,t){var i;try{if(!((i=e?.contentDocument)===null||i===void 0)&&i.body)return await He(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Bi(e,t){return F(e,HTMLCanvasElement)?Hi(e):F(e,HTMLVideoElement)?Ui(e,t):F(e,HTMLIFrameElement)?$i(e,t):e.cloneNode(Ht(e))}const Wi=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Vi(e,t,i){var r,o;if(Ht(t))return t;let s=[];return Wi(e)&&e.assignedNodes?s=Z(e.assignedNodes()):F(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=Z(e.contentDocument.body.childNodes):s=Z(((o=e.shadowRoot)!==null&&o!==void 0?o:e).childNodes),s.length===0||F(e,HTMLVideoElement)||await s.reduce((n,f)=>n.then(()=>He(f,i)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function qi(e,t,i){const r=t.style;if(!r)return;const o=window.getComputedStyle(e);o.cssText?(r.cssText=o.cssText,r.transformOrigin=o.transformOrigin):At(i).forEach(s=>{let n=o.getPropertyValue(s);s==="font-size"&&n.endsWith("px")&&(n=`${Math.floor(parseFloat(n.substring(0,n.length-2)))-.1}px`),F(e,HTMLIFrameElement)&&s==="display"&&n==="inline"&&(n="block"),s==="d"&&t.getAttribute("d")&&(n=`path(${t.getAttribute("d")})`),r.setProperty(s,n,o.getPropertyPriority(s))})}function Ni(e,t){F(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),F(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function ji(e,t){if(F(e,HTMLSelectElement)){const r=Array.from(t.children).find(o=>e.value===o.getAttribute("value"));r&&r.setAttribute("selected","")}}function Ri(e,t,i){return F(t,Element)&&(qi(e,t,i),Ai(e,t,i),Ni(e,t),ji(e,t)),t}async function Gi(e,t){const i=e.querySelectorAll?e.querySelectorAll("use"):[];if(i.length===0)return e;const r={};for(let s=0;s<i.length;s++){const f=i[s].getAttribute("xlink:href");if(f){const p=e.querySelector(f),g=document.querySelector(f);!p&&g&&!r[f]&&(r[f]=await He(g,t,!0))}}const o=Object.values(r);if(o.length){const s="http://www.w3.org/1999/xhtml",n=document.createElementNS(s,"svg");n.setAttribute("xmlns",s),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const f=document.createElementNS(s,"defs");n.appendChild(f);for(let p=0;p<o.length;p++)f.appendChild(o[p]);e.appendChild(n)}return e}async function He(e,t,i){return!i&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>Bi(r,t)).then(r=>Vi(e,r,t)).then(r=>Ri(e,r,t)).then(r=>Gi(r,t))}const Ut=/url\((['"]?)([^'"]+?)\1\)/g,Xi=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Yi=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Qi(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Ki(e){const t=[];return e.replace(Ut,(i,r,o)=>(t.push(o),i)),t.filter(i=>!nt(i))}async function Ji(e,t,i,r,o){try{const s=i?xi(t,i):t,n=rt(t);let f;return o||(f=await st(s,n,r)),e.replace(Qi(t),`$1${f}$3`)}catch{}return e}function Zi(e,{preferredFontFormat:t}){return t?e.replace(Yi,i=>{for(;;){const[r,,o]=Xi.exec(i)||[];if(!o)return"";if(o===t)return`src: ${r};`}}):e}function $t(e){return e.search(Ut)!==-1}async function Bt(e,t,i){if(!$t(e))return e;const r=Zi(e,i);return Ki(r).reduce((s,n)=>s.then(f=>Ji(f,n,t,i)),Promise.resolve(r))}async function he(e,t,i){var r;const o=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(o){const s=await Bt(o,null,i);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function er(e,t){await he("background",e,t)||await he("background-image",e,t),await he("mask",e,t)||await he("-webkit-mask",e,t)||await he("mask-image",e,t)||await he("-webkit-mask-image",e,t)}async function tr(e,t){const i=F(e,HTMLImageElement);if(!(i&&!nt(e.src))&&!(F(e,SVGImageElement)&&!nt(e.href.baseVal)))return;const r=i?e.src:e.href.baseVal,o=await st(r,rt(r),t);await new Promise((s,n)=>{const p=[new Promise(m=>{e.onload=m})];e.onerror=t.onImageErrorHandler?(...m)=>{try{s(t.onImageErrorHandler(...m))}catch(k){n(k)}}:n;const g=e;g.loading==="lazy"&&(g.loading="eager"),i?(e.srcset="",e.src=o):e.href.baseVal=o,g.decode&&p.push(g.decode().catch()),Promise.all(p).then(s)})}async function ir(e,t){const r=Z(e.childNodes).map(o=>Wt(o,t));await Promise.all(r).then(()=>e)}async function Wt(e,t){F(e,Element)&&(await er(e,t),await tr(e,t),await ir(e,t))}function rr(e,t){const{style:i}=e;t.backgroundColor&&(i.backgroundColor=t.backgroundColor),t.width&&(i.width=`${t.width}px`),t.height&&(i.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(o=>{i[o]=r[o]}),e}const Vt={};async function qt(e){let t=Vt[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Vt[e]=t,t}async function Nt(e,t){let i=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(i.match(/url\([^)]+\)/g)||[]).map(async n=>{let f=n.replace(r,"$1");return f.startsWith("https://")||(f=new URL(f,e.url).href),zt(f,t.fetchRequestInit,({result:p})=>(i=i.replace(n,`url(${p})`),[n,p]))});return Promise.all(s).then(()=>i)}function jt(e){if(e==null)return[];const t=[],i=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(i,"");const o=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const p=o.exec(r);if(p===null)break;t.push(p[0])}r=r.replace(o,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,n="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(n,"gi");for(;;){let p=s.exec(r);if(p===null){if(p=f.exec(r),p===null)break;s.lastIndex=f.lastIndex}else f.lastIndex=s.lastIndex;t.push(p[0])}return t}async function nr(e,t){const i=[],r=[];return e.forEach(o=>{if("cssRules"in o)try{Z(o.cssRules||[]).forEach((s,n)=>{if(s.type===CSSRule.IMPORT_RULE){let f=n+1;const p=s.href,g=qt(p).then(m=>Nt(m,t)).then(m=>jt(m).forEach(k=>{try{o.insertRule(k,k.startsWith("@import")?f+=1:o.cssRules.length)}catch(I){console.error("Error inserting rule from remote css",{rule:k,error:I})}})).catch(m=>{console.error("Error loading remote css",m.toString())});r.push(g)}})}catch(s){const n=e.find(f=>f.href==null)||document.styleSheets[0];o.href!=null&&r.push(qt(o.href).then(f=>Nt(f,t)).then(f=>jt(f).forEach(p=>{n.insertRule(p,n.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(o=>{if("cssRules"in o)try{Z(o.cssRules||[]).forEach(s=>{i.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${o.href}`,s)}}),i))}function or(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>$t(t.style.getPropertyValue("src")))}async function sr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const i=Z(e.ownerDocument.styleSheets),r=await nr(i,t);return or(r)}function Rt(e){return e.trim().replace(/["']/g,"")}function ar(e){const t=new Set;function i(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Rt(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&i(s)})}return i(e),t}async function lr(e,t){const i=await sr(e,t),r=ar(e);return(await Promise.all(i.filter(s=>r.has(Rt(s.style.fontFamily))).map(s=>{const n=s.parentStyleSheet?s.parentStyleSheet.href:null;return Bt(s.cssText,n,t)}))).join(`
2
+ `)}async function cr(e,t){const i=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await lr(e,t);if(i){const r=document.createElement("style"),o=document.createTextNode(i);r.appendChild(o),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function dr(e,t={}){const{width:i,height:r}=Ft(e,t),o=await He(e,t,!0);return await cr(o,t),await Wt(o,t),rr(o,t),await Ti(o,i,r)}async function ur(e,t={}){const{width:i,height:r}=Ft(e,t),o=await dr(e,t),s=await ze(o),n=document.createElement("canvas"),f=n.getContext("2d"),p=t.pixelRatio||Ci(),g=t.canvasWidth||i,m=t.canvasHeight||r;return n.width=g*p,n.height=m*p,t.skipAutoScale||Ei(n),n.style.width=`${g}`,n.style.height=`${m}`,t.backgroundColor&&(f.fillStyle=t.backgroundColor,f.fillRect(0,0,n.width,n.height)),f.drawImage(s,0,0,n.width,n.height),n}async function fr(e,t={}){return(await ur(e,t)).toDataURL()}const hr=async e=>{let i=0;const{os:r}=_t(),o=r==="iOS";for(;i<3;)try{const s=document.documentElement,n=e?e.x:0,f=e?e.y:0,p=e?e.width:window.innerWidth,g=e?e.height:window.innerHeight,m=window.scrollX,k=window.scrollY,I=m+n,z=k+f;i>0&&await new Promise(O=>setTimeout(O,500*i));const T=o;return await fr(s,{quality:.9,pixelRatio:1,cacheBust:T?!1:i===0,skipAutoScale:!0,width:p,height:g,canvasWidth:p,canvasHeight:g,fontEmbedCSS:T||i>0?"":void 0,style:{transform:`translate(${-I}px, ${-z}px)`}})}catch(s){if(console.warn(`Screenshot attempt ${i+1} failed:`,s),i++,i===3)return console.error("All screenshot attempts failed."),null}return null};const pr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),br=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,r)=>r?r.toUpperCase():i.toLowerCase()),Gt=e=>{const t=br(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xt=(...e)=>e.filter((t,i,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===i).join(" ").trim(),gr=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var wr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const mr=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:n,...f},p)=>y.createElement("svg",{ref:p,...wr,width:t,height:t,stroke:e,strokeWidth:r?Number(i)*24/Number(t):i,className:Xt("lucide",o),...!s&&!gr(f)&&{"aria-hidden":"true"},...f},[...n.map(([g,m])=>y.createElement(g,m)),...Array.isArray(s)?s:[s]]));const ee=(e,t)=>{const i=y.forwardRef(({className:r,...o},s)=>y.createElement(mr,{ref:s,iconNode:t,className:Xt(`lucide-${pr(Gt(e))}`,`lucide-${e}`,r),...o}));return i.displayName=Gt(e),i};const yr=ee("crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);const Yt=ee("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const xr=ee("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const vr=ee("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const kr=ee("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const Sr=ee("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const Cr=ee("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);const Qt=ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Er=({onConfirm:e,onCancel:t})=>{const[i,r]=y.useState(!1),[o,s]=y.useState({x:0,y:0}),[n,f]=y.useState({x:0,y:0}),p=v=>{r(!0),s({x:v.clientX,y:v.clientY}),f({x:v.clientX,y:v.clientY})},g=v=>{i&&f({x:v.clientX,y:v.clientY})},m=()=>{T()},k=v=>{if(v.touches.length===1){r(!0);const O=v.touches[0];s({x:O.clientX,y:O.clientY}),f({x:O.clientX,y:O.clientY}),document.body.style.overflow="hidden"}},I=v=>{if(i&&v.touches.length===1){const O=v.touches[0];f({x:O.clientX,y:O.clientY})}},z=()=>{T(),document.body.style.overflow=""},T=()=>{if(i){r(!1);const v=Math.min(o.x,n.x),O=Math.min(o.y,n.y),j=Math.abs(n.x-o.x),R=Math.abs(n.y-o.y);j>10&&R>10&&e({x:v,y:O,width:j,height:R})}};return y.useEffect(()=>{const v=O=>{O.key==="Escape"&&t()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[t]),h.jsxs("div",{style:{position:"fixed",inset:0,zIndex:99999,cursor:"crosshair",userSelect:"none"},onMouseDown:p,onMouseMove:g,onMouseUp:m,onTouchStart:k,onTouchMove:I,onTouchEnd:z,children:[h.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)"}}),!i&&h.jsx("div",{style:{position:"absolute",top:"20px",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"20px",pointerEvents:"none",fontSize:"14px"},children:"Kéo chuột hoặc chạm để chọn vùng chụp ảnh (ESC để hủy)"}),i&&h.jsx("div",{style:{position:"absolute",left:Math.min(o.x,n.x),top:Math.min(o.y,n.y),width:Math.abs(n.x-o.x),height:Math.abs(n.y-o.y),border:"2px solid #fff",backgroundColor:"rgba(255, 255, 255, 0.1)",boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"}})]})},Kt=({questionId:e,questionIdChild:t,contextData:i,onSubmit:r,themeColor:o="#3b82f6",triggerComponent:s,isOpen:n,onOpen:f,onClose:p})=>{const[g,m]=y.useState(!1),[k,I]=y.useState(""),[z,T]=y.useState(e),[v,O]=y.useState(t||""),[j,R]=y.useState([]),[at,lt]=y.useState(null),[Or,Zt]=y.useState(!1),[ne,ei]=y.useState(!1),[ti,Ue]=y.useState(!1),[G,pe]=y.useState(null),[P,be]=y.useState({}),[ii,$e]=y.useState("incorrect_content"),[Mr,ct]=y.useState(!1),ri=y.useRef(null),dt=n!==void 0?n:g,_r=dt&&!Mr;y.useEffect(()=>{dt&&(be({}),T(e),O(t||""),R([]),I(""),$e("incorrect_content"))},[dt,e,t]);const Ar=()=>{if(j.length>=3){alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");return}ri.current?.click()},Fr=b=>{const S=b.target.files?.[0];if(!S)return;if(!S.type.startsWith("image/")){alert("Vui lòng chọn file ảnh.");return}if(S.size>5*1024*1024){alert("Ảnh quá lớn. Vui lòng chọn ảnh dưới 5MB.");return}const X=new FileReader;X.onload=Be=>{const We=Be.target?.result;We&&R(si=>[...si,We])},X.readAsDataURL(S),b.target.value=""},Pr=()=>{R([]),I(""),T(e),O(t||""),$e("incorrect_content"),be({}),n===void 0&&m(!0)},ni=async b=>{if(j.length>=3){alert("Bạn chỉ có thể chụp tối đa 3 ảnh.");return}if(ct(!0),b==="crop"){setTimeout(()=>Ue(!0),150);return}setTimeout(async()=>{await oi()},150)},oi=async b=>{Zt(!0);try{const S=await hr(b);S?R(X=>[...X,S]):alert("Không thể chụp ảnh màn hình. Vui lòng thử lại.")}catch(S){console.error(S)}finally{Zt(!1),ct(!1)}},Lr=b=>{Ue(!1),oi(b)},Dr=()=>{Ue(!1),ct(!1)},zr=b=>{R(S=>S.filter((X,Be)=>Be!==b))},ut=()=>{p&&p(),m(!1),R([]),Ue(!1),lt(null),I(""),be({}),$e("incorrect_content")},Hr=async()=>{const b={};if(z?isNaN(Number(z))&&(b.questionId="ID câu hỏi phải là số"):b.questionId="Vui lòng nhập ID câu hỏi",v&&isNaN(Number(v))&&(b.questionIdChild="ID câu hỏi con phải là số"),k.trim()||(b.description="Vui lòng nhập mô tả lỗi"),Object.keys(b).length>0){be(b);return}ei(!0);try{const S=_t(),X=await Promise.all(j.map(async We=>(await(await fetch("https://lcms.icanwork.vn/api/upload-to-s3/upload-image-error-to-s3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({base64:We})})).json()).file_url));await r({idQuestion:z,idChildQuestion:v,errorType:ii,errorDescription:k,listImage:X,deviceInfo:S,contextData:i}),ut()}catch(S){console.error("Submit feedback failed",S)}finally{ei(!1)}};return h.jsxs(h.Fragment,{children:[h.jsx("style",{id:"feedback-widget-styles",children:`
3
3
  @keyframes fb-fade-in {
4
4
  from { opacity: 0; transform: translateY(10px); }
5
5
  to { opacity: 1; transform: translateY(0); }
@@ -41,18 +41,24 @@
41
41
  right: 20px !important;
42
42
  }
43
43
  /* Prevent iOS zoom on inputs */
44
- /* input, select, textarea {
44
+ input, select, textarea {
45
45
  font-size: 16px !important;
46
- } */
46
+ }
47
47
  }
48
- @media (max-width: 767px) {
48
+ @media (max-width: 820px) {
49
49
  .fb-btn-crop {
50
50
  display: none !important;
51
51
  }
52
+ /* Enforce 16px font on all mobile/tablet inputs to prevent zoom */
53
+ .fb-widget-modal input,
54
+ .fb-widget-modal select,
55
+ .fb-widget-modal textarea {
56
+ font-size: 16px !important;
57
+ }
52
58
  }
53
59
  @media (min-width: 768px) {
54
60
  .fb-btn-upload {
55
- display: none !important;
61
+
56
62
  }
57
63
  }
58
- `}),ti&&f.jsx(Er,{onConfirm:Lr,onCancel:Dr}),at&&f.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.8)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",cursor:"zoom-out",animation:"fb-fade-in 0.2s ease-out",backdropFilter:"blur(4px)"},onClick:()=>lt(null),children:f.jsx("img",{src:at,alt:"Zoomed",draggable:!1,onContextMenu:b=>b.preventDefault(),style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:"8px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1)",backgroundColor:"white",userSelect:"none",WebkitUserSelect:"none"}})}),f.jsx("div",{onClick:()=>{n===void 0?Pr():h&&h()},style:{cursor:"pointer",display:"inline-block"},children:s||f.jsx("button",{className:"fb-widget-trigger",style:{position:"fixed",bottom:"24px",right:"24px",backgroundColor:o,color:"white",border:"none",borderRadius:"50%",width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",cursor:"pointer",zIndex:9990,transition:"transform 0.2s"},title:"Báo lỗi",onMouseEnter:b=>b.currentTarget.style.transform="scale(1.1)",onMouseLeave:b=>b.currentTarget.style.transform="scale(1)",children:f.jsx(kr,{size:24})})}),Or&&f.jsx("div",{style:{position:"fixed",top:20,right:20,background:"rgba(0,0,0,0.8)",color:"white",padding:"8px 12px",borderRadius:"8px",zIndex:1e4,fontWeight:500,backdropFilter:"blur(4px)",fontSize:"0.8rem"},children:"Đang chụp..."}),_r&&!ti&&!at&&f.jsxs("div",{className:"fb-widget-modal",children:[f.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f.jsx("h2",{style:{margin:0,fontSize:"1rem",fontWeight:700,color:"#111827"},children:"Báo lỗi"}),f.jsx("button",{onClick:ut,style:{background:"transparent",border:"none",cursor:"pointer",color:"#6b7280",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:"background-color 0.2s"},onMouseEnter:b=>b.currentTarget.style.backgroundColor="#f3f4f6",onMouseLeave:b=>b.currentTarget.style.backgroundColor="transparent",children:f.jsx(Qt,{size:18})})]}),f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[f.jsxs("div",{children:[f.jsxs("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["ID Câu hỏi ",f.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),f.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",transition:"all 0.2s"},children:[f.jsx(Yt,{size:12,style:{position:"absolute",left:"10px",color:G==="id"?o:P.questionId?"#ef4444":"#9ca3af",transition:"color 0.2s",pointerEvents:"none"}}),f.jsx("input",{type:"text",value:z,onFocus:()=>pe("id"),onBlur:()=>pe(null),onChange:b=>{T(b.target.value),P.questionId&&be(S=>({...S,questionId:void 0}))},disabled:!!e,placeholder:"Nhập ID (ví dụ: 101)",style:{width:"100%",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.questionId?"#ef4444":G==="id"?o:"#e5e7eb"}`,boxShadow:G==="id"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",transition:"all 0.2s",backgroundColor:"#f9fafb"}})]}),P.questionId&&f.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.questionId})]}),f.jsxs("div",{children:[f.jsx("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:"ID Câu hỏi con"}),f.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",transition:"all 0.2s"},children:[f.jsx(Yt,{size:12,style:{position:"absolute",left:"10px",color:G==="idChild"?o:P.questionIdChild?"#ef4444":"#9ca3af",transition:"color 0.2s",pointerEvents:"none"}}),f.jsx("input",{type:"text",value:v,onFocus:()=>pe("idChild"),onBlur:()=>pe(null),onChange:b=>{O(b.target.value)},placeholder:"Nhập ID (ví dụ: 101)",disabled:!!t,style:{width:"100%",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.questionIdChild?"#ef4444":G==="idChild"?o:"#e5e7eb"}`,boxShadow:G==="idChild"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",transition:"all 0.2s",backgroundColor:"#f9fafb"}})]}),P.questionIdChild&&f.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.questionIdChild})]}),f.jsxs("div",{children:[f.jsxs("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["Loại lỗi ",f.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),f.jsxs("select",{value:ii,onChange:b=>$e(b.target.value),style:{width:"100%",padding:"6px 10px",borderRadius:"6px",border:"1px solid #e5e7eb",backgroundColor:"#f9fafb",fontSize:"0.85rem",color:"#1f2937",outline:"none",cursor:"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 10px center",backgroundSize:"14px"},children:[f.jsx("option",{value:"incorrect_content",children:"Lỗi nội dung"}),f.jsx("option",{value:"display_error",children:"Lỗi hiển thị"}),f.jsx("option",{value:"missing_data",children:"Thiếu thông tin"}),f.jsx("option",{value:"technical_issue",children:"Lỗi kỹ thuật"}),f.jsx("option",{value:"other",children:"Khác"})]})]}),f.jsxs("div",{children:[f.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2px"},children:[f.jsxs("label",{style:{fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["Mô tả lỗi ",f.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),f.jsxs("span",{style:{fontSize:"0.7rem",color:"#9ca3af"},children:[k.length,"/1000"]})]}),f.jsxs("div",{style:{position:"relative"},children:[f.jsx("div",{style:{position:"absolute",left:"10px",top:"8px",pointerEvents:"none"},children:f.jsx(Cr,{size:12,style:{color:G==="desc"?o:P.description?"#ef4444":"#9ca3af",transition:"color 0.2s"}})}),f.jsx("textarea",{value:k,onFocus:()=>pe("desc"),onBlur:()=>pe(null),onChange:b=>{I(b.target.value),P.description&&be(S=>({...S,description:void 0}))},maxLength:1e3,placeholder:"Mô tả chi tiết...",style:{width:"100%",minHeight:"60px",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.description?"#ef4444":G==="desc"?o:"#e5e7eb"}`,boxShadow:G==="desc"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",resize:"vertical",boxSizing:"border-box",transition:"all 0.2s",backgroundColor:"#f9fafb",lineHeight:"1.4",fontFamily:"inherit"}})]}),P.description&&f.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.description})]})]}),f.jsxs("div",{style:{marginBottom:"2px"},children:[f.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"6px"},children:f.jsxs("label",{style:{fontWeight:600,fontSize:"0.8rem",color:"#374151"},children:["Ảnh chụp (",j.length,"/3)"]})}),j.length>0&&f.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"6px",marginBottom:"8px"},children:j.map((b,S)=>f.jsxs("div",{style:{position:"relative",aspectRatio:"16/9",border:"1px solid #e5e7eb",borderRadius:"6px",overflow:"hidden",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[f.jsx("img",{src:b,alt:`Screenshot ${S+1}`,draggable:!1,onContextMenu:X=>X.preventDefault(),style:{width:"100%",height:"100%",objectFit:"cover",cursor:"zoom-in",transition:"transform 0.2s",userSelect:"none",WebkitUserSelect:"none"},onClick:()=>lt(b)}),f.jsx("button",{onClick:()=>zr(S),title:"Xóa ảnh",style:{position:"absolute",top:"2px",right:"2px",background:"rgba(239, 68, 68, 0.9)",color:"white",border:"none",borderRadius:"50%",width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0,boxShadow:"0 1px 2px rgba(0,0,0,0.2)"},children:f.jsx(Qt,{size:10})})]},S))}),f.jsxs("div",{style:{display:"flex",gap:"8px"},children:[f.jsx("input",{type:"file",ref:ri,style:{display:"none"},accept:"image/*",onChange:Fr}),f.jsxs("button",{onClick:()=>ni("full"),style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[f.jsx(Sr,{size:18}),f.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Toàn màn hình"})]}),f.jsxs("button",{onClick:()=>ni("crop"),className:"fb-btn-crop",style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[f.jsx(yr,{size:18}),f.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Chọn vùng"})]}),f.jsxs("button",{onClick:Ar,className:"fb-btn-upload",style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[f.jsx(xr,{size:18}),f.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Chọn ảnh"})]})]})]}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"auto",paddingTop:"8px",borderTop:"1px solid #f3f4f6"},children:[f.jsx("button",{onClick:ut,disabled:ne,style:{padding:"8px 16px",borderRadius:"8px",border:"1px solid #d1d5db",background:"white",cursor:"pointer",color:"#374151",fontWeight:500,fontSize:"0.85rem",transition:"background-color 0.2s"},onMouseEnter:b=>b.currentTarget.style.background="#f9fafb",onMouseLeave:b=>b.currentTarget.style.background="white",children:"Hủy bỏ"}),f.jsx("button",{onClick:Hr,disabled:ne,style:{padding:"8px 16px",borderRadius:"8px",border:"none",background:o,color:"white",cursor:ne?"not-allowed":"pointer",fontWeight:600,fontSize:"0.85rem",opacity:ne?.7:1,boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.1)",transition:"transform 0.1s, opacity 0.2s"},onMouseDown:b=>!ne&&(b.currentTarget.style.transform="scale(0.98)"),onMouseUp:b=>!ne&&(b.currentTarget.style.transform="scale(1)"),children:ne?f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[f.jsx(vr,{size:16,style:{animation:"fb-spin 1s linear infinite"}}),f.jsx("span",{children:"Đang gửi..."})]}):"Gửi báo lỗi"})]})]})]})},Jt=y.createContext(void 0),Ir=()=>{const e=y.useContext(Jt);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e},Tr=({children:e,onSubmit:t,themeColor:i})=>{const[r,o]=y.useState(!1),[s,n]=y.useState(null),[h,p]=y.useState(""),[g,m]=y.useState(void 0),k=(z,T,v)=>{n(z),p(T||""),m(v),o(!0)},I=()=>{o(!1)};return f.jsxs(Jt.Provider,{value:{openFeedback:k,closeFeedback:I,isOpen:r,activeQuestionId:s},children:[e,s&&f.jsx(Kt,{questionId:s,questionIdChild:h,contextData:g,onSubmit:t,themeColor:i,isOpen:r,onClose:I,triggerComponent:f.jsx(f.Fragment,{})})]})};$.FeedbackProvider=Tr,$.FeedbackWidget=Kt,$.useFeedback=Ir,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}));
64
+ `}),ti&&h.jsx(Er,{onConfirm:Lr,onCancel:Dr}),at&&h.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.8)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",cursor:"zoom-out",animation:"fb-fade-in 0.2s ease-out",backdropFilter:"blur(4px)"},onClick:()=>lt(null),children:h.jsx("img",{src:at,alt:"Zoomed",draggable:!1,onContextMenu:b=>b.preventDefault(),style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:"8px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1)",backgroundColor:"white",userSelect:"none",WebkitUserSelect:"none"}})}),h.jsx("div",{onClick:()=>{n===void 0?Pr():f&&f()},style:{cursor:"pointer",display:"inline-block"},children:s||h.jsx("button",{className:"fb-widget-trigger",style:{position:"fixed",bottom:"24px",right:"24px",backgroundColor:o,color:"white",border:"none",borderRadius:"50%",width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",cursor:"pointer",zIndex:9990,transition:"transform 0.2s"},title:"Báo lỗi",onMouseEnter:b=>b.currentTarget.style.transform="scale(1.1)",onMouseLeave:b=>b.currentTarget.style.transform="scale(1)",children:h.jsx(kr,{size:24})})}),Or&&h.jsx("div",{style:{position:"fixed",top:20,right:20,background:"rgba(0,0,0,0.8)",color:"white",padding:"8px 12px",borderRadius:"8px",zIndex:1e4,fontWeight:500,backdropFilter:"blur(4px)",fontSize:"0.8rem"},children:"Đang chụp..."}),_r&&!ti&&!at&&h.jsxs("div",{className:"fb-widget-modal",children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx("h2",{style:{margin:0,fontSize:"1rem",fontWeight:700,color:"#111827"},children:"Báo lỗi"}),h.jsx("button",{onClick:ut,style:{background:"transparent",border:"none",cursor:"pointer",color:"#6b7280",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",transition:"background-color 0.2s"},onMouseEnter:b=>b.currentTarget.style.backgroundColor="#f3f4f6",onMouseLeave:b=>b.currentTarget.style.backgroundColor="transparent",children:h.jsx(Qt,{size:18})})]}),h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[h.jsxs("div",{children:[h.jsxs("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["ID Câu hỏi ",t?"bài đọc":""," ",h.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),h.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",transition:"all 0.2s"},children:[h.jsx(Yt,{size:12,style:{position:"absolute",left:"10px",color:G==="id"?o:P.questionId?"#ef4444":"#9ca3af",transition:"color 0.2s",pointerEvents:"none"}}),h.jsx("input",{type:"text",value:z,onFocus:()=>pe("id"),onBlur:()=>pe(null),onChange:b=>{T(b.target.value),P.questionId&&be(S=>({...S,questionId:void 0}))},disabled:!!e,placeholder:"Nhập ID (ví dụ: 101)",style:{width:"100%",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.questionId?"#ef4444":G==="id"?o:"#e5e7eb"}`,boxShadow:G==="id"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",transition:"all 0.2s",backgroundColor:"#f9fafb"}})]}),P.questionId&&h.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.questionId})]}),t?h.jsxs("div",{children:[h.jsx("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:"ID Câu hỏi"}),h.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",transition:"all 0.2s"},children:[h.jsx(Yt,{size:12,style:{position:"absolute",left:"10px",color:G==="idChild"?o:P.questionIdChild?"#ef4444":"#9ca3af",transition:"color 0.2s",pointerEvents:"none"}}),h.jsx("input",{type:"text",value:v,onFocus:()=>pe("idChild"),onBlur:()=>pe(null),onChange:b=>{O(b.target.value)},placeholder:"Nhập ID (ví dụ: 101)",disabled:!!t,style:{width:"100%",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.questionIdChild?"#ef4444":G==="idChild"?o:"#e5e7eb"}`,boxShadow:G==="idChild"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",transition:"all 0.2s",backgroundColor:"#f9fafb"}})]}),P.questionIdChild&&h.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.questionIdChild})]}):h.jsx(h.Fragment,{}),h.jsxs("div",{children:[h.jsxs("label",{style:{display:"block",marginBottom:"2px",fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["Loại lỗi ",h.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),h.jsxs("select",{value:ii,onChange:b=>$e(b.target.value),style:{width:"100%",padding:"6px 10px",borderRadius:"6px",border:"1px solid #e5e7eb",backgroundColor:"#f9fafb",fontSize:"0.85rem",color:"#1f2937",outline:"none",cursor:"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 10px center",backgroundSize:"14px"},children:[h.jsx("option",{value:"incorrect_content",children:"Lỗi nội dung"}),h.jsx("option",{value:"display_error",children:"Lỗi hiển thị"}),h.jsx("option",{value:"missing_data",children:"Thiếu thông tin"}),h.jsx("option",{value:"technical_issue",children:"Lỗi kỹ thuật"}),h.jsx("option",{value:"other",children:"Khác"})]})]}),h.jsxs("div",{children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"2px"},children:[h.jsxs("label",{style:{fontSize:"0.8rem",fontWeight:600,color:"#374151"},children:["Mô tả lỗi ",h.jsx("span",{style:{color:"#ef4444"},children:"*"})]}),h.jsxs("span",{style:{fontSize:"0.7rem",color:"#9ca3af"},children:[k.length,"/1000"]})]}),h.jsxs("div",{style:{position:"relative"},children:[h.jsx("div",{style:{position:"absolute",left:"10px",top:"8px",pointerEvents:"none"},children:h.jsx(Cr,{size:12,style:{color:G==="desc"?o:P.description?"#ef4444":"#9ca3af",transition:"color 0.2s"}})}),h.jsx("textarea",{value:k,onFocus:()=>pe("desc"),onBlur:()=>pe(null),onChange:b=>{I(b.target.value),P.description&&be(S=>({...S,description:void 0}))},maxLength:1e3,placeholder:"Mô tả chi tiết...",style:{width:"100%",minHeight:"60px",padding:"6px 10px 6px 28px",borderRadius:"6px",border:`1px solid ${P.description?"#ef4444":G==="desc"?o:"#e5e7eb"}`,boxShadow:G==="desc"?`0 0 0 2px ${o}20`:"none",outline:"none",fontSize:"0.85rem",color:"#1f2937",resize:"vertical",boxSizing:"border-box",transition:"all 0.2s",backgroundColor:"#f9fafb",lineHeight:"1.4",fontFamily:"inherit"}})]}),P.description&&h.jsx("span",{style:{display:"block",marginTop:"2px",fontSize:"0.7rem",color:"#ef4444"},children:P.description})]})]}),h.jsxs("div",{style:{marginBottom:"2px"},children:[h.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"6px"},children:h.jsxs("label",{style:{fontWeight:600,fontSize:"0.8rem",color:"#374151"},children:["Ảnh chụp (",j.length,"/3)"]})}),j.length>0&&h.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"6px",marginBottom:"8px"},children:j.map((b,S)=>h.jsxs("div",{style:{position:"relative",aspectRatio:"16/9",border:"1px solid #e5e7eb",borderRadius:"6px",overflow:"hidden",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[h.jsx("img",{src:b,alt:`Screenshot ${S+1}`,draggable:!1,onContextMenu:X=>X.preventDefault(),style:{width:"100%",height:"100%",objectFit:"cover",cursor:"zoom-in",transition:"transform 0.2s",userSelect:"none",WebkitUserSelect:"none"},onClick:()=>lt(b)}),h.jsx("button",{onClick:()=>zr(S),title:"Xóa ảnh",style:{position:"absolute",top:"2px",right:"2px",background:"rgba(239, 68, 68, 0.9)",color:"white",border:"none",borderRadius:"50%",width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0,boxShadow:"0 1px 2px rgba(0,0,0,0.2)"},children:h.jsx(Qt,{size:10})})]},S))}),h.jsxs("div",{style:{display:"flex",gap:"8px"},children:[h.jsx("input",{type:"file",ref:ri,style:{display:"none"},accept:"image/*",onChange:Fr}),h.jsxs("button",{onClick:()=>ni("full"),style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[h.jsx(Sr,{size:18}),h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Toàn màn hình"})]}),h.jsxs("button",{onClick:()=>ni("crop"),className:"fb-btn-crop",style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[h.jsx(yr,{size:18}),h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Chọn vùng"})]}),h.jsxs("button",{onClick:Ar,className:"fb-btn-upload",style:{flex:1,padding:"12px",textAlign:"center",background:"white",border:"1px dashed #d1d5db",borderRadius:"8px",color:"#4b5563",cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",transition:"all 0.2s",minWidth:"60px"},onMouseOver:b=>{b.currentTarget.style.borderColor=o,b.currentTarget.style.color=o,b.currentTarget.style.backgroundColor="#f9fafb"},onMouseOut:b=>{b.currentTarget.style.borderColor="#d1d5db",b.currentTarget.style.color="#4b5563",b.currentTarget.style.backgroundColor="white"},children:[h.jsx(xr,{size:18}),h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:500},children:"Chọn ảnh"})]})]})]}),h.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"auto",paddingTop:"8px",borderTop:"1px solid #f3f4f6"},children:[h.jsx("button",{onClick:ut,disabled:ne,style:{padding:"8px 16px",borderRadius:"8px",border:"1px solid #d1d5db",background:"white",cursor:"pointer",color:"#374151",fontWeight:500,fontSize:"0.85rem",transition:"background-color 0.2s"},onMouseEnter:b=>b.currentTarget.style.background="#f9fafb",onMouseLeave:b=>b.currentTarget.style.background="white",children:"Hủy bỏ"}),h.jsx("button",{onClick:Hr,disabled:ne,style:{padding:"8px 16px",borderRadius:"8px",border:"none",background:o,color:"white",cursor:ne?"not-allowed":"pointer",fontWeight:600,fontSize:"0.85rem",opacity:ne?.7:1,boxShadow:"0 2px 4px -1px rgba(0, 0, 0, 0.1)",transition:"transform 0.1s, opacity 0.2s"},onMouseDown:b=>!ne&&(b.currentTarget.style.transform="scale(0.98)"),onMouseUp:b=>!ne&&(b.currentTarget.style.transform="scale(1)"),children:ne?h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[h.jsx(vr,{size:16,style:{animation:"fb-spin 1s linear infinite"}}),h.jsx("span",{children:"Đang gửi..."})]}):"Gửi báo lỗi"})]})]})]})},Jt=y.createContext(void 0),Ir=()=>{const e=y.useContext(Jt);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e},Tr=({children:e,onSubmit:t,themeColor:i})=>{const[r,o]=y.useState(!1),[s,n]=y.useState(null),[f,p]=y.useState(""),[g,m]=y.useState(void 0),k=(z,T,v)=>{n(z),p(T||""),m(v),o(!0)},I=()=>{o(!1)};return h.jsxs(Jt.Provider,{value:{openFeedback:k,closeFeedback:I,isOpen:r,activeQuestionId:s},children:[e,s&&h.jsx(Kt,{questionId:s,questionIdChild:f,contextData:g,onSubmit:t,themeColor:i,isOpen:r,onClose:I,triggerComponent:h.jsx(h.Fragment,{})})]})};$.FeedbackProvider=Tr,$.FeedbackWidget=Kt,$.useFeedback=Ir,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hocmai-feedback-widget",
3
3
  "private": false,
4
- "version": "0.1.7",
4
+ "version": "0.1.8",
5
5
  "type": "module",
6
6
  "main": "./dist/support-feedback-lib.umd.js",
7
7
  "module": "./dist/support-feedback-lib.es.js",